diff --git a/Externals_CLM.cfg b/Externals_CLM.cfg index 01943849fa..631695f4bd 100644 --- a/Externals_CLM.cfg +++ b/Externals_CLM.cfg @@ -2,7 +2,7 @@ local_path = src/fates protocol = git repo_url = https://github.com/NGEET/fates -tag = sci.1.56.0_api.23.0.0 +tag = sci.1.57.4_api.24.0.0 required = True [externals_description] diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 3676cc57aa..cbd5e3ce44 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -741,7 +741,7 @@ sub setup_cmdl_fates_mode { $var = "use_fates"; if ( &value_is_true($nl_flags->{$var}) ) { - # This section is a place-holder to test for modules that are not allowed with ED + # This section is a place-holder to test for modules that are not allowed with FATES # the defaults which are set in the logic section of the namelist builder will # automatically set these correctly (well that is the assumption), but here we # want to set a catch to fail and warn users if they explicitly set incompatible user namelist @@ -774,7 +774,7 @@ sub setup_cmdl_fates_mode { # dis-allow fates specific namelist items with non-fates runs my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", "use_fates_cohort_age_tracking", - "use_fates_inventory_init","use_fates_fixed_biogeog","use_fates_nocomp","use_fates_sp","fates_inventory_ctrl_filename","use_fates_logging","fates_parteh_mode" ); + "use_fates_inventory_init","use_fates_fixed_biogeog","use_fates_nocomp","use_fates_sp","fates_inventory_ctrl_filename","use_fates_logging","fates_parteh_mode","use_fates_tree_damage" ); # dis-allow fates specific namelist items with non-fates runs foreach my $var ( @list ) { if ( defined($nl->get_value($var)) ) { @@ -1167,7 +1167,7 @@ sub setup_cmdl_spinup { $log->fatal_error("$var has an invalid value ($val). Valid values are: @valid_values"); } if ( $nl_flags->{'bgc_spinup'} eq "on" && (not &value_is_true( $nl_flags->{'use_cn'} )) && (not &value_is_true($nl_flags->{'use_fates'})) ) { - $log->fatal_error("$var can not be '$nl_flags->{'bgc_spinup'}' if neither CN nor ED is turned on (use_cn=$nl_flags->{'use_cn'}, use_fates=$nl_flags->{'use_fates'})."); + $log->fatal_error("$var can not be '$nl_flags->{'bgc_spinup'}' if neither CN nor FATES is turned on (use_cn=$nl_flags->{'use_cn'}, use_fates=$nl_flags->{'use_fates'})."); } if ( $nl->get_value("spinup_state") eq 0 && $nl_flags->{'bgc_spinup'} eq "on" ) { $log->fatal_error("Namelist spinup_state contradicts the command line option bgc_spinup" ); @@ -2046,6 +2046,10 @@ sub setup_logic_subgrid { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'toosmall_lake'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'toosmall_wetland'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'toosmall_urban'); + + if ( &value_is_true($nl_flags->{'use_fates'}) && $nl->get_value('n_dom_pfts') != 0 ) { + $log->fatal_error( "FATES and n_dom_pfts can NOT be set at the same time" ); + } } #------------------------------------------------------------------------------- @@ -2611,7 +2615,7 @@ sub setup_logic_do_transient_crops { # In principle, use_fates should be compatible with # do_transient_crops. However, this hasn't been tested, so to be safe, # we are not allowing this combination for now. - $cannot_be_true = "$var has not been tested with ED, so for now these two options cannot be combined"; + $cannot_be_true = "$var has not been tested with FATES, so for now these two options cannot be combined"; } if ($cannot_be_true) { @@ -3660,6 +3664,10 @@ sub setup_logic_dry_deposition { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; if ($opts->{'drydep'} ) { + if ( &value_is_true( $nl_flags->{'use_fates'}) && not &value_is_true( $nl_flags->{'use_fates_sp'}) ) { + $log->warning("DryDeposition can NOT be on when FATES is also on unless FATES-SP mode is on.\n" . + " Use the '--no-drydep' option when '-bgc fates' is activated"); + } add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'drydep_list'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'drydep_method'); } else { @@ -3705,7 +3713,7 @@ sub setup_logic_megan { if ($nl_flags->{'megan'} ) { if ( &value_is_true( $nl_flags->{'use_fates'} ) ) { - $log->fatal_error("MEGAN can NOT be on when ED is also on.\n" . + $log->warning("MEGAN can NOT be on when FATES is also on.\n" . " Use the '-no-megan' option when '-bgc fates' is activated"); } add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'megan_specifier'); @@ -4107,7 +4115,7 @@ sub setup_logic_fates { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fates_paramfile', 'phys'=>$nl_flags->{'phys'}); my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", "use_fates_inventory_init","use_fates_fixed_biogeog","use_fates_nocomp", - "use_fates_logging","fates_parteh_mode", "use_fates_cohort_age_tracking" ); + "use_fates_logging","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage" ); foreach my $var ( @list ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'use_fates'=>$nl_flags->{'use_fates'}, 'use_fates_sp'=>$nl_flags->{'use_fates_sp'} ); diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 05898ccef4..2686d62b9a 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -491,7 +491,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -lnd/clm2/paramdata/fates_params_api.22.1.0_12pft_c220307.nc +lnd/clm2/paramdata/fates_params_api.24.0.0_12pft_c220608.nc @@ -2541,6 +2541,7 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts 0 .false. +.false. .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 4ad4b191d1..4691706d78 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -648,6 +648,12 @@ Switch deciding which nutrient model to use in FATES. (Only relevant if FATES is on) + +Toggle to turn on the tree damage module in FATES +(Only relevant if FATES is on) + + Turn on spitfire module to simulate fire by setting fates_spitfire_mode > 0. @@ -2124,7 +2130,7 @@ Command line arguement for biogeochemistry mode for CLM4.5 Nitrification/De-nitrification Methane model Vertically resolved Carbon - fates = FATES/ED ecosystem demography model with below ground BGC: + fates = FATES Functionally Assembled Terrestrial Ecosystem Simulator (ecosystem demography model with below ground BGC): diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 824826d578..f6c8d75937 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,7 +163,7 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 1844; +my $ntests = 1846; if ( defined($opts{'compare'}) ) { $ntests += 1254; } @@ -956,6 +956,11 @@ sub cat_and_create_namelistinfile { GLC_TWO_WAY_COUPLING=>"FALSE", phys=>"clm5_0", }, + "useFATESWn_dom_pft" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + namelst=>"n_dom_pfts = 1", + GLC_TWO_WAY_COUPLING=>"FALSE", + phys=>"clm5_0", + }, "useFATESWbMH" =>{ options=>"-bgc fates -envxml_dir . -no-megan", namelst=>"use_biomass_heat_storage=.true.", GLC_TWO_WAY_COUPLING=>"FALSE", @@ -1001,6 +1006,11 @@ sub cat_and_create_namelistinfile { GLC_TWO_WAY_COUPLING=>"FALSE", phys=>"clm4_5", }, + "useDRYDEPwithFATES" =>{ options=>"--bgc fates --envxml_dir . --no-megan --drydep", + namelst=>"", + GLC_TWO_WAY_COUPLING=>"FALSE", + phys=>"clm4_5", + }, "useFATESSPWONOCOMP" =>{ options=>"-bgc fates -envxml_dir . -no-megan", namelst=>"use_fates_sp=T,use_fates_nocomp=F", GLC_TWO_WAY_COUPLING=>"FALSE", diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 7e460f4c43..e1e5764170 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1804,6 +1804,24 @@ + + + + + + + + + + + + + + + + + + @@ -2060,7 +2078,7 @@ - + @@ -2251,6 +2269,24 @@ + + + + + + + + + + + + + + + + + +