From ee5efecb0630adae98b5839bb206edf14fe01144 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 29 Apr 2024 17:12:41 -0600 Subject: [PATCH 01/31] Fix the clm6_0 issues identified in #2492 --- bld/namelist_files/namelist_defaults_ctsm.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 147a23f49a..03b5afd1ef 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -116,9 +116,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/isotopes/atm_delta_C14_CMIP6_SSP5B_3x1_global_1850-2100_yearly_c181209.nc -.false. .true. .false. +.false. .false. @@ -430,6 +430,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). Jordan1991 Sturm1997 +Sturm1997 none nn -1850 -1850 - -1850 -1850 - -1850 -1850 +1850 +1850 NONE diff --git a/bld/namelist_files/use_cases/2000_control.xml b/bld/namelist_files/use_cases/2000_control.xml index f3c4980fc8..2fce7c5cce 100644 --- a/bld/namelist_files/use_cases/2000_control.xml +++ b/bld/namelist_files/use_cases/2000_control.xml @@ -8,37 +8,17 @@ constant -.true. -.false. -.true. -.false. -.false. +.true. +.false. +.false. -2000 -2000 +2000 +2000 -2000 -2000 +2000 +2000 -2000 -2000 - -2000 -2000 - -2000 -2000 - -2000 -2000 - -2000 -2000 - -2000 -2000 - -2000 -2000 +2000 +2000 diff --git a/bld/namelist_files/use_cases/2010_control.xml b/bld/namelist_files/use_cases/2010_control.xml index 9316ecfb7f..d4c2a9c9c0 100644 --- a/bld/namelist_files/use_cases/2010_control.xml +++ b/bld/namelist_files/use_cases/2010_control.xml @@ -8,44 +8,17 @@ constant -.true. -.true. -.false. -.true. -.false. -.false. +.true. +.true. +.false. -2010 -2010 +2010 +2010 -2010 -2010 +2010 +2010 -2010 -2010 - -2010 -2010 - -2010 -2010 - -2010 -2010 - -2010 -2010 - -2010 -2010 - -2010 -2010 - -2010 -2010 - -2010 -2010 +2010 +2010 diff --git a/bld/namelist_files/use_cases/20thC_transient.xml b/bld/namelist_files/use_cases/20thC_transient.xml index d6dd729b35..b88ca3d3b1 100644 --- a/bld/namelist_files/use_cases/20thC_transient.xml +++ b/bld/namelist_files/use_cases/20thC_transient.xml @@ -18,46 +18,20 @@ flanduse_timeseries -.true. -.false. -.true. -.false. -.false. - -1850 -2015 -1850 - -1850 -2015 -1850 - -1850 -2015 -1850 - -1850 -2016 -1850 - -1850 -2016 -1850 - -1850 -2016 -1850 - -1850 -2106 -1850 - -1850 -2106 -1850 - -1850 -2106 -1850 +.true. +.false. +.false. + +1850 +2015 +1850 + +1850 +2016 +1850 + +1850 +2106 +1850 diff --git a/bld/namelist_files/use_cases/stdurbpt_pd.xml b/bld/namelist_files/use_cases/stdurbpt_pd.xml index 65786f32ae..6f5e754ba0 100644 --- a/bld/namelist_files/use_cases/stdurbpt_pd.xml +++ b/bld/namelist_files/use_cases/stdurbpt_pd.xml @@ -18,10 +18,8 @@ 'OFF' -.true. -.false. -.true. -.false. -.false. +.true. +.false. +.false. From af672fb3f0727bad7490c131499e9c151779c574 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 6 May 2024 13:53:07 -0600 Subject: [PATCH 07/31] Fix comparison to a baseline directory --- bld/unit_testers/compare_namelists | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bld/unit_testers/compare_namelists b/bld/unit_testers/compare_namelists index e0c6263555..7a8badc288 100755 --- a/bld/unit_testers/compare_namelists +++ b/bld/unit_testers/compare_namelists @@ -80,9 +80,10 @@ if [ "$PHYSB" = "all" ] && [ "$PHYSA" != "all" ]; then fi if [ "$verbose" = "YES" ]; then echo "Get list of lnd_in.* files"; fi +if [ "$verbose" = "YES" ]; then pwd; fi filepat="lnd_in.*" filenames=($filepat) -if [ "$verbose" = "YES" ]; then echo "filename list = $filenames"; fi +if [ "$verbose" = "YES" ]; then echo "filename list = ${filenames[*]}"; fi if [ "${filenames[*]}" = "$filepat" ]; then echo "No lnd_in files exist in the current directory -- run ./build-namelist_test.pl first" exit 1 @@ -92,9 +93,11 @@ do fileA="./$file" fileB="$baseline/$file" # If physicsA option used and the file matches the physics input - if [[ $fileA =~ "-phys+$PHYSA" ]]; then + if [[ "$fileA" =~ "-phys+$PHYSA" ]] || [ "$PHYSA" = "all" ]; then # Replace physicsB for fileB - fileB=${fileB/-phys+$PHYSA/-phys+$PHYSB} + if [ ! "$PHYSA" = "all" ]; then + fileB=${fileB/-phys+$PHYSA/-phys+$PHYSB} + fi if ! test -f $fileB; then if [ "$verbose" = "YES" ]; then echo "$fileB does NOT exist -- skipping"; fi else @@ -109,4 +112,4 @@ do fi fi done -if [ "$verbose" = "YES" ]; then echo "Successfully ran through lnd_in files to compare"; fi \ No newline at end of file +if [ "$verbose" = "YES" ]; then echo "Successfully ran through lnd_in files to compare"; fi From eec4e79bb867aa671ad52a9c52028f1df00358e1 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 7 May 2024 03:23:41 -0600 Subject: [PATCH 08/31] Update testlist based on what's needed for CAM and CESM test lists --- cime_config/testdefs/testlist_clm.xml | 32 +++++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index c2a90507ba..56ba176cfe 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -73,7 +73,7 @@ - + @@ -102,7 +102,7 @@ - + @@ -111,7 +111,7 @@ - + @@ -120,7 +120,7 @@ - + @@ -129,7 +129,7 @@ - + @@ -138,7 +138,7 @@ - + @@ -331,6 +331,24 @@ + + + + + + + + + + + + + + + + + + @@ -685,7 +703,7 @@ - + From e529c2f119f8561a7203f0f3588ded549094e6e6 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 7 May 2024 03:27:31 -0600 Subject: [PATCH 09/31] Add IHistClm60BgcCropG which is needed for CESM testing, change NoAnthro compsets to run with RTM as required for Paleo work, best guess as to what needs science support --- cime_config/config_compsets.xml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 2de911da86..538329e523 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -91,6 +91,8 @@ I2000Clm60Sp 2000_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV + + @@ -182,6 +184,8 @@ I1850Clm60Sp 1850_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV + + @@ -291,22 +295,24 @@ I1850Clm60BgcNoAnthro - 1850_DATM%GSWP3v1_CLM60%BGC-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV + 1850_DATM%GSWP3v1_CLM60%BGC-NOANTHRO_SICE_SOCN_RTM_SGLC_SWAV + I1850Clm60SpNoAnthro - 1850_DATM%GSWP3v1_CLM60%SP-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV + 1850_DATM%GSWP3v1_CLM60%SP-NOANTHRO_SICE_SOCN_RTM_SGLC_SWAV + I1850Clm50BgcNoAnthro - 1850_DATM%GSWP3v1_CLM50%BGC-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV + 1850_DATM%GSWP3v1_CLM50%BGC-NOANTHRO_SICE_SOCN_RTM_SGLC_SWAV I1850Clm50SpNoAnthro - 1850_DATM%GSWP3v1_CLM50%SP-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV + 1850_DATM%GSWP3v1_CLM50%SP-NOANTHRO_SICE_SOCN_RTM_SGLC_SWAV @@ -319,12 +325,15 @@ I1850Clm60SpNoAnthro - 1850_DATM%GSWP3v1_CLM60%SP-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV + 1850_DATM%GSWP3v1_CLM60%SP-NOANTHRO_SICE_SOCN_RTM_SGLC_SWAV + IHistClm60Sp HIST_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV + + @@ -631,6 +640,17 @@ I1850Clm60BgcCropG 1850_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV + + + + + + + IHistClm60BgcCropG + HIST_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV + + + From 9b5001d0026e0de26bc0b20608f3924ea0cca214 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 7 May 2024 17:02:30 -0600 Subject: [PATCH 10/31] Fix #2519 so that the mksurfdata_esmf build can work in a CESM checkout --- tools/mksurfdata_esmf/gen_mksurfdata_build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/mksurfdata_esmf/gen_mksurfdata_build b/tools/mksurfdata_esmf/gen_mksurfdata_build index 974c1929a5..864b5915b9 100755 --- a/tools/mksurfdata_esmf/gen_mksurfdata_build +++ b/tools/mksurfdata_esmf/gen_mksurfdata_build @@ -127,7 +127,16 @@ if [ "$existing_bld" = "No" ]; then if [ "$verbose" != "YES" ]; then options="$options --silent" fi - $cwd/../../cime/CIME/scripts/configure --macros-format CMake --machine $MACH $options + # Try finding configure file assuming a CTSM standalone checkout and then try for a CESM checkout + configure="$cwd/../../cime/CIME/scripts/configure" + if [ ! -f "$configure" ]; then + configure="$cwd/../../../../cime/CIME/scripts/configure" + if [ ! -f "$configure" ]; then + echo "Error $configure file does NOT exist in expected location, either for a standalone checkout or CESM/CAM checkout" + exit 1 + fi + fi + $configure --macros-format CMake --machine $MACH $options if [ $? != 0 ]; then echo "Error doing configure for machine name: $MACH" From f33040751bcf1fdb566119f6f91d5c9695e97386 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 8 May 2024 13:55:17 -0600 Subject: [PATCH 11/31] Change comments about clm5_1 to clm6_0 --- cime_config/testdefs/testlist_clm.xml | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 56ba176cfe..5350b4716b 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -312,14 +312,14 @@ - + - + @@ -328,7 +328,7 @@ - + @@ -337,7 +337,7 @@ - + @@ -346,7 +346,7 @@ - + @@ -586,14 +586,14 @@ - + - + @@ -602,7 +602,7 @@ - + @@ -749,14 +749,14 @@ - + - + @@ -765,7 +765,7 @@ - + @@ -2108,14 +2108,14 @@ - + - + @@ -2124,7 +2124,7 @@ - + @@ -2798,7 +2798,7 @@ - + @@ -2808,7 +2808,7 @@ - + From 524cbc06a30a6820f72c60e9c44d9748977afe48 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 8 May 2024 13:58:33 -0600 Subject: [PATCH 12/31] Revert order of irrigate and add note that it's also set in the use-cases --- bld/namelist_files/namelist_defaults_ctsm.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 25b0c80cf9..6f2f265da4 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -115,10 +115,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/isotopes/atm_delta_C14_CMIP6_SSP534os_3x1_global_1850-2100_yearly_c181209.nc lnd/clm2/isotopes/atm_delta_C14_CMIP6_SSP5B_3x1_global_1850-2100_yearly_c181209.nc - + +.false. .true. .false. -.false. .false. From b9e947d76e40fbf39c0bdcfbae3de9e14b751b1c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 8 May 2024 16:58:20 -0600 Subject: [PATCH 13/31] Get mksurfdata_esmf build and namelist build working under a CESM checkout --- python/ctsm/.pylintrc | 2 ++ python/ctsm/toolchain/gen_mksurfdata_namelist.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/python/ctsm/.pylintrc b/python/ctsm/.pylintrc index db78949288..230f8acba8 100644 --- a/python/ctsm/.pylintrc +++ b/python/ctsm/.pylintrc @@ -436,6 +436,8 @@ good-names=i, ds, m, n, + ni, + nj, l1, l2, ax, diff --git a/python/ctsm/toolchain/gen_mksurfdata_namelist.py b/python/ctsm/toolchain/gen_mksurfdata_namelist.py index 8a953c39df..361616419f 100755 --- a/python/ctsm/toolchain/gen_mksurfdata_namelist.py +++ b/python/ctsm/toolchain/gen_mksurfdata_namelist.py @@ -12,7 +12,7 @@ from datetime import datetime import netCDF4 -from ctsm.path_utils import path_to_ctsm_root +from ctsm.path_utils import path_to_ctsm_root, path_to_cime from ctsm.ctsm_logging import setup_logging_pre_config, add_logging_args, process_logging_args logger = logging.getLogger(__name__) @@ -326,7 +326,7 @@ def main(): ) # determine output mesh - determine_output_mesh(res, force_model_mesh_file, input_path, rawdata_files, tool_path) + determine_output_mesh(res, force_model_mesh_file, input_path, rawdata_files) # Determine num_pft if nocrop_flag: @@ -752,11 +752,11 @@ def handle_transient_run( return landuse_fname, must_run_download_input_data -def determine_output_mesh(res, force_model_mesh_file, input_path, rawdata_files, tool_path): +def determine_output_mesh(res, force_model_mesh_file, input_path, rawdata_files): """ determine output mesh """ - xml_path = os.path.join(tool_path, "../../ccs_config/component_grids_nuopc.xml") + xml_path = os.path.join(path_to_cime(), "../ccs_config/component_grids_nuopc.xml") tree2 = ET.parse(xml_path) root = tree2.getroot() model_mesh = "" From 7d91ac1d991003e9c953f5e1bb903064d789e1bd Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 8 May 2024 17:16:23 -0600 Subject: [PATCH 14/31] Correct clm60 typo in testlist --- 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 5350b4716b..75bdf63e19 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -331,22 +331,22 @@ - + - + - + - + From 010a008396e8edab3870270da919a706a543ee71 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 8 May 2024 17:32:03 -0600 Subject: [PATCH 15/31] Add a description and usage and error check command line args --- bld/unit_testers/cmp_baseline_lnd_in_files.sh | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/bld/unit_testers/cmp_baseline_lnd_in_files.sh b/bld/unit_testers/cmp_baseline_lnd_in_files.sh index de32cddf76..ebeeffc72a 100755 --- a/bld/unit_testers/cmp_baseline_lnd_in_files.sh +++ b/bld/unit_testers/cmp_baseline_lnd_in_files.sh @@ -1,15 +1,39 @@ #!/bin/bash +# +# A simple script to compare lnd_in namelists between two baselines on Derecho +# +#---------------------------------------------------------------------- +# Usage subroutine +usage() { + echo "" + echo "***********************************************************************" + echo "usage:" + echo "./cmp_baseline_lnd_in_files.sh " + echo " " + echo "Compares lnd_in files between two baselines on Derecho" + echo "***********************************************************************" +} + +#---------------------------------------------------------------------- + +if [ "$#" -ne 2 ]; then + echo "Need to give two baseline directories to compare" + usage + exit 1 +fi baseline=$1 compare=$2 cwd=`pwd` if [ -z "$1" ]; then echo "Need to enter a baseline directory tag name" + usage exit 1 fi if [ -z "$2" ]; then echo "Need to enter a comparison directory tag name" + usage exit 1 fi @@ -22,6 +46,7 @@ fi comp_root=$BASELINE_ROOT/$compare if ! test -d "$comp_root"; then echo "Root comparison directory of $comp_root does NOT exist" + usage exit 1 fi cd $root From fc0261376e1499fe06d6b41adfc3c2270bd373a6 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 8 May 2024 17:47:52 -0600 Subject: [PATCH 16/31] Adjustments to the testlist Make sure CESM testing compsets with cam6 forcing are being exercised. Update NoAnthro to Clm60. --- cime_config/testdefs/testlist_clm.xml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 75bdf63e19..1b825f0d40 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -21,11 +21,10 @@ - + - - + @@ -33,6 +32,15 @@ + + + + + + + + + @@ -141,6 +149,7 @@ + From f8c6a49539c3b1ce86dd2ca491c953b0c8856766 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 9 May 2024 02:05:20 -0600 Subject: [PATCH 17/31] Add a ctsm_sci test for I1850Clm50BgcCropG to verify that current B1850 will work --- cime_config/testdefs/testlist_clm.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 1b825f0d40..f0dc3ee270 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -576,6 +576,15 @@ + + + + + + + + + From c37f743023dc4bf8fd26b7bd88336cbb7bc61d68 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 9 May 2024 14:57:59 -0600 Subject: [PATCH 18/31] Add more tests of finidat file settings, a bunch of things fail because of a problem in the use-case changes I made --- bld/unit_testers/build-namelist_test.pl | 164 ++++++++++++++++-------- 1 file changed, 114 insertions(+), 50 deletions(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 74dbcef3f4..2b65b18f38 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,10 +163,10 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3665; +my $ntests = 3385; if ( defined($opts{'compare'}) ) { - $ntests += 2313; + $ntests += 2097; } plan( tests=>$ntests ); @@ -1424,7 +1424,7 @@ sub cat_and_create_namelistinfile { print " Test all use-cases over all physics options\n"; print "==================================================\n"; -# Run over all use-cases... +# Run over all use-cases for f09 and all physics... my $list = `$bldnml -use_case list 2>&1 | grep "use case"`; my @usecases; if ( $list =~ /build-namelist : use cases : (.+)$/ ) { @@ -1436,27 +1436,128 @@ sub cat_and_create_namelistinfile { print "use-cases = @usecases\n"; die "ERROR:: Number of use-cases isn't what's expected\n"; } +my @expect_fails = ( "1850-2100_SSP5-3.4_transient", "1850-2100_SSP4-3.4", "1850-2100_SSP1-1.9_transient", + "1850-2100_SSP4-6.0_transient" ); foreach my $phys ( "clm4_5", "clm5_0", "clm5_1", "clm6_0" ) { print "physics = $phys\n"; foreach my $usecase ( @usecases ) { print "usecase = $usecase\n"; - $options = "-use_case $usecase -envxml_dir ."; + $options = "-res 0.9x1.25 -use_case $usecase -envxml_dir ."; &make_env_run(); eval{ system( "$bldnml $options > $tempfile 2>&1 " ); }; - is( $@, '', "options: $options" ); - $cfiles->checkfilesexist( "$options", $mode ); - $cfiles->shownmldiff( "default", "standard" ); - if ( defined($opts{'compare'}) ) { - $cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode ); - $cfiles->comparefiles( "$options", $mode, $opts{'compare'} ); + my $expect_fail = 0; + foreach my $failusecase ( @expect_fails ) { + if ( $failusecase eq $usecase ) { + $expect_fail = 1; + } } - if ( defined($opts{'generate'}) ) { - $cfiles->copyfiles( "$options", $mode ); + if ( not $expect_fail ) { + is( $@, '', "options: $options" ); + $cfiles->checkfilesexist( "$options", $mode ); + $cfiles->shownmldiff( "default", "standard" ); + if ( defined($opts{'compare'}) ) { + $cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode ); + $cfiles->comparefiles( "$options", $mode, $opts{'compare'} ); + } + if ( defined($opts{'generate'}) ) { + $cfiles->copyfiles( "$options", $mode ); + } + } else { + isnt( $@, '', "options: $options" ); } &cleanup(); } } +print "\n=======================================================================================\n"; +print " Test the seperate initial condition files, for ones not tested elsewhere\n"; +print "=========================================================================================\n"; + +my %finidat_files = ( + "f091850Clm45BgcGSW" =>{ phys =>"clm4_5", + atm_forc=>"GSWP3v1", + res => "0.9x1.25", + bgc => "bgc", + use_case => "1850_control", + start_ymd => "18500101", + }, + "f091850Clm45BgcCRU" =>{ phys =>"clm4_5", + atm_forc=>"CRUv7", + res => "0.9x1.25", + bgc => "bgc", + use_case => "1850_control", + start_ymd => "18500101", + }, + "f091850Clm45BgcCAM6" =>{ phys =>"clm4_5", + atm_forc=>"cam6.0", + res => "0.9x1.25", + bgc => "bgc", + use_case => "1850_control", + start_ymd => "18500101", + }, + "f091850Clm50BgcGSW" =>{ phys =>"clm5_0", + atm_forc=>"GSWP3v1", + res => "0.9x1.25", + bgc => "bgc", + use_case => "1850_control", + start_ymd => "18500101", + }, + "f091850Clm50SpGSW" =>{ phys =>"clm5_0", + atm_forc=>"GSWP3v1", + res => "0.9x1.25", + bgc => "sp", + use_case => "1850_control", + start_ymd => "18500101", + }, + "f091850Clm50BgcCRU" =>{ phys =>"clm5_0", + atm_forc=>"CRUv7", + res => "0.9x1.25", + bgc => "bgc", + use_case => "1850_control", + start_ymd => "18500101", + }, + "f091850Clm50SpCRU" =>{ phys =>"clm5_0", + atm_forc=>"CRUv7", + res => "0.9x1.25", + bgc => "sp", + use_case => "1850_control", + start_ymd => "18500101", + }, + "f091850Clm50BgcCAM6" =>{ phys =>"clm5_0", + atm_forc=>"cam6.0", + res => "0.9x1.25", + bgc => "bgc", + use_case => "1850_control", + start_ymd => "18500101", + }, + ); + +foreach my $key ( keys(%finidat_files) ) { + print( "$key\n" ); + my $phys = $finidat_files{$key}{'phys'}; + print "physics = $phys\n"; + &make_config_cache($phys); + my $usecase = $finidat_files{$key}{'use_case'}; + my $bgc = $finidat_files{$key}{'bgc'}; + my $res = $finidat_files{$key}{'res'}; + my $start_ymd = $finidat_files{$key}{'start_ymd'}; + my $lnd_tuning_mode = "${phys}_" . $finidat_files{$key}{'atm_forc'}; + $options = "-bgc $bgc -res $res -use_case $usecase -envxml_dir . --lnd_tuning_mode $lnd_tuning_mode -namelist '&a start_ymd=$start_ymd/'"; + &make_env_run(); + eval{ system( "$bldnml $options > $tempfile 2>&1 " ); }; + is( $@, '', "options: $options" ); + $cfiles->checkfilesexist( "$options", $mode ); + $cfiles->shownmldiff( "default", "standard" ); + if ( defined($opts{'compare'}) ) { + $cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode ); + $cfiles->comparefiles( "$options", $mode, $opts{'compare'} ); + } + if ( defined($opts{'generate'}) ) { + $cfiles->copyfiles( "$options", $mode ); + } + &cleanup(); +} + print "\n==================================================\n"; print "Test crop resolutions \n"; print "==================================================\n"; @@ -1519,7 +1620,7 @@ sub cat_and_create_namelistinfile { "20thC_transient", ); foreach my $res ( @glc_res ) { - foreach my $usecase ( @usecases ) { + foreach my $usecase ( @use_cases ) { my $startymd = undef; if ( ($usecase eq "1850_control") || ($usecase eq "20thC_transient") ) { $startymd = 18500101; @@ -1591,43 +1692,6 @@ sub cat_and_create_namelistinfile { # # End loop over versions # -# -# Test ALL SSP's for f09... -# -$phys = "clm6_0"; -$mode = "-phys $phys"; -&make_config_cache($phys); -my $res = "0.9x1.25"; -foreach my $usecase ( "1850-2100_SSP5-8.5_transient", "1850-2100_SSP2-4.5_transient", "1850-2100_SSP1-2.6_transient", "1850-2100_SSP3-7.0_transient" ) { - $options = "-res $res -bgc bgc -crop -use_case $usecase -envxml_dir . -namelist '&a start_ymd=20150101/'"; - &make_env_run(); - eval{ system( "$bldnml $options > $tempfile 2>&1 " ); }; - is( $@, '', "$options" ); - $cfiles->checkfilesexist( "$options", $mode ); - $cfiles->shownmldiff( "default", "standard" ); - if ( defined($opts{'compare'}) ) { - $cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode ); - $cfiles->comparefiles( "$options", $mode, $opts{'compare'} ); - } - if ( defined($opts{'generate'}) ) { - $cfiles->copyfiles( "$options", $mode ); - } - &cleanup(); -} - -# The SSP's that fail because of missing ndep files... -$phys = "clm5_0"; -$mode = "-phys $phys"; -&make_config_cache($phys); -my $res = "0.9x1.25"; -foreach my $usecase ( "1850-2100_SSP5-3.4_transient", "1850-2100_SSP4-3.4", "1850-2100_SSP1-1.9_transient", - "1850-2100_SSP4-6.0_transient" ) { - $options = "-res $res -bgc bgc -crop -use_case $usecase -envxml_dir . -namelist '&a start_ymd=20150101/'"; - &make_env_run(); - eval{ system( "$bldnml $options > $tempfile 2>&1 " ); }; - isnt( $?, 0, $usecase ); - system( "cat $tempfile" ); -} print "\n==================================================\n"; print "Test clm4.5/clm5.0/clm5_1/clm6_0 resolutions \n"; From 190be8bd937ce545ad636c7c339f8b5497968ab6 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 10 May 2024 14:21:11 -0600 Subject: [PATCH 19/31] Fix the 2010 use case, and get the namelist testing working better --- bld/namelist_files/use_cases/2010_control.xml | 4 ++-- bld/unit_testers/build-namelist_test.pl | 24 ++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/bld/namelist_files/use_cases/2010_control.xml b/bld/namelist_files/use_cases/2010_control.xml index d4c2a9c9c0..d16177301c 100644 --- a/bld/namelist_files/use_cases/2010_control.xml +++ b/bld/namelist_files/use_cases/2010_control.xml @@ -12,8 +12,8 @@ .true. .false. -2010 -2010 +2010 +2010 2010 2010 diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 2b65b18f38..25545dcf8a 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,10 +163,10 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3385; +my $ntests = 3313; if ( defined($opts{'compare'}) ) { - $ntests += 2097; + $ntests += 2001; } plan( tests=>$ntests ); @@ -1436,22 +1436,24 @@ sub cat_and_create_namelistinfile { print "use-cases = @usecases\n"; die "ERROR:: Number of use-cases isn't what's expected\n"; } -my @expect_fails = ( "1850-2100_SSP5-3.4_transient", "1850-2100_SSP4-3.4", "1850-2100_SSP1-1.9_transient", - "1850-2100_SSP4-6.0_transient" ); +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" ) { print "physics = $phys\n"; + &make_config_cache($phys); foreach my $usecase ( @usecases ) { print "usecase = $usecase\n"; $options = "-res 0.9x1.25 -use_case $usecase -envxml_dir ."; &make_env_run(); - eval{ system( "$bldnml $options > $tempfile 2>&1 " ); }; - my $expect_fail = 0; + my $expect_fail = undef; foreach my $failusecase ( @expect_fails ) { if ( $failusecase eq $usecase ) { $expect_fail = 1; + last; } } - if ( not $expect_fail ) { + eval{ system( "$bldnml $options > $tempfile 2>&1 " ); }; + if ( ! defined($expect_fail) ) { is( $@, '', "options: $options" ); $cfiles->checkfilesexist( "$options", $mode ); $cfiles->shownmldiff( "default", "standard" ); @@ -1463,7 +1465,7 @@ sub cat_and_create_namelistinfile { $cfiles->copyfiles( "$options", $mode ); } } else { - isnt( $@, '', "options: $options" ); + isnt( $@, 0, "options: $options" ); } &cleanup(); } @@ -1546,6 +1548,12 @@ sub cat_and_create_namelistinfile { &make_env_run(); eval{ system( "$bldnml $options > $tempfile 2>&1 " ); }; is( $@, '', "options: $options" ); + my $finidat = `grep finidat lnd_in`; + if ( $finidat =~ /initdata_map/ ) { + my $result; + eval( $result = `grep use_init_interp lnd_in` ); + isnt( $#, 0, "use_init_interp needs to be set here and was not: $result") + } $cfiles->checkfilesexist( "$options", $mode ); $cfiles->shownmldiff( "default", "standard" ); if ( defined($opts{'compare'}) ) { From 2b8c042973bd383d986c64dda73b11ab9350d2d7 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 10 May 2024 18:05:52 -0600 Subject: [PATCH 20/31] Fix the tests so expected fails, actually fail --- bld/unit_testers/build-namelist_test.pl | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 25545dcf8a..b0ddb1e448 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -1480,57 +1480,73 @@ sub cat_and_create_namelistinfile { atm_forc=>"GSWP3v1", res => "0.9x1.25", bgc => "bgc", + crop => "--no-crop", use_case => "1850_control", start_ymd => "18500101", + namelist => "irrigate=T", }, "f091850Clm45BgcCRU" =>{ phys =>"clm4_5", atm_forc=>"CRUv7", res => "0.9x1.25", bgc => "bgc", + crop => "--no-crop", use_case => "1850_control", start_ymd => "18500101", + namelist => "irrigate=T", }, "f091850Clm45BgcCAM6" =>{ phys =>"clm4_5", atm_forc=>"cam6.0", res => "0.9x1.25", bgc => "bgc", + crop => "--crop", use_case => "1850_control", start_ymd => "18500101", + namelist => "irrigate=F", }, "f091850Clm50BgcGSW" =>{ phys =>"clm5_0", atm_forc=>"GSWP3v1", res => "0.9x1.25", bgc => "bgc", + crop => "--crop", use_case => "1850_control", start_ymd => "18500101", + namelist => "irrigate=F", }, "f091850Clm50SpGSW" =>{ phys =>"clm5_0", atm_forc=>"GSWP3v1", res => "0.9x1.25", bgc => "sp", + crop => "--no-crop", use_case => "1850_control", start_ymd => "18500101", + namelist => "irrigate=T", }, "f091850Clm50BgcCRU" =>{ phys =>"clm5_0", atm_forc=>"CRUv7", res => "0.9x1.25", bgc => "bgc", + crop => "--crop", use_case => "1850_control", start_ymd => "18500101", + namelist => "irrigate=F", }, "f091850Clm50SpCRU" =>{ phys =>"clm5_0", atm_forc=>"CRUv7", res => "0.9x1.25", bgc => "sp", + crop => "--no-crop", use_case => "1850_control", start_ymd => "18500101", + namelist => "irrigate=T", }, "f091850Clm50BgcCAM6" =>{ phys =>"clm5_0", atm_forc=>"cam6.0", res => "0.9x1.25", bgc => "bgc", + crop => "--crop", use_case => "1850_control", start_ymd => "18500101", + namelist => "irrigate=F", }, ); @@ -1542,9 +1558,12 @@ sub cat_and_create_namelistinfile { my $usecase = $finidat_files{$key}{'use_case'}; my $bgc = $finidat_files{$key}{'bgc'}; my $res = $finidat_files{$key}{'res'}; + my $crop = $finidat_files{$key}{'crop'}; + my $namelist = $finidat_files{$key}{'namelist'}; my $start_ymd = $finidat_files{$key}{'start_ymd'}; my $lnd_tuning_mode = "${phys}_" . $finidat_files{$key}{'atm_forc'}; - $options = "-bgc $bgc -res $res -use_case $usecase -envxml_dir . --lnd_tuning_mode $lnd_tuning_mode -namelist '&a start_ymd=$start_ymd/'"; + $options = "-bgc $bgc -res $res -use_case $usecase -envxml_dir . $crop --lnd_tuning_mode $lnd_tuning_mode " . + "-namelist '&a start_ymd=$start_ymd, $namelist/'"; &make_env_run(); eval{ system( "$bldnml $options > $tempfile 2>&1 " ); }; is( $@, '', "options: $options" ); @@ -1552,7 +1571,7 @@ sub cat_and_create_namelistinfile { if ( $finidat =~ /initdata_map/ ) { my $result; eval( $result = `grep use_init_interp lnd_in` ); - isnt( $#, 0, "use_init_interp needs to be set here and was not: $result") + is ( $result =~ /.true./, 1, "use_init_interp needs to be true here: $result"); } $cfiles->checkfilesexist( "$options", $mode ); $cfiles->shownmldiff( "default", "standard" ); From 8c109657651315ff83b98561108c6ac71a7f6b29 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 10 May 2024 21:05:33 -0600 Subject: [PATCH 21/31] Set use_init_interp=T for finidat files that are older than ctsm5.2 --- bld/namelist_files/namelist_defaults_ctsm.xml | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 6f2f265da4..c99700289e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -970,21 +970,21 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.I1850Clm45BgcGs.0901-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc lnd/clm2/initdata_map/clmi.I1850Clm45BgcCruGs.1101-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc lnd/clm2/initdata_map/clmi.B1850Clm45BgcGs.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc @@ -992,7 +992,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.I1850Clm50Sp.0181-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc @@ -1016,14 +1016,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc lnd/clm2/initdata_map/clmi.I1850Clm50SpCru.1706-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc @@ -1031,7 +1031,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.I1850Clm50Sp.0181-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc @@ -1053,7 +1053,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.I1850Clm50Sp.0181-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc @@ -1125,7 +1125,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc @@ -1136,14 +1136,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 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 @@ -1151,7 +1151,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1159,7 +1159,7 @@ 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 @@ -1167,7 +1167,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1175,7 +1175,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc @@ -1197,7 +1197,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1206,21 +1206,21 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 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 @@ -1228,7 +1228,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1236,7 +1236,7 @@ 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 @@ -1244,7 +1244,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1252,7 +1252,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc @@ -1260,7 +1260,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1269,21 +1269,21 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 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 @@ -1291,7 +1291,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1299,7 +1299,7 @@ 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 @@ -1307,7 +1307,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1315,7 +1315,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc @@ -1323,7 +1323,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1332,7 +1332,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc From e14303f9ac6bb7a8f36dfebec2ab73d0a6e20151 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sun, 12 May 2024 20:21:29 -0600 Subject: [PATCH 22/31] Fix irrigate for two use-cases so namelists all agree with the ctsm5.1.dev176 version --- bld/namelist_files/use_cases/2010_control.xml | 6 +++--- bld/namelist_files/use_cases/20thC_transient.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bld/namelist_files/use_cases/2010_control.xml b/bld/namelist_files/use_cases/2010_control.xml index d16177301c..2f72624077 100644 --- a/bld/namelist_files/use_cases/2010_control.xml +++ b/bld/namelist_files/use_cases/2010_control.xml @@ -8,9 +8,9 @@ constant -.true. -.true. -.false. +.true. +.false. +.false. 2010 2010 diff --git a/bld/namelist_files/use_cases/20thC_transient.xml b/bld/namelist_files/use_cases/20thC_transient.xml index b88ca3d3b1..6cbf9e0d38 100644 --- a/bld/namelist_files/use_cases/20thC_transient.xml +++ b/bld/namelist_files/use_cases/20thC_transient.xml @@ -20,7 +20,7 @@ .true. .false. -.false. +.false. 1850 2015 From 9fa2841b8ed6ad0d0696969ee3ea9d4b5627aec7 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 13 May 2024 00:56:57 -0600 Subject: [PATCH 23/31] New finidat files for clm5_1/clm6_0 for 1850 Use ne30np4.pg3_gx1v7 BgcCrop GSWP3v1 finidat file for 1850 clm5_1 and clm6_0. --- bld/namelist_files/namelist_defaults_ctsm.xml | 57 ++++--------------- 1 file changed, 11 insertions(+), 46 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 40ba339d65..fff414d82e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -758,34 +758,13 @@ 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=.false. glc_nec=10 do_transient_pfts=.false. - - -hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + +hgrid=ne30np4.pg3 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. lnd_tuning_mode=clm6_0_GSWP3v1 -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. - - - -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. - - - - -hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. - - - -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. +hgrid=ne30np4.pg3 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. lnd_tuning_mode=clm6_0_GSWP3v1 @@ -1049,26 +1028,12 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc - -lnd/clm2/initdata_map/clmi.I1850Clm50Sp.0181-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc - -lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm50BgcCrop-ciso.1366-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc - - - -lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc + + +lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm60BgcCrop-ciso.1361-01-01.ne30pg3_mg17_c240317.nc Date: Mon, 13 May 2024 02:44:47 -0600 Subject: [PATCH 27/31] Start on Change files --- doc/ChangeLog | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 118 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 3307c8df88..172c203e7f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,121 @@ =============================================================== +Tag name: ctsm5.2.005 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Mon 13 May 2024 02:44:33 AM MDT +One-line Summary: Fix clm6_0 defaults and CESM testing issues, add tests to detect these problems + +Purpose and description of changes +---------------------------------- + +Fix the clm6_0 defaults that were incorrect in ctsm5.2.0. The use-cases needed to be changed to handle clm6_0. +And clm6_0 wasn't handled in the merge of ctsm5.1.dev174 for the two new settings. Simplified the use-cases which +should help prevent these problems in the future. use_init_interp will be set for ctsm5.1 finidat files. + +Fix some testing. mksurfdata_esmf and the MKSUIRFDATA test didn't work in a CESM checkout. build-namelist unit tests +weren't going over the use-cases. Also started adding some tests to go over finidat files, but didn't yet capture all of them. +Add some scripts to compare namelists in order to detect namelist issues for physics +version updates, and more easily see namelist changes in one place (bld/unit_testers/cmp_baseline_lnd_in_files, +bld/unit_testers/compare_namelists). + +Add some tests to detect issues in CESM and CAM testing (add more tests for cam6.0 forcing, add new IHistClm60BgcCropG +compset). Add a NoAnthro compset to the ctsm_sci testing. Add I1850Clm60Sp test for f09 and f19 to ctsm_sci. + +Change NoAnthro compsets to use RTM rather than MOSART. Add science support to some clm6_0 compsets, as was obvious. + + +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 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes #2492 -- Fix clm6_0 defaults + Fixes #2504 -- build-namelist unit tests for use-cases + Fixes #2519 -- MKSURFDATAESMF for CESM checkout + Fixes #2520 -- B1850 compsets are failing + One tick box in #2403 (new initial conditions) + +Notes of particular relevance for users +--------------------------------------- + +Changes made to namelist defaults (e.g., changed parameter values): + Fixes: snow_thermal_cond_method, irrigate and snicar_snobc_intmix for clm6_0 + +Changes to the datasets (e.g., parameter, surface or initial files): + New initial conditions for clm5_1/clm6_0 for 1850 from ne30pg3_g17 GSWP3v1 forcing for BgcCrop with ciso + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + build-namelist unit tester started to add some finidat tests, but only some of them were added to the list + +Changes to tests or testing: Add some tests to detect the CESM test issues + + +Testing summary: regular ctsm_sci +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS (except + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS (except + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + + any other testing (give details below): + + ctsm_sci + derecho ---- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: Yes! + + Summarize any changes to answers, i.e., + - what code configurations: clm6_0 (some clm4_5 see below) + - what platforms/compilers: All + - nature of change (roundoff; larger than roundoff/same climate; new climate): + new climate so agrees with clm5_1 namelists, and fixes irrigate for clm4_5 + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + + #2501 -- Fix clm6_0 defaults + +=============================================================== +=============================================================== Tag name: ctsm5.2.004 Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) Date: Thu 09 May 2024 03:10:52 PM MDT diff --git a/doc/ChangeSum b/doc/ChangeSum index 17ad670f17..0edccb3a18 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.2.005 erik 05/13/2024 Fix clm6_0 defaults and CESM testing issues, add tests to detect these problems ctsm5.2.004 multiple 05/09/2024 CTSM5.2 1979 fsurdat and 1979-2026 landuse ne0np4 files + two fixes ctsm5.2.003 samrabin 05/02/2024 Merge b4b-dev ctsm5.2.002 glemieux 04/26/2024 FATES default allometry parameter file update From a09d22376f704ea37c30b19e6978f6fa19a261bf Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 13 May 2024 13:44:35 -0600 Subject: [PATCH 28/31] Some tests were failing to find the 1850 finidat file, more changes to match how the finidat matching is done so that it now works --- bld/namelist_files/namelist_defaults_ctsm.xml | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 59a0d9ee75..655e97c47c 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -760,11 +760,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). hgrid=ne30np4.pg3 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. lnd_tuning_mode=clm6_0_GSWP3v1 +>hgrid=ne30np4.pg3 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 hgrid=ne30np4.pg3 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. lnd_tuning_mode=clm6_0_GSWP3v1 +>hgrid=ne30np4.pg3 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 @@ -1006,27 +1006,12 @@ 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_map/clmi.I1850Clm50Sp.0181-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc - - - -lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc - - lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm60BgcCrop-ciso.1361-01-01.ne30pg3_mg17_c240317.nc From 9ecc1bc79a1dd66a138fd398872ef8fa55e09fbf Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 13 May 2024 16:10:43 -0600 Subject: [PATCH 29/31] Fix a resoplution name in a test --- 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 da38a4e27d..9cfba6f5b3 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -576,7 +576,7 @@ - + From 8bf5f5abd69b4ccfe590b1b42ddebc1a91c8c2c1 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 13 May 2024 16:32:08 -0600 Subject: [PATCH 30/31] Add test to expected fails --- 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 8ee60cf4b8..9da502fd54 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -51,6 +51,13 @@ + + + FAIL + #2542 + + + FAIL From 672da6de229e5a1acb166adf33375d772615de44 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 13 May 2024 16:46:38 -0600 Subject: [PATCH 31/31] Update change log a bit --- doc/ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 172c203e7f..de37d4934c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.2.005 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) -Date: Mon 13 May 2024 02:44:33 AM MDT +Date: Mon 13 May 2024 04:46:10 PM MDT One-line Summary: Fix clm6_0 defaults and CESM testing issues, add tests to detect these problems Purpose and description of changes @@ -76,11 +76,11 @@ Testing summary: regular ctsm_sci build-namelist tests (if CLMBuildNamelist.pm has changed): - derecho - PASS (except + derecho - PASS (737 compare different to baseline) python testing (if python code has changed; see instructions in python/README.md; document testing done): - derecho - PASS (except + derecho - PASS regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):