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

exports and LONG_NAMES for land water and energy balances #957

Open gmao-rreichle opened 1 week ago

gmao-rreichle commented 1 week ago

This PR is an attempt to clarify and clean up the various "accounting" and "spurious" flux terms that are needed to reconcile what Catchment calculates and what the atmospheric turbulence expects (based on its linearization). The PR is motivated by the (urgent) work on M21C file specs and balance equations. Ultimately, the changes need to be merged into both the "develop" and "R21C" branches.

For now, the additional "SPLH" export and the revisions of the LONG_NAMES of the spurious terms were only implemented in Catchment. (CatchmentCN will be addressed when changes have been verified for Catchment.)

The PR is expected to be 0-diff for restarts. In AGCM simulations, the EVP[*] diagnostics in the "lnd" collections are expected to change (bug fix). In offline (land-only) simulations, the LHLAND and EVP[*] diagnostics may have roundoff differences.

See documents below for additional information.

See also https://github.com/GEOS-ESM/GEOSgcm_App/pull/621

RR notes on spurious and accounting terms (LINK CORRECTED ON 4 JULY 2024!): SP_and_ACC_src_code_20240628.pdf

RR slides on land energy and water balances: M21C_land_budgets_20240611_edited_13Jun.pdf M21C_land_budgets_20240628.pdf

gmao-rreichle commented 2 days ago

@rdkoster, @biljanaorescanin:

I started looking into Biljana's latest 1-day AMIP simulations using the "develop" branch ("stock") and this PR's branch ("exp"). I didn't quite see what I was expecting before I ran out of time.

However, it looks like the apportioning of the EVACC term in GEOS_CatchGridComp.F90 when running in coupled land-atm (GCM) mode has two errors. The first error was that the EVACC correction was only applied for SUMEVP>0, which should already fixed in the branch. The second error seems to be a confusion of units. For example, in the following equation:

EVPICE = EVPICE - EVACC*EVPICE/SUMEV

EVPICE and SUMEV are in W/m2 and EVACC is in kg/m2/s. It looks like a units conversion with L_s (latent heat of sublimation, MAPL_ALHS) is missing. Similarly, the next three equations are missing a units conversion with L_v (latent heat of vaporization, MAPL_ALHL). In the current code, the correction is therefore essentially ignored (besides being only applied for evaporation but not for dewfall) and the EVP[*] output becomes inconsistent with the EVAP and LHLAND variables.

The error might have been prevented if the code included clear documentation of the units of the inputs and outputs of catchment(). This information is sorely needed to make the code understandable to future investigators.

If the above makes any sense, please modify the branch accordingly and re-run the 1-day AMIP experiments.

@biljanaorescanin: To be safe, it would be best to switch to a restart date in mid-February. We tend to have the biggest problems with the snow terms, and the snow-covered land area is larger in Feb than in Apr, so any issues with snow will be easier to detect.

gmao-rreichle commented 13 hours ago

Thanks, @biljanaorescanin, for making the proposed changes and running another day in Feb.

For this PR's branch at https://github.com/GEOS-ESM/GEOSgcm_GridComp/pull/957/commits/d95a4a19df209faadf9a1bcee76b66cd9944ef3d, the following energy balance:

ECHANGE = SWLAND + LWLAND - SHLAND 
          - LHLAND 
          - Lf*PRECSNO - SPLAND - SPSNOW - SPLH

closes within +/- 0.2 W/m2 for all grid cells, with a std-dev across all grid cells of ~0.02 W/m2.
Moreover, we now have

EVLAND = (EVPINTR + EVPSOIL + EVPTRNS)/Lv + EVPSBLN/Ls

to within 1e-5 mm/d. Alas, we still only have

LHLAND = EVPINTR + EVPSBLN + EVPSOIL + EVPTRNS

to within +/- 2 W/m2. The mismatch seems to occur only when FRSNOW>0, but I'm not sure. This requires more investigation.

For reference, in "develop" the following energy balance:

ECHANGE = SWLAND + LWLAND - SHLAND 
          - EVPINTR - EVPSBLN - EVPSOIL - EVPTRNS
          - Lf*PRECSNO - SPLAND - SPSNOW 

is equivalent to the branch's balance above (i.e., closes to within +/- 0.2 W/m2 for all grid cells, with a std-dev across all grid cells of ~0.02 W/m2).

However, for "develop":

EVLAND = (EVPINTR + EVPSOIL + EVPTRNS)/Lv + EVPSBLN/Ls

does not match (deviates up to 10 mm/d) and

LHLAND = EVPINTR + EVPSBLN + EVPSOIL + EVPTRNS

does not match (deviates up to 400 W/m2).

cc: @rdkoster