From 98404d841a19c1a360fa73da1d377a926108b1a5 Mon Sep 17 00:00:00 2001 From: adamrher Date: Tue, 20 Aug 2024 15:25:28 -0600 Subject: [PATCH 001/116] added polarcap support for cesm3 release --- bld/namelist_files/namelist_defaults_ctsm.xml | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 674effd165..273045c837 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -713,6 +713,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. .true. @@ -732,6 +734,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. .true. @@ -752,6 +756,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. .true. @@ -772,6 +778,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. .true. @@ -791,6 +799,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. .true. @@ -811,6 +821,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. .true. @@ -1069,6 +1081,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_2000_78pfts_c240216.nc + +/glade/derecho/scratch/aherring/restart/ctsm5.2.005/tools/mksurfdata_esmf/surfdata_POLARCAP_ne30x4_hist_2000_78pfts_c240820.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4CONUS.ne30x8_hist_2000_78pfts_c240216.nc @@ -1939,6 +2011,8 @@ lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne120np4.pg3_hist_1850_78pfts_c240216. lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_1979_78pfts_c240425.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_1979_78pfts_c240425.nc + +/glade/derecho/scratch/aherring/restart/ctsm5.2.005/tools/mksurfdata_esmf/surfdata_POLARCAP_ne30x4_SSP2-4.5_1979_78pfts_c240820.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4CONUS.ne30x8_hist_1979_78pfts_c240425.nc @@ -2046,6 +2120,8 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c >lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240425.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240425.nc +/glade/derecho/scratch/aherring/restart/ctsm5.2.005/tools/mksurfdata_esmf/landuse.timeseries_POLARCAP_ne30x4_SSP2-4.5_1979-2026_78pfts_c240820.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240425.nc From 53ea29c309e9a11f70bb6839b527ec968ab0d3a3 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 1 Oct 2024 18:17:09 -0600 Subject: [PATCH 002/116] Add init_interp_attributes for clm5_0_cam6.0 to namelist_defaults --- bld/namelist_files/namelist_defaults_ctsm.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 650b21cb8d..3418315f57 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1214,6 +1214,12 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + +hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + + Date: Wed, 2 Oct 2024 16:43:05 -0600 Subject: [PATCH 003/116] Remove clm51 references from /cime_config --- cime_config/buildnml | 11 +---------- cime_config/config_component.xml | 15 ++------------- cime_config/config_compsets.xml | 14 +------------- cime_config/testdefs/ExpectedTestFails.xml | 4 ++-- cime_config/testdefs/testlist_clm.xml | 10 ++++------ .../testmods_dirs/clm/ciso_cwd_hr/user_nl_clm | 2 +- .../clm/clm51cam6LndTuningMode/include_user_mods | 1 - .../clm/clm51cam6LndTuningMode/shell_commands | 5 ----- .../include_user_mods | 1 - .../include_user_mods | 1 + .../user_nl_clm | 0 cime_config/usermods_dirs/NEON/FATES/README.md | 2 +- 12 files changed, 13 insertions(+), 53 deletions(-) delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/include_user_mods delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/shell_commands delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/include_user_mods rename cime_config/testdefs/testmods_dirs/clm/{clm51cam6LndTuningModeZDustSoilErod => clm60cam6LndTuningModeZDustSoilErod}/user_nl_clm (100%) diff --git a/cime_config/buildnml b/cime_config/buildnml index e9b7a610cd..32bb14f335 100644 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -23,7 +23,7 @@ _config_cache_template = """ -Specifies CTSM physics +Specifies CTSM physics """ @@ -113,11 +113,6 @@ def buildnml(case, caseroot, compname): "clm5_0_QIAN": "clm5_0_GSWP3v1", "clm5_0_NLDAS2": "clm5_0_GSWP3v1", "clm5_0_ERA5": "clm5_0_GSWP3v1", - "clm5_1_1PT": "clm5_1_GSWP3v1", - "clm5_1_QIAN": "clm5_1_GSWP3v1", - "clm5_1_NLDAS2": "clm5_1_GSWP3v1", - "clm5_1_ERA5": "clm5_1_GSWP3v1", - "clm5_1_CRUv7": "clm5_1_GSWP3v1", "clm6_0_1PT": "clm6_0_GSWP3v1", "clm6_0_QIAN": "clm6_0_GSWP3v1", "clm6_0_NLDAS2": "clm6_0_GSWP3v1", @@ -144,13 +139,9 @@ def buildnml(case, caseroot, compname): # to the CAM version) tuning_based_on = { "clm6_0_GSWP3v1": "clm5_0_GSWP3v1", - "clm5_1_GSWP3v1": "clm5_0_GSWP3v1", "clm6_0_cam6.0": "clm5_0_cam6.0", "clm6_0_cam5.0": "clm5_0_cam6.0", "clm6_0_cam4.0": "clm5_0_cam6.0", - "clm5_1_cam6.0": "clm5_0_cam6.0", - "clm5_1_cam5.0": "clm5_0_cam6.0", - "clm5_1_cam4.0": "clm5_0_cam6.0", "clm5_0_cam5.0": "clm5_0_cam6.0", "clm5_0_cam4.0": "clm5_0_cam6.0", "clm4_5_cam6.0": "clm5_0_cam6.0", diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 3fb682ccf0..413a0d246c 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -15,7 +15,6 @@ clm4.5: clm5.0: - clm5.1: clm6.0: Satellite phenology: @@ -78,7 +77,7 @@ UNSET - clm5_0_cam6.0,clm5_0_cam7.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_GSWP3v1,clm5_0_CRUv7,clm5_0_QIAN,clm5_0_1PT,clm5_0_NLDAS2,clm5_0_ERA5,clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_QIAN,clm4_5_cam6.0,clm4_5_cam7.0,clm4_5_cam5.0,clm4_5_cam4.0,clm4_5_1PT,clm4_5_NLDAS2,clm4_5_ERA5,clm5_1_CRUv7,clm5_1_GSWP3v1,clm5_1_cam6.0,clm5_1_QIAN,clm5_1_1PT,clm5_1_NLDAS2,clm5_1_ERA5,clm6_0_CRUv7,clm6_0_GSWP3v1,clm6_0_cam6.0,clm6_0_cam7.0,clm6_0_cam5.0,clm6_0_cam4.0,clm6_0_QIAN,clm6_0_1PT,clm6_0_NLDAS2,clm6_0_ERA5 + clm5_0_cam6.0,clm5_0_cam7.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_GSWP3v1,clm5_0_CRUv7,clm5_0_QIAN,clm5_0_1PT,clm5_0_NLDAS2,clm5_0_ERA5,clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_QIAN,clm4_5_cam6.0,clm4_5_cam7.0,clm4_5_cam5.0,clm4_5_cam4.0,clm4_5_1PT,clm4_5_NLDAS2,clm4_5_ERA5,clm6_0_CRUv7,clm6_0_GSWP3v1,clm6_0_cam6.0,clm6_0_cam7.0,clm6_0_cam5.0,clm6_0_cam4.0,clm6_0_QIAN,clm6_0_1PT,clm6_0_NLDAS2,clm6_0_ERA5 @@ -113,14 +112,6 @@ clm5_0_1PT clm5_0_NLDAS2 clm5_0_ERA5 - - clm5_1_GSWP3v1 - INVALID_USE_CLM60_NOT_CLM51 - clm5_1_cam4.0 - clm5_1_cam5.0 - clm5_1_cam6.0 - INVALID_USE_CLM60_NOT_CLM51_FOR_CAM70 - INVALID_USE_CLM60_NOT_CLM51_FOR_CPLHIST clm6_0_CRUv7 clm6_0_CRUv7 @@ -147,7 +138,7 @@ char - clm4_5,clm5_0,clm5_1,clm6_0 + clm4_5,clm5_0,clm6_0 - - IHistClm51Sp - HIST_DATM%GSWP3v1_CLM51%SP_SICE_SOCN_MOSART_SGLC_SWAV - - IHistClm60SpRs HIST_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV @@ -652,12 +646,6 @@ - - - I1850Clm51BgcCropG - 1850_DATM%GSWP3v1_CLM51%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV - - diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 30b19ce862..28f9286399 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -245,7 +245,7 @@ - + FAIL #2423 @@ -282,7 +282,7 @@ - + FAIL MOSART#91 diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 0eb3d5012d..047675fccf 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -120,14 +120,13 @@ - - + + - @@ -946,14 +945,13 @@ - + - - + diff --git a/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm index 3462b802c7..fd70b85611 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm @@ -1,2 +1,2 @@ -paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c240814.nc' +paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_ciso_cwd_hr_params.c240814.nc' hist_fincl1 = 'CWDC_HR','C13_CWDC_HR','C14_CWDC_HR','CWD_HR_L2','CWD_HR_L2_vr','CWD_HR_L3','CWD_HR_L3_vr' diff --git a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/include_user_mods deleted file mode 100644 index fe0e18cf88..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/include_user_mods +++ /dev/null @@ -1 +0,0 @@ -../default diff --git a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/shell_commands deleted file mode 100644 index cf39cca1c0..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/shell_commands +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -./xmlchange LND_TUNING_MODE="clm5_1_cam6.0" -./xmlchange ROF_NCPL='$ATM_NCPL' - diff --git a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/include_user_mods deleted file mode 100644 index aa76c52034..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/include_user_mods +++ /dev/null @@ -1 +0,0 @@ -../clm51cam6LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/include_user_mods new file mode 100644 index 0000000000..3dabdc9aeb --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/include_user_mods @@ -0,0 +1 @@ +../clm60cam6LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/user_nl_clm similarity index 100% rename from cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/user_nl_clm rename to cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/user_nl_clm diff --git a/cime_config/usermods_dirs/NEON/FATES/README.md b/cime_config/usermods_dirs/NEON/FATES/README.md index dcfcfdf9af..49cd2fc767 100644 --- a/cime_config/usermods_dirs/NEON/FATES/README.md +++ b/cime_config/usermods_dirs/NEON/FATES/README.md @@ -2,7 +2,7 @@ Use these user mods as you would any other user_mods, e.g.: -`./create_newcase --case FATES_ABBY_test --res CLM_USRDAT --compset I1PtClm51Fates --run-unsupported --user-mods-dir /glade/work/$user/CTSM/cime_config/usermods_dirs/NEON/FATES/ABBY` +`./create_newcase --case FATES_ABBY_test --res CLM_USRDAT --compset I1PtClm60Fates --run-unsupported --user-mods-dir /glade/work/$user/CTSM/cime_config/usermods_dirs/NEON/FATES/ABBY` ## Note on crop sites KONA and STER From 89654cc6bd9d6696b12c8f436ec60c4c31f9b8f6 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 2 Oct 2024 16:50:24 -0600 Subject: [PATCH 004/116] Remove clm51 references from /bld --- bld/config_files/clm_phys_vers.pm | 4 +- bld/config_files/config_definition_ctsm.xml | 4 +- bld/namelist_files/namelist_defaults_ctsm.xml | 263 +----------------- .../namelist_defaults_drydep.xml | 1 - .../namelist_defaults_overall.xml | 2 - .../namelist_definition_ctsm.xml | 4 +- bld/unit_testers/build-namelist_test.pl | 29 +- 7 files changed, 16 insertions(+), 291 deletions(-) diff --git a/bld/config_files/clm_phys_vers.pm b/bld/config_files/clm_phys_vers.pm index 9ab79ee8b0..bec811b61e 100755 --- a/bld/config_files/clm_phys_vers.pm +++ b/bld/config_files/clm_phys_vers.pm @@ -28,7 +28,7 @@ use bigint; #use warnings; #use diagnostics; -my @version_strings = ("clm4_5", "clm5_0", "clm5_1", "clm6_0"); +my @version_strings = ("clm4_5", "clm5_0", "clm6_0"); #------------------------------------------------------------------------------- @@ -88,7 +88,7 @@ if ( ! defined(caller) && $#ARGV == -1 ) { sub testit { print "unit tester\n"; my %lastv; - my @vers_list = ( "clm4_5", "clm5_0", "clm5_1", "clm6_0" ); + my @vers_list = ( "clm4_5", "clm5_0", "clm6_0" ); foreach my $vers ( @vers_list ) { my $phys = config_files::clm_phys_vers->new($vers); isa_ok($phys, "config_files::clm_phys_vers", "created clm_phys_vers object"); diff --git a/bld/config_files/config_definition_ctsm.xml b/bld/config_files/config_definition_ctsm.xml index e6628b1d94..f37f9a6f4e 100644 --- a/bld/config_files/config_definition_ctsm.xml +++ b/bld/config_files/config_definition_ctsm.xml @@ -5,10 +5,10 @@ -Specifies either clm4_5, clm5_0, clm5_1 (deprecated), or clm6_0 physics +Specifies either clm4_5, clm5_0, or clm6_0 physics clm4_5_CRUv7 clm5_0_cam6.0 -clm5_1_GSWP3v1 clm6_0_GSWP3v1 @@ -200,8 +199,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 2.0d00 2.0d00 0.5d00 -0.5d00 -2.0d00 0.5d00 2.0d00 @@ -275,14 +272,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >20.0d00 20.0d00 -20.0d00 -20.0d00 -20.0d00 -20.0d00 20.0d00 0.008d00 0.008d00 -0.008d00 -0.008d00 -0.008d00 -0.008d00 0.008d00 SwensonLawrence2012 Jordan1991 -Sturm1997 Sturm1997 lnd/clm2/paramdata/ctsm60_params.c240822.nc -lnd/clm2/paramdata/ctsm51_params.c240814.nc lnd/clm2/paramdata/clm50_params.c240814.nc lnd/clm2/paramdata/clm45_params.c240814.nc @@ -567,7 +546,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ZengWang2007 -Meier2022 Meier2022 .true. @@ -616,7 +594,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .false. 0.d+0 -0.5d00 0.5d00 @@ -630,11 +607,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case). Constant -DependsOnLat DependsOnLat .false. -.true. .true. .false. @@ -752,25 +727,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. - - -.true. -.true. -.true. -.true. - -.true. - - -.true. .true. - - -.true. -.true. -.true. -.true. - -.true. - - -.true. .true. -.true. .true. .true. @@ -867,10 +803,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .false. .false. .false. -.false. -.false. -.false. -.false. +.false. +.false. .false. -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm5_1_GSWP3v1 use_excess_ice=.true. - - + hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 use_excess_ice=.true. @@ -956,9 +886,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm5_1_GSWP3v1 use_excess_ice=.true. - hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 use_excess_ice=.true. @@ -1352,14 +1279,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >lnd/clm2/initdata_map/clmi.I1850Clm50SpCru.1706-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc - + -lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc - lnd/clm2/initdata_esmf/ctsm5.3/clmi.f19_interp_from.I1850Clm50BgcCrop-ciso.1366-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc -lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc - - - -lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc - - lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc - -lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc - - -lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - - - -lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc - - - -lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc - - - - -lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc - lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc - -lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc - - lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc - - -lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc - - -lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - - - - -lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc - - - -lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc - - - - -lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc - sahara .false. .false. -.true. .true. .true. .false. @@ -2283,7 +2052,6 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 .true. .false. .false. -.false. .false. .false. 2000 @@ -2482,10 +2250,6 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc -lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc -lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2_cam5.4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2_cam5.4-forCLM_cdf5_c240202.nc -lnd/clm2/dustemisdata/dst_source2x2_cam5.4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2_cam5.4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2tuned-cam4-forCLM_cdf5_c240202.nc -lnd/clm2/dustemisdata/dst_source2x2tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc -lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc @@ -2742,7 +2488,6 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 off -low low .false. diff --git a/bld/namelist_files/namelist_defaults_drydep.xml b/bld/namelist_files/namelist_defaults_drydep.xml index fb73ab6646..2ca89e4620 100644 --- a/bld/namelist_files/namelist_defaults_drydep.xml +++ b/bld/namelist_files/namelist_defaults_drydep.xml @@ -26,7 +26,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 'ISOP = isoprene', 'C10H16 = pinene_a + carene_3 + thujene_a', 'CH3OH = methanol', 'C2H5OH = ethanol', 'CH2O = formaldehyde', 'CH3CHO = acetaldehyde', 'CH3COOH = acetic_acid', 'CH3COCH3 = acetone' atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc -atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc diff --git a/bld/namelist_files/namelist_defaults_overall.xml b/bld/namelist_files/namelist_defaults_overall.xml index 5b7ae1bdd9..577f9bce61 100644 --- a/bld/namelist_files/namelist_defaults_overall.xml +++ b/bld/namelist_files/namelist_defaults_overall.xml @@ -34,8 +34,6 @@ determine default values for namelists. cold cold cold -cold -cold cold cold diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 417444914e..79a16feba3 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -171,7 +171,7 @@ dust optics type for SNICAR snow albedo calculation snow grain shape used in SNICAR snow albedo calculation -(snicar_snw_shape='hexagonal_plate' is supported in ctsm5.1 and 'sphere' in older model versions; others are EXPERIMENTAL, UNSUPPORTED, and UNTESTED!) +(snicar_snw_shape='sphere' is supported in pre-ctsm5.1 model versions and 'hexagonal place' is supported in newer versions; others are EXPERIMENTAL, UNSUPPORTED, and UNTESTED!) + valid_values="clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_cam7.0,clm4_5_cam6.0,clm4_5_cam5.0,clm4_5_cam4.0,clm5_0_cam7.0,clm5_0_cam6.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_CRUv7,clm5_0_GSWP3v1,clm6_0_GSWP3v1,clm6_0_cam7.0,clm6_0_cam6.0,clm6_0_cam5.0,clm6_0_cam4.0"> General configuration of model version and atmospheric forcing to tune the model to run under. This sets the model to run with constants and initial conditions that were set to run well under the configuration of model version and atmospheric forcing. To run well constants would need to be changed diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 06c9bcc361..65bb5dbd27 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -78,7 +78,7 @@ sub make_config_cache { -Specifies clm physics +Specifies clm physics EOF $fh->close(); @@ -600,10 +600,6 @@ sub cat_and_create_namelistinfile { namelst=>"use_crop=.true.", phys=>"clm4_5", }, - "LeungDust_WO_Prigent" =>{ options=>" -envxml_dir . -bgc sp", - namelst=>"use_prigent_roughness=.true.", - phys=>"clm5_1", - }, "soilm_stream off w file" =>{ options=>"-res 0.9x1.25 -envxml_dir .", namelst=>"use_soil_moisture_streams = .false.,stream_fldfilename_soilm='file_provided_when_off'", phys=>"clm5_0", @@ -966,16 +962,6 @@ sub cat_and_create_namelistinfile { GLC_TWO_WAY_COUPLING=>"TRUE", phys=>"clm5_0", }, - "sasuspinupWOsoilmatx" =>{ options=>"-envxml_dir . -bgc bgc -clm_accelerated_spinup sasu", - namelst=>"use_soil_matrixcn=.false.,use_matrixcn=.false.", - GLC_TWO_WAY_COUPLING=>"TRUE", - phys=>"clm5_1", - }, - "sasuspinupWOCN" =>{ options=>"-envxml_dir . -bgc sp -clm_accelerated_spinup sasu", - namelst=>"", - GLC_TWO_WAY_COUPLING=>"TRUE", - phys=>"clm5_1", - }, "nyrforceWOspinup" =>{ options=>"-envxml_dir . -bgc bgc -clm_accelerated_spinup sasu", namelst=>"use_matrixcn=.false.,spinup_matrixcn=F,nyr_forcing=20", GLC_TWO_WAY_COUPLING=>"TRUE", @@ -1390,7 +1376,7 @@ sub cat_and_create_namelistinfile { # # Loop over all physics versions # -foreach my $phys ( "clm4_5", "clm5_0", "clm5_1", "clm6_0" ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { $mode = "-phys $phys"; &make_config_cache($phys); @@ -1481,7 +1467,7 @@ sub cat_and_create_namelistinfile { } my @expect_fails = ( "1850-2100_SSP5-3.4_transient", "1850-2100_SSP4-3.4_transient", "2018-PD_transient", "1850-2100_SSP1-1.9_transient", "1850-2100_SSP4-6.0_transient", "2018_control" ); -foreach my $phys ( "clm4_5", "clm5_0", "clm5_1", "clm6_0" ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { print "physics = $phys\n"; &make_config_cache($phys); foreach my $usecase ( @usecases ) { @@ -1770,10 +1756,10 @@ sub cat_and_create_namelistinfile { # print "\n==================================================\n"; -print "Test clm4.5/clm5.0/clm5_1/clm6_0 resolutions \n"; +print "Test clm4.5/clm5.0/clm6_0 resolutions \n"; print "==================================================\n"; -foreach my $phys ( "clm4_5", 'clm5_0', 'clm5_1', "clm6_0" ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { my $mode = "-phys $phys"; &make_config_cache($phys); my @clmoptions = ( "-bgc bgc -envxml_dir .", "-bgc bgc -envxml_dir . -clm_accelerated_spinup=on", "-bgc bgc -envxml_dir . -light_res 360x720", @@ -1873,7 +1859,7 @@ sub cat_and_create_namelistinfile { my $res = "0.9x1.25"; my $mask = "gx1v7"; my $simyr = "1850"; -foreach my $phys ( "clm4_5", 'clm5_0', 'clm5_1', 'clm6_0' ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { my $mode = "-phys $phys"; &make_config_cache($phys); my @forclist = (); @@ -1881,9 +1867,6 @@ sub cat_and_create_namelistinfile { foreach my $forc ( @forclist ) { foreach my $bgc ( "sp", "bgc" ) { my $lndtuningmode = "${phys}_${forc}"; - if ( $lndtuningmode eq "clm5_1_CRUv7" ) { - next; - } if ( $lndtuningmode eq "clm6_0_CRUv7" ) { next; } From 7b0aa84fda10a8609b2a9bf4e16d67eefc4425c7 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 2 Oct 2024 16:51:19 -0600 Subject: [PATCH 005/116] Remove clm51 references from /doc --- doc/.ChangeLog_template | 2 -- .../Running-with-custom-crop-calendars.rst | 2 +- .../running-special-cases/Running-with-tillage.rst | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/.ChangeLog_template b/doc/.ChangeLog_template index c95ea482e3..579f3c68e2 100644 --- a/doc/.ChangeLog_template +++ b/doc/.ChangeLog_template @@ -20,8 +20,6 @@ Does this tag change answers significantly for any of the following physics conf [ ] clm6_0 -[ ] clm5_1 - [ ] clm5_0 [ ] ctsm5_0-nwp diff --git a/doc/source/users_guide/running-special-cases/Running-with-custom-crop-calendars.rst b/doc/source/users_guide/running-special-cases/Running-with-custom-crop-calendars.rst index 878cc0d353..22009add51 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-custom-crop-calendars.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-custom-crop-calendars.rst @@ -93,4 +93,4 @@ The entire process can be illustrated with the RXCROPMATURITY system test. E.g.: :: - run_sys_tests -t RXCROPMATURITY_Lm61.f10_f10_mg37.IHistClm51BgcCrop.cheyenne_intel.clm-cropMonthOutput --skip-generate --skip-compare \ No newline at end of file + run_sys_tests -t RXCROPMATURITY_Lm61.f10_f10_mg37.IHistClm60BgcCrop.cheyenne_intel.clm-cropMonthOutput --skip-generate --skip-compare diff --git a/doc/source/users_guide/running-special-cases/Running-with-tillage.rst b/doc/source/users_guide/running-special-cases/Running-with-tillage.rst index 8cfcaa680b..bccaf0b946 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-tillage.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-tillage.rst @@ -18,10 +18,10 @@ Example: Crop simulation with no tillage ---------------------------------------- :: - > cime/scripts/create_newcase -case IHistClm51BgcCrop_notill -res f19_g17_gl4 -compset IHistClm51BgcCrop + > cime/scripts/create_newcase -case IHistClm60BgcCrop_notill -res f19_g17_gl4 -compset IHistClm60BgcCrop - > cd IHistClm51BgcCrop_notill + > cd IHistClm60BgcCrop_notill > ./case.setup # turn off tillage From 76bcadff3b8afd65c89fe277ac8bdfbb08bdb8ce Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 2 Oct 2024 16:51:56 -0600 Subject: [PATCH 006/116] Remove clm51 references from /lilac --- lilac/bld_templates/ctsm_template.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lilac/bld_templates/ctsm_template.cfg b/lilac/bld_templates/ctsm_template.cfg index 2cd018aa3c..63755f018b 100644 --- a/lilac/bld_templates/ctsm_template.cfg +++ b/lilac/bld_templates/ctsm_template.cfg @@ -26,7 +26,7 @@ finidat = UNSET # High-level configuration options # ------------------------------------------------------------------------ -# ctsm_phys: 'clm4_5', 'clm5_0', 'clm5_1' or "clm6_0" +# ctsm_phys: 'clm4_5', 'clm5_0', or "clm6_0" ctsm_phys = clm5_0 # configuration: 'nwp' or 'clm' From 39cb1eb6e450688d5f7d0727d60d697913474cfc Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 2 Oct 2024 16:52:32 -0600 Subject: [PATCH 007/116] Remove clm51 references from /python --- python/ctsm/lilac_make_runtime_inputs.py | 4 ++-- python/ctsm/subset_data.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ctsm/lilac_make_runtime_inputs.py b/python/ctsm/lilac_make_runtime_inputs.py index e751f6c931..623cb3524d 100644 --- a/python/ctsm/lilac_make_runtime_inputs.py +++ b/python/ctsm/lilac_make_runtime_inputs.py @@ -28,7 +28,7 @@ -Specifies ctsm physics +Specifies ctsm physics """ @@ -163,7 +163,7 @@ def buildnml(cime_path, rundir): "buildnml_input", "ctsm_phys", ctsm_cfg_path, - allowed_values=["clm4_5", "clm5_0", "clm5_1", "clm6_0"], + allowed_values=["clm4_5", "clm5_0", "clm6_0"], ) configuration = get_config_value( config, diff --git a/python/ctsm/subset_data.py b/python/ctsm/subset_data.py index d38aee1308..fb0ba925a9 100644 --- a/python/ctsm/subset_data.py +++ b/python/ctsm/subset_data.py @@ -743,7 +743,7 @@ def subset_region(args, file_dict: dict): print("\nFor running this regional case with the created user_mods : ") print( - "./create_newcase --case case --res CLM_USRDAT --compset I2000Clm51BgcCrop", + "./create_newcase --case case --res CLM_USRDAT --compset I2000Clm60BgcCrop", "--run-unsupported --user-mods-dirs ", args.user_mods_dir, "\n\n", From 12bcee7c5f70c513f4975e746621db43cca9a858 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 2 Oct 2024 17:23:35 -0600 Subject: [PATCH 008/116] Update $ntests in build-namelist_test.pl --- bld/unit_testers/build-namelist_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 65bb5dbd27..2b1e13dba0 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,7 +163,7 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3997; +my $ntests = 3196; if ( defined($opts{'compare'}) ) { $ntests += 2437; From dff408b1390e6ca032a81241d69a98d98c99e373 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 8 Oct 2024 15:11:26 -0600 Subject: [PATCH 009/116] 5.1 to 6.0 correction recommended by Erik --- bld/CLMBuildNamelist.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index b881cdbfac..6392ed2f79 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2113,7 +2113,7 @@ sub setup_logic_roughness_methods { my $phys = $physv->as_string(); if ( $phys eq "clm4_5" || $phys eq "clm5_0" ) { if ( $var eq "Meier2022" ) { - $log->fatal_error("z0param_method = $var and phys = $phys, but this method has been tested only with clm5_1 and later versions; to use with earlier versions, disable this error, and add Meier2022 parameters to the corresponding params file"); + $log->fatal_error("z0param_method = $var and phys = $phys, but this method has been tested only with clm6_0 and later versions; to use with earlier versions, disable this error, and add Meier2022 parameters to the corresponding params file"); } } } From 9c9bdca00525b45a49c26f73eb2a768b1bc2e316 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 15 Oct 2024 18:21:51 -0600 Subject: [PATCH 010/116] Fix single-point matrix fails --- src/utils/SparseMatrixMultiplyMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/SparseMatrixMultiplyMod.F90 b/src/utils/SparseMatrixMultiplyMod.F90 index 5ea9848373..a6eb13bb24 100644 --- a/src/utils/SparseMatrixMultiplyMod.F90 +++ b/src/utils/SparseMatrixMultiplyMod.F90 @@ -1243,7 +1243,7 @@ subroutine SPMP_ABC(this,num_unit,filter_u,A,B,C,list_ready,list_A,list_B,list_C call endrun( subname//" ERROR: missing required optional arguments" ) return end if - SHR_ASSERT_FL((size(filter_actunit_C) > num_actunit_C), sourcefile, __LINE__) + SHR_ASSERT_FL((size(filter_actunit_C) >= num_actunit_C), sourcefile, __LINE__) end if if(.not. list_ready)then From 1fd28b58ee8bd2802a705ec13edcffe2f756cb28 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 16 Oct 2024 11:27:43 -0600 Subject: [PATCH 011/116] Add CONUS flanduse_timeseries for sim_year_range="1850-2000" --- bld/namelist_files/namelist_defaults_ctsm.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 3418315f57..421f450ec8 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2042,6 +2042,8 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc Date: Wed, 16 Oct 2024 11:57:39 -0600 Subject: [PATCH 012/116] Update namelist_defaults with PPE's 16-pft f19 fsurdat/landuse files --- bld/namelist_files/namelist_defaults_ctsm.xml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index d7dc104183..6edd9d68b9 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1839,11 +1839,16 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_1x1_urbanc_alpha_synth_hist_ + + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_16pfts_c240926.nc + + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_360x720cru_hist_1850_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_1850_78pfts_c240908.nc @@ -1910,12 +1915,15 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 --> + +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_hist_1850-2023_16pfts_c240926.nc + + lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc - - lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240908.nc Date: Wed, 16 Oct 2024 12:05:53 -0600 Subject: [PATCH 013/116] Clean-up: Rm deprecated use_vichydro=.true. or .false. options --- bld/namelist_files/namelist_defaults_ctsm.xml | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 6edd9d68b9..19cc4e26d7 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1766,22 +1766,13 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa15_hist_2000_16pfts_c240908.nc - - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_78pfts_c240908.nc @@ -1846,27 +1837,27 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_16pfts_c240926.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_360x720cru_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_1850_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa480_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa120_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg2_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg3_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne3np4.pg3_hist_1850_78pfts_c240908.nc From 29eb50aaada32da7b390ce6ea1e74361d239379c Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 16 Oct 2024 12:53:35 -0600 Subject: [PATCH 014/116] Add PPE's 16-pft f19 fsurdat/landuse generation to Makefile --- python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py | 5 +++++ tools/mksurfdata_esmf/Makefile | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py index 5de67adb12..7b0d5f69b2 100755 --- a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py +++ b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py @@ -23,6 +23,7 @@ "global-present", "global-present-low-res", "global-present-ultra-hi-res", + "global-hist-1850-f19", "crop-tropics-present", "crop", "crop-global-present", @@ -242,6 +243,10 @@ def main(): "--start-year 2000 --end-year 2000 --nocrop --res", "ultra_hi_res_no_crop", ), + "global-hist-1850-f19": ( + "--start-year 1850 --end-year 2023 --nocrop --res", + "f19", + ), "crop-tropics-present": ( "--start-year 2000 --end-year 2000 --res", "5x5_amazon", diff --git a/tools/mksurfdata_esmf/Makefile b/tools/mksurfdata_esmf/Makefile index 7ad8e1aa77..cc02a50cdb 100644 --- a/tools/mksurfdata_esmf/Makefile +++ b/tools/mksurfdata_esmf/Makefile @@ -83,6 +83,7 @@ STANDARD = \ global-potveg \ global-present \ global-present-low-res \ + global-hist-1850-f19 \ CROP = \ crop-global-future \ @@ -153,6 +154,9 @@ global-present-low-res : FORCE $(MKSURFDATA) --number-of-nodes 1 --tasks-per-node 64 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 $(BATCHJOBS) $@.sh +global-hist-1850-f19 : FORCE + $(MKSURFDATA) --number-of-nodes 8 --scenario $@ --jobscript-file $@.sh --walltime 12:00:00 + $(BATCHJOBS) $@.sh # # Ultra high resolutions (Don't do by default user should select this by hand) # From cf767a9eb1c49b6d337492373ae7492bd7bc1089 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 12:02:48 -0600 Subject: [PATCH 015/116] Add 20thC test to build-namelist_test.pl and update defaults accordingly --- bld/namelist_files/namelist_defaults_ctsm.xml | 5 +++++ bld/unit_testers/build-namelist_test.pl | 1 + 2 files changed, 6 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 421f450ec8..ab0d7c0d7f 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1248,6 +1248,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. +hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + + hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 06c9bcc361..346b852dc2 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -514,6 +514,7 @@ sub cat_and_create_namelistinfile { foreach my $options ( "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; From 5dd623dc4bec442e11077c91855f67d0119caafe Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 12:41:50 -0600 Subject: [PATCH 016/116] Add f19 20thC -no-crop test to build-namelist_test --- bld/unit_testers/build-namelist_test.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 346b852dc2..6941d8fa02 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -514,6 +514,7 @@ sub cat_and_create_namelistinfile { foreach my $options ( "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); From fc3e5de24444fd1cffb41bab84bb6d1a9abc9ac2 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 14:31:16 -0600 Subject: [PATCH 017/116] Similar changes as for CONUS, now for the ARCTIC grid --- bld/namelist_files/namelist_defaults_ctsm.xml | 15 +++------------ bld/unit_testers/build-namelist_test.pl | 1 + 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index ab0d7c0d7f..8746319186 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1101,7 +1101,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). - hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - -hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - - hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - - hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. @@ -1285,6 +1273,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 6941d8fa02..c813cb7083 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -515,6 +515,7 @@ sub cat_and_create_namelistinfile { "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4.ARCTIC.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); From e35ba5a72bc69a85a69177980c3330aa21e4ab49 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 14:38:07 -0600 Subject: [PATCH 018/116] Small correction to build-namelist_test.pl --- bld/unit_testers/build-namelist_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index c813cb7083..4f03ed089f 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -516,7 +516,7 @@ sub cat_and_create_namelistinfile { "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4.ARCTIC.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", - "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", + "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; From b6a51861efde22e1846bbd4a584483bd7ea3694b Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 15:07:48 -0600 Subject: [PATCH 019/116] Add ctsm_sci tests for the VR grids and aux_clm test for f19 --- cime_config/testdefs/testlist_clm.xml | 34 +++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 490748c7e7..77a2d76ba3 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2015,7 +2015,17 @@ - + + + + + + + + + + + @@ -2025,6 +2035,16 @@ + + + + + + + + + + @@ -2044,7 +2064,7 @@ - + @@ -2054,6 +2074,16 @@ + + + + + + + + + + From 41359b72c501ff1eee3abfc33a7d137d0073feff Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 15:34:24 -0600 Subject: [PATCH 020/116] Adding 3 clm50cam7LNdTuningMode* testmods_dirs for the new tests --- .../clm/clm50cam7LndTuningMode/include_user_mods | 1 + .../testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands | 5 +++++ .../clm/clm50cam7LndTuningMode_1979Start/include_user_mods | 1 + .../clm/clm50cam7LndTuningMode_1979Start/shell_commands | 1 + .../clm/clm50cam7LndTuningMode_2013Start/include_user_mods | 1 + .../clm/clm50cam7LndTuningMode_2013Start/shell_commands | 1 + 6 files changed, 10 insertions(+) create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods new file mode 100644 index 0000000000..fe0e18cf88 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods @@ -0,0 +1 @@ +../default diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands new file mode 100644 index 0000000000..a9b56a5eae --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands @@ -0,0 +1,5 @@ +#!/bin/bash + +./xmlchange LND_TUNING_MODE="clm5_0_cam7.0" +./xmlchange ROF_NCPL='$ATM_NCPL' + diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods new file mode 100644 index 0000000000..44d94c8805 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods @@ -0,0 +1 @@ +../clm50cam7LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands new file mode 100644 index 0000000000..2aafcc1186 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands @@ -0,0 +1 @@ +./xmlchange RUN_STARTDATE=1979-01-01 diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods new file mode 100644 index 0000000000..44d94c8805 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods @@ -0,0 +1 @@ +../clm50cam7LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands new file mode 100644 index 0000000000..035842f982 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands @@ -0,0 +1 @@ +./xmlchange RUN_STARTDATE=2013-01-01 From 6cb49758a383a430a90d4dec39126ca9820e0f5f Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 21 Oct 2024 17:57:44 -0600 Subject: [PATCH 021/116] Add comments about using Clm50 in testlist --- cime_config/testdefs/testlist_clm.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 77a2d76ba3..c643f21c38 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2032,6 +2032,7 @@ + @@ -2071,6 +2072,7 @@ + From d4737210924d27e7b356abf8150ecf4c2ef6f81b Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 21 Oct 2024 18:41:40 -0600 Subject: [PATCH 022/116] Add the ARCTICGRIS & POLARCAP VR grids as I added ARCTIC & CONUS before --- bld/namelist_files/namelist_defaults_ctsm.xml | 6 ++++ bld/unit_testers/build-namelist_test.pl | 2 ++ cime_config/testdefs/testlist_clm.xml | 34 ++++++++++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 8746319186..7f8dd7d582 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2036,8 +2036,12 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc @@ -2116,6 +2120,8 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 4f03ed089f..6bedf1c98d 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -515,7 +515,9 @@ sub cat_and_create_namelistinfile { "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4.POLARCAP.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4.ARCTIC.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4.ARCTICGRIS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index c643f21c38..ffce938b9e 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2025,6 +2025,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -2046,13 +2067,24 @@ - + + + + + + + + + + + + From 6d9ee4aa6df86e8a1c80cac90da8f3c1090c814e Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 1 Oct 2024 18:17:09 -0600 Subject: [PATCH 023/116] Add init_interp_attributes for clm5_0_cam6.0 to namelist_defaults --- bld/namelist_files/namelist_defaults_ctsm.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index d7dc104183..b362d0c5fb 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1205,6 +1205,12 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + +hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + + Date: Wed, 16 Oct 2024 11:27:43 -0600 Subject: [PATCH 024/116] Add CONUS flanduse_timeseries for sim_year_range="1850-2000" --- bld/namelist_files/namelist_defaults_ctsm.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index b362d0c5fb..6e2c137b07 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1920,6 +1920,8 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc Date: Thu, 17 Oct 2024 12:02:48 -0600 Subject: [PATCH 025/116] Add 20thC test to build-namelist_test.pl and update defaults accordingly --- bld/namelist_files/namelist_defaults_ctsm.xml | 13 +++++++++++++ bld/unit_testers/build-namelist_test.pl | 1 + 2 files changed, 14 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 6e2c137b07..2c9ac338e4 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1242,6 +1242,19 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft=79 mask=tx2_3v2 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 use_excess_ice=.true. +hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + + +hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + + +hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. "FALSE" ); eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; From 367c7bc688a785aa1aa4d65d412af74df337d33a Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 12:41:50 -0600 Subject: [PATCH 026/116] Add f19 20thC -no-crop test to build-namelist_test --- bld/unit_testers/build-namelist_test.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 05629fc189..c732c4f9f6 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -514,6 +514,7 @@ sub cat_and_create_namelistinfile { foreach my $options ( "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); From a988ccdcc03745717c0c1f359efb68d89120e671 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 14:31:16 -0600 Subject: [PATCH 027/116] Similar changes as for CONUS, now for the ARCTIC grid --- bld/namelist_files/namelist_defaults_ctsm.xml | 10 +++------- bld/unit_testers/build-namelist_test.pl | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 2c9ac338e4..60d6102ef0 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1092,7 +1092,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). - hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - -hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - - hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index c732c4f9f6..a4d86939d3 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -515,6 +515,7 @@ sub cat_and_create_namelistinfile { "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4.ARCTIC.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); From 9ec87466af2a83d1f8c26cda7939fabae2d457f5 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 14:38:07 -0600 Subject: [PATCH 028/116] Small correction to build-namelist_test.pl --- bld/unit_testers/build-namelist_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index a4d86939d3..31c3b25fcb 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -516,7 +516,7 @@ sub cat_and_create_namelistinfile { "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4.ARCTIC.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", - "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", + "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; From 1face61dde30ee67d2406c369d4f070cac6d5e4b Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 15:07:48 -0600 Subject: [PATCH 029/116] Add ctsm_sci tests for the VR grids and aux_clm test for f19 --- cime_config/testdefs/testlist_clm.xml | 34 +++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 4654f53c45..6a6f33d111 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2059,7 +2059,17 @@ - + + + + + + + + + + + @@ -2069,6 +2079,16 @@ + + + + + + + + + + @@ -2088,7 +2108,7 @@ - + @@ -2098,6 +2118,16 @@ + + + + + + + + + + From 8557a044af858a069a4ae0299c10be3793099498 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 17 Oct 2024 15:34:24 -0600 Subject: [PATCH 030/116] Adding 3 clm50cam7LNdTuningMode* testmods_dirs for the new tests --- .../clm/clm50cam7LndTuningMode/include_user_mods | 1 + .../testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands | 5 +++++ .../clm/clm50cam7LndTuningMode_1979Start/include_user_mods | 1 + .../clm/clm50cam7LndTuningMode_1979Start/shell_commands | 1 + .../clm/clm50cam7LndTuningMode_2013Start/include_user_mods | 1 + .../clm/clm50cam7LndTuningMode_2013Start/shell_commands | 1 + 6 files changed, 10 insertions(+) create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods new file mode 100644 index 0000000000..fe0e18cf88 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods @@ -0,0 +1 @@ +../default diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands new file mode 100644 index 0000000000..a9b56a5eae --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands @@ -0,0 +1,5 @@ +#!/bin/bash + +./xmlchange LND_TUNING_MODE="clm5_0_cam7.0" +./xmlchange ROF_NCPL='$ATM_NCPL' + diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods new file mode 100644 index 0000000000..44d94c8805 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods @@ -0,0 +1 @@ +../clm50cam7LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands new file mode 100644 index 0000000000..2aafcc1186 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands @@ -0,0 +1 @@ +./xmlchange RUN_STARTDATE=1979-01-01 diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods new file mode 100644 index 0000000000..44d94c8805 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods @@ -0,0 +1 @@ +../clm50cam7LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands new file mode 100644 index 0000000000..035842f982 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands @@ -0,0 +1 @@ +./xmlchange RUN_STARTDATE=2013-01-01 From 76d336a9bf4a4d5e0df61392a0c9ab71bd4c4090 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 21 Oct 2024 17:57:44 -0600 Subject: [PATCH 031/116] Add comments about using Clm50 in testlist --- cime_config/testdefs/testlist_clm.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 6a6f33d111..13fc3debb4 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2076,6 +2076,7 @@ + @@ -2115,6 +2116,7 @@ + From e90189d51ae343539ecdb7085d018bec13d2d21e Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 21 Oct 2024 18:41:40 -0600 Subject: [PATCH 032/116] Add the ARCTICGRIS & POLARCAP VR grids as I added ARCTIC & CONUS before --- bld/namelist_files/namelist_defaults_ctsm.xml | 6 ++++ bld/unit_testers/build-namelist_test.pl | 2 ++ cime_config/testdefs/testlist_clm.xml | 34 ++++++++++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 60d6102ef0..91ca0bfb7e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1927,8 +1927,12 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc @@ -2007,6 +2011,8 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 31c3b25fcb..b6b31cd644 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -515,7 +515,9 @@ sub cat_and_create_namelistinfile { "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4.POLARCAP.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4.ARCTIC.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4.ARCTICGRIS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 13fc3debb4..33f86446cb 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2069,6 +2069,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -2090,13 +2111,24 @@ - + + + + + + + + + + + + From 2bcf44e5b9e19557387c9b885ae696f026906507 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 21 Oct 2024 19:24:05 -0600 Subject: [PATCH 033/116] Correction from a conflict during the rebase and/or merges --- bld/namelist_files/namelist_defaults_ctsm.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 91ca0bfb7e..9b92e95f64 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1240,16 +1240,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - - -hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - - hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. From b766fc0b0bb2e3e94d8fb7410b14a06f48ecde3b Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 21 Oct 2024 19:33:47 -0600 Subject: [PATCH 034/116] Second correction from conflict during the rebase and/or merges --- bld/namelist_files/namelist_defaults_ctsm.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 9b92e95f64..deff06e611 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1235,10 +1235,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft=79 mask=tx2_3v2 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 use_excess_ice=.true. -hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - Date: Mon, 21 Oct 2024 20:23:18 -0600 Subject: [PATCH 035/116] Third correction --- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index deff06e611..15176ded6d 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1235,6 +1235,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft=79 mask=tx2_3v2 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 use_excess_ice=.true. + Date: Tue, 22 Oct 2024 10:01:20 -0600 Subject: [PATCH 036/116] Corrections for certain tests to pass --- bld/namelist_files/namelist_defaults_ctsm.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 15176ded6d..ba262d45e1 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1826,6 +1826,8 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne120np4.pg3_hist_2000_78pfts_c240908. lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_2000_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_2000_78pfts_c240908.nc + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.POLARCAP.ne30x4_hist_2000_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4CONUS.ne30x8_hist_2000_78pfts_c240908.nc @@ -1883,6 +1885,8 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne120np4.pg3_hist_1850_78pfts_c240908. lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_1979_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_1979_78pfts_c240908.nc + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.POLARCAP.ne30x4_hist_1979_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4CONUS.ne30x8_hist_1979_78pfts_c240908.nc @@ -1998,7 +2002,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc From bae4c644df8f966d75cd9d3ede356d308dcbbcfc Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 22 Oct 2024 10:22:09 -0600 Subject: [PATCH 037/116] Change 4 Sp tests from nofire to nofireemis so that they will pass --- cime_config/testdefs/testlist_clm.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 33f86446cb..5a3d4d465d 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2163,41 +2163,45 @@ - + + - + + - + + - + + From 932337a075b2a9986062c9d1499b25b40aaa3954 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 22 Oct 2024 10:35:35 -0600 Subject: [PATCH 038/116] Update ExpectedTestFails.xml regarding urbanc_alpha test --- cime_config/testdefs/ExpectedTestFails.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 7049e9672b..3065205451 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -29,9 +29,10 @@ - + FAIL + #2122 CDEPS/#243 From 04ed1530a44027ade613c48f4323b5425c09b5b0 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 22 Oct 2024 16:34:02 -0600 Subject: [PATCH 039/116] Updates from Erik's code review and testing --- bld/unit_testers/build-namelist_test.pl | 16 +++++++++++++++- cime_config/testdefs/testlist_clm.xml | 2 -- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 08075df481..ca11c18253 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,7 +163,7 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3196; +my $ntests = 3229; if ( defined($opts{'compare'}) ) { $ntests += 2437; @@ -605,6 +605,10 @@ sub cat_and_create_namelistinfile { namelst=>"use_crop=.true.", phys=>"clm4_5", }, + "LeungDust_WO_Prigent" =>{ options=>" -envxml_dir . -bgc sp", + namelst=>"use_prigent_roughness=.false.,dust_emis_method='Leung_2023'", + phys=>"clm6_0", + }, "soilm_stream off w file" =>{ options=>"-res 0.9x1.25 -envxml_dir .", namelst=>"use_soil_moisture_streams = .false.,stream_fldfilename_soilm='file_provided_when_off'", phys=>"clm5_0", @@ -967,6 +971,16 @@ sub cat_and_create_namelistinfile { GLC_TWO_WAY_COUPLING=>"TRUE", phys=>"clm5_0", }, + "sasuspinupWOsoilmatx" =>{ options=>"-envxml_dir . -bgc bgc -clm_accelerated_spinup sasu", + namelst=>"use_soil_matrixcn=.false.,use_matrixcn=.false.", + GLC_TWO_WAY_COUPLING=>"TRUE", + phys=>"clm6_0", + }, + "sasuspinupWOCN" =>{ options=>"-envxml_dir . -bgc sp -clm_accelerated_spinup sasu", + namelst=>"", + GLC_TWO_WAY_COUPLING=>"TRUE", + phys=>"clm6_0", + }, "nyrforceWOspinup" =>{ options=>"-envxml_dir . -bgc bgc -clm_accelerated_spinup sasu", namelst=>"use_matrixcn=.false.,spinup_matrixcn=F,nyr_forcing=20", GLC_TWO_WAY_COUPLING=>"TRUE", diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index a944c5993d..2e1ae173a1 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -123,7 +123,6 @@ - @@ -960,7 +959,6 @@ - From 66926130a37ab3b5b61f647bf7549fe439e23c9e Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 22 Oct 2024 17:00:27 -0600 Subject: [PATCH 040/116] Syntax error correction in ExpectedTestFails.xml --- cime_config/testdefs/ExpectedTestFails.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index af833215ed..8062359f37 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -32,8 +32,7 @@ FAIL - #2122 - CDEPS/#243 + CDEPS/#243 and/or #2122 From eed612a94af37ee72b8ccff9fde404bc948e5b07 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 15 Oct 2024 18:21:51 -0600 Subject: [PATCH 041/116] Fix single-point matrix fails --- src/utils/SparseMatrixMultiplyMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/SparseMatrixMultiplyMod.F90 b/src/utils/SparseMatrixMultiplyMod.F90 index 5ea9848373..a6eb13bb24 100644 --- a/src/utils/SparseMatrixMultiplyMod.F90 +++ b/src/utils/SparseMatrixMultiplyMod.F90 @@ -1243,7 +1243,7 @@ subroutine SPMP_ABC(this,num_unit,filter_u,A,B,C,list_ready,list_A,list_B,list_C call endrun( subname//" ERROR: missing required optional arguments" ) return end if - SHR_ASSERT_FL((size(filter_actunit_C) > num_actunit_C), sourcefile, __LINE__) + SHR_ASSERT_FL((size(filter_actunit_C) >= num_actunit_C), sourcefile, __LINE__) end if if(.not. list_ready)then From 0a395436a0786168735bb9f5e74495c385ce412d Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 22 Oct 2024 17:24:06 -0600 Subject: [PATCH 042/116] Two more ASSERT statments changed from > to >= --- src/utils/SparseMatrixMultiplyMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/SparseMatrixMultiplyMod.F90 b/src/utils/SparseMatrixMultiplyMod.F90 index a6eb13bb24..564da21cc2 100644 --- a/src/utils/SparseMatrixMultiplyMod.F90 +++ b/src/utils/SparseMatrixMultiplyMod.F90 @@ -1217,7 +1217,7 @@ subroutine SPMP_ABC(this,num_unit,filter_u,A,B,C,list_ready,list_A,list_B,list_C call endrun( subname//" ERROR: missing required optional arguments" ) return end if - SHR_ASSERT_FL((size(filter_actunit_A) > num_actunit_A), sourcefile, __LINE__) + SHR_ASSERT_FL((size(filter_actunit_A) >= num_actunit_A), sourcefile, __LINE__) end if if(present(num_actunit_B))then if(num_actunit_B < 0)then @@ -1230,7 +1230,7 @@ subroutine SPMP_ABC(this,num_unit,filter_u,A,B,C,list_ready,list_A,list_B,list_C call endrun( subname//" ERROR: missing required optional arguments" ) return end if - SHR_ASSERT_FL((size(filter_actunit_B) > num_actunit_B), sourcefile, __LINE__) + SHR_ASSERT_FL((size(filter_actunit_B) >= num_actunit_B), sourcefile, __LINE__) end if if(present(num_actunit_C))then if(num_actunit_C < 0)then From 16e634dbbbf9cffdaa4db7cb7891aa148cd99fda Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 23 Oct 2024 13:10:14 -0600 Subject: [PATCH 043/116] Remove #2780 tests from ExpectedTestFails.xml --- cime_config/testdefs/ExpectedTestFails.xml | 25 +--------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 3065205451..390ab03eb3 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -32,8 +32,7 @@ FAIL - #2122 - CDEPS/#243 + CDEPS/#243 and/or #2122 @@ -60,28 +59,6 @@ - - - FAIL - #2780 - Crashes in the matrix solver. - - - - - FAIL - #2780 - Crashes in the matrix solver. - - - - - FAIL - #2780 - Crashes in the matrix solver. - - - FAIL From 20895d81e690ba32d25918104bda6199181c492d Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 16 Oct 2024 11:57:39 -0600 Subject: [PATCH 044/116] Update namelist_defaults with PPE's 16-pft f19 fsurdat/landuse files --- bld/namelist_files/namelist_defaults_ctsm.xml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index ba262d45e1..b72df5db06 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1841,11 +1841,16 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_1x1_urbanc_alpha_synth_hist_ + + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_16pfts_c240926.nc + + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_360x720cru_hist_1850_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_1850_78pfts_c240908.nc @@ -1914,9 +1919,14 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 --> + +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_hist_1850-2023_16pfts_c240926.nc + + lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc @@ -1926,8 +1936,6 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc - - lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240908.nc Date: Wed, 16 Oct 2024 12:05:53 -0600 Subject: [PATCH 045/116] Clean-up: Rm deprecated use_vichydro=.true. or .false. options --- bld/namelist_files/namelist_defaults_ctsm.xml | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index b72df5db06..d917508963 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1766,22 +1766,13 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa15_hist_2000_16pfts_c240908.nc - - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_78pfts_c240908.nc @@ -1848,27 +1839,27 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_16pfts_c240926.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_360x720cru_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_1850_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa480_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa120_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg2_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg3_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne3np4.pg3_hist_1850_78pfts_c240908.nc From 992239c8bd3d7322b965ff4179b9ac4a6df38b0a Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 16 Oct 2024 12:53:35 -0600 Subject: [PATCH 046/116] Add PPE's 16-pft f19 fsurdat/landuse generation to Makefile --- python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py | 5 +++++ tools/mksurfdata_esmf/Makefile | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py index 5de67adb12..7b0d5f69b2 100755 --- a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py +++ b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py @@ -23,6 +23,7 @@ "global-present", "global-present-low-res", "global-present-ultra-hi-res", + "global-hist-1850-f19", "crop-tropics-present", "crop", "crop-global-present", @@ -242,6 +243,10 @@ def main(): "--start-year 2000 --end-year 2000 --nocrop --res", "ultra_hi_res_no_crop", ), + "global-hist-1850-f19": ( + "--start-year 1850 --end-year 2023 --nocrop --res", + "f19", + ), "crop-tropics-present": ( "--start-year 2000 --end-year 2000 --res", "5x5_amazon", diff --git a/tools/mksurfdata_esmf/Makefile b/tools/mksurfdata_esmf/Makefile index 7ad8e1aa77..cc02a50cdb 100644 --- a/tools/mksurfdata_esmf/Makefile +++ b/tools/mksurfdata_esmf/Makefile @@ -83,6 +83,7 @@ STANDARD = \ global-potveg \ global-present \ global-present-low-res \ + global-hist-1850-f19 \ CROP = \ crop-global-future \ @@ -153,6 +154,9 @@ global-present-low-res : FORCE $(MKSURFDATA) --number-of-nodes 1 --tasks-per-node 64 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 $(BATCHJOBS) $@.sh +global-hist-1850-f19 : FORCE + $(MKSURFDATA) --number-of-nodes 8 --scenario $@ --jobscript-file $@.sh --walltime 12:00:00 + $(BATCHJOBS) $@.sh # # Ultra high resolutions (Don't do by default user should select this by hand) # From 89befd3c122067a2272554f1b785889bceeac94f Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 24 Oct 2024 14:25:37 -0600 Subject: [PATCH 047/116] Revert bae4c64 to change 4 -nofireemis ctsm_sci tests back to -nofire https://github.com/ESCOMP/CTSM/pull/2805/commits/bae4c644df8f966d75cd9d3ede356d308dcbbcfc I made the change to get the tests to pass originally. Turns out issue #2784 will resolve the failures, so this time I added the four tests to ExpecedTestFails.xml --- cime_config/testdefs/ExpectedTestFails.xml | 25 ++++++++++++++++++++++ cime_config/testdefs/testlist_clm.xml | 12 ++++------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 8062359f37..041cb51516 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -36,6 +36,31 @@ + + + FAIL + #2784 + + + + + FAIL + #2784 + + + + + FAIL + #2784 + + + + + FAIL + #2784 + + + diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 2e1ae173a1..2bd253ed49 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2159,45 +2159,41 @@ - + - - + - - + - - + - From b84a9c6e15fd3d5380726efaf56d7d5193f083b0 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 24 Oct 2024 17:51:21 -0600 Subject: [PATCH 048/116] Update namelist_defaults for 4x5 as I did before for f19 --- bld/namelist_files/namelist_defaults_ctsm.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 505f59c96d..e036fbfcd9 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1684,9 +1684,11 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_1x1_urbanc_alpha_synth_hist_ - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_16pfts_c240926.nc + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_1850_16pfts_c241007.nc @@ -1697,7 +1699,7 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_1850_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_1850_78pfts_c240908.nc @@ -1762,9 +1764,11 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 --> - + lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_hist_1850-2023_16pfts_c240926.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_hist_1850-2023_16pfts_c241007.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240908.nc From 7b92fc45b2b41bbd36a006956d9e7d33f2748047 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 24 Oct 2024 18:12:04 -0600 Subject: [PATCH 049/116] Add f45 16pft file generation to mksurfdata_esmf's Makefile --- python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py | 5 +++++ tools/mksurfdata_esmf/Makefile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py index 7b0d5f69b2..fdf9466763 100755 --- a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py +++ b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py @@ -24,6 +24,7 @@ "global-present-low-res", "global-present-ultra-hi-res", "global-hist-1850-f19", + "global-hist-1850-f45", "crop-tropics-present", "crop", "crop-global-present", @@ -247,6 +248,10 @@ def main(): "--start-year 1850 --end-year 2023 --nocrop --res", "f19", ), + "global-hist-1850-f45": ( + "--start-year 1850 --end-year 2023 --nocrop --res", + "f45", + ), "crop-tropics-present": ( "--start-year 2000 --end-year 2000 --res", "5x5_amazon", diff --git a/tools/mksurfdata_esmf/Makefile b/tools/mksurfdata_esmf/Makefile index cc02a50cdb..8dee6db596 100644 --- a/tools/mksurfdata_esmf/Makefile +++ b/tools/mksurfdata_esmf/Makefile @@ -79,11 +79,13 @@ SUBSETDATA_1X1_URBALPHA := --lat -37.7308 --lon 0 --site 1x1_urbanc_alpha --o # low-res is for low resolutions for testing # nldas is for NWP working with WRF # STANDARD means no crop, so 16 pfts +# global-hist-1850-f45 is used by FATES and we expect it to be phased out STANDARD = \ global-potveg \ global-present \ global-present-low-res \ global-hist-1850-f19 \ + global-hist-1850-f45 \ CROP = \ crop-global-future \ @@ -157,6 +159,9 @@ global-present-low-res : FORCE global-hist-1850-f19 : FORCE $(MKSURFDATA) --number-of-nodes 8 --scenario $@ --jobscript-file $@.sh --walltime 12:00:00 $(BATCHJOBS) $@.sh +global-hist-1850-f45 : FORCE + $(MKSURFDATA) --number-of-nodes 2 --scenario $@ --jobscript-file $@.sh --walltime 12:00:00 + $(BATCHJOBS) $@.sh # # Ultra high resolutions (Don't do by default user should select this by hand) # From cdbc561c4e28a4cf5ffd259d285e596ffef06911 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 24 Oct 2024 18:58:56 -0600 Subject: [PATCH 050/116] Add f45 16pft fates test to build-namelist_test.pl --- bld/unit_testers/build-namelist_test.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index ca11c18253..2d848b38a5 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -546,6 +546,7 @@ sub cat_and_create_namelistinfile { "--res 0.9x1.25 --bgc sp --use_case 1850-2100_SSP2-4.5_transient --namelist '&a start_ymd=18501223/'", "-bgc fates -use_case 2000_control -no-megan", "-bgc fates -use_case 20thC_transient -no-megan", + "-bgc fates -use_case 20thC_transient -no-megan -no-crop --res 4x5", "-bgc fates -use_case 1850_control -no-megan -namelist \"&a use_fates_sp=T, soil_decomp_method='None'/\"", "-bgc sp -use_case 2000_control -res 0.9x1.25 -namelist '&a use_soil_moisture_streams = T/'", "--res 1.9x2.5 --bgc bgc --use_case 1850-2100_SSP2-4.5_transient --namelist '&a start_ymd=19101023/'", From cde3b247886e43900dc770ecf0eb402ffe82cbba Mon Sep 17 00:00:00 2001 From: adamrher Date: Tue, 20 Aug 2024 15:25:28 -0600 Subject: [PATCH 051/116] added polarcap support for cesm3 release --- bld/namelist_files/namelist_defaults_ctsm.xml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index e036fbfcd9..4440ea5a48 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -721,6 +721,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. .true. @@ -742,6 +744,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. + +.true. .true. .true. +.true. .true. @@ -775,6 +784,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. +.true. + +.true. hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. +hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. +hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + +hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. @@ -1395,6 +1423,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + Date: Mon, 28 Oct 2024 16:32:49 -0600 Subject: [PATCH 052/116] Remove clm50 physics support for the POLARCAP grid --- bld/namelist_files/namelist_defaults_ctsm.xml | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 8665bbafc0..70f5f952f0 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -721,8 +721,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. -.true. .true. @@ -766,8 +764,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. -.true. .true. @@ -1038,11 +1034,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. -hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. -hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc - -lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - - lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc - -lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - - Date: Mon, 28 Oct 2024 17:38:32 -0600 Subject: [PATCH 053/116] Rm clm50 test from build-namelist_test; correct syntax error in xml file --- bld/namelist_files/namelist_defaults_ctsm.xml | 5 ++-- bld/unit_testers/build-namelist_test.pl | 26 ++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 70f5f952f0..85fcc20c7e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -743,7 +743,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. .true. + maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.POLARCAP.ne30x4">.true. .true. @@ -781,7 +781,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. .true. + maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.POLARCAP.ne30x4">.true. .true. @@ -1200,6 +1200,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 2d848b38a5..d5f6cd47c8 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -506,6 +506,31 @@ sub cat_and_create_namelistinfile { } } print "\n===============================================================================\n"; +print "Test setting drv_flds_in fields in CAM, clm60 only"; +print "=================================================================================\n"; +foreach my $phys ( "clm6_0" ) { + $mode = "-phys $phys CAM_SETS_DRV_FLDS"; + &make_config_cache($phys); + foreach my $options ( + "--res ne0np4.POLARCAP.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + ) { + &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); + eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; + is( $@, '', "options: $options" ); + $cfiles->checkfilesexist( "$options", $mode ); + $cfiles->shownmldiff( "default", $mode ); + if ( defined($opts{'compare'}) ) { + $cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode ); + $cfiles->dodiffonfile( "lnd_in", "$options", $mode ); + $cfiles->comparefiles( "$options", $mode, $opts{'compare'} ); + } + if ( defined($opts{'generate'}) ) { + $cfiles->copyfiles( "$options", $mode ); + } + &cleanup(); + } +} +print "\n===============================================================================\n"; print "Test setting drv_flds_in fields in CAM"; print "=================================================================================\n"; foreach my $phys ( "clm5_0", "clm6_0" ) { @@ -515,7 +540,6 @@ sub cat_and_create_namelistinfile { "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", - "--res ne0np4.POLARCAP.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4.ARCTIC.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4.ARCTICGRIS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", From a7ef2e5dd277324d149a99829049ca0213f5c08b Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 28 Oct 2024 17:43:15 -0600 Subject: [PATCH 054/116] Rm clm50 test from ctsm_sci test-suite --- cime_config/testdefs/testlist_clm.xml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 2bd253ed49..4c13e821b3 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2065,24 +2065,13 @@ - - - - - - - - - - - - + From 237b11439ddf19080e3680c1762d01bcd274d937 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 29 Oct 2024 15:07:43 -0600 Subject: [PATCH 055/116] Correction to failure phase for four tests in ExpectedTestFails --- cime_config/testdefs/ExpectedTestFails.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 041cb51516..2945d4fbac 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -37,25 +37,25 @@ - + FAIL #2784 - + FAIL #2784 - + FAIL #2784 - + FAIL #2784 From db72132852dbf6bad936ac3f3545d3847630a46a Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 29 Oct 2024 15:56:05 -0600 Subject: [PATCH 056/116] Putting back code lost in updates, used in #2805 for tests to pass --- bld/namelist_files/namelist_defaults_ctsm.xml | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 85fcc20c7e..e036fbfcd9 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -742,11 +742,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4.ARCTIC.ne30x4" >.true. .true. -.true. - -.true. .true. .true. -.true. - -.true. hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=ne0np4.POLARCAP.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - - -hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc - -lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - - lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc - -lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - - Date: Wed, 30 Oct 2024 01:47:33 -0600 Subject: [PATCH 057/116] Get the PF UNIT tests working using the full ESMF library which also requires PIO and NetCDF as a result --- src/CMakeLists.txt | 55 ++++++++++--------- .../test/CNPhenology_test/CMakeLists.txt | 2 +- .../test/CNVegComputeSeed_test/CMakeLists.txt | 2 +- .../test/DustEmis_test/CMakeLists.txt | 2 +- .../test/Latbaset_test/CMakeLists.txt | 2 +- .../test/Balance_test/CMakeLists.txt | 2 +- .../test/Daylength_test/CMakeLists.txt | 2 +- .../HillslopeHydrology_test/CMakeLists.txt | 2 +- .../test/Irrigation_test/CMakeLists.txt | 2 +- .../test/Photosynthesis_test/CMakeLists.txt | 2 +- .../test/SnowHydrology_test/CMakeLists.txt | 2 +- .../TotalWaterAndHeat_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../test/WaterTracerUtils_test/CMakeLists.txt | 2 +- .../test/WaterType_test/CMakeLists.txt | 2 +- .../test/Wateratm2lnd_test/CMakeLists.txt | 2 +- .../dynConsBiogeophys_test/CMakeLists.txt | 2 +- .../test/dynInitColumns_test/CMakeLists.txt | 2 +- .../test/dynTimeInfo_test/CMakeLists.txt | 2 +- .../test/dynVar_test/CMakeLists.txt | 2 +- src/main/test/accumul_test/CMakeLists.txt | 2 +- src/main/test/atm2lnd_test/CMakeLists.txt | 2 +- .../test/initVertical_test/CMakeLists.txt | 2 +- .../test/assertions_test/CMakeLists.txt | 2 +- .../test/tillage_test/CMakeLists.txt | 2 +- .../annual_flux_dribbler_test/CMakeLists.txt | 2 +- .../test/array_utils_test/CMakeLists.txt | 2 +- .../test/clm_time_manager_test/CMakeLists.txt | 2 +- src/utils/test/numerics_test/CMakeLists.txt | 2 +- 29 files changed, 56 insertions(+), 55 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5b0f6c9b1b..7501723930 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,14 +3,18 @@ cmake_minimum_required(VERSION 2.8) list(APPEND CMAKE_MODULE_PATH ${CIME_CMAKE_MODULE_DIRECTORY}) include(CIME_initial_setup) -project(clm45_tests Fortran C) +#list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../tools/mksurfdata_esmf/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../share/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../component/cmeps/cmake") + +project(clm_tests Fortran C) include(CIME_utils) set(CLM_ROOT "..") -# This definition is needed to avoid having ESMF depend on mpi -add_definitions(-DHIDE_MPI) +#find_package(ESMF 8.2.0 REQUIRED ) +find_package(NetCDF 4.7.4 REQUIRED Fortran) # Add source directories from other share code (csm_share, etc.). This should be # done first, so that in case of name collisions, the CLM versions take @@ -18,7 +22,6 @@ add_definitions(-DHIDE_MPI) # wins). add_subdirectory(${CLM_ROOT}/share/src csm_share) add_subdirectory(${CLM_ROOT}/share/unit_test_stubs/util csm_share_stubs) -add_subdirectory(${CLM_ROOT}/share/src/esmf_wrf_timemgr esmf_wrf_timemgr) # Add files needed from CMEPS list ( APPEND drv_sources_needed @@ -53,43 +56,41 @@ foreach (sourcefile ${share_sources}) endif() endforeach() -# Remove shr_cal_mod from share_sources. -# -# shr_cal_mod depends on ESMF (or the lightweight esmf wrf timemgr, at -# least). Since CTSM doesn't currently use shr_cal_mod, we're avoiding -# the extra overhead of including esmf_wrf_timemgr sources in this -# build. -# -# TODO: like above, this should be moved into a general-purpose function -# in Sourcelist_utils. Then this block of code could be replaced with a -# single call, like: remove_source_file(${share_sources} -# "shr_cal_mod.F90") -foreach (sourcefile ${share_sources}) - string(REGEX MATCH "shr_cal_mod.F90" match_found ${sourcefile}) - if(match_found) - list(REMOVE_ITEM share_sources ${sourcefile}) - endif() -endforeach() +if (DEFINED PIO) + set(PIO_PATH ${PIO}) +else() + set(PIO_PATH $ENV{PIO}) +endif() # Build libraries containing stuff needed for the unit tests. # Eventually, these add_library calls should probably be distributed into the correct location, rather than being in this top-level CMakeLists.txt file. add_library(csm_share ${share_sources} ${drv_sources_needed}) declare_generated_dependencies(csm_share "${share_genf90_sources}") -add_library(esmf_wrf_timemgr ${esmf_wrf_timemgr_sources}) add_library(clm ${clm_sources}) declare_generated_dependencies(clm "${clm_genf90_sources}") -add_dependencies(esmf_wrf_timemgr csm_share) -add_dependencies(clm csm_share esmf_wrf_timemgr) +add_dependencies(clm csm_share esmf) # We need to look for header files here, in order to pick up shr_assert.h include_directories(${CLM_ROOT}/share/include) -# And we need to look for header files here, for some include files needed by -# the esmf_wrf_timemgr code -include_directories(${CLM_ROOT}/share/src/esmf_wrf_timemgr) + +# PIO2 +add_compile_definitions(PIO2) + +add_library(pioc STATIC IMPORTED) +add_library(piof STATIC IMPORTED) +set_property(TARGET pioc PROPERTY IMPORTED_LOCATION $ENV{PIO}/lib/libpioc.so) +set_property(TARGET piof PROPERTY IMPORTED_LOCATION $ENV{PIO}/lib/libpiof.so) + # Tell cmake to look for libraries & mod files here, because this is where we built libraries include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories (${ESMF_F90COMPILEPATHS}) +include_directories ($ENV{PIO}/include) +include_directories (${NETCDF}/include) + +message( "CMAKE_CURRENT_BINARY_DIR = ${CMAKE_CURRENT_BINARY_DIR}" ) link_directories(${CMAKE_CURRENT_BINARY_DIR}) +link_libraries( pioc piof netcdf ) # Add the test directories # Note: it's possible that these could be added by each source directory that diff --git a/src/biogeochem/test/CNPhenology_test/CMakeLists.txt b/src/biogeochem/test/CNPhenology_test/CMakeLists.txt index 2367c86612..283e089ba6 100644 --- a/src/biogeochem/test/CNPhenology_test/CMakeLists.txt +++ b/src/biogeochem/test/CNPhenology_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(CNPhenology TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeochem/test/CNVegComputeSeed_test/CMakeLists.txt b/src/biogeochem/test/CNVegComputeSeed_test/CMakeLists.txt index dd6bdba723..b958439031 100644 --- a/src/biogeochem/test/CNVegComputeSeed_test/CMakeLists.txt +++ b/src/biogeochem/test/CNVegComputeSeed_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(CNVegComputeSeed TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeochem/test/DustEmis_test/CMakeLists.txt b/src/biogeochem/test/DustEmis_test/CMakeLists.txt index c705d6c2e3..d312b721b9 100644 --- a/src/biogeochem/test/DustEmis_test/CMakeLists.txt +++ b/src/biogeochem/test/DustEmis_test/CMakeLists.txt @@ -5,4 +5,4 @@ set (pfunit_sources add_pfunit_ctest(DustEmis TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeochem/test/Latbaset_test/CMakeLists.txt b/src/biogeochem/test/Latbaset_test/CMakeLists.txt index 217fc7233c..d9f1c044f3 100644 --- a/src/biogeochem/test/Latbaset_test/CMakeLists.txt +++ b/src/biogeochem/test/Latbaset_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(CropTypeLatbaset TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Balance_test/CMakeLists.txt b/src/biogeophys/test/Balance_test/CMakeLists.txt index 541d4fb266..e140323124 100644 --- a/src/biogeophys/test/Balance_test/CMakeLists.txt +++ b/src/biogeophys/test/Balance_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(balance TEST_SOURCES "test_Balance.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Daylength_test/CMakeLists.txt b/src/biogeophys/test/Daylength_test/CMakeLists.txt index 2e5cb58cf9..bd2d6407a9 100644 --- a/src/biogeophys/test/Daylength_test/CMakeLists.txt +++ b/src/biogeophys/test/Daylength_test/CMakeLists.txt @@ -4,4 +4,4 @@ set (pfunit_sources add_pfunit_ctest(Daylength TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/HillslopeHydrology_test/CMakeLists.txt b/src/biogeophys/test/HillslopeHydrology_test/CMakeLists.txt index f40baf96ed..078934cc78 100644 --- a/src/biogeophys/test/HillslopeHydrology_test/CMakeLists.txt +++ b/src/biogeophys/test/HillslopeHydrology_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(HillslopeHydrologyUtils TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Irrigation_test/CMakeLists.txt b/src/biogeophys/test/Irrigation_test/CMakeLists.txt index 8cb531ba1a..4acf72961d 100644 --- a/src/biogeophys/test/Irrigation_test/CMakeLists.txt +++ b/src/biogeophys/test/Irrigation_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(irrigation TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Photosynthesis_test/CMakeLists.txt b/src/biogeophys/test/Photosynthesis_test/CMakeLists.txt index 29810cbd9d..628a98994a 100644 --- a/src/biogeophys/test/Photosynthesis_test/CMakeLists.txt +++ b/src/biogeophys/test/Photosynthesis_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(Photosynthesis TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/SnowHydrology_test/CMakeLists.txt b/src/biogeophys/test/SnowHydrology_test/CMakeLists.txt index 600356b2ff..9e1738ab83 100644 --- a/src/biogeophys/test/SnowHydrology_test/CMakeLists.txt +++ b/src/biogeophys/test/SnowHydrology_test/CMakeLists.txt @@ -5,4 +5,4 @@ set (pfunit_sources add_pfunit_ctest(SnowHydrology TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/TotalWaterAndHeat_test/CMakeLists.txt b/src/biogeophys/test/TotalWaterAndHeat_test/CMakeLists.txt index a82532f69b..424515e414 100644 --- a/src/biogeophys/test/TotalWaterAndHeat_test/CMakeLists.txt +++ b/src/biogeophys/test/TotalWaterAndHeat_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(total_water_and_heat TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/WaterTracerContainerType_test/CMakeLists.txt b/src/biogeophys/test/WaterTracerContainerType_test/CMakeLists.txt index 283906a442..645972aa1e 100644 --- a/src/biogeophys/test/WaterTracerContainerType_test/CMakeLists.txt +++ b/src/biogeophys/test/WaterTracerContainerType_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(water_tracer_container TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/WaterTracerUtils_test/CMakeLists.txt b/src/biogeophys/test/WaterTracerUtils_test/CMakeLists.txt index 321e06883a..1a65bbfadd 100644 --- a/src/biogeophys/test/WaterTracerUtils_test/CMakeLists.txt +++ b/src/biogeophys/test/WaterTracerUtils_test/CMakeLists.txt @@ -5,4 +5,4 @@ set (pfunit_sources add_pfunit_ctest(water_tracer_utils TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/WaterType_test/CMakeLists.txt b/src/biogeophys/test/WaterType_test/CMakeLists.txt index 506179aabd..3f0ab409da 100644 --- a/src/biogeophys/test/WaterType_test/CMakeLists.txt +++ b/src/biogeophys/test/WaterType_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(water_type TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Wateratm2lnd_test/CMakeLists.txt b/src/biogeophys/test/Wateratm2lnd_test/CMakeLists.txt index c2157952e0..1ddb840431 100644 --- a/src/biogeophys/test/Wateratm2lnd_test/CMakeLists.txt +++ b/src/biogeophys/test/Wateratm2lnd_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(water_atm2lnd TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/dyn_subgrid/test/dynConsBiogeophys_test/CMakeLists.txt b/src/dyn_subgrid/test/dynConsBiogeophys_test/CMakeLists.txt index 5e981270a4..da9c27090c 100644 --- a/src/dyn_subgrid/test/dynConsBiogeophys_test/CMakeLists.txt +++ b/src/dyn_subgrid/test/dynConsBiogeophys_test/CMakeLists.txt @@ -3,4 +3,4 @@ set(pfunit_sources add_pfunit_ctest(dynConsBiogeophys TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/dyn_subgrid/test/dynInitColumns_test/CMakeLists.txt b/src/dyn_subgrid/test/dynInitColumns_test/CMakeLists.txt index 7952f66756..0adbd696ad 100644 --- a/src/dyn_subgrid/test/dynInitColumns_test/CMakeLists.txt +++ b/src/dyn_subgrid/test/dynInitColumns_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(dynInitColumns TEST_SOURCES "test_init_columns.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/dyn_subgrid/test/dynTimeInfo_test/CMakeLists.txt b/src/dyn_subgrid/test/dynTimeInfo_test/CMakeLists.txt index 66f2027c36..625ddae91b 100644 --- a/src/dyn_subgrid/test/dynTimeInfo_test/CMakeLists.txt +++ b/src/dyn_subgrid/test/dynTimeInfo_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(dynTimeInfo TEST_SOURCES "test_dynTimeInfo.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/dyn_subgrid/test/dynVar_test/CMakeLists.txt b/src/dyn_subgrid/test/dynVar_test/CMakeLists.txt index fc4cf07b30..7164947f1e 100644 --- a/src/dyn_subgrid/test/dynVar_test/CMakeLists.txt +++ b/src/dyn_subgrid/test/dynVar_test/CMakeLists.txt @@ -9,4 +9,4 @@ set (extra_sources add_pfunit_ctest(dynVar TEST_SOURCES "${pfunit_sources}" OTHER_SOURCES "${extra_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/main/test/accumul_test/CMakeLists.txt b/src/main/test/accumul_test/CMakeLists.txt index 0b06d9e87e..8d7cf69f1c 100644 --- a/src/main/test/accumul_test/CMakeLists.txt +++ b/src/main/test/accumul_test/CMakeLists.txt @@ -3,4 +3,4 @@ set(pfunit_sources add_pfunit_ctest(accumul TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/main/test/atm2lnd_test/CMakeLists.txt b/src/main/test/atm2lnd_test/CMakeLists.txt index 51c4732205..fcc4159ce2 100644 --- a/src/main/test/atm2lnd_test/CMakeLists.txt +++ b/src/main/test/atm2lnd_test/CMakeLists.txt @@ -4,4 +4,4 @@ set(pfunit_sources add_pfunit_ctest(atm2lnd TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/main/test/initVertical_test/CMakeLists.txt b/src/main/test/initVertical_test/CMakeLists.txt index 8fe9648a50..aec45772c4 100644 --- a/src/main/test/initVertical_test/CMakeLists.txt +++ b/src/main/test/initVertical_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(initVertical TEST_SOURCES "test_initVertical.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/self_tests/test/assertions_test/CMakeLists.txt b/src/self_tests/test/assertions_test/CMakeLists.txt index d36d8c7675..aeae976839 100644 --- a/src/self_tests/test/assertions_test/CMakeLists.txt +++ b/src/self_tests/test/assertions_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(assertions TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/soilbiogeochem/test/tillage_test/CMakeLists.txt b/src/soilbiogeochem/test/tillage_test/CMakeLists.txt index fbc550dd03..13be9aee3e 100644 --- a/src/soilbiogeochem/test/tillage_test/CMakeLists.txt +++ b/src/soilbiogeochem/test/tillage_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(tillage TEST_SOURCES "test_tillage.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/utils/test/annual_flux_dribbler_test/CMakeLists.txt b/src/utils/test/annual_flux_dribbler_test/CMakeLists.txt index a0a60e7431..01efdc1e50 100644 --- a/src/utils/test/annual_flux_dribbler_test/CMakeLists.txt +++ b/src/utils/test/annual_flux_dribbler_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(annual_flux_dribbler TEST_SOURCES "test_annual_flux_dribbler.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/utils/test/array_utils_test/CMakeLists.txt b/src/utils/test/array_utils_test/CMakeLists.txt index 21c7d91d81..a6b36304b4 100644 --- a/src/utils/test/array_utils_test/CMakeLists.txt +++ b/src/utils/test/array_utils_test/CMakeLists.txt @@ -5,4 +5,4 @@ set (pfunit_sources add_pfunit_ctest(array_utils TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/utils/test/clm_time_manager_test/CMakeLists.txt b/src/utils/test/clm_time_manager_test/CMakeLists.txt index f34e77dfc9..66a62e665d 100644 --- a/src/utils/test/clm_time_manager_test/CMakeLists.txt +++ b/src/utils/test/clm_time_manager_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(clm_time_manager TEST_SOURCES "test_clm_time_manager.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/utils/test/numerics_test/CMakeLists.txt b/src/utils/test/numerics_test/CMakeLists.txt index 19d2c67451..2e826e2018 100644 --- a/src/utils/test/numerics_test/CMakeLists.txt +++ b/src/utils/test/numerics_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(numerics TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) From 31070e622c65b88620e317903f038a67a2c8ba48 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 30 Oct 2024 01:49:27 -0600 Subject: [PATCH 058/116] Update submodules to something towards cesm3_0_alpha04a with cime updated beyond it as needed by PF UNIT testing, and ccs_config just updated to one beyond the previous one used by CTSM --- .gitmodules | 22 +++++++++++++++------- libraries/mpi-serial | 1 + 2 files changed, 16 insertions(+), 7 deletions(-) create mode 160000 libraries/mpi-serial diff --git a/.gitmodules b/.gitmodules index 1f6da08484..30adb590d3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -60,7 +60,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/MOSART [submodule "mizuRoute"] path = components/mizuRoute url = https://github.com/ESCOMP/mizuRoute -fxtag = cesm-coupling.n02_v2.1.2 +fxtag = cesm-coupling.n02_v2.1.3 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute @@ -68,7 +68,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git -fxtag = ccs_config_cesm1.0.0 +fxtag = ccs_config_cesm1.0.8 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git @@ -76,7 +76,7 @@ fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git [submodule "cime"] path = cime url = https://github.com/ESMCI/cime -fxtag = cime6.0.246 +fxtag = cime6.1.37 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/cime @@ -84,7 +84,7 @@ fxDONOTUSEurl = https://github.com/ESMCI/cime [submodule "cmeps"] path = components/cmeps url = https://github.com/ESCOMP/CMEPS.git -fxtag = cmeps0.14.77 +fxtag = cmeps1.0.16 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git @@ -92,7 +92,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git [submodule "cdeps"] path = components/cdeps url = https://github.com/ESCOMP/CDEPS.git -fxtag = cdeps1.0.48 +fxtag = cdeps1.0.53 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git @@ -100,7 +100,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git [submodule "share"] path = share url = https://github.com/ESCOMP/CESM_share -fxtag = share1.0.19 +fxtag = share1.0.20 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share @@ -116,11 +116,19 @@ fxDONOTUSEurl = https://github.com/MCSclimate/MCT [submodule "parallelio"] path = libraries/parallelio url = https://github.com/NCAR/ParallelIO -fxtag = pio2_6_2 +fxtag = pio2_6_3 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/ParallelIO +[submodule "mpi-serial"] +path = libraries/mpi-serial +url = https://github.com/ESMCI/mpi-serial +fxtag = MPIserial_2.5.0 +fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed +fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial + [submodule "doc-builder"] path = doc/doc-builder url = https://github.com/ESMCI/doc-builder diff --git a/libraries/mpi-serial b/libraries/mpi-serial new file mode 160000 index 0000000000..2c44fb3d32 --- /dev/null +++ b/libraries/mpi-serial @@ -0,0 +1 @@ +Subproject commit 2c44fb3d327be7c6429894bc5d4de769f3486848 From 326d8dd2fff3cae329dc56aba54330e0615c7ba7 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 30 Oct 2024 10:50:36 -0600 Subject: [PATCH 059/116] Match cesm3_0_alpha04a submodules closer, move ccs_config back one, and share forward, and remove mct --- .gitmodules | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index 30adb590d3..5f1e4b9fa7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -68,7 +68,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git -fxtag = ccs_config_cesm1.0.8 +fxtag = ccs_config_cesm1.0.7 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git @@ -100,19 +100,11 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git [submodule "share"] path = share url = https://github.com/ESCOMP/CESM_share -fxtag = share1.0.20 +fxtag = share1.1.2 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share -[submodule "mct"] -path = libraries/mct -url = https://github.com/MCSclimate/MCT -fxtag = MCT_2.11.0 -fxrequired = ToplevelRequired -# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed -fxDONOTUSEurl = https://github.com/MCSclimate/MCT - [submodule "parallelio"] path = libraries/parallelio url = https://github.com/NCAR/ParallelIO From c3a4d8b735627225539e37a40a1e0c397dd03b1a Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 30 Oct 2024 10:52:22 -0600 Subject: [PATCH 060/116] Update git submodule directories --- ccs_config | 2 +- cime | 2 +- components/cdeps | 2 +- components/cmeps | 2 +- components/mizuRoute | 2 +- libraries/parallelio | 2 +- share | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ccs_config b/ccs_config index 69a958581e..e4ac80ef14 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 69a958581ecd2d32ee9cb1c38bcd3847b8b920bf +Subproject commit e4ac80ef142954e582b4065222145352f22cd3a4 diff --git a/cime b/cime index 422ddaa770..a8a04e2d9d 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit 422ddaa770a3cea6e83a60c9700ebce77acaceed +Subproject commit a8a04e2d9deac572e6f2222b4f893a575308db99 diff --git a/components/cdeps b/components/cdeps index 7b0b3a8272..f6bc97483a 160000 --- a/components/cdeps +++ b/components/cdeps @@ -1 +1 @@ -Subproject commit 7b0b3a827241c53d296ec877cb1f59966bf5e5bf +Subproject commit f6bc97483a1bfb7352c6c5610a13ed898a86990b diff --git a/components/cmeps b/components/cmeps index 47fb4e633a..5b7d76978e 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 47fb4e633a76ec6d60969b1af751f90790387246 +Subproject commit 5b7d76978e2fdc661ec2de4ba9834b985decadc6 diff --git a/components/mizuRoute b/components/mizuRoute index 81c720c7ee..2ff305a029 160000 --- a/components/mizuRoute +++ b/components/mizuRoute @@ -1 +1 @@ -Subproject commit 81c720c7ee51f9c69f2934f696078c42f4493565 +Subproject commit 2ff305a0292cb06789de6cfea7ad3cc0d6173493 diff --git a/libraries/parallelio b/libraries/parallelio index f52ade0756..6539ef05ae 160000 --- a/libraries/parallelio +++ b/libraries/parallelio @@ -1 +1 @@ -Subproject commit f52ade075619b32fa141993b5665b0fe099befc2 +Subproject commit 6539ef05ae7584ec570a56fdab9f7dfb336c2b80 diff --git a/share b/share index 4b9dc4871a..f6f31fd61c 160000 --- a/share +++ b/share @@ -1 +1 @@ -Subproject commit 4b9dc4871a259f00f35bb47708d876cb7dcdf75c +Subproject commit f6f31fd61cb8f80aee97311fcca64b3e26b0202c From c0d408037adcccc6c9f33261ff098a3dafd975a5 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 30 Oct 2024 11:06:06 -0600 Subject: [PATCH 061/116] Delete mct as no longer needed --- libraries/mct | 1 - 1 file changed, 1 deletion(-) delete mode 160000 libraries/mct diff --git a/libraries/mct b/libraries/mct deleted file mode 160000 index 82b0071e69..0000000000 --- a/libraries/mct +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 82b0071e69d14330b75d23b0bc68543ebea9aadc From d7cb1820a1b745b5f2ffc896d257fe7ccc6c9ede Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 30 Oct 2024 11:06:37 -0600 Subject: [PATCH 062/116] Update ccs_config as required for the build with this version of cime --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 5f1e4b9fa7..78a24f5789 100644 --- a/.gitmodules +++ b/.gitmodules @@ -68,7 +68,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git -fxtag = ccs_config_cesm1.0.7 +fxtag = ccs_config_cesm1.0.8 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git From f472f6d802a34c6d8093ddaa024da9057e621c4e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 30 Oct 2024 16:50:14 -0600 Subject: [PATCH 063/116] Remove commented out code and log message and add some comments about what's going on based on code review --- src/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7501723930..70cf802e45 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,7 +13,9 @@ include(CIME_utils) set(CLM_ROOT "..") -#find_package(ESMF 8.2.0 REQUIRED ) +# find needed external packages +# This is where ESMF could be asked for, but it's already included in the share build brought in below +# NetCDF is required -- because PIO and NetCDF are required by the standard default ESMF libraries find_package(NetCDF 4.7.4 REQUIRED Fortran) # Add source directories from other share code (csm_share, etc.). This should be @@ -56,6 +58,7 @@ foreach (sourcefile ${share_sources}) endif() endforeach() +# Bring in PIO, jsut because it's needed for the default ESMF library and included in other submodules like share and cmeps if (DEFINED PIO) set(PIO_PATH ${PIO}) else() @@ -64,6 +67,7 @@ endif() # Build libraries containing stuff needed for the unit tests. # Eventually, these add_library calls should probably be distributed into the correct location, rather than being in this top-level CMakeLists.txt file. +# This line of bringing in the share library also brings in ESMF and PIO add_library(csm_share ${share_sources} ${drv_sources_needed}) declare_generated_dependencies(csm_share "${share_genf90_sources}") add_library(clm ${clm_sources}) @@ -74,7 +78,7 @@ add_dependencies(clm csm_share esmf) include_directories(${CLM_ROOT}/share/include) -# PIO2 +# PIO2 library to the include and the linking step add_compile_definitions(PIO2) add_library(pioc STATIC IMPORTED) @@ -88,7 +92,7 @@ include_directories (${ESMF_F90COMPILEPATHS}) include_directories ($ENV{PIO}/include) include_directories (${NETCDF}/include) -message( "CMAKE_CURRENT_BINARY_DIR = ${CMAKE_CURRENT_BINARY_DIR}" ) +# Directories and libraries to include in the link step link_directories(${CMAKE_CURRENT_BINARY_DIR}) link_libraries( pioc piof netcdf ) From 073e742cbc218dc25e3de77c061ad8644f2778fd Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 31 Oct 2024 17:29:07 -0600 Subject: [PATCH 064/116] fsurdat file needed for NEON MOAB PRISM test --- bld/CLMBuildNamelist.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 32204388f3..c206cbcd6f 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -678,6 +678,11 @@ sub setup_cmdl_chk_res { } } +sub begins_with +{ + return substr($_[0], 0, length($_[1])) eq $_[1]; +} + sub setup_cmdl_resolution { my ($opts, $nl_flags, $definition, $defaults, $envxml_ref) = @_; @@ -713,7 +718,7 @@ sub setup_cmdl_resolution { $nl_flags->{'neon'} = ".false."; $nl_flags->{'neonsite'} = ""; if ( $nl_flags->{'res'} eq "CLM_USRDAT" ) { - if ( $opts->{'clm_usr_name'} eq "NEON" ) { + if ( begins_with($opts->{'clm_usr_name'}, "NEON") ) { $nl_flags->{'neon'} = ".true."; $nl_flags->{'neonsite'} = $envxml_ref->{'NEONSITE'}; $log->verbose_message( "This is a NEON site with NEONSITE = " . $nl_flags->{'neonsite'} ); From 1c60312bdd82b2eb869cc4ece9c522aca33eb02c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 1 Nov 2024 13:49:23 -0600 Subject: [PATCH 065/116] CIME update at cime6.1.11 requires moving CIME.utils append_testlog to CIME.status --- cime_config/SystemTests/lilacsmoke.py | 3 ++- cime_config/SystemTests/sspmatrixcn.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cime_config/SystemTests/lilacsmoke.py b/cime_config/SystemTests/lilacsmoke.py index 5bdbb31ec1..8202505ab2 100644 --- a/cime_config/SystemTests/lilacsmoke.py +++ b/cime_config/SystemTests/lilacsmoke.py @@ -25,7 +25,8 @@ import shutil from CIME.SystemTests.system_tests_common import SystemTestsCommon -from CIME.utils import run_cmd, run_cmd_no_fail, symlink_force, new_lid, safe_copy, append_testlog +from CIME.utils import run_cmd, run_cmd_no_fail, symlink_force, new_lid, safe_copy +from CIME.status import append_testlog from CIME.build import post_build from CIME.test_status import ( NAMELIST_PHASE, diff --git a/cime_config/SystemTests/sspmatrixcn.py b/cime_config/SystemTests/sspmatrixcn.py index f4a09a277e..29b6dce8e6 100644 --- a/cime_config/SystemTests/sspmatrixcn.py +++ b/cime_config/SystemTests/sspmatrixcn.py @@ -22,7 +22,7 @@ sys.path.append(os.path.join(CIMEROOT, "scripts", "lib")) sys.path.append(os.path.join(CIMEROOT, "scripts")) else: - from CIME.utils import append_testlog + from CIME.status import append_testlog from CIME.XML.standard_module_setup import * from CIME.SystemTests.system_tests_common import SystemTestsCommon From 94dccba56719c9d21d13c17308ba30307e10f05f Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 1 Nov 2024 14:10:51 -0600 Subject: [PATCH 066/116] Add a comment to note that MCTID is just the component ID number --- src/cpl/nuopc/lnd_comp_nuopc.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpl/nuopc/lnd_comp_nuopc.F90 b/src/cpl/nuopc/lnd_comp_nuopc.F90 index 7fe93454ac..9631e807cd 100644 --- a/src/cpl/nuopc/lnd_comp_nuopc.F90 +++ b/src/cpl/nuopc/lnd_comp_nuopc.F90 @@ -235,7 +235,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return ! Note still need compid for those parts of the code that use the data model - ! functionality through subroutine calls + ! functionality through subroutine calls (MCTID just means the Model ComonenT IDentification number) call NUOPC_CompAttributeGet(gcomp, name='MCTID', value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return read(cvalue,*) compid ! convert from string to integer From ae600d5f5553ec10c5c1b1ed582e7c4bd69273cd Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 2 Nov 2024 01:04:24 -0600 Subject: [PATCH 067/116] Add test for valid driver option --- bld/unit_testers/build-namelist_test.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 2d848b38a5..b6ce7021c6 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,7 +163,7 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3229; +my $ntests = 3230; if ( defined($opts{'compare'}) ) { $ntests += 2437; @@ -922,6 +922,10 @@ sub cat_and_create_namelistinfile { namelst=>"", phys=>"clm6_0", }, + "driver is invalid" =>{ options=>"-driver invalid_name -envxml_dir .", + namelst=>"", + phys=>"clm6_0", + }, "lnd_frac not set but lilac"=>{ options=>"-driver nuopc -lilac -envxml_dir . -lnd_frac UNSET", namelst=>"fsurdat='surfdata.nc'", phys=>"clm6_0", From d38b3a5d6c277b8ea5dee21a02b269c11eb64ff7 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 2 Nov 2024 01:16:29 -0600 Subject: [PATCH 068/116] Some adjustments to make lilac clearer, also add checking for an invalid driver option --- bld/CLMBuildNamelist.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 32204388f3..2018475311 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -71,7 +71,7 @@ REQUIRED OPTIONS (if read they allow user_nl_clm and CLM_BLDNML_OPTS to expand variables [for example to use \$DIN_LOC_ROOT]) (default current directory) - -lnd_frac "domainfile" Land fraction file (the input domain file) (needed for LILAC) + -lnd_frac "domainfile" Land fraction file (the input domain file) (only needed with --lilac option) -res "resolution" Specify horizontal grid. Use nlatxnlon for spectral grids; dlatxdlon for fv grids (dlat and dlon are the grid cell size in degrees for latitude and longitude respectively) @@ -1989,7 +1989,7 @@ sub setup_logic_lnd_frac { "env variables) AND fatmlndfrac on namelist"); } if ( $opts->{$var} =~ /UNSET/ ) { - $log->fatal_error("-lnd_frac was set as UNSET in the CTSM build-namelist set it with the env variables: LND_DOMAIN_PATH/LND_DOMAIN_FILE."); + $log->fatal_error("-lnd_frac was set as UNSET in the CTSM build-namelist, it's required with the --lilac option"); } my $lnd_frac = SetupTools::expand_xml_var( $opts->{$var}, $envxml_ref); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fatmlndfrc','val'=>$lnd_frac ); @@ -1999,20 +1999,22 @@ sub setup_logic_lnd_frac { if (defined $nl->get_value('fatmlndfrc')) { # do nothing - use value provided by config_grid.xml and clm.cpl7.template } else { - $log->fatal_error("fatmlndfrc was NOT sent into CLM build-namelist."); + $log->fatal_error("fatmlndfrc was NOT sent into CLM build-namelist, it is required for the --lilac option."); } # # For the NUOPC driver neither lnd_frac nor fatmlndfrc need to be set # - } else { + } elsif ($opts->{'driver'} eq "nuopc" ) { if ( defined($opts->{$var}) ) { if ( $opts->{$var} !~ /UNSET/ ) { - $log->fatal_error("$var should NOT be set for the NUOPC driver as it is unused" ); + $log->fatal_error("$var should NOT be set for the NUOPC driver as it is unused (only used by the --lilac option)" ); } } if ( defined($nl->get_value('fatmlndfrc')) ) { $log->fatal_error("fatmlndfrac should NOT be set in the namelist for the NUOPC driver as it is unused" ); } + } else { + $log->fatal_error("Input --driver type of $opts->{'driver'} is an invalid option. Correct this in xml variable COMP_iINTERFACE in your case" ); } } @@ -2760,7 +2762,7 @@ SIMYR: foreach my $sim_yr ( @sim_years ) { # this check has to be here and not earlier since use_init_interp is set here and hillslope is already set above in setup_logic_hillslope if ( &value_is_true($nl->get_value($useinitvar)) && value_is_true($nl->get_value("use_hillslope")) ) { $log->warning("WARNING: You have set use_hillslope while $useinitvar is TRUE.\n This means all hillslope columns in a gridcell will read identical values from initial conditions, even if the initial conditions (finidat) file has hillslope information. If you are sure you want this behaviour, add -ignore_warnings to CLM_BLDNML_OPTS.") - } +} } # end initial conditions From 933abaeac41b4e2a5f03ceccd8029f3d35410834 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 2 Nov 2024 02:14:10 -0600 Subject: [PATCH 069/116] Update ccs_config --- ccs_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccs_config b/ccs_config index e4ac80ef14..775e9f7900 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit e4ac80ef142954e582b4065222145352f22cd3a4 +Subproject commit 775e9f790044c3632e70e2beda9d66db34558b7b From 38f11c2d4d7eff409c4069fa06baf60dec1587d9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 6 Nov 2024 11:01:18 -0700 Subject: [PATCH 070/116] Update mpi-serial to version that builds on Izumi --- .gitmodules | 2 +- libraries/mpi-serial | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 78a24f5789..e812c4c63a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -116,7 +116,7 @@ fxDONOTUSEurl = https://github.com/NCAR/ParallelIO [submodule "mpi-serial"] path = libraries/mpi-serial url = https://github.com/ESMCI/mpi-serial -fxtag = MPIserial_2.5.0 +fxtag = MPIserial_2.5.1 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial diff --git a/libraries/mpi-serial b/libraries/mpi-serial index 2c44fb3d32..39416b7546 160000 --- a/libraries/mpi-serial +++ b/libraries/mpi-serial @@ -1 +1 @@ -Subproject commit 2c44fb3d327be7c6429894bc5d4de769f3486848 +Subproject commit 39416b754652bd281a89e86b37734aa5f3ffafd6 From 2a6348f11631ab63f3b8b6ebadc012e7ccb2a78b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 8 Nov 2024 15:26:21 -0700 Subject: [PATCH 071/116] A fix for mpi-serial on Izumi from Jim with an update in ccs_config --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index e812c4c63a..ed23904527 100644 --- a/.gitmodules +++ b/.gitmodules @@ -68,7 +68,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git -fxtag = ccs_config_cesm1.0.8 +fxtag = ccs_config_cesm1.0.10 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git From 6c87b4ed7ffd42e7d63d521ecd1c07d4591c5bb8 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 18 Nov 2024 00:42:57 -0700 Subject: [PATCH 072/116] Remove month length from ER tests fixing #2871 --- cime_config/testdefs/testlist_clm.xml | 52 +++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 4c13e821b3..e91bbe26f7 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -863,7 +863,7 @@ - + @@ -893,7 +893,7 @@ - + @@ -903,7 +903,7 @@ - + @@ -1434,7 +1434,7 @@ - + @@ -1444,7 +1444,7 @@ - + @@ -1452,10 +1452,10 @@ - + - + @@ -1463,7 +1463,7 @@ - + @@ -1474,7 +1474,7 @@ - + @@ -1515,13 +1515,13 @@ - + - + @@ -1551,7 +1551,7 @@ - + @@ -1561,7 +1561,7 @@ - + @@ -1697,7 +1697,7 @@ - + @@ -1725,7 +1725,7 @@ - + @@ -1734,7 +1734,7 @@ - + @@ -1926,7 +1926,7 @@ - + @@ -1936,7 +1936,7 @@ - + @@ -1944,7 +1944,7 @@ - + @@ -2400,7 +2400,7 @@ - + @@ -2466,7 +2466,7 @@ - + @@ -2475,7 +2475,7 @@ - + @@ -2619,7 +2619,7 @@ - + @@ -2628,7 +2628,7 @@ - + @@ -2794,7 +2794,7 @@ - + @@ -2802,7 +2802,7 @@ - + From 8d02a9b7612bb936b18dabdb8a9d32ebf5e75744 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 18 Nov 2024 00:44:37 -0700 Subject: [PATCH 073/116] Add another expected fail --- cime_config/testdefs/ExpectedTestFails.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 53cf50087c..d7e8605eaa 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -138,6 +138,13 @@ + + + FAIL + #2310 + + + FAIL From 16459da0385c2699902e09277b87120e66cc541c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 18 Nov 2024 13:17:31 -0700 Subject: [PATCH 074/116] Change some 13 month tests to 397 in case it's Gregorian for 2000 year compsets, make sure yearly ER tests have at least 3 years, or done in days --- cime_config/testdefs/testlist_clm.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 36d143029f..b3e96839c6 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1570,7 +1570,7 @@ - + @@ -1953,7 +1953,7 @@ - + @@ -2409,7 +2409,7 @@ - + @@ -2803,20 +2803,22 @@ - + + - + + From 9fb9da27c74a8ae31b7ccc8fe43efdd1ca60865f Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 18 Nov 2024 17:20:04 -0700 Subject: [PATCH 075/116] Remove the izumi nag mpi-serial expected fails --- cime_config/testdefs/ExpectedTestFails.xml | 81 ---------------------- 1 file changed, 81 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index d7e8605eaa..10869f105e 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -298,71 +298,6 @@ - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - FAIL @@ -377,22 +312,6 @@ - - - FAIL - #2861 - - - - - - - FAIL - #2861 - - - - FAIL From 7f859f2eaf29837c45af9481f8e2342b440f360d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 19 Nov 2024 02:32:46 -0700 Subject: [PATCH 076/116] Change C96 grids to use the mt232 ocean mask --- cime_config/testdefs/testlist_clm.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index b3e96839c6..8d1adde851 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -196,7 +196,7 @@ - + @@ -749,7 +749,7 @@ - + @@ -1608,7 +1608,7 @@ - + From d36049e7e636b6f581767a31b0c6ebb154f775d9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 19 Nov 2024 02:43:40 -0700 Subject: [PATCH 077/116] Switch some tests from nofire to nofireemis testmod --- cime_config/testdefs/testlist_clm.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 8d1adde851..3e688c5872 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2157,7 +2157,7 @@ - + @@ -2166,7 +2166,7 @@ - + @@ -2176,7 +2176,7 @@ - + @@ -2185,7 +2185,7 @@ - + From 89fdd78b30ffc4213934c890913cb4f2d9d191f3 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 19 Nov 2024 02:46:20 -0700 Subject: [PATCH 078/116] Revert "Switch some tests from nofire to nofireemis testmod" This reverts commit d36049e7e636b6f581767a31b0c6ebb154f775d9. --- cime_config/testdefs/testlist_clm.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 3e688c5872..8d1adde851 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2157,7 +2157,7 @@ - + @@ -2166,7 +2166,7 @@ - + @@ -2176,7 +2176,7 @@ - + @@ -2185,7 +2185,7 @@ - + From 7f57331c71194144e668eb1b37a8d53fcbc41def Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 19 Nov 2024 11:15:20 -0700 Subject: [PATCH 079/116] Fix SP nofire tests Some of the ctsm_sci tests with Sp were running nofire, which should have been nofireemis with the default testmod. --- cime_config/testdefs/testlist_clm.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 8d1adde851..81eb7265d2 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2157,7 +2157,7 @@ - + @@ -2166,32 +2166,35 @@ - + + - + + - + + From 12c5f569a9c101ac30af484e1e458f7948626048 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 19 Nov 2024 12:41:16 -0700 Subject: [PATCH 080/116] Fix 36 year tests that should have been 3 I put in 36 year tests rather than 3 years. One ERP test I made for 762 days rather than 3 years to shorten it. 762 allows even months for one year being a leap year. --- cime_config/testdefs/testlist_clm.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 81eb7265d2..cec7e775f5 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1524,13 +1524,13 @@ - + - + @@ -2478,7 +2478,7 @@ - + @@ -2487,7 +2487,7 @@ - + From 89bbdbc9f0757b755a239120231dbaf8063d883e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 20 Nov 2024 01:57:50 -0700 Subject: [PATCH 081/116] fix (namelist-tester): Run CAM special tests for clm6_0 and get working --- bld/unit_testers/build-namelist_test.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index c012d35418..f23f7d6173 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,7 +163,7 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3230; +my $ntests = 3263; if ( defined($opts{'compare'}) ) { $ntests += 2437; @@ -473,7 +473,7 @@ sub cat_and_create_namelistinfile { print "\n===============================================================================\n"; print "Test some CAM specific setups for special grids \n"; print "=================================================================================\n"; -foreach my $phys ( "clm4_5", "clm5_0" ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { $mode = "-phys $phys"; &make_config_cache($phys); foreach my $options ( @@ -485,7 +485,7 @@ sub cat_and_create_namelistinfile { "-res ne0np4CONUS.ne30x8 -bgc sp -use_case 2000_control -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0", "-res 1.9x2.5 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20030101/' -lnd_tuning_mode ${phys}_cam7.0", "-res 1.9x2.5 -bgc sp -use_case 2010_control -namelist '&a start_ymd=20100101/' -lnd_tuning_mode ${phys}_cam7.0", - "-res 1x1_brazil -no-megan -use_case 2000_control -lnd_tuning_mode ${phys}_CRUv7", + "-res 1x1_brazil -no-megan -use_case 2000_control -lnd_tuning_mode ${phys}_GSWP3v1", "-res C96 -bgc sp -use_case 2010_control -namelist '&a start_ymd=20100101/' -lnd_tuning_mode ${phys}_cam7.0", "-res ne0np4.ARCTIC.ne30x4 -bgc sp -use_case 2000_control -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0", ) { @@ -906,7 +906,7 @@ sub cat_and_create_namelistinfile { namelst=>"h2osfcflag=0", phys=>"clm5_0", }, - "45bad lnd_tuning_mode value" =>{ options=>"-lnd_tuning_mode clm5_0_GSWP3 -envxml_dir .", + "45bad lnd_tuning_mode value" =>{ options=>"-lnd_tuning_mode clm5_0_GSWP3v1 -envxml_dir .", namelst=>"", phys=>"clm4_5", }, From 1de46e3224299ee4eaa87acac8c45c777c75a2ab Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 20 Nov 2024 17:23:30 -0700 Subject: [PATCH 082/116] change (tests): change some of the ER tests that were changed to length days so that they won't be on an exact year/month boundary --- cime_config/testdefs/testlist_clm.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index cec7e775f5..2ad1f3b4d5 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -902,7 +902,7 @@ - + @@ -1551,7 +1551,7 @@ - + @@ -1560,7 +1560,7 @@ - + @@ -2412,7 +2412,7 @@ - + @@ -2478,7 +2478,7 @@ - + @@ -2487,7 +2487,7 @@ - + From 770fc1fc3e9e88c90baaa2ba88f50843b900191e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 20 Nov 2024 17:48:38 -0700 Subject: [PATCH 083/116] update (submodules): ccs_config directory --- ccs_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccs_config b/ccs_config index 775e9f7900..6e77e7ee17 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 775e9f790044c3632e70e2beda9d66db34558b7b +Subproject commit 6e77e7ee1748a4d3b2497d7ad3943498a7cec2aa From 41ac44e63d4c6210eacfef1671118076fb698cad Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 20 Nov 2024 23:36:08 -0700 Subject: [PATCH 084/116] fix(testslist): Last ER monthly test to convert --- cime_config/testdefs/testlist_clm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 2ad1f3b4d5..976df654c5 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -3366,7 +3366,7 @@ - + From 46c5ee1455c41d7312807e6d90f976b4ebc2eb9b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 21 Nov 2024 16:39:18 -0700 Subject: [PATCH 085/116] fix (fatest Landuse test): Get the FatesColdLandUse test working by using a transient compset longname, and adjusting some things in the test-mod --- cime_config/testdefs/testlist_clm.xml | 2 +- .../testmods_dirs/clm/FatesColdLandUse/shell_commands | 6 +++++- .../testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 976df654c5..380d45c620 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -3072,7 +3072,7 @@ - + diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands index 6152f0bd0c..7b89551fde 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands @@ -1,3 +1,7 @@ #!/bin/bash -./xmlchange CLM_BLDNML_OPTS="-clm_demand flanduse_timeseries" --append +# Make sure the use-case is a transient one, so that that the landuse.timeeries file is used +# TODO: Have cases that turn FATES landuse on, use transient compsets and require that they do +# See: https://github.com/ESCOMP/CTSM/issues/2304 +# https://github.com/ESCOMP/CTSM/issues/1617 +./xmlchange --force CLM_NML_USE_CASE=20thC_transient diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm index f718010b07..d0c503b0ef 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm @@ -1 +1,7 @@ +! FATES LandUse using the CTSM landuse timeseries file for the transitions +! Turn off transient lakes and urban right now, until this is handled in +! the build-namelist +! See: https://github.com/ESCOMP/CTSM/issues/1617 fates_harvest_mode = 'landuse_timeseries' +do_transient_lakes = .false. +do_transient_urban = .false. From 26821d837400f640675ed19cd6e4cdb6c3de12bb Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 22 Nov 2024 11:32:58 -0700 Subject: [PATCH 086/116] Add FatesSetupParamBuild to the testmods that will make FATES parameter files as it will test that the environment will work to run it --- .../clm/FatesColdHydro/include_user_mods | 1 + .../clm/FatesColdPRT2/include_user_mods | 1 + .../clm/FatesSetupParamBuild/shell_commands | 84 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100755 cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods index 14f7591b72..77430498b3 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods @@ -1 +1,2 @@ ../FatesCold +../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods index 14f7591b72..61325515f3 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods @@ -1 +1,2 @@ ../FatesCold +../FatesSetupParamBuild/ diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands new file mode 100755 index 0000000000..95f913c392 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -0,0 +1,84 @@ +#!/bin/bash + +# Make sure the environment is setup to run the FATES modify parameter file tool + +if [ -f xmlquery ]; then + SRCDIR=$(./xmlquery SRCROOT --value || echo "null") + error=$? + if [ $error != 0 ]; then + echo "Trouble getting SRCROOT from case" + exit 1 + fi + CASEDIR=`./xmlquery CASEROOT --value` + error=$? + if [ $error != 0 ]; then + echo "Trouble getting CASEROOT from case" + exit 1 + fi + DEBUG=0 +else + echo "set SRCDIR assuming running in the testmod directory" + DEBUG=1 + PWD=`pwd` + CASEDIR=$PWD + SRCDIR="$PWD/../../../../.." +fi +FATESDIR="$SRCDIR/src/fates/" + +# check if ncgen is in your path +which ncgen >& /dev/null +error=$? +if [ $error != 0 ]; then + echo "ncgen is NOT in your path" + exit 1 +elif [ $DEBUG ]; then + echo "ncgen was found" +fi + +# check if conda is in your path +which conda >& /dev/null +error=$? +if [ $error != 0 ]; then + echo "conda is NOT in your path and is used to get the python environment to run the FATES modify parameter file tool" + noconda=1 +else + if [ $DEBUG ]; then + echo "conda was found" + fi + noconda=0 +fi + +# Check that the modify script exists and can be used + +MODIFY_FATES_PARAMFILE="$FATESDIR/tools/modify_fates_paramfile.py" +if [ ! -f $MODIFY_FATES_PARAMFILE ]; then + echo "$MODIFY_FATES_PARAMFILE does NOT exist" + exit 1 +elif [ $DEBUG ]; then + echo "$MODIFY_FATES_PARAMFILE was found" +fi + +$MODIFY_FATES_PARAMFILE --help >& /dev/null +error=$? +if [ $error != 0 ]; then + echo "$MODIFY_FATES_PARAMFILE can NOT be succesfully run" + if [ $noconda == 1 ]; then + echo "Attempting to activate the conda ctsm_pylib environment" + conda activate ctsm_pylib + error=$? + if [ $error != 0 ]; then + echo "Trouble activating the conda ctsm_pylib environment" + exit 1 + elif [ $DEBUG ]; then + echo "conda activate ctsm_pylib was successful" + fi + else + echo "Make sure your python environment can run $MODIFY_FATES_PARAMFILE" + echo "One way to do that is to add conda to your environment" + echo " then activate the ctsm_pylib environemnt" + echo " ctsm_oylib is created at the top level of CTSM using py_env_create" + exit 1 + fi +elif [ $DEBUG ]; then + echo "$MODIFY_FATES_PARAMFILE is runable" +fi From 1a30a2abda72cc37bddd494135c4799b083e6a7d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 22 Nov 2024 11:35:47 -0700 Subject: [PATCH 087/116] fix (build-namelist): Remove the check for file existance so that build-namelist can be run and check_input_data --download can be used to get files that currently don't exist --- bld/CLMBuildNamelist.pm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index a3236d4354..ee5dd18c9e 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -4758,8 +4758,6 @@ sub setup_logic_fates { my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) ); if ( ! defined($nl->get_value($var)) ) { $log->fatal_error("$var is required when use_fates_inventory_init is set" ); - } elsif ( ! -f "$fname" ) { - $log->fatal_error("$fname does NOT point to a valid filename" ); } } } @@ -4790,8 +4788,6 @@ sub setup_logic_fates { my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) ); if ( ! defined($nl->get_value($var)) ) { $log->fatal_error("$var is required when use_fates_luh is set and use_fates_potentialveg is false" ); - } elsif ( ! -f "$fname" ) { - $log->fatal_error("$var does NOT point to a valid filename" ); } } } @@ -4804,8 +4800,6 @@ sub setup_logic_fates { my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) ); if ( ! defined($nl->get_value($var)) ) { $log->fatal_error("$var is required when use_fates_luh and use_fates_fixed_biogeog is set" ); - } elsif ( ! -f "$fname" ) { - $log->fatal_error("$var does NOT point to a valid filename" ); } } } @@ -4847,8 +4841,6 @@ sub setup_logic_fates { my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) ); if ( ! defined($nl->get_value($var)) ) { $log->fatal_error("$var is required when fates_harvest_mode is landuse_timeseries" ); - } elsif ( ! -f "$fname" ) { - $log->fatal_error("$var does NOT point to a valid filename" ); } } } From a9b02b749f67c987c8cfb1567bc35bca253472ab Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 22 Nov 2024 14:47:26 -0700 Subject: [PATCH 088/116] Comment out the use-case setting, just make sure the compset used for the test is a transient one --- .../testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands index 7b89551fde..1db5b1820c 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands @@ -4,4 +4,4 @@ # TODO: Have cases that turn FATES landuse on, use transient compsets and require that they do # See: https://github.com/ESCOMP/CTSM/issues/2304 # https://github.com/ESCOMP/CTSM/issues/1617 -./xmlchange --force CLM_NML_USE_CASE=20thC_transient +#./xmlchange --force CLM_NML_USE_CASE=20thC_transient From 9b7f94a0e94fe915e546f988de26eff024ec2a09 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 22 Nov 2024 17:57:22 -0700 Subject: [PATCH 089/116] refactor (FATES param build test): Make a function to make checking for errors easier --- .../clm/FatesSetupParamBuild/shell_commands | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index 95f913c392..4030917f7e 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -2,36 +2,39 @@ # Make sure the environment is setup to run the FATES modify parameter file tool -if [ -f xmlquery ]; then - SRCDIR=$(./xmlquery SRCROOT --value || echo "null") - error=$? - if [ $error != 0 ]; then - echo "Trouble getting SRCROOT from case" - exit 1 +# Function to check for errors and abort +check_error () { + # Arguments: error, message + if [ $# != 2 ]; then + echo "Wrong number of arguments to check_error" fi - CASEDIR=`./xmlquery CASEROOT --value` - error=$? + error=$1 + msg=$2 if [ $error != 0 ]; then - echo "Trouble getting CASEROOT from case" + echo "ERROR: Command failed" + echo $msg exit 1 fi +} + +# If under a casedirectory get a few variables for later use +if [ -f xmlquery ]; then + SRCDIR=$(./xmlquery SRCROOT --value || echo "null") + check_error $? "Trouble getting SRCROOT from case" DEBUG=0 +# otherwise if this is being run in the testmod directory for debugging else echo "set SRCDIR assuming running in the testmod directory" DEBUG=1 PWD=`pwd` - CASEDIR=$PWD SRCDIR="$PWD/../../../../.." fi FATESDIR="$SRCDIR/src/fates/" # check if ncgen is in your path which ncgen >& /dev/null -error=$? -if [ $error != 0 ]; then - echo "ncgen is NOT in your path" - exit 1 -elif [ $DEBUG ]; then +check_error $? "ncgen is NOT in your path" +if [ $DEBUG ]; then echo "ncgen was found" fi @@ -61,22 +64,20 @@ fi $MODIFY_FATES_PARAMFILE --help >& /dev/null error=$? if [ $error != 0 ]; then - echo "$MODIFY_FATES_PARAMFILE can NOT be succesfully run" + echo "$MODIFY_FATES_PARAMFILE can NOT be successfully run" if [ $noconda == 1 ]; then echo "Attempting to activate the conda ctsm_pylib environment" conda activate ctsm_pylib - error=$? - if [ $error != 0 ]; then - echo "Trouble activating the conda ctsm_pylib environment" - exit 1 - elif [ $DEBUG ]; then + check_error $? "Trouble activating the conda ctsm_pylib environment" + if [ $DEBUG ]; then echo "conda activate ctsm_pylib was successful" fi else echo "Make sure your python environment can run $MODIFY_FATES_PARAMFILE" echo "One way to do that is to add conda to your environment" echo " then activate the ctsm_pylib environemnt" - echo " ctsm_oylib is created at the top level of CTSM using py_env_create" + echo " in some cases you may have to add conda activate ctsm_pylib in your startup files" + echo " ctsm_pylib is created at the top level of CTSM using py_env_create" exit 1 fi elif [ $DEBUG ]; then From 6ea3f59b1d8cb86259870fba93ab031309ceb27f Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 22 Nov 2024 18:51:19 -0700 Subject: [PATCH 090/116] Add another level to the testmod includes, so that the FatesSetupBuild lavel appears in the final shell_commands file for the case --- .../testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods | 1 + .../testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods | 1 + 2 files changed, 2 insertions(+) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods index 77430498b3..5ad8824b70 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods @@ -1,2 +1,3 @@ +../Fates ../FatesCold ../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods index 61325515f3..e781a89ea2 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods @@ -1,2 +1,3 @@ +../Fates ../FatesCold ../FatesSetupParamBuild/ From 0fbb17f717e90181211c6fb4625c543c43d51081 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 22 Nov 2024 20:28:10 -0700 Subject: [PATCH 091/116] fix (FATES tests): Add FatesSetupParamBuild to the FATES tests that run the modify_fates_paramfile.py script, so that it will ensure environment is ready to run the script --- .../testmods_dirs/clm/FatesColdSeedDisp/include_user_mods | 2 ++ .../testmods_dirs/clm/FatesColdTwoStream/include_user_mods | 2 ++ .../clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods | 3 +++ 3 files changed, 7 insertions(+) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods index 14f7591b72..5ad8824b70 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods @@ -1 +1,3 @@ +../Fates ../FatesCold +../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/include_user_mods index 14f7591b72..5ad8824b70 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/include_user_mods @@ -1 +1,3 @@ +../Fates ../FatesCold +../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods index 17d5840e8c..afd6dde8e1 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods @@ -1 +1,4 @@ +../Fates +../FatesCold ../FatesColdNoComp +../FatesSetupParamBuild From b5665652e86cd43256b6ff9c22f9647bfb6e5af1 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 27 Nov 2024 01:57:03 -0700 Subject: [PATCH 092/116] Change 15 day ER tests to 20 day tests as this version of cime no longer allows 15 day tests --- cime_config/testdefs/testlist_clm.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 380d45c620..0c6d85bd40 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2731,7 +2731,7 @@ - + @@ -2740,7 +2740,7 @@ - + @@ -2749,7 +2749,7 @@ - + @@ -2758,7 +2758,7 @@ - + @@ -2769,7 +2769,7 @@ - + From 874ee3942ca6110308adccb58280ab0aea752846 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 27 Nov 2024 02:01:35 -0700 Subject: [PATCH 093/116] Pipe errors to stdout --- .../clm/FatesSetupParamBuild/shell_commands | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index 4030917f7e..e23709974c 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -6,13 +6,13 @@ check_error () { # Arguments: error, message if [ $# != 2 ]; then - echo "Wrong number of arguments to check_error" + echo "Wrong number of arguments to check_error" >&2 fi error=$1 msg=$2 if [ $error != 0 ]; then - echo "ERROR: Command failed" - echo $msg + echo "ERROR: Command failed" >&2 + echo $msg >&2 exit 1 fi } @@ -42,7 +42,7 @@ fi which conda >& /dev/null error=$? if [ $error != 0 ]; then - echo "conda is NOT in your path and is used to get the python environment to run the FATES modify parameter file tool" + echo "conda is NOT in your path and is used to get the python environment to run the FATES modify parameter file tool" >&2 noconda=1 else if [ $DEBUG ]; then @@ -55,7 +55,7 @@ fi MODIFY_FATES_PARAMFILE="$FATESDIR/tools/modify_fates_paramfile.py" if [ ! -f $MODIFY_FATES_PARAMFILE ]; then - echo "$MODIFY_FATES_PARAMFILE does NOT exist" + echo "$MODIFY_FATES_PARAMFILE does NOT exist" >&2 exit 1 elif [ $DEBUG ]; then echo "$MODIFY_FATES_PARAMFILE was found" @@ -64,7 +64,7 @@ fi $MODIFY_FATES_PARAMFILE --help >& /dev/null error=$? if [ $error != 0 ]; then - echo "$MODIFY_FATES_PARAMFILE can NOT be successfully run" + echo "$MODIFY_FATES_PARAMFILE can NOT be successfully run" >&2 if [ $noconda == 1 ]; then echo "Attempting to activate the conda ctsm_pylib environment" conda activate ctsm_pylib @@ -73,11 +73,11 @@ if [ $error != 0 ]; then echo "conda activate ctsm_pylib was successful" fi else - echo "Make sure your python environment can run $MODIFY_FATES_PARAMFILE" - echo "One way to do that is to add conda to your environment" - echo " then activate the ctsm_pylib environemnt" - echo " in some cases you may have to add conda activate ctsm_pylib in your startup files" - echo " ctsm_pylib is created at the top level of CTSM using py_env_create" + echo "Make sure your python environment can run $MODIFY_FATES_PARAMFILE" >&2 + echo "One way to do that is to add conda to your environment" >&2 + echo " then activate the ctsm_pylib environemnt" >&2 + echo " in some cases you may have to add conda activate ctsm_pylib in your startup files" >&2 + echo " ctsm_pylib is created at the top level of CTSM using py_env_create" >&2 exit 1 fi elif [ $DEBUG ]; then From 82ba004e8a90e9a31ae45fcf383e1feda284c2b9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 30 Nov 2024 17:31:30 -0700 Subject: [PATCH 094/116] fix (FatesParamfileSetup): get it working again correctly --- .../clm/FatesSetupParamBuild/shell_commands | 112 ++++++++++++------ 1 file changed, 79 insertions(+), 33 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index e23709974c..0f4fab8560 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -2,21 +2,61 @@ # Make sure the environment is setup to run the FATES modify parameter file tool +# Function to log a message if $DEBUG is set +log_msg_if_debug () { + # Arguments: message + if [ "$#" -ne "1" ]; then + echo "Wrong number of arguments to log_msg_if_debug" >&2 + exit 5 + fi + if [ -z "$DEBUG" ];then + echo "log_msg_if_debug was called without DEBUG being set" >&2 + exit 5 + fi + if [ "$DEBUG" -eq "1" ]; then + echo -e $1 + fi +} + # Function to check for errors and abort check_error () { - # Arguments: error, message - if [ $# != 2 ]; then + # Arguments: error, error-message + if [ "$#" -ne "2" ]; then echo "Wrong number of arguments to check_error" >&2 + exit 5 fi error=$1 msg=$2 - if [ $error != 0 ]; then + if [ "$error" -ne "0" ]; then echo "ERROR: Command failed" >&2 echo $msg >&2 exit 1 fi } +# Function to check if a script or command runs without errors +check_if_runable () { + # DO NOT: Add exit statements here as this is meant to be in an if statement + # All log output should also go to standard error, to not confuse the integer return code + # Arguments: command, error-message + # Returns TRUE if runable and FALSE otherwise + if [ "$#" -ne "2" ]; then + echo "Wrong number of arguments to check_if_runable: $# should be 2" >&2 + return 0 + fi + cmd=$1 + msg=$2 + # Run command and send all output to /dev/null to remove it + $($cmd >& /dev/null) + error=$? + if [ "$error" -ne "0" ]; then + echo $msg >&2 + return 0 + else + return 1 + fi +} + # If under a casedirectory get a few variables for later use if [ -f xmlquery ]; then SRCDIR=$(./xmlquery SRCROOT --value || echo "null") @@ -26,30 +66,26 @@ if [ -f xmlquery ]; then else echo "set SRCDIR assuming running in the testmod directory" DEBUG=1 - PWD=`pwd` - SRCDIR="$PWD/../../../../.." + SRCDIR=$(realpath "../../../../..") fi FATESDIR="$SRCDIR/src/fates/" # check if ncgen is in your path -which ncgen >& /dev/null +$(which ncgen >& /dev/null) check_error $? "ncgen is NOT in your path" -if [ $DEBUG ]; then - echo "ncgen was found" -fi +log_msg_if_debug "ncgen was found" # check if conda is in your path -which conda >& /dev/null -error=$? -if [ $error != 0 ]; then - echo "conda is NOT in your path and is used to get the python environment to run the FATES modify parameter file tool" >&2 +msg="conda is NOT in your path and is used to get the python environment to run the FATES modify parameter file tool" +cmd="which conda" +$(check_if_runable "$cmd" "$msg") +if [[ "$?" -eq "0" ]]; then noconda=1 else - if [ $DEBUG ]; then - echo "conda was found" - fi + log_msg_if_debug "conda was found" noconda=0 fi +echo "noconda = $noconda" # Check that the modify script exists and can be used @@ -57,29 +93,39 @@ MODIFY_FATES_PARAMFILE="$FATESDIR/tools/modify_fates_paramfile.py" if [ ! -f $MODIFY_FATES_PARAMFILE ]; then echo "$MODIFY_FATES_PARAMFILE does NOT exist" >&2 exit 1 -elif [ $DEBUG ]; then - echo "$MODIFY_FATES_PARAMFILE was found" fi +log_msg_if_debug "$MODIFY_FATES_PARAMFILE was found" -$MODIFY_FATES_PARAMFILE --help >& /dev/null -error=$? -if [ $error != 0 ]; then - echo "$MODIFY_FATES_PARAMFILE can NOT be successfully run" >&2 - if [ $noconda == 1 ]; then - echo "Attempting to activate the conda ctsm_pylib environment" - conda activate ctsm_pylib - check_error $? "Trouble activating the conda ctsm_pylib environment" - if [ $DEBUG ]; then - echo "conda activate ctsm_pylib was successful" +msg="$MODIFY_FATES_PARAMFILE can NOT be successfully run" +cmd="$MODIFY_FATES_PARAMFILE --help" +# If not runable as is if conda is available try some different options +$(check_if_runable "$cmd" "$msg") +if [[ "$?" -eq "0" ]]; then + echo "failed..." + if [[ $noconda -eq "0" ]]; then + prefix="conda run -n ctsm_pylib" + echo "Attempting to run under \'$prefix\'" + cmdrun="$prefix $cmd" + msg="$prefix $MODIFY_FATES_PARAMFILE can NOT be successfully run" + $(check_if_runable "$cmdrun" "$msg") + if [[ "$?" -eq "0" ]]; then + echo "failed..." + echo "Attempting to activate the ctsm_pylib environment" + $(conda activate ctsm_pylib) + check_error $? "Trouble activating the conda ctsm_pylib environment" + log_msg_if_debug "conda activate ctsm_pylib was successful" + else + MODIFY_FATES_PARAMFILE="$prefix $MODIFY_FATEST_PARAMFILE" fi else echo "Make sure your python environment can run $MODIFY_FATES_PARAMFILE" >&2 - echo "One way to do that is to add conda to your environment" >&2 - echo " then activate the ctsm_pylib environemnt" >&2 - echo " in some cases you may have to add conda activate ctsm_pylib in your startup files" >&2 + echo "One way to do that is to activate the ctsm_pylib conda environment" >&2 + echo " First add conda to your environment" >&2 + echo " Then run the activate command" >&2 + echo " conda activate ctsm_pylib" >&2 + echo " In some cases you may have to add conda activate ctsm_pylib in your startup files" >&2 echo " ctsm_pylib is created at the top level of CTSM using py_env_create" >&2 exit 1 fi -elif [ $DEBUG ]; then - echo "$MODIFY_FATES_PARAMFILE is runable" fi +log_msg_if_debug "$MODIFY_FATES_PARAMFILE is runable" From 4686632863d0087892317fe7ae1ea45ba4a8df71 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 30 Nov 2024 17:35:38 -0700 Subject: [PATCH 095/116] Remove some unneeded debug log statements --- .../testmods_dirs/clm/FatesSetupParamBuild/shell_commands | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index 0f4fab8560..877d7ff2c6 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -85,8 +85,6 @@ else log_msg_if_debug "conda was found" noconda=0 fi -echo "noconda = $noconda" - # Check that the modify script exists and can be used MODIFY_FATES_PARAMFILE="$FATESDIR/tools/modify_fates_paramfile.py" @@ -101,7 +99,6 @@ cmd="$MODIFY_FATES_PARAMFILE --help" # If not runable as is if conda is available try some different options $(check_if_runable "$cmd" "$msg") if [[ "$?" -eq "0" ]]; then - echo "failed..." if [[ $noconda -eq "0" ]]; then prefix="conda run -n ctsm_pylib" echo "Attempting to run under \'$prefix\'" @@ -109,7 +106,6 @@ if [[ "$?" -eq "0" ]]; then msg="$prefix $MODIFY_FATES_PARAMFILE can NOT be successfully run" $(check_if_runable "$cmdrun" "$msg") if [[ "$?" -eq "0" ]]; then - echo "failed..." echo "Attempting to activate the ctsm_pylib environment" $(conda activate ctsm_pylib) check_error $? "Trouble activating the conda ctsm_pylib environment" From 8f72cd697425482dcb35a1bc0bd812b65715861d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 30 Nov 2024 18:10:12 -0700 Subject: [PATCH 096/116] add (user mode testing): add a beginning of a simple bash unit tester for the shell_commands script and it's functions --- .../clm/FatesSetupParamBuild/README.md | 7 ++++ .../run_shell_commands_tests | 37 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md create mode 100755 cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md new file mode 100644 index 0000000000..e2b225d501 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md @@ -0,0 +1,7 @@ + +User mod directory to make sure the user is setup to run the FATES modify param file script. +IF not it trys some different options and prints messages regarding what worked, and what the user +needs to do if nothing worked. + + + diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests new file mode 100755 index 0000000000..a2eb2b4b85 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -0,0 +1,37 @@ +#!/bin/bash + +# Define a custom error handler function +handle_error() { + echo "An error occurred: $1" + echo "error code: $?" + # Additional error handling code can go here + return 1 +} + +# Set the error handler to be called when an error occurs +trap 'handle_error "Something went wrong!"' ERR + +host=`hostname -f` +if [[ "$host" =~ derecho*.hpc.ucar.edu || "$host" =~ d*.hpc.ucar.edu ]] ; then + echo "Running on Derecho..." >&2 + echo ".... making sure conda is loaded..." >&2 + module load conda +else + echo "Not a recognized host: $host" >&2 + exit 5 +fi +echo "Test if shell_commands will run..." +. ./shell_commands > /dev/null + +echo "Now do some tests of the bash subroutines" >&2 +unset DEBUG +$(log_msg_if_debug "Die with Error since DEBUG is unset") +if [[ "$?" -eq "0" ]]; then + echo "Should have died with an error..." >&2 + exit 1 +fi +echo "after DEBUG test" +DEBUG=0 +$(log_msg_if_debug "Die with Error since too many options are input" "another option") + +echo "Successful" From 5aef052e97126171041fb76be15017fb11f5b66f Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sun, 1 Dec 2024 15:26:34 -0700 Subject: [PATCH 097/116] Add title and list files --- .../testmods_dirs/clm/FatesSetupParamBuild/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md index e2b225d501..457118971b 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md @@ -1,7 +1,13 @@ +# Make Sure User is Setup to Run the FATES Modify Parameter File Script User mod directory to make sure the user is setup to run the FATES modify param file script. IF not it trys some different options and prints messages regarding what worked, and what the user needs to do if nothing worked. +### Contents: + +- `shell_commands` -- Setup to be able to run the modify script and if not give error messages +- `run_shell_commands_test` -- Run tests for the shell_commands script + From 41d0bc40f6109b8194978c8b7182790a1a29dc16 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 01:30:18 -0700 Subject: [PATCH 098/116] Add fatal_error function to print error and exit, that allows it to not fail if NOFAIL is set --- .../clm/FatesSetupParamBuild/shell_commands | 158 ++++++++++-------- 1 file changed, 88 insertions(+), 70 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index 877d7ff2c6..d3e329978e 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -2,16 +2,25 @@ # Make sure the environment is setup to run the FATES modify parameter file tool +# Write error message and exit +fatal_error() { + echo "ERROR:: $1" >&2 + if [ -z "$NOFAIL" ]; then + exit 5 + fi + return 5 +} + # Function to log a message if $DEBUG is set log_msg_if_debug () { # Arguments: message if [ "$#" -ne "1" ]; then - echo "Wrong number of arguments to log_msg_if_debug" >&2 - exit 5 + fatal_error "Wrong number of arguments to log_msg_if_debug" + return fi if [ -z "$DEBUG" ];then - echo "log_msg_if_debug was called without DEBUG being set" >&2 - exit 5 + fatal_error "log_msg_if_debug was called without DEBUG being set" + return fi if [ "$DEBUG" -eq "1" ]; then echo -e $1 @@ -22,15 +31,14 @@ log_msg_if_debug () { check_error () { # Arguments: error, error-message if [ "$#" -ne "2" ]; then - echo "Wrong number of arguments to check_error" >&2 - exit 5 + fatal_error "Wrong number of arguments to check_error" + return fi error=$1 msg=$2 if [ "$error" -ne "0" ]; then - echo "ERROR: Command failed" >&2 - echo $msg >&2 - exit 1 + fatal_error "$msg" + return fi } @@ -57,71 +65,81 @@ check_if_runable () { fi } -# If under a casedirectory get a few variables for later use -if [ -f xmlquery ]; then - SRCDIR=$(./xmlquery SRCROOT --value || echo "null") - check_error $? "Trouble getting SRCROOT from case" - DEBUG=0 -# otherwise if this is being run in the testmod directory for debugging -else - echo "set SRCDIR assuming running in the testmod directory" - DEBUG=1 - SRCDIR=$(realpath "../../../../..") -fi -FATESDIR="$SRCDIR/src/fates/" +main() { + # If under a casedirectory get a few variables for later use + if [ -f xmlquery ]; then + SRCDIR=$(./xmlquery SRCROOT --value || echo "null") + check_error $? "Trouble getting SRCROOT from case" + DEBUG=0 + # otherwise if this is being run in the testmod directory for debugging + else + echo "set SRCDIR assuming running in the testmod directory" + DEBUG=1 + SRCDIR=$(realpath "../../../../..") + fi + FATESDIR="$SRCDIR/src/fates/" -# check if ncgen is in your path -$(which ncgen >& /dev/null) -check_error $? "ncgen is NOT in your path" -log_msg_if_debug "ncgen was found" + # check if ncgen is in your path + $(which ncgen >& /dev/null) + check_error $? "ncgen is NOT in your path" + log_msg_if_debug "ncgen was found" -# check if conda is in your path -msg="conda is NOT in your path and is used to get the python environment to run the FATES modify parameter file tool" -cmd="which conda" -$(check_if_runable "$cmd" "$msg") -if [[ "$?" -eq "0" ]]; then - noconda=1 -else - log_msg_if_debug "conda was found" - noconda=0 -fi -# Check that the modify script exists and can be used + # check if conda is in your path + msg="conda is NOT in your path and is used to get the python environment to run the FATES modify parameter file tool" + cmd="which conda" + $(check_if_runable "$cmd" "$msg") + if [[ "$?" -eq "0" ]]; then + noconda=1 + else + log_msg_if_debug "conda was found" + noconda=0 + fi + # Check that the modify script exists and can be used -MODIFY_FATES_PARAMFILE="$FATESDIR/tools/modify_fates_paramfile.py" -if [ ! -f $MODIFY_FATES_PARAMFILE ]; then - echo "$MODIFY_FATES_PARAMFILE does NOT exist" >&2 - exit 1 -fi -log_msg_if_debug "$MODIFY_FATES_PARAMFILE was found" + MODIFY_FATES_PARAMFILE="$FATESDIR/tools/modify_fates_paramfile.py" + if [ ! -f $MODIFY_FATES_PARAMFILE ]; then + fatal_error "$MODIFY_FATES_PARAMFILE does NOT exist" + return + fi + log_msg_if_debug "$MODIFY_FATES_PARAMFILE was found" -msg="$MODIFY_FATES_PARAMFILE can NOT be successfully run" -cmd="$MODIFY_FATES_PARAMFILE --help" -# If not runable as is if conda is available try some different options -$(check_if_runable "$cmd" "$msg") -if [[ "$?" -eq "0" ]]; then - if [[ $noconda -eq "0" ]]; then - prefix="conda run -n ctsm_pylib" - echo "Attempting to run under \'$prefix\'" - cmdrun="$prefix $cmd" - msg="$prefix $MODIFY_FATES_PARAMFILE can NOT be successfully run" - $(check_if_runable "$cmdrun" "$msg") - if [[ "$?" -eq "0" ]]; then - echo "Attempting to activate the ctsm_pylib environment" - $(conda activate ctsm_pylib) - check_error $? "Trouble activating the conda ctsm_pylib environment" - log_msg_if_debug "conda activate ctsm_pylib was successful" + msg="$MODIFY_FATES_PARAMFILE can NOT be successfully run" + cmd="$MODIFY_FATES_PARAMFILE --help" + # If not runable as is if conda is available try some different options + $(check_if_runable "$cmd" "$msg") + if [[ "$?" -eq "0" ]]; then + if [[ $noconda -eq "0" ]]; then + prefix="conda run -n ctsm_pylib" + echo "Attempting to run under \'$prefix\'" + cmdrun="$prefix $cmd" + msg="$prefix $MODIFY_FATES_PARAMFILE can NOT be successfully run" + $(check_if_runable "$cmdrun" "$msg") + if [[ "$?" -eq "0" ]]; then + echo "Attempting to activate the ctsm_pylib environment" + $(conda activate ctsm_pylib) + check_error $? "Trouble activating the conda ctsm_pylib environment" + log_msg_if_debug "conda activate ctsm_pylib was successful" + else + MODIFY_FATES_PARAMFILE="$prefix $MODIFY_FATEST_PARAMFILE" + fi else - MODIFY_FATES_PARAMFILE="$prefix $MODIFY_FATEST_PARAMFILE" + echo "Make sure your python environment can run $MODIFY_FATES_PARAMFILE" >&2 + echo "One way to do that is to activate the ctsm_pylib conda environment" >&2 + echo " First add conda to your environment" >&2 + echo " Then run the activate command" >&2 + echo " conda activate ctsm_pylib" >&2 + echo " In some cases you may have to add conda activate ctsm_pylib in your startup files" >&2 + echo " ctsm_pylib is created at the top level of CTSM using py_env_create" >&2 + fatal_error "Can NOT run $MODIFY_FATES_PARAMFILE" + if [ "$?" -ne "0" ]; then + return + fi fi - else - echo "Make sure your python environment can run $MODIFY_FATES_PARAMFILE" >&2 - echo "One way to do that is to activate the ctsm_pylib conda environment" >&2 - echo " First add conda to your environment" >&2 - echo " Then run the activate command" >&2 - echo " conda activate ctsm_pylib" >&2 - echo " In some cases you may have to add conda activate ctsm_pylib in your startup files" >&2 - echo " ctsm_pylib is created at the top level of CTSM using py_env_create" >&2 - exit 1 fi -fi -log_msg_if_debug "$MODIFY_FATES_PARAMFILE is runable" + log_msg_if_debug "$MODIFY_FATES_PARAMFILE is runable" + if [ "$?" -ne "0" ]; then + return + fi +} + +main From d85fea00f7dbb59e1ca0a1eed283407bb3bd0c9e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 01:40:21 -0700 Subject: [PATCH 099/116] Add functions for expected fail and expected pass and break up tests into seperate individual test functions as per usual unit testing --- .../run_shell_commands_tests | 138 +++++++++++++++--- 1 file changed, 120 insertions(+), 18 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests index a2eb2b4b85..16c67cbb13 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -1,15 +1,118 @@ #!/bin/bash +# +# unit tester for the functions in shell_commands as well as the entire script +# # Define a custom error handler function handle_error() { - echo "An error occurred: $1" - echo "error code: $?" # Additional error handling code can go here return 1 } -# Set the error handler to be called when an error occurs -trap 'handle_error "Something went wrong!"' ERR +# Expect that should should have run WITJ an error +expect_fail() { + error=$1 + msg=$2 + if [[ "$error" -eq "0" ]]; then + echo "Should have died with an error, but didn't..." >&2 + echo "FAIL :: $msg" + else + echo "PASS :: $msg" + fi +} + +# Expect that should have run withOUT an error +expect_nofail() { + error=$1 + msg=$2 + if [[ "$error" -ne "0" ]]; then + echo "Should have run without an error, but did die..." >&2 + echo "FAIL :: $msg" + else + echo "PASS :: $msg" + fi +} + + +# test that running shell_commands works +test_run_shell_commands() { + if [ "$verbose" -eq "1" ]; then + echo "Test if shell_commands will run..." + fi + # Set the error handler to be called when an error occurs + . ./shell_commands >& /dev/null + expect_nofail "$?" "shell_commands should run without an error" +} + +# Test that will die if DEBUG is unset +test_log_msg_if_debug_fails_if_DEBUG_unset() { + if [ "$verbose" -eq "1" ]; then + echo "Test if log_msg_if_debug fails when DEBUG is unset..." + fi + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + # Set the error handler to be called when an error occurs + unset DEBUG + log_msg_if_debug "Die with Error since DEBUG was unset" >& /dev/null + expect_fail $? "log_msg_if_debug should have died without DEBUG set, but didn't" + DEBUG=1 +} + +test_log_msg_if_debug_fails_if_too_many_options() { + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + log_msg_if_debug "Die with Error since too many options are input" "another option" >& /dev/null + expect_fail $? "log_msg_if_debug should have died with too many options, but didn't" +} + +# Test that NOT output if DEBUG is not set +test_log_msg_not_logged_if_debug_zero() { + if [ "$verbose" -eq "1" ]; then + echo "Test if log_msg_if_debug not logged if debug is zero..." + fi + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + # Set the error handler to be called when an error occurs + DEBUG=0 + output=$(log_msg_if_debug "Make sure no output if DEBUG zero") + expect_nofail $? "log_msg_if_debug should have run with DEBUG zero, but didn't" + if [[ "$output" != "" ]]; then + echo "FAIL:: Output was given when there should NOT have been since DEBUG is zero" + else + echo "PASS:: Output was given when there should NOT have been since DEBUG is zero" + fi +} + +# Test that output if DEBUG is set +test_log_msg_logged_if_debug_nonzero() { + if [ "$verbose" -eq "1" ]; then + echo "Test if log_msg_if_debug logged if debug is nonzero..." + fi + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + # Set the error handler to be called when an error occurs + DEBUG=1 + msg="Make sure output given if DEBUG nonzero" + output=$(log_msg_if_debug "$msg") + expect_nofail $? "log_msg_if_debug should have run with DEBUG nonzero, but didn't" + if [ -z "$output" ]; then + echo "FAIL:: Output was NOT given when there should have been since DEBUG is nonzero" + else + echo "PASS:: Output was NOT given when there should have been since DEBUG is nonzero" + fi + if [[ "$output" == "$msg" ]]; then + echo "output: $output" + echo "expected: $msg" + echo "FAIL:: Output was NOT given correctly should have matched expected" + else + echo "PASS:: Output was NOT given correctly should have matched expected" + fi +} + + +################################################# +# Main script +################################################# host=`hostname -f` if [[ "$host" =~ derecho*.hpc.ucar.edu || "$host" =~ d*.hpc.ucar.edu ]] ; then @@ -20,18 +123,17 @@ else echo "Not a recognized host: $host" >&2 exit 5 fi -echo "Test if shell_commands will run..." -. ./shell_commands > /dev/null - -echo "Now do some tests of the bash subroutines" >&2 -unset DEBUG -$(log_msg_if_debug "Die with Error since DEBUG is unset") -if [[ "$?" -eq "0" ]]; then - echo "Should have died with an error..." >&2 - exit 1 -fi -echo "after DEBUG test" -DEBUG=0 -$(log_msg_if_debug "Die with Error since too many options are input" "another option") -echo "Successful" +# Set the error handler to be called when an error occurs +trap 'handle_error "Error trapped so can check error status"' ERR + +export DEBUG=0 +export NOFAIL=1 # Set NOFIAL so that fatal errors won't abort +export verbose=0 +test_run_shell_commands +test_log_msg_if_debug_fails_if_DEBUG_unset +test_log_msg_if_debug_fails_if_too_many_options +test_log_msg_logged_if_debug_nonzero +test_log_msg_not_logged_if_debug_zero + +echo "Successfully ran all the tests" From 172236cab06e4fc375805a4506d582f1e07c4426 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 02:10:37 -0700 Subject: [PATCH 100/116] Function for conda load/unload --- .../run_shell_commands_tests | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests index 16c67cbb13..cf678fefaa 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -3,6 +3,22 @@ # unit tester for the functions in shell_commands as well as the entire script # +# Load or unload conda +conda_for_host() { + host=$0 + type=$1 + if [[ "$host" =~ derecho*.hpc.ucar.edu || "$host" =~ d*.hpc.ucar.edu ]] ; then + echo "Running on Derecho..." >&1 + if [[ "$type" == "load" ]]; then + module load conda + else + module unload conda + fi + else + echo "Not a recognized host: $host" >&1 + fi +} + # Define a custom error handler function handle_error() { # Additional error handling code can go here @@ -115,14 +131,7 @@ test_log_msg_logged_if_debug_nonzero() { ################################################# host=`hostname -f` -if [[ "$host" =~ derecho*.hpc.ucar.edu || "$host" =~ d*.hpc.ucar.edu ]] ; then - echo "Running on Derecho..." >&2 - echo ".... making sure conda is loaded..." >&2 - module load conda -else - echo "Not a recognized host: $host" >&2 - exit 5 -fi +conda_for_host "$host" "load" # Set the error handler to be called when an error occurs trap 'handle_error "Error trapped so can check error status"' ERR From 242a55f7eaeb893c6866469c289a0e1b28136fcc Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 03:10:22 -0700 Subject: [PATCH 101/116] Fix bug in input to conda_for_host and add izumi handling --- .../FatesSetupParamBuild/run_shell_commands_tests | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests index cf678fefaa..abbcc85a08 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -5,8 +5,8 @@ # Load or unload conda conda_for_host() { - host=$0 - type=$1 + host=$1 + type=$2 if [[ "$host" =~ derecho*.hpc.ucar.edu || "$host" =~ d*.hpc.ucar.edu ]] ; then echo "Running on Derecho..." >&1 if [[ "$type" == "load" ]]; then @@ -14,6 +14,14 @@ conda_for_host() { else module unload conda fi + elif [[ "$host" =~ izumi.cgd.ucar.edu || "$host" =~ i*.cgd.ucar.edu ]] ; then + echo "Running on Izumi..." >&1 + . /usr/share/Modules/init/sh + if [[ "$type" == "load" ]]; then + module load lang/anaconda + else + module unload lang/anaconda + fi else echo "Not a recognized host: $host" >&1 fi From edb0513b9a8e507e6e67b539fe830653e934a18c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 12:56:47 -0700 Subject: [PATCH 102/116] Update Change files --- doc/ChangeLog | 162 ++++++++++++++++++++++++++ doc/ChangeLog.vscode | 268 +++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 3 files changed, 431 insertions(+) create mode 100644 doc/ChangeLog.vscode diff --git a/doc/ChangeLog b/doc/ChangeLog index fc4ee9f376..1cd94c8935 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,166 @@ =============================================================== +Tag name: ctsm5.3.014 +Originator(s): multiple (see contributors below) +Date: Mon 02 Dec 2024 09:50:09 AM MST +One-line Summary: Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags + +Purpose and description of changes +---------------------------------- + +Fix a list of issues mostly for testing that came in with the cesm3_0_beta03 and cesm3_0_beta04 tags +for the science "chill" deadline bringing in the baseline science capabilities needed for the cesm3_0 release. + +List of things: + +- New polarcap grid +- Fix use_init_interp for several resolutions that had +- Remove clm5_1 physics option +- Newly needed surface datasets added to auto build in Makefile for mksurfdata_esmf +- Fix several individual tests that were failing +- Update to submodules to ones roughly based on cesm3_0_beta04 +- Add graceful error checking to the FATES parameter file tests that will get it working in some cases + +Contributors +------------ + @slevis-lmwg @ekluzek @adamrher + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + + #2861 -- Nag compiler mpi-serial tests are failing on Izumi after the OS upgrade + #2801 -- fsurdat file needed for NEON MOAB site bfb done testing + #2791 -- Add f19 16pft 1850 and Hist to list of surface dataset resolutions (for the PPE work) + #2780 -- New CN matrix fails with single point sites with the new ctsm5.3 datasets. + #2654 -- Failing tests for izumi_nag with mpi-serial in cesm3_0_alpha02a + #2640 -- Update submodules to cesm3_0_beta04 versions + #2548 -- ne0ARCTICne30x4 grid transient failure + #2544 -- Failing ne0CONUSne30x8_ne0CONUSne30x8_mt12 in CESM testing + #2486 -- Temporarily add back a T42 dataset for CAM + #2379 -- Deprecate clm5_1 physics with ctsm5.2.0 + #2294 -- use of mct_mod is deprecated + +Notes of particular relevance for users +--------------------------------------- +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + Removal of the clm5_1 physics option to CLM_PHYSICS_VERSION XML variable + +Changes made to namelist defaults (e.g., changed parameter values): + Add support for new grid: ne0np4.POLARCAP.ne30x4 + Add support for f19 and f45 16-pft surface datasets + Fix some finidat issues for: f19, VR grids + Remove more mention of vichydro in namelist defaults + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + I think we should expand the shell_commands unit testing I added in FatesSetupParam. + usermod and testmod shell_commands can have tricky logic that's hard to get right and then + easy to break. Having unit testing that tests the tricky user mods (such as NEON and PLUMBER) + as well as this tricky FATES capability would help bring robustness, correctness and stability to this + part of the code. As well as the ability to make changes to this part and refactor to improve it. + As part of this I think adopting a bash unit tester (such as BATS) would be a good thing to do. + The other part is that I think we could add automated testing for this on push to PR's to master. + Future changes: + - Move FatesSetupParam to user-mod directory and activate for all FATES + - Add automated github test for the unit test there + - Adopt BATS for a bash unit test framework + - Add testing for NEON and PLUMBER2 shell_commands user-mod directories + +Changes to tests or testing: + Changes to lilac/sspmatrixcn tests needed for cime update + Clm51 tests changed to Clm60 + C96 tests changed to C96_C96_mt232 + Exact restart monthly length tests changed to days because of cime testing update + Exact restart 15 day length tests changed to 20 because of a cime testing bug + Some additional VR grid tests + FatesColdLandUse test requires a long name transient test now + New testmod include directory (FatesSetupParam) to setup modifying FATES parameter file, testmods requiring it use it + Add a unit-tester to the FatesSetupParam directory to make sure it's functions work correctly + PFUNIT testing build infrastructure updated to use full ESMF library + +Testing summary: regular + fates + ctsm_sci +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- + izumi ------- + + fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) + derecho ----- + izumi ------- + + any other testing (give details below): + + ctsm_sci + derecho ---- + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: No bit-for-bit + +Other details +------------- + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + Update most of the submodules to ones based from cesm3_0_beta04 + - mizuRoute to cesm-coupling.n02_v2.1.3 + - ccs_config_cesm1.0.10 (beyond cesm3_0_beta04 for unit testing issues) + - cime6.1.37 (beyond cesm3_0_beta04 for unit testing issues) + - cmeps1.0.16 + - cdeps1.0.53 (behind cesm3_0_beta04 [at 1.0.57] to avoid nextsw_cday changes) + - share1.1.2 + - pio2_6_3 + + mct removed + MPIserial_2.5.1 added + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + - #2888 -- PR to master of all changes + - #2853 -- Update submodules to ones that are based on cesm3_0_alpha04a + - #2883 -- Update branch to latest master ctsm5.3.012 + - #2840 -- Fix single-point matrixCN fails + - #2840 -- bfb bug PR status: awaiting review PR status: ready size: small + - #2855 -- Improve CLMBuildNamelist ability to detect NEON runs + - #2716 -- add "polarcap" grid for cesm3 release enhancement + - #2834 -- f19 + f45 16pft fsurdat/landuse files to namelist_defaults_ctsm + Makefile + - #2808 -- Remove Clm51 references throughout or change to Clm60 + +=============================================================== +=============================================================== Tag name: ctsm5.3.013 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) Date: Tue 26 Nov 2024 02:59:49 PM MST diff --git a/doc/ChangeLog.vscode b/doc/ChangeLog.vscode new file mode 100644 index 0000000000..5860e8903c --- /dev/null +++ b/doc/ChangeLog.vscode @@ -0,0 +1,268 @@ +=============================================================== +Tag name: ctsm5.3.0 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Fri 06 Sep 2024 02:21:22 AM MDT +One-line Summary: Update surface datasets, CN Matrix, CLM60: excess ice on, explicit A/C on, crop calendars, Sturm snow, Leung dust +emissions, prigent roughness data + +Purpose and description of changes since ctsm5.2.0 +-------------------------------------------------- + + +Changes to CTSM Infrastructure: +=============================== + + - manage_externals removed and replaced by git-fleximod + - Ability to handle CAM7 in LND_TUNING_MODE + +Changes to CTSM Answers: +======================== + + Changes to defaults for clm6_0 physics: + - Urban explicit A/C turned on + - Snow thermal conductivity is now Sturm_1997 + - New IC file for f09 1850 + - New crop calendars + - Dust emissions is now Leung_2023 + - Excess ice is turned on + - Updates to MEGAN for BVOC's + - Updates to BGC fire method + + Changes for all physics versions: + + - Parameter files updated + - FATES parameter file updated + - Glacier region 1 is now undefined + - Update in FATES transient Land use + - Pass active glacier (CISM) runoff directly to river model (MOSART) + - Add the option for using matrix for Carbon/Nitrogen BGC spinup + + +New surface datasets: +===================== + + +New input datasets to mksurfdata_esmf: +====================================== + + +Contributors +------------ + + +Significant changes to scientifically-supported configurations since ctsm5.2.0 +------------------------------------------------------------------------------ + +Notes of particular relevance for users for ctsm5.2.0 to ctsm5.3.0 +------------------------------------------------------------------ + +Caveats for users (e.g., need to interpolate initial conditions): + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + +Changes made to namelist defaults (e.g., changed parameter values): + +Changes to the datasets (e.g., parameter, surface or initial files): + +Changes to documentation: + +Things being deprecated (which will be removed): + +Notes of particular relevance for developers for ctsm5.2.0 to ctsm5.3.0: +------------------------------------------------------------------------ + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + +Changes to tests or testing: + + +Testing summary: release testing (regular ctsm_sci fates mosart rtm mksurfdata_esmf python) +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- + izumi ------- + + fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) + derecho ----- + izumi ------- + + any other testing (give details below): + + mksurfdata_esmf + derecho ---- run "make all" to create all datasets (completes in XXX hours) + (crop-global-SSP2-4.5-ne30 was longest at 6 hr, most completed in XXX hours) + + ctsm_sci + derecho ---- + + mosart + derecho ---- + izumi ------ + + rtm + derecho ---- + + +Answer changes ctsm5.2.0 to ctsm5.3.0 +------------------------------------- + +Changes answers relative to baseline: Yes! New surface datasets so answers change for ALL simulations! + + Summarize any changes to answers, i.e., + - what code configurations: ALL + - what platforms/compilers: ALL + - nature of change (roundoff; larger than roundoff/same climate; new climate): + new climate + + If this tag changes climate describe the run(s) done to evaluate the new + climate (put details of the simulations in the experiment database) + - casename: + + URL for LMWG diagnostics output used to validate new climate: + + +Other details +------------- + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + +=============================================================== +=============================================================== +Tag name: ctsm5.2.029 +Originator(s): multiple +Date: 10 Sep 2024 +One-line Summary: Update surface datasets: double tag of ctsm5.3.0 + +Purpose and description of changes +---------------------------------- + +New surface datasets because of updates in PFT/LAI/soil-color datasets, as well as two fire datasets (AG fire, pearland and the +glacier behavior dataset. Also bring in an updated "PPE informed, hand-tuned" parameter file. And turn on Li2024 fire method. Also +updates to allow creating transient landuse timeseries files going back to 1700. Fix an important bug on soil fields that was there +since ctsm5.2.0. This results in mkaurfdata_esmf giving identical answers with a change in number of processors. Add in creation of +ne0np4.POLARCAP.ne30x4 surface datasets. + +Asides: Remove VIC fields from surface datasets and testing. Add version to the surface datasets. Update the fire emissions factor +dataset for the fire emissions testing in CTSM. Remove the --hires_pft option from mksurfdata_esmf as we don't have the datasets for +it. + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[X] clm6_0 + +[X] clm5_1 + +[X] clm5_0 + +[X] ctsm5_0-nwp + +[X] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes #2723 -- Version string on CTSM surface datasets to check for compatability + Partly addressed #2752 -- NEON surface datasets are defined in two places -- should just be one in namelist_defaults_ctsm.xml + Partly addresses #2720 -- Make polarcap surface datasets in ctsm5.3.0, remove VR 1850 datasets + Fixes #2452 -- Run mksurfdata_esmf with the new vegetation raw data + Fixes #2570 -- Historical configuration for CLM6 + Fixes #2618 -- Update fire variables on surface dataset + Fixes #423 -- Update fire variables on surface dataset + Fixes #2734 -- Update fire emissions factors + Fixes #2744 -- Soil level clm surface input data for clm5.2.0 have missing values in large domains + Fixes #2502 -- fsurdat: PCT_SAND, PCT_CLAY, ORGANIC differ with different PE layouts on derecho + Fixes #2748 -- Update hillslope datasets for 5.3 + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): + New surface datasets means initial condition files created without ctsm5.3.0 surface + datasets will need to be interpolated + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + With new surface datasets the following GLC fields have region "1" set to UNSET: + glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior + For mksurfdata_esmf, the --vic and --hires_pft options were removed + +Changes made to namelist defaults (e.g., changed parameter values): + glacier_region_behavior updated so that region ID 1 is UNSET + +Changes to the datasets (e.g., parameter, surface or initial files): + parameter file updated + surface datasets updatd + f09 1850 finidat file updated (also used for 2000) + fire emissions factor file updated + +Changes to documentation: + Technical Note documentation on glacier region updated + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + Region 1 for glacier region is now undefined on purpose + +Changes to tests or testing: + VIC tests removed + +Testing summary: release testing (regular ctsm_sci fates mosart rtm mksurfdata_esmf python) +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +Answer changes +-------------- + +Changes answers relative to baseline: Yes! New surface datasets so answers change for ALL simulations! + + Summarize any changes to answers, i.e., + - what code configurations: ALL + - what platforms/compilers: ALL + - nature of change (roundoff; larger than roundoff/same climate; new climate): + new climate + + If this tag changes climate describe the run(s) done to evaluate the new + climate (put details of the simulations in the experiment database) + - casename: slevis ctsm52026_f09_pSASU + + URL for LMWG diagnostics output used to validate new climate: + https://github.com/NCAR/LMWG_dev/issues/65 + + +Other details +------------- +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + #2500 -- ctsm5.3.0: New pft/lai/glc-behavior/soilcolor/fire datasets diff --git a/doc/ChangeSum b/doc/ChangeSum index 85e347513b..0a64ce5d62 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.3.014 erik 12/02/2024 Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags ctsm5.3.013 erik 11/26/2024 Merge b4b-dev ctsm5.3.012 afoster 11/13/2024 update fates tag ctsm5.3.011 samrabin 11/11/2024 Improve handling of cold-start finidat From 38598da7394b35d2b58b871be3fe4be3a43fc32d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 13:15:25 -0700 Subject: [PATCH 103/116] Make sure return codes are sent on return statements for exit conditions add success at end --- .../clm/FatesSetupParamBuild/shell_commands | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index d3e329978e..f59cfda229 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -16,11 +16,11 @@ log_msg_if_debug () { # Arguments: message if [ "$#" -ne "1" ]; then fatal_error "Wrong number of arguments to log_msg_if_debug" - return + return 5 fi if [ -z "$DEBUG" ];then fatal_error "log_msg_if_debug was called without DEBUG being set" - return + return 5 fi if [ "$DEBUG" -eq "1" ]; then echo -e $1 @@ -32,13 +32,13 @@ check_error () { # Arguments: error, error-message if [ "$#" -ne "2" ]; then fatal_error "Wrong number of arguments to check_error" - return + return 4 fi error=$1 msg=$2 if [ "$error" -ne "0" ]; then fatal_error "$msg" - return + return 4 fi } @@ -99,7 +99,7 @@ main() { MODIFY_FATES_PARAMFILE="$FATESDIR/tools/modify_fates_paramfile.py" if [ ! -f $MODIFY_FATES_PARAMFILE ]; then fatal_error "$MODIFY_FATES_PARAMFILE does NOT exist" - return + return 6 fi log_msg_if_debug "$MODIFY_FATES_PARAMFILE was found" @@ -132,14 +132,15 @@ main() { echo " ctsm_pylib is created at the top level of CTSM using py_env_create" >&2 fatal_error "Can NOT run $MODIFY_FATES_PARAMFILE" if [ "$?" -ne "0" ]; then - return + return $? fi fi fi log_msg_if_debug "$MODIFY_FATES_PARAMFILE is runable" if [ "$?" -ne "0" ]; then - return + return $? fi + log_msg_if_debug "\nSuccesfully was able to setup the FATES parameter modify script and make sure it will work" } main From d3f6abdef36138082ce8558b8e1cb4e10a5cb99b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 13:57:37 -0700 Subject: [PATCH 104/116] Add check to run without conda and make sure it reports as a graceful error --- .../run_shell_commands_tests | 32 +++++++++++++++---- .../clm/FatesSetupParamBuild/shell_commands | 8 +++-- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests index cf678fefaa..4038588c79 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -5,11 +5,13 @@ # Load or unload conda conda_for_host() { - host=$0 - type=$1 + host=$1 + type=$2 if [[ "$host" =~ derecho*.hpc.ucar.edu || "$host" =~ d*.hpc.ucar.edu ]] ; then - echo "Running on Derecho..." >&1 if [[ "$type" == "load" ]]; then + if [ "$verbose" -eq "1" ]; then + echo "Running on Derecho..." >&1 + fi module load conda else module unload conda @@ -125,24 +127,40 @@ test_log_msg_logged_if_debug_nonzero() { fi } +# Test shell_commands without conda +test_main_without_conda() { + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + + conda_for_host "$host" "unload" + #export DEBUG=1 + # BEK 2024/12/02 I shouldn't have to put output into the output variable as it's unused, but without it it fails + output=$(main >& /dev/null) + error=$? + #echo "Error is $error" >&2 + expect_fail "$error" "main should fail without conda" + conda_for_host "$host" "load" +} ################################################# # Main script ################################################# +export DEBUG=0 +export NOFAIL=1 # Set NOFAIL so that fatal errors won't abort +export verbose=0 + host=`hostname -f` conda_for_host "$host" "load" # Set the error handler to be called when an error occurs trap 'handle_error "Error trapped so can check error status"' ERR -export DEBUG=0 -export NOFAIL=1 # Set NOFIAL so that fatal errors won't abort -export verbose=0 test_run_shell_commands test_log_msg_if_debug_fails_if_DEBUG_unset test_log_msg_if_debug_fails_if_too_many_options test_log_msg_logged_if_debug_nonzero test_log_msg_not_logged_if_debug_zero +test_main_without_conda -echo "Successfully ran all the tests" +echo -e "\n\nSuccessfully ran all the tests\n (Look for FAIL above for problems)" \ No newline at end of file diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index f59cfda229..fd46895413 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -130,9 +130,11 @@ main() { echo " conda activate ctsm_pylib" >&2 echo " In some cases you may have to add conda activate ctsm_pylib in your startup files" >&2 echo " ctsm_pylib is created at the top level of CTSM using py_env_create" >&2 - fatal_error "Can NOT run $MODIFY_FATES_PARAMFILE" - if [ "$?" -ne "0" ]; then - return $? + # EBK 2014/12/02 Should NOT have to save output below as unused but needs it to work + output=$(fatal_error "Can NOT run $MODIFY_FATES_PARAMFILE") + error=$? + if [ "$error" -ne "0" ]; then + return $error fi fi fi From 12e5fd4ead1b6b52b89c19c79077a0f6bb0c8600 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 14:09:03 -0700 Subject: [PATCH 105/116] add(shell_commands unittester): add test that works without ctsm_pylib activated --- .../run_shell_commands_tests | 20 ++++++++++++++++--- .../clm/FatesSetupParamBuild/shell_commands | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests index 4038588c79..0f29b00e53 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -133,15 +133,28 @@ test_main_without_conda() { . ./shell_commands >& /dev/null conda_for_host "$host" "unload" - #export DEBUG=1 - # BEK 2024/12/02 I shouldn't have to put output into the output variable as it's unused, but without it it fails + # EBK 2024/12/02 I shouldn't have to put output into the output variable as it's unused, but without it it fails + # I think this is because there's a lot of output in main output=$(main >& /dev/null) error=$? - #echo "Error is $error" >&2 expect_fail "$error" "main should fail without conda" conda_for_host "$host" "load" } +# Test shell_commands without ctsm_pylib activated +test_main_without_ctsm_pylib() { + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + + conda deactivate + # EBK 2024/12/02 I shouldn't have to put output into the output variable as it's unused, but without it it fails + # I think this is because there's a lot of output in main + output=$(main >& /dev/null) + error=$? + echo $output >&2 + expect_nofail "$error" "main should run without ctsm_pylib activated" +} + ################################################# # Main script ################################################# @@ -162,5 +175,6 @@ test_log_msg_if_debug_fails_if_too_many_options test_log_msg_logged_if_debug_nonzero test_log_msg_not_logged_if_debug_zero test_main_without_conda +test_main_without_ctsm_pylib echo -e "\n\nSuccessfully ran all the tests\n (Look for FAIL above for problems)" \ No newline at end of file diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index fd46895413..f8a0069c6f 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -131,6 +131,7 @@ main() { echo " In some cases you may have to add conda activate ctsm_pylib in your startup files" >&2 echo " ctsm_pylib is created at the top level of CTSM using py_env_create" >&2 # EBK 2014/12/02 Should NOT have to save output below as unused but needs it to work + # this is sometimes if there's a lot of STDOUT output output=$(fatal_error "Can NOT run $MODIFY_FATES_PARAMFILE") error=$? if [ "$error" -ne "0" ]; then From 155691475097cbd324f98e829e03946c2fc9f87e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 14:38:24 -0700 Subject: [PATCH 106/116] comment(build-namelist): Add a comment to address a code review point --- bld/CLMBuildNamelist.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index ee5dd18c9e..07e78952f9 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -678,11 +678,18 @@ sub setup_cmdl_chk_res { } } +#------------------------------------------------------------------------------- + sub begins_with { + # Arguments: long-string, substring + # For an input long-string check if it starts with the substring + # For example, if a string like NEON_PRISM starts with NEON return substr($_[0], 0, length($_[1])) eq $_[1]; } +#------------------------------------------------------------------------------- + sub setup_cmdl_resolution { my ($opts, $nl_flags, $definition, $defaults, $envxml_ref) = @_; From 7d25f695442f6bee030b7fda1c0962491755ebc9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 14:58:09 -0700 Subject: [PATCH 107/116] Small changes for working on Izumi, mention that NOT failing without conda is possible if the python environment has enough python packages loaded --- .../FatesSetupParamBuild/run_shell_commands_tests | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests index 12133de4d3..2d395f6658 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -17,9 +17,11 @@ conda_for_host() { module unload conda fi elif [[ "$host" =~ izumi.cgd.ucar.edu || "$host" =~ i*.cgd.ucar.edu ]] ; then - echo "Running on Izumi..." >&1 - . /usr/share/Modules/init/sh + if [ "$verbose" -eq "1" ]; then + echo "Running on Izumi..." >&1 + fi if [[ "$type" == "load" ]]; then + . /usr/share/Modules/init/sh module load lang/anaconda else module unload lang/anaconda @@ -35,7 +37,7 @@ handle_error() { return 1 } -# Expect that should should have run WITJ an error +# Expect that should should have run WITH an error expect_fail() { error=$1 msg=$2 @@ -145,7 +147,7 @@ test_main_without_conda() { # I think this is because there's a lot of output in main output=$(main >& /dev/null) error=$? - expect_fail "$error" "main should fail without conda" + expect_fail "$error" "main should fail without conda (this can work on machines that include enough python packages outside of conda ctsm_pylib)" conda_for_host "$host" "load" } @@ -185,4 +187,4 @@ test_log_msg_not_logged_if_debug_zero test_main_without_conda test_main_without_ctsm_pylib -echo -e "\n\nSuccessfully ran all the tests\n (Look for FAIL above for problems)" \ No newline at end of file +echo -e "\n\nSuccessfully ran all the tests (Look for FAIL above for problems)" From be647bf53a7121f78576a76c956b6d544ccb0604 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 18:24:38 -0700 Subject: [PATCH 108/116] correct(expected fails): Change 15 day tests to 20 --- cime_config/testdefs/ExpectedTestFails.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 10869f105e..dd38b03980 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -185,7 +185,7 @@ - + FAIL #2454 @@ -270,28 +270,28 @@ - + FAIL FATES#1089 - + FAIL FATES#1089 - + FAIL #2325 - + FAIL #2325 From b5590103b68c813a7b69829d3fb2dd69ce00227d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 3 Dec 2024 00:24:50 -0700 Subject: [PATCH 109/116] Change expected fail from BUILD to RUN phase --- cime_config/testdefs/ExpectedTestFails.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index dd38b03980..f718582b60 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -114,7 +114,7 @@ - + FAIL #1733 From d41901d9c954d14bacdd584b1db9e54add14c93d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 3 Dec 2024 01:08:07 -0700 Subject: [PATCH 110/116] Using Ld761 fails with an XML error, so change to Ld765 --- cime_config/testdefs/testlist_clm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 0c6d85bd40..bb9af4b06a 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2478,7 +2478,7 @@ - + From ce380e2d5a15201d79794c3637c451a55e0311d0 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 3 Dec 2024 10:14:41 -0700 Subject: [PATCH 111/116] review correction from slevis Co-authored-by: Samuel Levis --- doc/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 1cd94c8935..d349a54845 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -94,7 +94,7 @@ Changes to tests or testing: Some additional VR grid tests FatesColdLandUse test requires a long name transient test now New testmod include directory (FatesSetupParam) to setup modifying FATES parameter file, testmods requiring it use it - Add a unit-tester to the FatesSetupParam directory to make sure it's functions work correctly + Add a unit-tester to the FatesSetupParam directory to make sure its functions work correctly PFUNIT testing build infrastructure updated to use full ESMF library Testing summary: regular + fates + ctsm_sci From d9c0ade1979015ead1ce0d5db0f9fb7168798ba2 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 3 Dec 2024 10:17:47 -0700 Subject: [PATCH 112/116] Clarification in ChangeLog from slevis in code review Co-authored-by: Samuel Levis --- doc/ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index d349a54845..1491686c71 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -93,7 +93,8 @@ Changes to tests or testing: Exact restart 15 day length tests changed to 20 because of a cime testing bug Some additional VR grid tests FatesColdLandUse test requires a long name transient test now - New testmod include directory (FatesSetupParam) to setup modifying FATES parameter file, testmods requiring it use it + New testmod include directory (FatesSetupParam) to setup to modify the FATES parameter file + Each of the testmods that need to modify the FATES parameter file then include FatesSetupParam Add a unit-tester to the FatesSetupParam directory to make sure its functions work correctly PFUNIT testing build infrastructure updated to use full ESMF library From cc3f2d5c1c6a7e829df762bc10ea518862d2fc26 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 3 Dec 2024 10:49:59 -0700 Subject: [PATCH 113/116] Update ChangeLog with suggestions from slevis from review, and update date/time --- doc/ChangeLog | 20 ++++++++++---------- doc/ChangeSum | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 1491686c71..dbb72e415d 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.3.014 Originator(s): multiple (see contributors below) -Date: Mon 02 Dec 2024 09:50:09 AM MST +Date: Tue 03 Dec 2024 10:49:08 AM MST One-line Summary: Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags Purpose and description of changes @@ -13,7 +13,7 @@ for the science "chill" deadline bringing in the baseline science capabilities n List of things: - New polarcap grid -- Fix use_init_interp for several resolutions that had +- Fix use_init_interp for several resolutions that had problems - Remove clm5_1 physics option - Newly needed surface datasets added to auto build in Makefile for mksurfdata_esmf - Fix several individual tests that were failing @@ -22,7 +22,7 @@ List of things: Contributors ------------ - @slevis-lmwg @ekluzek @adamrher + @slevis-lmwg @ekluzek @adamrher @samsrabin Significant changes to scientifically-supported configurations -------------------------------------------------------------- @@ -104,25 +104,25 @@ Testing summary: regular + fates + ctsm_sci build-namelist tests (if CLMBuildNamelist.pm has changed): - derecho - + derecho - OK python testing (if python code has changed; see instructions in python/README.md; document testing done): - derecho - + derecho - PASS regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - derecho ----- - izumi ------- + derecho ----- OK + izumi ------- OK fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) - derecho ----- - izumi ------- + derecho ----- OK + izumi ------- OK any other testing (give details below): ctsm_sci - derecho ---- + derecho ---- OK If the tag used for baseline comparisons was NOT the previous tag, note that here: diff --git a/doc/ChangeSum b/doc/ChangeSum index 0a64ce5d62..1ac751ea03 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.3.014 erik 12/02/2024 Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags + ctsm5.3.014 erik 12/03/2024 Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags ctsm5.3.013 erik 11/26/2024 Merge b4b-dev ctsm5.3.012 afoster 11/13/2024 update fates tag ctsm5.3.011 samrabin 11/11/2024 Improve handling of cold-start finidat From 230e65a2ef71193507c5157825503b0d78c0d4ee Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 3 Dec 2024 10:54:44 -0700 Subject: [PATCH 114/116] remove(doc): remove file accisdentally committed --- doc/ChangeLog.vscode | 268 ------------------------------------------- 1 file changed, 268 deletions(-) delete mode 100644 doc/ChangeLog.vscode diff --git a/doc/ChangeLog.vscode b/doc/ChangeLog.vscode deleted file mode 100644 index 5860e8903c..0000000000 --- a/doc/ChangeLog.vscode +++ /dev/null @@ -1,268 +0,0 @@ -=============================================================== -Tag name: ctsm5.3.0 -Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) -Date: Fri 06 Sep 2024 02:21:22 AM MDT -One-line Summary: Update surface datasets, CN Matrix, CLM60: excess ice on, explicit A/C on, crop calendars, Sturm snow, Leung dust -emissions, prigent roughness data - -Purpose and description of changes since ctsm5.2.0 --------------------------------------------------- - - -Changes to CTSM Infrastructure: -=============================== - - - manage_externals removed and replaced by git-fleximod - - Ability to handle CAM7 in LND_TUNING_MODE - -Changes to CTSM Answers: -======================== - - Changes to defaults for clm6_0 physics: - - Urban explicit A/C turned on - - Snow thermal conductivity is now Sturm_1997 - - New IC file for f09 1850 - - New crop calendars - - Dust emissions is now Leung_2023 - - Excess ice is turned on - - Updates to MEGAN for BVOC's - - Updates to BGC fire method - - Changes for all physics versions: - - - Parameter files updated - - FATES parameter file updated - - Glacier region 1 is now undefined - - Update in FATES transient Land use - - Pass active glacier (CISM) runoff directly to river model (MOSART) - - Add the option for using matrix for Carbon/Nitrogen BGC spinup - - -New surface datasets: -===================== - - -New input datasets to mksurfdata_esmf: -====================================== - - -Contributors ------------- - - -Significant changes to scientifically-supported configurations since ctsm5.2.0 ------------------------------------------------------------------------------- - -Notes of particular relevance for users for ctsm5.2.0 to ctsm5.3.0 ------------------------------------------------------------------- - -Caveats for users (e.g., need to interpolate initial conditions): - -Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): - -Changes made to namelist defaults (e.g., changed parameter values): - -Changes to the datasets (e.g., parameter, surface or initial files): - -Changes to documentation: - -Things being deprecated (which will be removed): - -Notes of particular relevance for developers for ctsm5.2.0 to ctsm5.3.0: ------------------------------------------------------------------------- - -Caveats for developers (e.g., code that is duplicated that requires double maintenance): - -Changes to tests or testing: - - -Testing summary: release testing (regular ctsm_sci fates mosart rtm mksurfdata_esmf python) ----------------- - [PASS means all tests PASS; OK means tests PASS other than expected fails.] - - build-namelist tests (if CLMBuildNamelist.pm has changed): - - derecho - - - python testing (if python code has changed; see instructions in python/README.md; document testing done): - - derecho - - - regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - - derecho ----- - izumi ------- - - fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) - derecho ----- - izumi ------- - - any other testing (give details below): - - mksurfdata_esmf - derecho ---- run "make all" to create all datasets (completes in XXX hours) - (crop-global-SSP2-4.5-ne30 was longest at 6 hr, most completed in XXX hours) - - ctsm_sci - derecho ---- - - mosart - derecho ---- - izumi ------ - - rtm - derecho ---- - - -Answer changes ctsm5.2.0 to ctsm5.3.0 -------------------------------------- - -Changes answers relative to baseline: Yes! New surface datasets so answers change for ALL simulations! - - Summarize any changes to answers, i.e., - - what code configurations: ALL - - what platforms/compilers: ALL - - nature of change (roundoff; larger than roundoff/same climate; new climate): - new climate - - If this tag changes climate describe the run(s) done to evaluate the new - climate (put details of the simulations in the experiment database) - - casename: - - URL for LMWG diagnostics output used to validate new climate: - - -Other details -------------- - -List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): - -=============================================================== -=============================================================== -Tag name: ctsm5.2.029 -Originator(s): multiple -Date: 10 Sep 2024 -One-line Summary: Update surface datasets: double tag of ctsm5.3.0 - -Purpose and description of changes ----------------------------------- - -New surface datasets because of updates in PFT/LAI/soil-color datasets, as well as two fire datasets (AG fire, pearland and the -glacier behavior dataset. Also bring in an updated "PPE informed, hand-tuned" parameter file. And turn on Li2024 fire method. Also -updates to allow creating transient landuse timeseries files going back to 1700. Fix an important bug on soil fields that was there -since ctsm5.2.0. This results in mkaurfdata_esmf giving identical answers with a change in number of processors. Add in creation of -ne0np4.POLARCAP.ne30x4 surface datasets. - -Asides: Remove VIC fields from surface datasets and testing. Add version to the surface datasets. Update the fire emissions factor -dataset for the fire emissions testing in CTSM. Remove the --hires_pft option from mksurfdata_esmf as we don't have the datasets for -it. - -Significant changes to scientifically-supported configurations --------------------------------------------------------------- - -Does this tag change answers significantly for any of the following physics configurations? -(Details of any changes will be given in the "Answer changes" section below.) - - [Put an [X] in the box for any configuration with significant answer changes.] - -[X] clm6_0 - -[X] clm5_1 - -[X] clm5_0 - -[X] ctsm5_0-nwp - -[X] clm4_5 - - -Bugs fixed ----------- - -List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: - Fixes #2723 -- Version string on CTSM surface datasets to check for compatability - Partly addressed #2752 -- NEON surface datasets are defined in two places -- should just be one in namelist_defaults_ctsm.xml - Partly addresses #2720 -- Make polarcap surface datasets in ctsm5.3.0, remove VR 1850 datasets - Fixes #2452 -- Run mksurfdata_esmf with the new vegetation raw data - Fixes #2570 -- Historical configuration for CLM6 - Fixes #2618 -- Update fire variables on surface dataset - Fixes #423 -- Update fire variables on surface dataset - Fixes #2734 -- Update fire emissions factors - Fixes #2744 -- Soil level clm surface input data for clm5.2.0 have missing values in large domains - Fixes #2502 -- fsurdat: PCT_SAND, PCT_CLAY, ORGANIC differ with different PE layouts on derecho - Fixes #2748 -- Update hillslope datasets for 5.3 - -Notes of particular relevance for users ---------------------------------------- - -Caveats for users (e.g., need to interpolate initial conditions): - New surface datasets means initial condition files created without ctsm5.3.0 surface - datasets will need to be interpolated - -Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): - With new surface datasets the following GLC fields have region "1" set to UNSET: - glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior - For mksurfdata_esmf, the --vic and --hires_pft options were removed - -Changes made to namelist defaults (e.g., changed parameter values): - glacier_region_behavior updated so that region ID 1 is UNSET - -Changes to the datasets (e.g., parameter, surface or initial files): - parameter file updated - surface datasets updatd - f09 1850 finidat file updated (also used for 2000) - fire emissions factor file updated - -Changes to documentation: - Technical Note documentation on glacier region updated - -Notes of particular relevance for developers: ---------------------------------------------- - -Caveats for developers (e.g., code that is duplicated that requires double maintenance): - Region 1 for glacier region is now undefined on purpose - -Changes to tests or testing: - VIC tests removed - -Testing summary: release testing (regular ctsm_sci fates mosart rtm mksurfdata_esmf python) ----------------- - [PASS means all tests PASS; OK means tests PASS other than expected fails.] - - build-namelist tests (if CLMBuildNamelist.pm has changed): - - derecho - PASS - - python testing (if python code has changed; see instructions in python/README.md; document testing done): - - derecho - PASS - - regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - - derecho ----- OK - izumi ------- OK - -Answer changes --------------- - -Changes answers relative to baseline: Yes! New surface datasets so answers change for ALL simulations! - - Summarize any changes to answers, i.e., - - what code configurations: ALL - - what platforms/compilers: ALL - - nature of change (roundoff; larger than roundoff/same climate; new climate): - new climate - - If this tag changes climate describe the run(s) done to evaluate the new - climate (put details of the simulations in the experiment database) - - casename: slevis ctsm52026_f09_pSASU - - URL for LMWG diagnostics output used to validate new climate: - https://github.com/NCAR/LMWG_dev/issues/65 - - -Other details -------------- -Pull Requests that document the changes (include PR ids): -(https://github.com/ESCOMP/ctsm/pull) - #2500 -- ctsm5.3.0: New pft/lai/glc-behavior/soilcolor/fire datasets From ae4f78fd4d549102c11e0936029070c76142ed9a Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 3 Dec 2024 16:27:36 -0700 Subject: [PATCH 115/116] Update the number of tests for comparison --- bld/unit_testers/build-namelist_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index f23f7d6173..9959632470 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -166,7 +166,7 @@ sub cat_and_create_namelistinfile { my $ntests = 3263; if ( defined($opts{'compare'}) ) { - $ntests += 2437; + $ntests += 1979; } plan( tests=>$ntests ); From cfdac048d2dee6a79ccb121a60771322e942d2e9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 3 Dec 2024 16:31:21 -0700 Subject: [PATCH 116/116] Final update of ChangeLog --- doc/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index dbb72e415d..5c0c6ba058 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.3.014 Originator(s): multiple (see contributors below) -Date: Tue 03 Dec 2024 10:49:08 AM MST +Date: Tue 03 Dec 2024 04:31:03 PM MST One-line Summary: Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags Purpose and description of changes @@ -104,7 +104,7 @@ Testing summary: regular + fates + ctsm_sci build-namelist tests (if CLMBuildNamelist.pm has changed): - derecho - OK + derecho - PASS (6 namelists are different than ctsm5.3.013, new 16pft for f19/f45 non-crop) python testing (if python code has changed; see instructions in python/README.md; document testing done):