ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
295 stars 299 forks source link

Remove use_dynroot from clm codes and testing #2451

Open slevis-lmwg opened 3 months ago

slevis-lmwg commented 3 months ago

From a meeting with @ekluzek @wwieder @slevis-lmwg

We can plan on removing use_dynroot from the code and from the test suites.

In ctsm5.1.dev175 git grep dynroot | grep -v ChangeLog returns

bld/CLMBuildNamelist.pm:  add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_dynroot', 'phys'=>$physv->as_string(), 'bgc_mode'=>$nl_flags->{'bgc_mode'});
bld/CLMBuildNamelist.pm:  my $use_dynroot = $nl->get_value('use_dynroot');
bld/CLMBuildNamelist.pm:  if ( &value_is_true($use_dynroot) && ($nl_flags->{'bgc_mode'} eq "sp") ) {
bld/CLMBuildNamelist.pm:     $log->fatal_error("Cannot turn dynroot mode on mode bgc=sp\n" .
bld/CLMBuildNamelist.pm:  if ( &value_is_true( $use_dynroot ) && &value_is_true( $nl_flags->{'use_hydrstress'} ) ) {
bld/CLMBuildNamelist.pm:     $log->fatal_error("Cannot turn use_dynroot on when use_hydrstress is on" );
bld/namelist_files/namelist_defaults_ctsm.xml:<use_dynroot phys="clm4_5"                  >.false.</use_dynroot>
bld/namelist_files/namelist_defaults_ctsm.xml:<use_dynroot phys="clm5_0"  bgc_mode="sp"   >.false.</use_dynroot>
bld/namelist_files/namelist_defaults_ctsm.xml:<use_dynroot phys="clm5_0"  bgc_mode="cn"   >.false.</use_dynroot>
bld/namelist_files/namelist_defaults_ctsm.xml:<use_dynroot phys="clm5_0"  bgc_mode="fates">.false.</use_dynroot>
bld/namelist_files/namelist_defaults_ctsm.xml:<use_dynroot phys="clm5_0"  bgc_mode="bgc"  >.false.</use_dynroot>
bld/namelist_files/namelist_defaults_ctsm.xml:<use_dynroot phys="clm5_1"                  >.false.</use_dynroot>
bld/namelist_files/namelist_definition_ctsm.xml:<entry id="use_dynroot" type="logical" category="physics"
bld/unit_testers/build-namelist_test.pl:     "useHYDSTwithdynroot"       =>{ options=>"-bgc bgc -envxml_dir . -megan",
bld/unit_testers/build-namelist_test.pl:                                     namelst=>"use_hydrstress=.true., use_dynroot=.true.",
cime_config/testdefs/testlist_clm.xml:  <test name="ERS_D_Ld3" grid="f10_f10_mg37" compset="I1850Clm50BgcCrop" testmods="clm/clm50dynroots">
cime_config/testdefs/testlist_clm.xml:  <test name="SMS_Ly3_Mmpi-serial" grid="1x1_numaIA" compset="I2000Clm50BgcCropQianRs" testmods="clm/clm50dynroots">
cime_config/testdefs/testmods_dirs/clm/clm50dynroots/user_nl_clm:use_dynroot = .true.
src/biogeochem/CNDriverMod.F90:  use clm_varctl                      , only : use_c13, use_c14, use_fates,  use_fates_bgc, use_dynroot
src/biogeochem/CNDriverMod.F90:    if( use_dynroot ) then
src/biogeophys/SoilStateType.F90:  use clm_varctl      , only : use_hydrstress, use_cn, use_lch4, use_dynroot, use_fates
src/biogeophys/SoilStateType.F90:    if (use_dynroot) then
src/biogeophys/SoilStateType.F90:    if ( use_dynroot ) then
src/biogeophys/SoilStateType.F90:     if( use_dynroot ) then
src/main/clm_varctl.F90:  logical, public :: use_dynroot = .false. ! true => use dynamic root module
src/main/controlMod.F90:    namelist /clm_inparm/ use_dynroot
src/main/controlMod.F90:    if ( use_dynroot .and. use_hydrstress ) then
src/main/controlMod.F90:       call endrun(msg=' ERROR:: dynroot and hydrstress can NOT be on at the same time'//&
src/main/controlMod.F90:    call mpi_bcast (use_dynroot, 1, MPI_LOGICAL, 0, mpicom, ier)
src/main/controlMod.F90:    write(iulog,*) '   dynamic roots          = ', use_dynroot
src/main/pftconMod.F90:    use clm_varctl  , only : paramfile, use_fates, use_flexibleCN, use_dynroot, use_biomass_heat_storage, z0param_method
src/main/pftconMod.F90:    if ( use_crop .and. use_dynroot )then

which seems quick to clean up.

slevis-lmwg commented 3 months ago

@ekluzek I could see myself removing the dynroot tests (and possibly other obsolete tests) while I'm updating the test suites for #640. Would you prefer that I didn't?

ekluzek commented 3 months ago

Since CN-Matrix is already big, we should do things like this outside of it (preferable in b4b-dev). The important thing in #640 is just to add the matrix tests that we decided in #2450 to be important for Matrix.

slevis-lmwg commented 2 days ago

Started branch rm_use_dynroot from b4b-dev (no PR, yet). Started aux_clm on derecho: ./run_sys_tests -s aux_clm -c ctsm5.2.007 --skip-generate