GEOS-ESM / GEOSgcm_GridComp

Repository containing the physics and IAU code for the GEOS Earth System Model
Apache License 2.0
9 stars 7 forks source link

bug fix: remove double-counting of heat corr (StieglitzSnow.F90) #946

Open gmao-rreichle opened 1 month ago

gmao-rreichle commented 1 month ago

In the rare circumstance when more snow would need to be sublimated than is available in the top layer, the residual energy accounting term was added twice, once here (in the changed line) and again ~30 lines further down.

This is a bug. It was discovered during the review of the land energy budget for M21C.

The fix is 0-diff in all standard GCM and LDAS tests. It remains unclear if the condition ever happens. If it does, it is so rare that it is not captured in the tests.

cc: @rdkoster

gmao-rreichle commented 2 weeks ago

The change is 0-diff for restarts and diagnostics in the full suite of GEOSldas nightly tests run by @gmao-rreichle on 17 Jun 2024. This means that the condition indeed happens very rarely, if ever.

The next step is to run the GEOSgcm tests once @biljanaorescanin is back in the office.

cc: @elakkraoui @rdkoster @lcandre2

biljanaorescanin commented 2 weeks ago

I am getting zero diff for all GCM testing. 1 day AMIP, REPLAY and INC REPLAY are all zero diff branch vs stock ( develop GEOSgcm_GridComp). The regression test is a success as well.