ESCOMP / CMEPS

NUOPC Community Mediator for Earth Prediction Systems
https://escomp.github.io/CMEPS/
24 stars 79 forks source link

Run MED -> GLC in CISM NOEVOLVE mode #442

Closed billsacks closed 7 months ago

billsacks commented 8 months ago

Description of changes

Previously we hadn't been doing the mapping from MED -> GLC when CISM was running in NOEVOLVE mode. This was a problem because this downscaled SMB is one of the main benefits of running CISM in NOEVOLVE mode.

Resolves ESCOMP/CMEPS#426. See that issue for details.

Specific notes

Contributors other than yourself, if any: Consultation with @mvertens

CMEPS Issues Fixed (include github issue #): #426

Are changes expected to change answers? Changes answers for some cpl hist fields (diagnostic only) in configurations with CISM in NOEVOLVE mode. Otherwise bit-for-bit.

Any User Interface Changes (namelist or namelist defaults changes)? No

Diffs in runseq

I have verified that the run sequence is the same as before for cases with CISM in EVOLVE mode, as well as for cases with sglc or xglc. Differences just appear in cases with CISM in NOEVOLVE mode.

T compset NOEVOLVE

These are the diffs for ERS_D_Ly3.f09_g17_gris4.T1850Gg.green_gnu.cism-noevolve:

--- ERS_D_Ly3.f09_g17_gris4.T1850Gg.green_gnu.cism-noevolve.20240320_165142_7a4g4j/CaseDocs/nuopc.runseq    2024-03-20 16:54:53
+++ ERS_D_Ly3.f09_g17_gris4.T1850Gg.green_gnu.cism-noevolve.20240320_165220_owwtn2/CaseDocs/nuopc.runseq    2024-03-20 16:53:06
@@ -3,6 +3,8 @@
   LND
   LND -> MED :remapMethod=redist
   MED med_phases_post_lnd
+  MED med_phases_prep_glc
+  MED -> GLC :remapMethod=redist
   GLC -> MED :remapMethod=redist
   MED med_phases_history_write
   MED med_phases_history_write

I compset NOEVOLVE

These are the diffs for SMS_Lm13.f10_f10_mg37.I1850Clm50SpG.green_gnu.cism-noevolve:

--- SMS_Lm13.f10_f10_mg37.I1850Clm50SpG.green_gnu.cism-noevolve.20240320_165200_idgr5p/CaseDocs/nuopc.runseq    2024-03-20 16:55:01
+++ SMS_Lm13.f10_f10_mg37.I1850Clm50SpG.green_gnu.cism-noevolve.20240320_165228_o0jlbq/CaseDocs/nuopc.runseq    2024-03-20 16:53:12
@@ -16,10 +16,12 @@
   ROF
   ROF -> MED :remapMethod=redist
   MED med_phases_post_rof
+@
+  MED med_phases_prep_glc
+  MED -> GLC :remapMethod=redist
+  GLC -> MED :remapMethod=redist
   MED med_phases_history_write
   MED med_phases_restart_write
   MED med_phases_profile
 @
-  GLC -> MED :remapMethod=redist
-@
 ::

Note that, in addition to adding MED med_phases_prep_glc and MED -> GLC :remapMethod=redist at daily frequency, this also changes MED med_phases_history_write, MED med_phases_restart_write and MED med_phases_profile to be done in the outer (86400) loop rather than the 10800 loop. This is because I have removed the setting of the active flag in the relevant call to runseq.enter_time_loop. This is an intentional change: my intuition is that it's right to only call these things daily in this case, since the med2glc fields will likely be wrong if history / restart is at a frequency other than daily. But I think this will restrict us to restarting a CISM NOEVOLVE case no more frequently than daily (as is also the case for a CISM EVOLVE case), and I'm not sure if this change might have some other negative implications that I'm not thinking of / aware of. We could change this back if people feel it would be better to leave it as it was before. (This could be changed back by restoring the active flag but now setting active=run_glc.)

Testing performed

Tested in the context of CISM-wrapper on ESCOMP/CISM-wrapper@feaf293 (on the branch in this PR: https://github.com/ESCOMP/CISM-wrapper/pull/86). I ran the full aux_glc test suite on derecho (intel & gnu) with comparisons against baseline. Failures were as expected:

    FAIL ERS_D_Ly3.f09_g17_gris4.T1850Gg.derecho_intel.cism-noevolve NLCOMP
    FAIL ERS_D_Ly3.f09_g17_gris4.T1850Gg.derecho_intel.cism-noevolve BASELINE /glade/derecho/scratch/sacks/aux_glc_240301164745/baselines: DIFF
    FAIL NCK_Ly3.f09_g17_gris20.T1850Gg.derecho_gnu COMPARE_base_multiinst
    FAIL SMS_Lm13.f10_f10_mg37.I1850Clm50SpG.derecho_intel.cism-noevolve NLCOMP
    FAIL SMS_Lm13.f10_f10_mg37.I1850Clm50SpG.derecho_intel.cism-noevolve BASELINE /glade/derecho/scratch/sacks/aux_glc_240301164745/baselines: DIFF

(The NCK test fails on master, too.) I confirmed that the diffs are as expected.

Note that, for this testing, I cherry-picked the changes on this CMEPS branch onto cmeps0.14.43, which is the version currently used in CISM-wrapper master.

billsacks commented 7 months ago

Per @jedwards4b email, we'll wait to merge this until after #446 is merged, because we want #446 in alpha17d and want this PR in alpha17e (coordinated with https://github.com/ESCOMP/CISM-wrapper/pull/86).

billsacks commented 7 months ago

For future reference: it looks like this got merged to main as part of https://github.com/ESCOMP/CMEPS/pull/445