Repository navigation
Conversation
…name "runoff" export (GEOS_LakeGridComp.F90)
…Surface for averaging with land and landice runoff) (GEOS_LakeGridComp.F90)
|
Thanks, @gmao-qliu, for putting this together! I made a few changes, consisting primarily of slightly changing/renaming the budget terms. I also added the exports into Surface, so they become available for GCM runs. |
|
Rolf,
I see you renamed runoff, precip and sno as WNETFLUXLAKE, PRLAKE and SNOLAKE. Other export variables don't have 'LAKE' in the name. I'd like to confirm that you prefer to keep 'LAKE' there?
…-Qing
________________________________
From: Rolf Reichle ***@***.***>
Sent: Friday, October 23, 2026 4:31 PM
To: GEOS-ESM/GEOSgcm_GridComp ***@***.***>
Cc: Liu, Qing (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC] ***@***.***>; Mention ***@***.***>
Subject: [EXTERNAL] [BULK] Re: [GEOS-ESM/GEOSgcm_GridComp] Add lake-specific exports to support Lake budget closure (PR #1553)
CAUTION: This email originated from outside of NASA. Please take care when clicking links or opening attachments. Use the "Report Message" button to report suspicious messages to the NASA SOC.
[https://avatars.githubusercontent.com/u/54944691?s=20&v=4]gmao-rreichle left a comment (GEOS-ESM/GEOSgcm_GridComp#1553)<#1553 (comment)>
Thanks, @gmao-qliu<https://github.com/gmao-qliu>, for putting this together! I made a few changes, consisting primarily of slightly changing/renaming the budget terms. I also added the exports into Surface, so they become available for GCM runs.
PRLAKE and SNOLAKE are meant to mirror PRLAND and SNOLAND from Catch.
Rather than use RUNOFF for the lake water budget, I added the same diagnostic with a different name that is (i) less confusing and (ii) does not interfere with the "runoff" diagnostic in Surface GC (which is averaged across land, landice, and lake).
Please take a look and let me know if you find anything wrong with my commits.
—
Reply to this email directly, view it on GitHub<#1553?email_source=notifications&email_token=AMWXGO7UVP6EKWHJNOP5Q4D5VO5YRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZXGQYTENZWGQ4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6374127648>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMWXGO4GKBZM4IDCASL66ND5VO5YRAVCNFSNUABFKJSXA33TNF2G64TZHMYTSNJUGE2DGNRSHNEXG43VMU5TKOJZHA2DAMZXGM42C5QC>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/AMWXGO52ZNKP2BC6IESGSUD5VO5YRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZXGQYTENZWGQ4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y> and Android<https://github.com/notifications/mobile/android/AMWXGOZBEJIVNPFBRQXXU2D5VO5YRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZXGQYTENZWGQ4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Including "LAKE" in the name is intentional. Without giving the export a lake-specific name, Surface will average over the same-name quantities from tile of other surface types (i.e., land and landice). E.g., to get just land precipitation from Catch, we have an export called "PRLAND". |
|
@gmao-qliu : One more thing: In the intro comment, I changed the fusion heat term in the balance equation to the following:
Before it was
which seemed wrong. Was this a typo in the original comment, or am I missing something? |
The original should be correct because the snow fusion heat term applies only to the water subtile (1-FRLAKEICE). |
Thanks, I see now. This is for snow falling on the unfrozen lake portion! I restored the original equation in the comment. |
* add issm mass budget terms * fix pointer assoc checks * remove commented out line * update description comment --------- Co-authored-by: agstub <aaron.g.stubblefield@dartmouth.edu>
gmao-rreichle
left a comment
There was a problem hiding this comment.
@agstub : Thanks for adding the ISSM balance variables. Can you please write down the balances explicitly somewhere, perhaps in the ISSM GridComp file somewhere, using the variable names of the exports (or internals)
| ! Exports: ICESURF, ICETHICK, ICEVEL (defined on landice tiles) [via private internal state] | ||
| ! Internals: ICESURF, ICETHICK, IMLS, OMLS, ISSM_NSTEPS (defined on mesh) [true internal state] | ||
| ! Imports: ICESMB (defined on landice tiles) [via private internal state] | ||
| ! Exports: ICESURF, ICETHICK, ICEVX, ICEVY, DHDT, DIVQ, ICESMB_ISSM (defined on mesh) [true export state] |
There was a problem hiding this comment.
This is probably more a question for the SI team (@weiyuan-jiang)... Why do we have these 7 "exports" here, which seem to duplicate the eponymous "internals"? I thought "internals" can also function as "exports" in MAPL. If that's the case, the code could be much simplified, and we wouldn't need separate variables for _EX and _IN. Although I'm not sure what happens in Lines ~826-862, where some (but not all!) exports are keyed to "HALO" variables (but with the HALO points not owned by the processor excluded).
Put differently, I don't understand why we would need an export for, say, ICESURF when ICESURF is also an internal.
There was a problem hiding this comment.
"I thought "internals" can also function as "exports" in MAPL."
I did not realize that. Yes that would simplify everything and there is not a need for the separate variables if that's the case. I will test tomorrow. Looking at other grid comps, I'm wondering if we need to add ADD2EXPORT = .true. in the MAPL_AddInternalSpec calls.
There was a problem hiding this comment.
Ok, thanks. I don't know about ADD2EXPORT=.true.. Maybe wait until we get input from @weiyuan-jiang next week. This cleanup, if it makes sense, isn't urgent and could be done in a follow-up PR.
There was a problem hiding this comment.
Use this as an example
so you don't need to specify the exportUpdated comments at the top of ISSM GridComp file to clarify how the ISSM mass balance equation relates to exports
…for readability (GEOS_LandIceGridComp.F90)
… call (GEOS_LandIceGridComp.F90, GEOS_SurfaceGridComp.F90)
…(GEOS_LandIceGridComp.F90, GEOS_SurfaceGridComp.F90)
…ceGridComp.F90, GEOS_ISSMGridComp.F90)
gmao-rreichle
left a comment
There was a problem hiding this comment.
@lcandre2 , @agstub : I pushed a few commits on this PR and its GEOSldas GC companion (GEOS-ESM/GEOSldas_GridComp#236), in an attempt to unify the variable names across the GridComp and fix what I think might be errors. Please review the commits and the comments below, thanks
| if(associated(DHGLC)) then | ||
| DHGLC = 0.0 | ||
| do L=1,NUM_SNOW_LAYERS | ||
| DHGLC = DHGLC - HTSN(:,L) |
There was a problem hiding this comment.
Why add the minus sign when summing up HTSN? By GEOS convention, heat content is zero at 0 deg C. Catch adds HTSN to calculate total energy
| DHGLC = DHGLC - HTSN(:,L) | ||
| enddo | ||
| do L=1,NUM_ICE_LAYERS | ||
| DHGLC = DHGLC - FR(:,ICE)*MAPL_CAPICE*RHOICE*DZMAXI(L)*(TICE(:,ICE,L)-MAPL_TICE) |
There was a problem hiding this comment.
Not sure I understand this correctly, but it looks like only the energy of the "bare" (not snow-covered) ice sheet layers is computed. Is there no exchange of energy between the bottom snow layer and the top layer of the ice sheet? I expected another term here that adds in the heat content of ice layers under the snowpack.
There was a problem hiding this comment.
So, the way I read/wrote this and the above do loop is that first it loops through and sums (well accidentally subtracts) the heat content in the snow layers -- HTSN) then proceeds to move to the ice layers and sums (accidentally subtracts) the heat content in the ice layers (messy equation). But, this is where my fortran is not great. So, I am most definitely open to improvements/other suggestions. Also, because HTSN is coming from snowrt, I think that it has already been weighted by snow fraction, but need to confirm.
There was a problem hiding this comment.
There's nothing wrong with the Fortran per se. I think it's just not adding up all of the energy in the system. Here's what I would expect (incl. the change in sign):
DHGLC = 0.0
do L=1,NUM_SNOW_LAYERS
DHGLC = DHGLC + HTSN(:,L) ! heat content of snowpack
enddo
do L=1,NUM_ICE_LAYERS
DHGLC = DHGLC + FR(:,ICE) *MAPL_CAPICE*RHOICE*DZMAXI(L)*(TICE(:,ICE, L)-MAPL_TICE) ! heat content of ice under bare conditions
DHGLC = DHGLC + FR(:,SNOW)*MAPL_CAPICE*RHOICE*DZMAXI(L)*(TICE(:,SNOW,L)-MAPL_TICE) ! heat content of ice under snowpack
enddo
In a nutshell, I think we're missing the heat content of the ice under the snowpack, which is in the added line. My understanding is that TICE(:,ICE) is the ice temp in the bare ice fraction and TICE(:,SNOW) is the ice temperature under the snowpack. Maybe I'm getting this all wrong?
There was a problem hiding this comment.
Ah....I see what you mean. I actually don't know and the only way I can think to find out is to run a couple short experiments, so I will.
| call MAPL_AddExportSpec(GC, & | ||
| LONG_NAME = 'snowfall_on_glaciated_surface' ,& | ||
| UNITS = 'kg m-2 s-1' ,& | ||
| SHORT_NAME = 'SNOGLC' ,& |
There was a problem hiding this comment.
This isn't relevant for M21C-Land, but Landice doesn't seem to have the new precipitation types (such as icefall) that Bill put into the model and will presumably want to turn on soon. We tweaked Catch to accept "ICE" (icefall) and add it to "SNO" (snowfall) for a total solid precipitation variable (SLDTOT). The outputs from Catch still say "SNO" is snowfall, but it would include icefall if ICE is non-zero in future version.
There was a problem hiding this comment.
Ah good catch, I'll start an issue for this -- should lake also be included?
gmao-rreichle
left a comment
There was a problem hiding this comment.
see below for a couple of quick answers
Update LONG_NAME for ice sheet velocity components, specifying local Cartesian coordinate system
* icesmb to iceequivsmb name changes * change DHDT and DIVQ names to be more specific * change glc suffix to ice prefix --------- Co-authored-by: agstub <aaron.g.stubblefield@dartmouth.edu>
specify "equivalent" surface mass balance
Adds exports needed to close the water and energy budgets for Lake, Landice, and ISSM.
Lake:
Water balance: 0 = PRLAKE - EVAP - WNETFLUXLAKE
Energy balance: DHLAKE = LWND + SWND - SH - LH - MAPL_ALHF * (1. - FRLAKEICE) * PRECSNOLAKE
Landice:
Water balance:
Snowpack:
DSNOMASGLC = ASNOWGLC x PRECTOTGLC - EVAPSNOWGLC – SMELT – WESNEXT – WESNDENS
Glacier (incl. snowpack):
0 [or DSNOWMASGLC???] = ICESMBGLC – WESNEXT – WESNDENS (needs add'l closure term b/c glacier volume assumed constant?) (probably wrong)
better guess:
DSNOWMASGLC = ICESMBGLC + SPEVAPBAREICE + SPRUNOFFBAREICE [ best guess right now, spurious (SP) terms to balance evap from bare ice and runoff from bare ice]
where
ICESMBGLC = PRECTOTGLC - EVAPGLC - RUNOFFGLC
Energy balance:
ECHANGEGLC = LWNDGLC +SWNDGLC - SHGLC - LHGLC
+(-?) MAPL_ALHFRUNOFFGLC (probably not needed here, already included in Landice GC physics)
+(-?) MAPL_ALHF(PRECTOTGLC-PRECSNOGLC) (probably not needed here, already included in Landice GC physics)
+ HCORRFROMSTIEGLITZ (need to export from LandiceGC)
ECHANGEGLCSRF = LWNDGLC +SWNDGLC + SHGLC + LHGLC + GHTFLUXGLC
EGLC = htsn + FR(:,ICE)*TICE(1,ICE)*CP + FR(:,SNOW)*TICE(1,SNOW)*CP
EGLCSRF = htsn_top_layer + FR(:,ICE)*TICE(1,ICE)*CP
GHTFLUXGLC may need different SHORT/LONG NAME attributes
ISSM:
Testing:
Initially tested with a 1-year GEOSldas offline simulation, and the annual energy and budgets based on lat/lon output are close to zero.
Balance computed from hourly averages:

Balance computed from daily averages (approximates fusion-heat term, where average of product is different from product of averages ):

