Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/excess ice cold start #2465

Merged
merged 31 commits into from
Aug 2, 2024
Merged

Conversation

mvdebolskiy
Copy link
Contributor

@mvdebolskiy mvdebolskiy commented Apr 11, 2024

Description of changes

Changed the way soil temperature is initialized when excess ice is on and the model starts from cold.

Specific notes

Added 2 parameters: excess_ice_coldstart_depth and excess_ice_coldstart_temp which control top depth and soil temperature for soil layers in columns where excess ice is present. Other columns get their default soil temperature.

excessicestream_type has been taken out of waterstate_type and its routines are called directly in clm_inst%Init. Checks for UseExcessIceStreams() are still in place in WaterStateType.F90 for double-checking.

Contributors other than yourself, if any:

CTSM Issues Fixed (include github issue #):

Fixes #2384
Fixes #2373

Are answers expected to change (and if so in what way)?

Yes. Anything that depends on deep soil temperature will be different.

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

Two namelist variables are added to clm_inparm group: excess_ice_coldstart_depth and excess_ice_coldstart_temp . Their default values are 0.5m and -2.15 deg C.

Testing performed, if any: Ran aux_clm on Derecho some tests on izumi

bld/CLMBuildNamelist.pm Outdated Show resolved Hide resolved
@mvdebolskiy
Copy link
Contributor Author

Also #2444 might be related

@wwieder wwieder added this to the CESM Capability Freeze milestone May 23, 2024
@mvdebolskiy
Copy link
Contributor Author

Here are results from I2000Clm60BgcCrop simulations from coldstart:
Given that the forcing gets stuck at 2015 for the rest of the run, it seems reasonable, though the initial temperatures can be lowered a little.

exice2000
tsoi2000
exice2100
tsoi2100

@mvdebolskiy
Copy link
Contributor Author

mvdebolskiy commented Jul 16, 2024

  • add readNamelist subroutine into TemperatureMod and get rid of global clm_varctl declarations.
  • Add endrun to WaterState, so the model stops if there is excess ice on the restart file but the use_excess_ice is set to false.

Copy link
Collaborator

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for going over the code with me @mvdebolskiy. Good to see this come in so that we can turn excess-ice on by default for clm6_0 physics. And to have default finidat datasets that have spunup excess-ice in them.

I ask for some changes, some of which we already talked about. And some that probably just appear here:

  • The changes you already talked about...
  • Figure out a name for the new namelist that will be in TemperatureType
  • Add a ReadNML subroutine to TemperatureType, with the new namelist variables in it.
  • Make sure PF unit tests work (do what the README file in the "src" directory says on Derecho
  • Check the values of the new namelist items to make sure they are valid
  • Think about changing the name of exice_init_stream_col
  • There's a couple formatting and documentation suggestions I have

These should all be reasonable. Let me know if you'd like to meet to go over how to add the new namelist in. But, there are lots of examples so that should be straightforward to do.

bld/CLMBuildNamelist.pm Outdated Show resolved Hide resolved
src/biogeophys/TemperatureType.F90 Outdated Show resolved Hide resolved
bld/CLMBuildNamelist.pm Outdated Show resolved Hide resolved
bld/CLMBuildNamelist.pm Outdated Show resolved Hide resolved
src/main/clm_varctl.F90 Outdated Show resolved Hide resolved
src/biogeophys/TemperatureType.F90 Show resolved Hide resolved
src/biogeophys/TemperatureType.F90 Show resolved Hide resolved
src/biogeophys/WaterType.F90 Outdated Show resolved Hide resolved
src/main/controlMod.F90 Outdated Show resolved Hide resolved
@ekluzek
Copy link
Collaborator

ekluzek commented Jul 16, 2024

@mvdebolskiy and I talked about the procedure to bring this in. He's not up to making tags himself at this point. So I'll work with him on it. Right now he's going to run some excess ice tests on Derecho to make sure it's working correctly. Then I'll run aux_clm tests for Derecho and Izumi and point him to issues to fix.

This does change answers. But, we actually could make it bit-for-bit by setting the new namelist values appropriately. So that should be something we think about.

I do want to teach him to run aux_clm and create baselines on Derecho. But, we'll take that one step at a time...

@mvdebolskiy
Copy link
Contributor Author

mvdebolskiy commented Jul 23, 2024

  • Figure out a name for the new namelist that will be in TemperatureType

Added clm_temperature_inparm group (for future handling of other coldstart temperature vars)

  • Add a ReadNML subroutine to TemperatureType, with the new namelist variables in it.

Added. Made NLFilename to be optional for unittests to be happy.

  • Make sure PF unit tests work (do what the README file in the "src" directory says on Derecho

Ran ../cime/scripts/fortran_unit_testing/run_tests.py --build-dir unit_tests.temp : 100% tests passed, 0 tests failed out of 52

  • Check the values of the new namelist items to make sure they are valid

Checked both in CLMBuildNamelist.pm and in TemperatureType%InitCold

  • Think about changing the name of exice_init_stream_col

Changed to excie_init_conc_col

Added a warning (instead of endrun) when starting with use_excess_ice=.false. from initial conditions that have it.
Note, simple flag=read would not work, since there is a call with write and define before (for init_interp) purposes, though the RestartExcessIceIssue helped.

New baseline on izumi: /home/mvdebolskiy/bl/fix-excess-ice/ERS_D.f10_f10_mg37.I1850Clm60Sp.izumi_nag.clm-ExcessIceStreams

@ekluzek ekluzek added enhancement new capability or improved behavior of existing capability tag: enh - new science labels Jul 29, 2024
@ekluzek
Copy link
Collaborator

ekluzek commented Jul 30, 2024

@mvdebolskiy I'm planning on doing the following things to finish out the tag. Just FYI, unless you want to comment or contribute:

  • Add some build-namelist unit tests for the new excess ice error conditions
  • Make sure the build-namelist changes are solid, if not and easy go ahead and fix, otherwise file an issue
  • Make sure we have the needed tests on Derecho for excess ice, if not add one
  • Update to ctsm5.2.017
  • Close all the conversations
  • Take a stab at creating the ChangeLog for ctsm5.2.018 (have @mvdebolskiy review and vet)
  • Run baselines for Derecho and Izumi for ctsm5.2.018
  • Finalize the tag as normal

If any problems crop up, I'll consult with you and get a fix in and/or file an issue to fix later.

@ekluzek ekluzek self-assigned this Jul 30, 2024
Dust emissions control moved to cmeps

Remove the dust emissions namelist items from CTSM and use the namelist in the drv_flds_in for CMEPS.

This updates CTSM to use the namelist control in CMEPS (in ESCOMP/CMEPS#429). So the CMEPS external needs to be updated, and the
namelist control in CTSM changed to use CMEPS rather than the internal CTSM control settings and the CTSM ones removed.

The new XML variable:

   LND_SETS_DUST_EMIS_DRV_FLDS

controls whether dust emission settings are set by CTSM or by CAM. Only one or the other can set them, and it's required so when CAM
and CTSM are running together they need to know which one will select.

This required some changes for LILAC. The drv_flds_in namelist file is now required for LILAC, and read for dust emissions
(and dust emissions only) at the LILAC lnd_comp_esmf.F90 level.

Add a unit test for the CMEPS code to make sure it's working correctly. This validates the code both for CAM and CTSM.

Fix the cidinahoBR test in the build-namelist unit tester.

 Conflicts:
	bld/unit_testers/build-namelist_test.pl
	src/biogeophys/TemperatureType.F90
doc/ChangeLog Outdated Show resolved Hide resolved
@ekluzek
Copy link
Collaborator

ekluzek commented Aug 1, 2024

Baselines look as expected on Derecho and Izumi. Izumi shows differences for ERS_D.f10_f10_mg37.I1850Clm60Sp.izumi_nag.clm-ExcessIceStreams that are significant, and this is without a cold-start. Which we think shouldn't show differences. So we are investigating.

I'll also run SMS_Lm12.f09_f09_mg17.I1850Clm60Sp.derecho_intel.clm-ExcessIceStartup_output_sp_exice on Derecho, creating a baseline for ctsm5.2.017 to check what happens there.

@ekluzek ekluzek merged commit 33daaf8 into ESCOMP:master Aug 2, 2024
2 checks passed
@ekluzek ekluzek deleted the fix/excess-ice-cold-start branch August 2, 2024 15:28
@samsrabin samsrabin added the science Enhancement to or bug impacting science label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new capability or improved behavior of existing capability science Enhancement to or bug impacting science
Projects
Status: Done (non release/external)
Status: Done
4 participants