diff --git a/Externals.cfg b/Externals.cfg index 723e6d98fd..ae541c324f 100644 --- a/Externals.cfg +++ b/Externals.cfg @@ -23,14 +23,14 @@ required = True local_path = components/mosart protocol = git repo_url = https://github.com/ESCOMP/mosart -tag = release-cesm2.0.00 +tag = nldas-grid.n01_mosart1_0_31 required = True [cime] local_path = cime protocol = git repo_url = https://github.com/ESMCI/cime -tag = ctsm/ctsm1.0/cime5.7.9/n01 +tag = ctsm/ctsm1.0/cime5.7.9/n05 required = True [externals_description] diff --git a/README b/README index b0833e346d..76c0a04982 100644 --- a/README +++ b/README @@ -32,6 +32,7 @@ test -------------- CLM Testing scripts for CLM offline tools. tools ------------- CLM Offline tools to prepare input datasets and process output. cime_config ------- Configuration files of cime for compsets and CLM settings manage_externals -- Script to manage the external source directories +python ------------ Some python modules mostly for use by run_sys_tests (but could be used elsewhere) Directory structure only for a CTSM checkout: @@ -61,10 +62,17 @@ README.rst --------------- File that displays under the project in github README_EXTERNALS.rst ----- Information on how to work with subversion externals for clm CODE_OF_CONDUCT.md ------- Code of Conduct for how to work with each other on the CTSM project Copyright ---------------- CESM Copyright file -doc/UpdateChangeLog.pl ------- Script to add documentation on a tag to the +doc/UpdateChangeLog.pl --- Script to add documentation on a tag to the ChangeLog/ChangeSum files -doc/ChangeLog ---------------- Documents different CLM versions -doc/ChangeSum ---------------- Summary documentation of different CLM versions +doc/ChangeLog ------------ Documents different CLM versions +doc/ChangeSum ------------ Summary documentation of different CLM versions + +doc/design --------------- Software Engineering and code design document files + +Checklists for standard Software Engineering tasks + +./doc/README.CHECKLIST.master_tags +./bld/namelist_files/README.CHECKLIST.interpolating_initial_conditions.md Documentation of Namelist Items: (view the following in a web browser) @@ -77,7 +85,13 @@ Important files in main directories (under $CTSMROOT): Externals.cfg --------------- File for management of the main high level externals Externals_CLM.cfg ----------- File for management of the CLM specific externals (i.e. FATES) + +run_sys_tests --------------- Python script to send the standard CTSM testing off (submits + the create_test test suite for several different compilers on the + machines we do standard CTSM testing on). + parse_cime.cs.status -------- Script to parse test status files cs.status.* created by create_test + (can be used along with run_sys_tests) doc/Quickstart.GUIDE -------- Quick guide to using cpl7 scripts. doc/IMPORTANT_NOTES --------- Some important notes about this version of clm, configuration modes and namelist items @@ -87,7 +101,7 @@ doc/ChangeSum --------------- Summary one-line list of changes for each model version. doc/README ------------------ Documentation similar to this file doc/UsersGuide -------------- CLM Users Guide -doc/CodeReference ----------- CLM Code Reference Guide +doc/IMPORTANT_NOTES --------- Some important notes on caveats for some configurations/namelist items bld/README ------------------ Description of how to use the configure and build-namelist scripts. diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 9f69ae72ff..42e0b35b92 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -62,6 +62,9 @@ REQUIRED OPTIONS -cimeroot "directory" Path to cime directory -config "filepath" Read the given CLM configuration cache file. Default: "config_cache.xml". + -configuration "cfg" The overall configuration being used [ clm | nwp ] + clm = Climate configuration + nwp = Numerical Weather Prediction configuration -d "directory" Directory where output namelist file will be written Default: current working directory. -envxml_dir "directory" Directory name of env_*.xml case files to read in. @@ -78,6 +81,7 @@ REQUIRED OPTIONS (i.e. 1850, 2000, 1850-2000, 1850-2100) "-sim_year list" to list valid simulation years (default 2000) + -structure "structure" The overall structure being used [ standard | fast ] OPTIONS -bgc "value" Build CLM with BGC package [ sp | cn | bgc | fates ] (default is sp). @@ -240,6 +244,7 @@ sub process_commandline { my %opts = ( cimeroot => undef, config => "config_cache.xml", + configuration => undef, csmdata => undef, clm_usr_name => undef, co2_type => undef, @@ -254,6 +259,7 @@ sub process_commandline { dir => "$cwd", rcp => "default", sim_year => "default", + structure => undef, clm_accelerated_spinup=> "default", chk_res => undef, note => undef, @@ -280,6 +286,7 @@ sub process_commandline { "co2_ppmv=f" => \$opts{'co2_ppmv'}, "co2_type=s" => \$opts{'co2_type'}, "config=s" => \$opts{'config'}, + "configuration=s" => \$opts{'configuration'}, "csmdata=s" => \$opts{'csmdata'}, "clm_usr_name=s" => \$opts{'clm_usr_name'}, "envxml_dir=s" => \$opts{'envxml_dir'}, @@ -306,6 +313,7 @@ sub process_commandline { "rcp=s" => \$opts{'rcp'}, "s|silent" => \$opts{'silent'}, "sim_year=s" => \$opts{'sim_year'}, + "structure=s" => \$opts{'structure'}, "output_reals=s" => \$opts{'output_reals_filename'}, "clm_accelerated_spinup=s" => \$opts{'clm_accelerated_spinup'}, "clm_start_type=s" => \$opts{'clm_start_type'}, @@ -621,6 +629,7 @@ sub process_namelist_commandline_options { setup_cmdl_chk_res($opts, $defaults); setup_cmdl_resolution($opts, $nl_flags, $definition, $defaults); setup_cmdl_mask($opts, $nl_flags, $definition, $defaults, $nl); + setup_cmdl_configuration_and_structure($opts, $nl_flags, $definition, $defaults, $nl); setup_cmdl_bgc($opts, $nl_flags, $definition, $defaults, $nl); setup_cmdl_fire_light_res($opts, $nl_flags, $definition, $defaults, $nl); setup_cmdl_spinup($opts, $nl_flags, $definition, $defaults, $nl); @@ -768,6 +777,31 @@ sub setup_cmdl_fates_mode { } } +#------------------------------------------------------------------------------- +sub setup_cmdl_configuration_and_structure { + # Error-check and set the 'configuration' and 'structure' namelist flags + + my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; + + my $val; + + my $var = "configuration"; + $val = $opts->{$var}; + if (defined($val) && ($val eq "clm" || $val eq "nwp")) { + $nl_flags->{$var} = $val; + } else { + $log->fatal_error("$var has a value (".$val.") that is NOT valid. Valid values are: clm, nwp."); + } + + $var = "structure"; + $val = $opts->{$var}; + if (defined($val) && ($val eq "standard" || $val eq "fast")) { + $nl_flags->{$var} = $val; + } else { + $log->fatal_error("$var has a value (".$val.") that is NOT valid. Valid values are: standard, fast."); + } +} + #------------------------------------------------------------------------------- sub setup_cmdl_bgc { # BGC - alias for group of biogeochemistry related use_XXX namelists @@ -1936,9 +1970,12 @@ sub setup_logic_subgrid { my $var = 'run_zero_weight_urban'; add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'collapse_urban'); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'n_dom_landunits'); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'n_dom_pfts'); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'collapse_urban', + 'structure'=>$nl_flags->{'structure'}); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'n_dom_landunits', + 'structure'=>$nl_flags->{'structure'}); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'n_dom_pfts', + 'structure'=>$nl_flags->{'structure'}); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'toosmall_soil'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'toosmall_crop'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'toosmall_glacier'); @@ -2052,7 +2089,8 @@ sub setup_logic_soilstate { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'organic_frac_squared' ); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'soil_layerstruct' ); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'soil_layerstruct', + 'structure'=>$nl_flags->{'structure'}); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_bedrock', 'use_fates'=>$nl_flags->{'use_fates'}, 'vichydro'=>$nl_flags->{'vichydro'} ); } @@ -2893,7 +2931,7 @@ sub setup_logic_hydrstress { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hydrstress', - 'use_fates'=>$nl_flags->{'use_fates'} ); + 'configuration'=>$nl_flags->{'configuration'}, 'use_fates'=>$nl_flags->{'use_fates'} ); $nl_flags->{'use_hydrstress'} = $nl->get_value('use_hydrstress'); if ( &value_is_true( $nl_flags->{'use_fates'} ) && &value_is_true( $nl_flags->{'use_hydrstress'} ) ) { $log->fatal_error("Cannot turn use_hydrstress on when use_fates is on" ); @@ -3281,8 +3319,9 @@ sub setup_logic_megan { my $var = "megan"; if ( $opts->{$var} eq "default" ) { - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, -'megan', clm_accelerated_spinup=>$nl_flags->{'clm_accelerated_spinup'} ); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'megan', + 'clm_accelerated_spinup'=>$nl_flags->{'clm_accelerated_spinup'}, + 'configuration'=>$nl_flags->{'configuration'} ); $nl_flags->{$var} = $nl->get_value($var); } else { $nl_flags->{$var} = $opts->{$var}; @@ -3432,6 +3471,8 @@ sub setup_logic_canopyfluxes { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_undercanopy_stability' ); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'itmax_canopy_fluxes', + 'structure'=>$nl_flags->{'structure'}); } #------------------------------------------------------------------------------- @@ -3453,8 +3494,10 @@ sub setup_logic_snowpack { # my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'nlevsno'); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'h2osno_max'); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'nlevsno', + 'structure'=>$nl_flags->{'structure'}); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'h2osno_max', + 'structure'=>$nl_flags->{'structure'}); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'int_snow_max'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'n_melt_glcmec'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'wind_dependent_snow_density'); diff --git a/bld/namelist_files/checkmapfiles.ncl b/bld/namelist_files/checkmapfiles.ncl index 6302615d1c..c0751adcb0 100644 --- a/bld/namelist_files/checkmapfiles.ncl +++ b/bld/namelist_files/checkmapfiles.ncl @@ -9,7 +9,7 @@ ; print( "Check that datm mapping files are consistent" ); - resolutions = (/ "128x256", "64x128", "48x96", "32x64", "8x16", "94x192", "0.23x0.31", "0.47x0.63", "0.9x1.25", "1.9x2.5", "2.5x3.33", "4x5", "10x15", "5x5_amazon", "1x1_camdenNJ", "1x1_vancouverCAN", "1x1_mexicocityMEX", "1x1_asphaltjungleNJ", "1x1_brazil", "1x1_urbanc_alpha", "1x1_numaIA", "1x1_smallvilleIA", "ne4np4", "ne16np4", "ne30np4", "ne60np4", "ne120np4", "ne240np4" /); + resolutions = (/ "128x256", "64x128", "48x96", "32x64", "8x16", "94x192", "0.23x0.31", "0.47x0.63", "0.9x1.25", "1.9x2.5", "2.5x3.33", "4x5", "10x15", "0.125nldas2", "5x5_amazon", "1x1_camdenNJ", "1x1_vancouverCAN", "1x1_mexicocityMEX", "1x1_asphaltjungleNJ", "1x1_brazil", "1x1_urbanc_alpha", "1x1_numaIA", "1x1_smallvilleIA", "ne4np4", "ne16np4", "ne30np4", "ne60np4", "ne120np4", "ne240np4" /); space = " "; badres = 0 diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 32a1f152cd..45cad259ad 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -96,8 +96,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .false. +1 0 -1 +0 NONE @@ -124,8 +125,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. .false. -20SL_8.5m -10SL_3.5m +5SL_3m +20SL_8.5m +10SL_3.5m .false. .false. @@ -232,6 +234,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .false. .true. +40 +3 + .true. 1.0 @@ -283,10 +288,15 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. -12 -5 -10000.0 -1000.0 +12 +5 +5 + +10000.0 +5000.0 +1000.0 2000. @@ -446,9 +456,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -6.d+1 -.false. -.false. -.true. +.false. +.true. + + + +lnd/clm2/mappingdata/maps/0.125nldas2/map_1km-merge-10min_HYDRO1K-merge-nomask_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_5x5min_nomask_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_0.25x0.25_MODIS_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_0.9x1.25_GRDC_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_10x10min_nomask_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_360x720cru_cruncep_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_3x3min_LandScan2004_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_10x10min_IGBPmergeICESatGIS_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_3x3min_MODIS_to_0.125nldas2_nomask_aave_da_c190412.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_3x3min_MODIS-wCsp_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_0.5x0.5_MODIS_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_3x3min_GLOBE-Gardner-mergeGIS_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_5x5min_ISRIC-WISE_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_3x3min_GLOBE-Gardner_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_0.5x0.5_AVHRR_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_3x3min_USGS_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_5x5min_IGBP-GSDP_to_0.125nldas2_nomask_aave_da_c190408.nc +lnd/clm2/mappingdata/maps/0.125nldas2/map_5x5min_ORNL-Soil_to_0.125nldas2_nomask_aave_da_c190408.nc + + + lnd/clm2/mappingdata/maps/5x5_amazon/map_0.5x0.5_MODIS_to_5x5_amazon_nomask_aave_da_c110920.nc landmesh +lnd/clm2/mappingdata/grids/SCRIPgrid_0.125nldas2_nomask_c190328.nc lnd/clm2/mappingdata/grids/SCRIPgrid_1x1pt_camdenNJ_nomask_c110308.nc lnd/clm2/mappingdata/grids/SCRIPgrid_1x1pt_brazil_nomask_c110308.nc lnd/clm2/mappingdata/grids/SCRIPgrid_1x1pt_camdenNJ_nomask_c110308.nc diff --git a/bld/namelist_files/namelist_defaults_overall.xml b/bld/namelist_files/namelist_defaults_overall.xml index 0edaa1dd76..f7f2d041c2 100644 --- a/bld/namelist_files/namelist_defaults_overall.xml +++ b/bld/namelist_files/namelist_defaults_overall.xml @@ -75,6 +75,7 @@ determine default values for namelists. gx1v6 gx1v6 +nldas2 navy navy navy diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 5ac5207f56..cac346c4e1 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -115,11 +115,12 @@ Otherwise use the fraction straight up (the default for CLM5.0) + group="clm_inparm" valid_values="10SL_3.5m,23SL_3.5m,49SL_10m,20SL_8.5m,5SL_3m" > 10SL_3.5m = standard CLM4 and CLM4.5 version 23SL_3.5m = more vertical layers for permafrost simulations 49SL_10m = 49 layer soil column, 10m of soil, 5 bedrock layers 20SL_8.5m = 20 layer soil column, 8m of soil, 5 bedrock layers +5SL_3m = 5 layer soil column, 3m of soil, 0 bedrock layers + +Max number of iterations used in subr. CanopyFluxes. For many years, 40 was the hardwired default value. +Default: 40 + + Fraction of intercepted precipitation @@ -1836,7 +1843,7 @@ CLM run type. +"512x1024,360x720cru,128x256,64x128,48x96,32x64,8x16,94x192,0.23x0.31,0.47x0.63,0.9x1.25,1.9x2.5,2.5x3.33,4x5,10x15,0.125nldas2,5x5_amazon,1x1_camdenNJ,1x1_vancouverCAN,1x1_mexicocityMEX,1x1_asphaltjungleNJ,1x1_brazil,1x1_urbanc_alpha,1x1_numaIA,1x1_smallvilleIA,0.1x0.1,0.25x0.25,0.5x0.5,3x3min,5x5min,10x10min,0.33x0.33,0.125x0.125,ne4np4,ne16np4,ne30np4,ne60np4,ne120np4,ne240np4,1km-merge-10min"> Horizontal resolutions Note: 0.1x0.1, 0.25x0.25, 0.5x0.5, 5x5min, 10x10min, 3x3min and 0.33x0.33 are only used for CLM tools @@ -1858,7 +1865,7 @@ hist means do NOT use a future scenario, just use historical data. + valid_values="USGS,gx3v7,gx1v6,gx1v7,navy,test,tx0.1v2,tx1v1,T62,cruncep,nldas2"> Land mask description diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index a2df43b4a9..39756d8055 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -138,9 +138,9 @@ sub make_config_cache { # # Figure out number of tests that will run # -my $ntests = 915; +my $ntests = 927; if ( defined($opts{'compare'}) ) { - $ntests += 579; + $ntests += 588; } plan( tests=>$ntests ); @@ -165,7 +165,7 @@ sub make_config_cache { my $DOMFILE = "$inputdata_rootdir/atm/datm7/domain.lnd.T31_gx3v7.090928.nc"; my $real_par_file = "user_nl_clm_real_parameters"; -my $bldnml = "../build-namelist -verbose -csmdata $inputdata_rootdir -lnd_frac $DOMFILE -glc_nec 10 -no-note -output_reals $real_par_file"; +my $bldnml = "../build-namelist -verbose -csmdata $inputdata_rootdir -lnd_frac $DOMFILE -configuration clm -structure standard -glc_nec 10 -no-note -output_reals $real_par_file"; if ( $opts{'test'} ) { $bldnml .= " -test"; } @@ -287,12 +287,14 @@ sub make_config_cache { &make_config_cache($phys); print "\n===============================================================================\n"; -print "Test irrigate, verbose, clm_demand, rcp, test, sim_year, use_case, l_ncpl\n"; +print "Test configuration, structure, irrigate, verbose, clm_demand, rcp, test, sim_year, use_case, l_ncpl\n"; print "=================================================================================\n"; -# irrigate, verbose, clm_demand, rcp, test, sim_year, use_case, l_ncpl +# configuration, structure, irrigate, verbose, clm_demand, rcp, test, sim_year, use_case, l_ncpl my $startfile = "clmrun.clm2.r.1964-05-27-00000.nc"; -foreach my $options ( "-namelist '&a irrigate=.true./'", "-verbose", "-rcp 2.6", "-test", "-sim_year 1850", +foreach my $options ( "-configuration nwp", + "-structure fast", + "-namelist '&a irrigate=.true./'", "-verbose", "-rcp 2.6", "-test", "-sim_year 1850", "-use_case 1850_control", "-l_ncpl 1", "-clm_start_type startup", "-namelist '&a irrigate=.false./' -crop -bgc bgc", "-envxml_dir . -infile myuser_nl_clm", diff --git a/cime_config/SystemTests/lciso.py b/cime_config/SystemTests/lciso.py new file mode 100644 index 0000000000..e79af2886b --- /dev/null +++ b/cime_config/SystemTests/lciso.py @@ -0,0 +1,36 @@ +""" +Implementation of the CIME LCISO (Land Carbon Isotope) test. + +This is a CTSM specific test: +Verifies turning on carbon isotopes doesn't change answers +(1) do a run with Carbon isotopes off (suffix base) +(2) add C13 and C14 carbon isotopes on with their time-series (suffix cisoallon) + +""" + +from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo +from CIME.XML.standard_module_setup import * +from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files + +logger = logging.getLogger(__name__) + +class LCISO(SystemTestsCompareTwo): + + def __init__(self, case): + SystemTestsCompareTwo.__init__(self, case, + separate_builds = False, + run_two_suffix = 'cisoallon', + run_one_description = 'carbon isotopes off', + run_two_description = 'c13 and c14 isotopes on as well as C isotope time series', + ignore_fieldlist_diffs = True) + + def _case_one_setup(self): + append_to_user_nl_files(caseroot = self._get_caseroot(), + component = "clm", + contents = "use_c13=F, use_c14=F") + + def _case_two_setup(self): + append_to_user_nl_files(caseroot = self._get_caseroot(), + component = "clm", + contents = "use_c13=.true.,use_c14=.true.,use_c13_timeseries=.true.,use_c14_bombspike=.true." ) + diff --git a/cime_config/buildnml b/cime_config/buildnml index 3d91d66ebf..66604338f3 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -38,6 +38,8 @@ def buildnml(case, caseroot, compname): lnd_root = case.get_value("COMP_ROOT_DIR_LND") din_loc_root = case.get_value("DIN_LOC_ROOT") + configuration = case.get_value("CLM_CONFIGURATION") + structure = case.get_value("CLM_STRUCTURE") ccsm_co2_ppmv = case.get_value("CCSM_CO2_PPMV") clm_co2_type = case.get_value("CLM_CO2_TYPE") clm_namelist_opts = case.get_value("CLM_NAMELIST_OPTS") @@ -206,11 +208,13 @@ def buildnml(case, caseroot, compname): command = ("%s -cimeroot %s -infile %s -csmdata %s -inputdata %s %s -namelist \"&clm_inparm start_ymd=%s %s/ \" " "%s %s -res %s %s -clm_start_type %s -envxml_dir %s -l_ncpl %s " + "-configuration %s -structure %s " "-lnd_frac %s -glc_nec %s -co2_ppmv %s -co2_type %s -config %s " "%s %s %s %s" %(cmd, _CIMEROOT, infile, din_loc_root, inputdata_file, ignore, start_ymd, clm_namelist_opts, nomeg, usecase, lnd_grid, clmusr, start_type, caseroot, lnd_ncpl, - lndfrac_file, glc_nec, ccsm_co2_ppmv, clm_co2_type, config_cache_file, + configuration, structure, + lndfrac_file, glc_nec, ccsm_co2_ppmv, clm_co2_type, config_cache_file, clm_bldnml_opts, spinup, tuning, gridmask)) rc, out, err = run_cmd(command, from_dir=clmconf) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 0312874444..56971672dc 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -15,7 +15,7 @@ clm4.5: - clm5.0: + clm5.0: Satellite phenology: CN: Carbon Nitrogen model CNDV: CN with Dynamic Vegetation @@ -30,6 +30,8 @@ BGC (vert. resol. CN and methane) with dynamic vegetation and prognostic crop: BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 DECK experiments: BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 WACCM DECK experiments: + + NWP configuration with satellite phenology: @@ -80,6 +82,38 @@ This is typically set by the compset. + + char + clm,nwp + clm + + nwp + + run_component_clm + env_run.xml + Sets CLM default namelist options related to model configuration. + clm: Configuration used for climate applications (CLM) + nwp: Configuration used for numerical weather prediction applications + + + + + char + standard,fast + standard + + fast + + run_component_clm + env_run.xml + Sets CLM default namelist options related to model structure. + standard: Standard model structure, allowing for more subgrid heterogeneity, + deeper soil, etc., at the cost of slower speeds. + fast: Simplified model structure, achieving faster speeds at the cost of less + subgrid heterogeneity, shallower soil, etc. + + + char UNSET diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 8a3036e5c3..9bffde0c86 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -231,6 +231,27 @@ 1850_DATM%CPLHIST_CLM50%BGC_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV + + + + + I2000Ctsm50NwpSpGswpGs + 2000_DATM%GSWP3v1_CLM50%NWP-SP_SICE_SOCN_MOSART_SGLC_SWAV + + + + + I2000Ctsm50NwpSpNldasGs + 2000_DATM%NLDAS2_CLM50%NWP-SP_SICE_SOCN_MOSART_SGLC_SWAV + + + + + I2000Ctsm50NwpSpNldasRsGs + 2000_DATM%NLDAS2_CLM50%NWP-SP_SICE_SOCN_SROF_SGLC_SWAV + @@ -360,6 +381,8 @@ 1850-01-01 + 2000-01-01 + 2010-01-01 1980-01-15 1997-12-31 1993-12-01 diff --git a/cime_config/config_pes.xml b/cime_config/config_pes.xml index 4362bed475..0d0bbad5b7 100644 --- a/cime_config/config_pes.xml +++ b/cime_config/config_pes.xml @@ -671,6 +671,80 @@ + + + + none + + -4 + -4 + -4 + -4 + -4 + -4 + -4 + -4 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + none + + -1 + -50 + -50 + -50 + -50 + -50 + -50 + -50 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + -1 + -1 + -1 + -1 + -1 + -1 + -1 + + + + diff --git a/cime_config/config_tests.xml b/cime_config/config_tests.xml index 703d271f4b..dbcd59eb6c 100644 --- a/cime_config/config_tests.xml +++ b/cime_config/config_tests.xml @@ -65,6 +65,16 @@ SSP smoke CLM spinup test (only valid for CLM compsets with CLM45) never + + CTSM Land model test to ensure Carbon isotopes on or off does NOT change answers + 1 + FALSE + FALSE + never + $STOP_OPTION + $STOP_N + + smoke CLM spinup test 1 diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index ee53ca4300..5058d28aef 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -30,18 +30,6 @@ - - - FAIL - #404 - - - PEND - #404 - Because of the RUN failure, this phase is listed as PEND - - - FAIL diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 6066e0a4e1..8966bacc3d 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1041,6 +1041,15 @@ + + + + + + + + + @@ -1658,6 +1667,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/.ChangeLog_template b/doc/.ChangeLog_template index 6b7fdb673f..6b65b11f9e 100644 --- a/doc/.ChangeLog_template +++ b/doc/.ChangeLog_template @@ -31,6 +31,8 @@ Does this tag change answers significantly for any of the following physics conf [ ] clm5_0 +[ ] ctsm5_0-nwp + [ ] clm4_5 Notes of particular relevance for users diff --git a/doc/ChangeLog b/doc/ChangeLog index 76da88f942..00d7835db9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,417 @@ =============================================================== +Tag name: ctsm1.0.dev038 +Originator(s): sacks (Bill Sacks) +Date: Wed May 1 10:53:02 MDT 2019 +One-line Summary: Support for NWP configuration, NLDAS grid and NLDAS datm forcing + +Purpose of changes +------------------ + +This tag includes a set of changes that, together, provide support for +running an initial Numerical Weather Prediction version of CTSM over the +Continental U.S. + +(1) NWP configuration: The changes in this configuration relative to the + climate (CLM5) configuration mainly target decreasing runtime by + removing features that are expensive and not as important for NWP + time scales (days to months rather than many years) and space scales + (high resolution): + + - Single dominant landunit; if vegetated, single dominant PFT + + - Only 5 soil layers, down to 3 m + + - Only 5 snow layers + + - Plant hydraulic stress off + + - Ball-Berry rather than Medlyn stomatal conductance method (this is + a side-effect of turning plant hydraulic stress off, and is not + itself a critical aspect of the NWP configuration) + + - Maximum of 3 iterations to compute canopy fluxes + + - MEGAN is off + + Note that the NWP compset triggers changes in two new xml variables: + CLM_CONFIGURATION ('clm' vs. 'nwp'; this controls things of a more + scientific nature, like whether plant hydraulic stress is on or + off), and CLM_STRUCTURE ('standard' vs. 'fast'; this controls + structural things like the maximum number of landunits per grid cell + and the soil layer structure). Thus, you can create a case that is a + hybrid between the CLM and NWP configurations by changing these two + xml variables independently. + +(2) NLDAS2 regional grid: 0.125 deg grid over the Continental U.S. + +(3) Updated version of MOSART with support for the same NLDAS2 regional + grid + +(4) NLDAS2 data atmosphere forcing: over the same regional grid; forcing + data are available from 1980 - 2018. (We have excluded 1979 because + a small amount of data were missing for that year, and we didn't + have a good way to handle those missing data.) + +These changes can be used independently or all together. However, note +that you will get garbage if you try to use the new NLDAS2 datm forcing +for a run that extends beyond the boundaries of the NLDAS2 domain. + +There are three new NWP compsets: +- I2000Ctsm50NwpSpGswpGs: GSWP3 datm forcing; meant for global runs or + regional runs outside the NLDAS domain +- I2000Ctsm50NwpSpNldasGs: NLDAS2 datm forcing; meant for regional runs + over the NLDAS domain or some portion of it +- I2000Ctsm50NwpSpNldasRsGs: Same as above, but with a stub runoff model + in place of MOSART, for runs that aren't interested in having a runoff + model and for which you want improved throughput + +The alias for the new grid is: nldas2_rnldas2_mnldas2 (indicating that +we're using the nldas2 grid for land/atmosphere, runoff ('r') and the +ocean mask ('m'). + + +Bugs fixed or introduced +------------------------ + +Issues fixed (include CTSM Issue #): +- Resolves ESCOMP/ctsm#451 (Add NWP physics option) +- Resolves ESCOMP/ctsm#452 (Add an NWP compset) + + +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.] + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): +- The NWP configuration is still a work in progress +- The NLDAS surface data set is still a work in progress (will soon + update this to use high-res PFTs) + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): +- New xml variables: + - CLM_CONFIGURATION (will eventually be renamed to CTSM_CONFIGURATION) + - CLM_STRUCTURE (will eventually be renamed to CTSM_STRUCTURE) +- New namelist variable: + - itmax_canopy_fluxes + +Changes made to namelist defaults (e.g., changed parameter values): +No changes for existing CLM compsets; new defaults for NWP compsets + +Changes to the datasets (e.g., parameter, surface or initial files): +No changes for existing grids; new surface dataset for nldas2 grid + +Substantial timing or memory changes: none + +Notes of particular relevance for developers: (including Code reviews and testing) +--------------------------------------------- +NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): none + +Changes to tests or testing: +- New tests covering NWP compsets, nldas grid and nldas datm forcing + +Code reviewed by: Mike Barlage, Erik Kluzek + + +CTSM testing: + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - ok + + tests pass; namelists change as expected + + tools-tests (test/tools): + + cheyenne - not run + + PTCLM testing (tools/shared/PTCLM/test): + + cheyenne - not run + + regular tests (aux_clm): + + cheyenne ---- pass + hobart ------ pass + +CTSM tag used for the baseline comparisons: ctsm1.0.dev037 + + +Answer changes +-------------- + +Changes answers relative to baseline: NO + + +Detailed list of changes +------------------------ + +List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): +- MOSART: release-cesm2.0.00 -> nldas-grid.n01_mosart1_0_31 +- CIME: ctsm/ctsm1.0/cime5.7.9/n04 -> ctsm/ctsm1.0/cime5.7.9/n05 + +Pull Requests that document the changes (include PR ids): +- https://github.com/ESCOMP/ctsm/pull/682 +- https://github.com/ESCOMP/ctsm/pull/685 + +=============================================================== +=============================================================== +Tag name: ctsm1.0.dev037 +Originator(s): sacks (Bill Sacks) +Date: Mon Apr 29 16:11:47 MDT 2019 +One-line Summary: Change year alignment for present-day I compsets + +Purpose of changes +------------------ + +Change year alignment for present-day I compsets (typically, these +compsets have aliases beginning with "I2000"), in order to work better +for cases that are meant to replicate particular years. + +(1) Start the model in year 2000 rather than year 1 + +(2) Change datm's year alignment so that model year 2000 uses +observations from year 2000, model year 2001 uses observations from year +2001, etc. + +(This change was requested by Sean Swenson and supported by Dave +Lawrence.) + + +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.] + +[ ] clm5_0 + +[ ] clm4_5 + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): +- Year-2000 compsets now start in model year 2000 rather than 1 + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): none + +Changes made to namelist defaults (e.g., changed parameter values): none + +Changes to the datasets (e.g., parameter, surface or initial files): none + +Substantial timing or memory changes: none + +Notes of particular relevance for developers: (including Code reviews and testing) +--------------------------------------------- +NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): none + +Changes to tests or testing: none + +Code reviewed by: cime changes reviewed by Erik Kluzek and others + + +CTSM testing: + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - not run + + tools-tests (test/tools): + + cheyenne - not run + + PTCLM testing (tools/shared/PTCLM/test): + + cheyenne - not run + + regular tests (aux_clm): + + cheyenne ---- ok + hobart ------ ok + + ok means tests pass, year-2000 cases change answers as expected + +CTSM tag used for the baseline comparisons: ctsm1.0.dev036 + + +Answer changes +-------------- + +Changes answers relative to baseline: YES + + If a tag changes answers relative to baseline comparison the + following should be filled in (otherwise remove this section): + + Summarize any changes to answers, i.e., + - what code configurations: Present-day compsets (I2000, I1Pt; also I2010 once those compsets are added) + - what platforms/compilers: all + - nature of change (roundoff; larger than roundoff/same climate; new climate): + larger than roundoff/same climate + + This changes the year alignment of datm. Climatological averages + should be the same as before, but the alignment of model year to + datm year changes. + + If bitwise differences were observed, how did you show they were no worse + than roundoff? N/A + + 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: N/A + + URL for LMWG diagnostics output used to validate new climate: N/A + + +Detailed list of changes +------------------------ + +List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): +- cime: ctsm/ctsm1.0/cime5.7.9/n03 -> ctsm/ctsm1.0/cime5.7.9/n04 + +Pull Requests that document the changes (include PR ids): +- cime changes documented in https://github.com/ESMCI/cime/pull/3093 + +=============================================================== +=============================================================== +Tag name: ctsm1.0.dev036 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Fri Apr 26 01:20:57 MDT 2019 +One-line Summary: Fix carbon isotope bug that caused wrong answers for isotopes under transient land-use change + +Purpose of changes +------------------ + +We currently have a bug so that for transient land-use change cases answers are different starting in soil +carbon when Carbon isotopes (use_c13, or use_c14) are on versus off. Answers are identical if there is no +land-use change. The bug does cause bulk Carbon (C12) to be slightly different, but qualitatively the same. +There is a significant impact to the Carbon isotope simulation however. The bug was causing changes in isotopic +pools to be directed to the bulk Carbon. Because, isotopes are so much smaller than bulk Carbon, this doesn't +cause a marked difference in the bulk Carbon simulation. But, the lack of the change in the isotopic pool +does have a meaningful impact on the simulation of the Carbon isotopic fields. + +Also added a general test for this and specific one to catch this case. And did some updates on documentation +files, and a small bug fix for run_sys_tests. + +Bugs fixed or introduced +------------------------ + +Issues fixed (include CTSM Issue #): #692 #675 #686 + #675 -- Answers differ when carbon isotopes are on under transient cases + #686 -- Add a system test to make sure turning on carbon isotopes doesn't change answers + #692 -- run_sys_test issue + +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] clm5_0 + +[X] clm4_5 + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): None + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): None + +Changes made to namelist defaults (e.g., changed parameter values): None + +Changes to the datasets (e.g., parameter, surface or initial files): None + +Substantial timing or memory changes: None + +Notes of particular relevance for developers: (including Code reviews and testing) +--------------------------------------------- +Caveats for developers (e.g., code that is duplicated that requires double maintenance): None + +Changes to tests or testing: Added LCISO test type and a 13 month Hist test to make sure carbon isotopes + don't cause a change to answers + +Code reviewed by: dlawren, billsacks, klindsey, bishtgautum + +CTSM testing: regular + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - PASS + + tools-tests (test/tools): + + cheyenne - PASS + + PTCLM testing (tools/shared/PTCLM/test): + + cheyenne - PASS (compare tests fail, because of namelist updates) + + regular tests (aux_clm): + + cheyenne ---- OK + hobart ------ OK + +CTSM tag used for the baseline comparisons: ctsm1.0.dev035 + + +Answer changes +-------------- + +Changes answers relative to baseline: Only for Carbon isotopes on under transient land-use change! + + Summarize any changes to answers, i.e., + - what code configurations: Bgc with use_c13 or use_c14 T and with a transient land-use change after each year boundary + - what platforms/compilers: All + - nature of change: same climate for bulk Carbon, isotopic Carbon is quite different for regions with land-use change + + 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: + + +Detailed list of changes +------------------------ + +List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): cime + cime from -- ctsm/ctsm1.0/cime5.7.9/n01 to ctsm/ctsm1.0/cime5.7.9/n03 + cime update allows the new test to work and starts adding NLDAS grid in + +Pull Requests that document the changes (include PR ids): #696 #694 +(https://github.com/ESCOMP/ctsm/pull) + #696 -- run_sys_test small fix + #694 -- Carbon isotope fix + +=============================================================== +=============================================================== Tag name: ctsm1.0.dev035 Originator(s): sacks (Bill Sacks) Date: Mon Apr 22 20:17:40 MDT 2019 diff --git a/doc/ChangeSum b/doc/ChangeSum index b54024aeaa..594b790d02 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,8 @@ Tag Who Date Summary ============================================================================================================================ + ctsm1.0.dev038 sacks 05/01/2019 Support for NWP configuration, NLDAS grid and NLDAS datm forcing + ctsm1.0.dev037 sacks 04/29/2019 Change year alignment for present-day I compsets + ctsm1.0.dev036 erik 04/26/2019 Fix carbon isotope bug that caused wrong answers for isotopes under transient land-use change ctsm1.0.dev035 sacks 04/22/2019 Change h2ocan to a purely diagnostic variable ctsm1.0.dev034 sacks 04/20/2019 Change clm4_5: Use Justin Perket snow on vegetation ctsm1.0.dev033 slevis 04/11/2019 Limit landunit presence with thresholds set in the namelist diff --git a/python/README.md b/python/README.md index e562dc0f84..8b265d3290 100644 --- a/python/README.md +++ b/python/README.md @@ -20,4 +20,7 @@ support different options: ## pylint -You can run pylint on everything in the ctsm package with `make lint` +You can run pylint on everything in the ctsm package with `make lint`. + +Note: you should expect some errors if using a python2 version of +pylint, but this should be clean if running with a python3 version. diff --git a/python/ctsm/joblauncher/job_launcher_qsub.py b/python/ctsm/joblauncher/job_launcher_qsub.py index c3b9c11676..bafd3d00f5 100644 --- a/python/ctsm/joblauncher/job_launcher_qsub.py +++ b/python/ctsm/joblauncher/job_launcher_qsub.py @@ -25,7 +25,8 @@ def run_command_impl(self, command, stdout_path, stderr_path): qsub_process = subprocess.Popen(self._qsub_command(stdout_path, stderr_path), stdin=subprocess.PIPE, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + stderr=subprocess.PIPE, + universal_newlines=True) (out, err) = qsub_process.communicate(' '.join(command)) if err: logger.info('qsub ERROR:\n%s', err) diff --git a/src/biogeochem/CNVegetationFacade.F90 b/src/biogeochem/CNVegetationFacade.F90 index 859d92bfda..b3b900d945 100644 --- a/src/biogeochem/CNVegetationFacade.F90 +++ b/src/biogeochem/CNVegetationFacade.F90 @@ -703,12 +703,12 @@ subroutine DynamicAreaConservation(this, bounds, clump_index, & if (use_c13) then call CStateUpdateDynPatch(bounds, num_soilc_with_inactive, filter_soilc_with_inactive, & this%c13_cnveg_carbonflux_inst, this%c13_cnveg_carbonstate_inst, & - soilbiogeochem_carbonstate_inst) + c13_soilbiogeochem_carbonstate_inst) end if if (use_c14) then call CStateUpdateDynPatch(bounds, num_soilc_with_inactive, filter_soilc_with_inactive, & this%c14_cnveg_carbonflux_inst, this%c14_cnveg_carbonstate_inst, & - soilbiogeochem_carbonstate_inst) + c14_soilbiogeochem_carbonstate_inst) end if call NStateUpdateDynPatch(bounds, num_soilc_with_inactive, filter_soilc_with_inactive, & this%cnveg_nitrogenflux_inst, this%cnveg_nitrogenstate_inst, & diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90 index 22082f06f7..59d2fb9f99 100644 --- a/src/biogeophys/CanopyFluxesMod.F90 +++ b/src/biogeophys/CanopyFluxesMod.F90 @@ -66,6 +66,7 @@ module CanopyFluxesMod ! ! !PRIVATE DATA MEMBERS: logical, private :: use_undercanopy_stability = .true. ! use undercanopy stability term or not + integer, private :: itmax_canopy_fluxes = -1 ! max # of iterations used in subroutine CanopyFluxes character(len=*), parameter, private :: sourcefile = & __FILE__ @@ -98,6 +99,7 @@ subroutine CanopyFluxesReadNML(NLFilename) !----------------------------------------------------------------------- namelist /canopyfluxes_inparm/ use_undercanopy_stability + namelist /canopyfluxes_inparm/ itmax_canopy_fluxes ! Initialize options to default values, in case they are not specified in ! the namelist @@ -115,10 +117,17 @@ subroutine CanopyFluxesReadNML(NLFilename) else call endrun(msg="ERROR could NOT find "//nmlname//"namelist"//errmsg(sourcefile, __LINE__)) end if + + if (itmax_canopy_fluxes < 1) then + call endrun(msg=' ERROR: expecting itmax_canopy_fluxes > 0 ' // & + errMsg(sourcefile, __LINE__)) + end if + call relavu( unitn ) end if call shr_mpi_bcast (use_undercanopy_stability, mpicom) + call shr_mpi_bcast (itmax_canopy_fluxes, mpicom) if (masterproc) then write(iulog,*) ' ' @@ -219,7 +228,6 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, real(r8), parameter :: delmax = 1.0_r8 ! maxchange in leaf temperature [K] real(r8), parameter :: dlemin = 0.1_r8 ! max limit for energy flux convergence [w/m2] real(r8), parameter :: dtmin = 0.01_r8 ! max limit for temperature convergence [K] - integer , parameter :: itmax = 40 ! maximum number of iteration [-] integer , parameter :: itmin = 2 ! minimum number of iteration [-] !added by K.Sakaguchi for litter resistance @@ -756,7 +764,7 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, ! Begin stability iteration call t_startf('can_iter') - ITERATION : do while (itlef <= itmax .and. fn > 0) + ITERATION : do while (itlef <= itmax_canopy_fluxes .and. fn > 0) ! Determine friction velocity, and potential temperature and humidity ! profiles of the surface boundary layer diff --git a/src/main/clm_varpar.F90 b/src/main/clm_varpar.F90 index d7d9ada89c..c19caf5bd5 100644 --- a/src/main/clm_varpar.F90 +++ b/src/main/clm_varpar.F90 @@ -6,6 +6,7 @@ module clm_varpar ! ! !USES: use shr_kind_mod , only: r8 => shr_kind_r8 + use shr_sys_mod , only: shr_sys_abort use spmdMod , only: masterproc use clm_varctl , only: use_extralakelayers, use_vertsoilc use clm_varctl , only: use_century_decomp, use_c13, use_c14 @@ -154,6 +155,12 @@ subroutine clm_varpar_init(actual_maxsoil_patches, actual_numcft) else if ( soil_layerstruct == '20SL_8.5m' ) then nlevsoi = 20 nlevgrnd = nlevsoi+5 + else if ( soil_layerstruct == '5SL_3m' ) then + nlevsoi = 5 + nlevgrnd = 5 + else + write(iulog,*) subname//' ERROR: Unrecognized soil layer structure: ', trim(soil_layerstruct) + call shr_sys_abort(subname//' ERROR: Unrecognized soil layer structure') endif if ( masterproc ) write(iulog, *) 'soil_layerstruct varpar ',soil_layerstruct,nlevsoi,nlevgrnd diff --git a/src/main/initVerticalMod.F90 b/src/main/initVerticalMod.F90 index 9ba2f2711c..f452de2edd 100644 --- a/src/main/initVerticalMod.F90 +++ b/src/main/initVerticalMod.F90 @@ -162,6 +162,8 @@ subroutine initVertical(bounds, glc_behavior, snow_depth, thick_wall, thick_roof integer, parameter :: LEVGRND_CLASS_STANDARD = 1 integer, parameter :: LEVGRND_CLASS_DEEP_BEDROCK = 2 integer, parameter :: LEVGRND_CLASS_SHALLOW_BEDROCK = 3 + + character(len=*), parameter :: subname = 'initVertical' !------------------------------------------------------------------------ begc = bounds%begc; endc= bounds%endc @@ -278,6 +280,24 @@ subroutine initVertical(bounds, glc_behavior, snow_depth, thick_wall, thick_roof do j = 1, nlevgrnd zsoi(j) = 0.5*(zisoi(j-1) + zisoi(j)) enddo + else if ( soil_layerstruct == '5SL_3m' ) then + dzsoi(1)= 0.1_r8 + dzsoi(2)= 0.3_r8 + dzsoi(3)= 0.6_r8 + dzsoi(4)= 1.0_r8 + dzsoi(5)= 1.0_r8 + + zisoi(0) = 0._r8 + do j = 1,nlevgrnd + zisoi(j)= sum(dzsoi(1:j)) + enddo + + do j = 1, nlevgrnd + zsoi(j) = 0.5*(zisoi(j-1) + zisoi(j)) + enddo + else + write(iulog,*) subname//' ERROR: Unrecognized soil layer structure: ', trim(soil_layerstruct) + call endrun(subname//' ERROR: Unrecognized soil layer structure') end if ! define a vertical grid spacing such that it is the normal dzsoi if diff --git a/tools/README b/tools/README index cf0640958c..81024eb9d0 100644 --- a/tools/README +++ b/tools/README @@ -142,13 +142,14 @@ III. Process sequence to create input datasets needed to run CLM c.) New atmosphere or ocean resolution - If the region DOES include ocean, use $CIMEROOT/tools/mapping/gen_domain_files/gen_maps.sh to create a + If the region DOES include ocean, use + $CIMEROOT/tools/mapping/gen_mapping_files/gen_cesm_maps.sh to create a mapping file for it. Example: - cd $CIMEROOT/tools/mapping/gen_domain_files - ./gen_maps.sh -focn -fatm -nocn -natm + cd $CIMEROOT/tools/mapping/gen_mapping_files + ./gen_cesm_maps.sh -focn -fatm -nocn -natm 3.) Add SCRIP grid file(s) created in (1) into XML database in CLM (optional) diff --git a/tools/mkmapdata/README b/tools/mkmapdata/README index b865e72f2d..3f5e9e92c2 100644 --- a/tools/mkmapdata/README +++ b/tools/mkmapdata/README @@ -12,7 +12,7 @@ two versions, one with mpiuni and one with mpi. Both versions also need to be built with NetCDF rather than the default IO version. -Currently uses: ESMF7.0.0 +Currently uses: ESMF7.1.0r Do the following for help with the different options to the script... @@ -44,7 +44,7 @@ and --src_type UGRID. http://www.earthsystemmodeling.org/ You may need more than one version to do everything above. On cheyenne -we use ESMF7.0.0. +we use ESMF7.1.0r. The version of NetCDF used with ESMF needs to be version 4.1 or higher and compiled with the NetCDF4 file format enabled (with HDF5 compression). diff --git a/tools/mkmapdata/mkmapdata.sh b/tools/mkmapdata/mkmapdata.sh index 49a4c03b89..436b504e07 100755 --- a/tools/mkmapdata/mkmapdata.sh +++ b/tools/mkmapdata/mkmapdata.sh @@ -342,7 +342,7 @@ case $hostname in if [ -z "$REGRID_PROC" ]; then REGRID_PROC=36 fi - esmfvers=7.0.0 + esmfvers=7.1.0r intelvers=17.0.1 module load esmf_libs/$esmfvers module load intel/$intelvers @@ -371,7 +371,7 @@ case $hostname in if [ -z "$REGRID_PROC" ]; then REGRID_PROC=8 fi - esmfvers=7.0.0 + esmfvers=7.1.0r intelvers=15.0.0 #intelvers=12.1.5 module purge diff --git a/tools/mksurfdata_map/Makefile.data b/tools/mksurfdata_map/Makefile.data index abac6af279..ddd915735d 100644 --- a/tools/mksurfdata_map/Makefile.data +++ b/tools/mksurfdata_map/Makefile.data @@ -66,6 +66,7 @@ STANDARD = \ global-present-f05 \ global-present-ne16np4 \ global-present-ne120np4 \ + global-present-nldas \ global-present-T42 \ global-historical \ global-historical-ne120np4 \ @@ -128,6 +129,12 @@ global-present-ne16np4 : FORCE global-present-ne120np4 : FORCE $(MKSURFDATA) -no-crop -glc_nec 10 -y 2000 -res ne120np4 $(BACKGROUND) +# BUG(wjs, 2019-04-10, ESCOMP/ctsm#262) This -hirespft won't work until issue 262 is resolved +# For now, I'm using: +# -no-crop -glc_nec 10 -y 2005 -res 0.125nldas2 +global-present-nldas : FORCE + $(MKSURFDATA) -no-crop -hirespft -glc_nec 10 -y 2005 -res 0.125nldas2 $(BACKGROUND) + global-historical : FORCE $(MKSURFDATA) -no-crop -glc_nec 10 -y 1850 -res $(STANDARD_RES) $(BACKGROUND)