Hello, one small observation in outgoingLongwave_calc in ground_surface.py, independent of the physics.
# Copy of the sunlit wall grid and replacement of the wall height with 1 if sunlit
sunlitwall = sunwall
sunlitwall[sunlitwall > 0] = 1
The comment says copy, but no copy is made, so the caller's wallsun grid (wall heights on sunlit walls) is overwritten with a 0/1 mask. In Solweig_2026a_calc this is currently harmless because the shadowing function regenerates wallsun each timestep and nothing reads it after this call. It would only bite a future consumer of wallsun downstream (POI output, the wall surface temperature scheme, diagnostics), which is why it seems worth mentioning now rather than after it becomes load-bearing.
If the in-place write is not intended, sunlitwall = np.where(sunwall > 0, 1.0, sunwall) or an explicit sunwall.copy() would match the comment. Happy to submit a one-line PR if you agree.
Hello, one small observation in
outgoingLongwave_calcinground_surface.py, independent of the physics.The comment says copy, but no copy is made, so the caller's
wallsungrid (wall heights on sunlit walls) is overwritten with a 0/1 mask. InSolweig_2026a_calcthis is currently harmless because the shadowing function regenerateswallsuneach timestep and nothing reads it after this call. It would only bite a future consumer ofwallsundownstream (POI output, the wall surface temperature scheme, diagnostics), which is why it seems worth mentioning now rather than after it becomes load-bearing.If the in-place write is not intended,
sunlitwall = np.where(sunwall > 0, 1.0, sunwall)or an explicitsunwall.copy()would match the comment. Happy to submit a one-line PR if you agree.