Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fates patch count controls #1766

Merged
merged 49 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6986334
Incremental changes to enable fates to drive the number of natveg pat…
rgknox May 20, 2022
72fbe0a
First pass of running/compiling fates with self-dictating patch counts
rgknox May 23, 2022
b3fbf23
Removed endrun from clm_varpar, circular dependency?
rgknox May 23, 2022
69bddf4
changing P32 test to P36 for improved core usage
glemieux May 23, 2022
b637526
Adjusting how maxcfts and maxnatpfts are defined with fates
rgknox May 24, 2022
57fe9ee
Merge branch 'fates-params-api23' of github.com:rgknox/ctsm into fate…
rgknox May 24, 2022
261eb28
Minor updates to fates-patch counting
rgknox May 25, 2022
d709a0f
fixed typo
rgknox May 25, 2022
d9db2b5
Added namelist hooks and interface for activating the tree damage mod…
rgknox May 27, 2022
3e86d6c
Added some placeholder code for harvest-product coupling in fates
rgknox May 27, 2022
8fc4b48
Merge branch 'ctsm5.1.dev098-branch' into fates-params-api23-dev98
rgknox May 27, 2022
ff247db
Small bug fix for fates surface file reads, temporary fates parameter…
rgknox May 29, 2022
da4d52a
Commented out clmfates wrapper code for product pools. Discussion wit…
rgknox May 31, 2022
cc8bc9a
Minor changes to how nat_wt_patch is calculated for fates
rgknox Jun 3, 2022
215864e
Updated default fates parameter file
rgknox Jun 8, 2022
243d26d
Add testmods for FATES and FATES-SP with Drydep and FATES and FATES-S…
ekluzek Jun 10, 2022
b039f49
Fixed location of default parameter file
rgknox Jun 10, 2022
b4e3acc
Added a tree damage test for fates
rgknox Jun 10, 2022
0e1a44f
removed clm_aux test for fates tree damage per Eriks suggestion
rgknox Jun 10, 2022
92226da
Reverted to base for SatellitePhenologyMod.F90 to removed whitespace …
rgknox Jun 10, 2022
b45cd84
Syntax and comment fixes for fates initialization logic. Added abort …
rgknox Jun 10, 2022
c4b16b1
Updates on comments
rgknox Jun 13, 2022
dfef51a
Switch a few cases of the use of ED in namelist documention for FATES…
ekluzek Jun 13, 2022
32c852f
Add a comment about requirement for ignore-warnings when FATES and Dr…
ekluzek Jun 13, 2022
461b8c1
Allowing calse to collapse in surfrdmod to be active with fates, again
rgknox Jun 14, 2022
cb71a47
Merge branch 'fates-params-api23' of github.com:rgknox/CTSM into fate…
ekluzek Jun 14, 2022
1558531
Modify the SP mode InterpMonthly call so will work with dry-depositio…
ekluzek Jun 14, 2022
f418d19
readAnnualVeg if dry-deposition even if FATES is on, and remove some …
ekluzek Jun 14, 2022
635cb1e
Make sure if FATES and DryDep is on SatellitePhenologyInit will be do…
ekluzek Jun 14, 2022
83433df
Work on comments a bit
ekluzek Jun 14, 2022
8fd708e
Add test that fails for FATES and n_dom_pfts
ekluzek Jun 14, 2022
3a20b10
Abort if FATES and n_dom_pft is on at the same time
ekluzek Jun 14, 2022
bc29236
Testing out new bounds system, adding surfpft_lb and ub
rgknox Jun 16, 2022
2d85b3e
Merge branch 'fates-params-api23' into fates_drydep_changes
ekluzek Jun 17, 2022
de1ca54
Minor code cleanup related to natpft_lb and natpft_ub having similar …
rgknox Jun 17, 2022
d3fa22b
Comment out the dry-dep change and add a note about it with the issue…
ekluzek Jun 17, 2022
37f25fb
Change if statements about drydep back to how they were before, but a…
ekluzek Jun 17, 2022
52e9ee1
Add a check that aborts if drydep or megan is on and FATES is on, out…
ekluzek Jun 17, 2022
b71d464
surfpft_lb and ub where required
ekluzek Jun 17, 2022
46e7697
This is required to get the FATES-SP drydep mode to work
ekluzek Jun 17, 2022
fc73c8a
Merge pull request #4 from ekluzek/fates_drydep_changes
rgknox Jun 19, 2022
1c66c59
reverted changes in subgridMod that were unused
rgknox Jun 19, 2022
7cb9f79
Removed misleading statement
rgknox Jun 19, 2022
1bc6e1e
Added intel compiler to tree damage test
rgknox Jun 20, 2022
92e98c7
Updating drydep check
rgknox Jun 20, 2022
a484ba1
Updated unit test to match args in clm_varpar
rgknox Jun 21, 2022
b75a508
Updated changelogs
rgknox Jun 21, 2022
6a4d9ed
Updated issues in the changelog
rgknox Jun 21, 2022
2ead5b8
Updated fates external pointer to sci.1.57.4_api.24.0.0
rgknox Jun 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Externals_CLM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
20 changes: 14 additions & 6 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)) ) {
Expand Down Expand Up @@ -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" );
Expand Down Expand Up @@ -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" );
}
}

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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'} );
Expand Down
3 changes: 2 additions & 1 deletion bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- FATES default parameter file -->
<!-- ================================================================== -->

<fates_paramfile>lnd/clm2/paramdata/fates_params_api.22.1.0_12pft_c220307.nc</fates_paramfile>
<fates_paramfile>lnd/clm2/paramdata/fates_params_api.24.0.0_12pft_c220608.nc</fates_paramfile>

<!-- ======================================================================================== -->
<!-- clm 5.0 BGC nitrogen model -->
Expand Down Expand Up @@ -2541,6 +2541,7 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts
<!-- ===== FATES DEFAULTS =========== -->
<fates_spitfire_mode use_fates=".true.">0</fates_spitfire_mode>
<use_fates_planthydro use_fates=".true.">.false.</use_fates_planthydro>
<use_fates_tree_damage use_fates=".true.">.false.</use_fates_tree_damage>
<use_fates_cohort_age_tracking use_fates=".true.">.false.</use_fates_cohort_age_tracking>
<use_fates_ed_st3 use_fates=".true.">.false.</use_fates_ed_st3>
<use_fates_ed_prescribed_phys use_fates=".true.">.false.</use_fates_ed_prescribed_phys>
Expand Down
8 changes: 7 additions & 1 deletion bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,12 @@ Switch deciding which nutrient model to use in FATES.
(Only relevant if FATES is on)
</entry>

<entry id="use_fates_tree_damage" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on the tree damage module in FATES
(Only relevant if FATES is on)
</entry>

<entry id="fates_spitfire_mode" type="integer" category="physics"
group="clm_inparm" valid_values="0,1,2,3,4,5" value=".false.">
Turn on spitfire module to simulate fire by setting fates_spitfire_mode > 0.
Expand Down Expand Up @@ -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):
</entry>

<!-- ======================================================================================== -->
Expand Down
12 changes: 11 additions & 1 deletion bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
38 changes: 37 additions & 1 deletion cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,24 @@
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="SMS_D" grid="f45_f45_mg37" compset="I2000Clm50FatesRs" testmods="clm/FatesColdDefDryDep">
<machines>
<machine name="cheyenne" compiler="gnu" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Run a test with dry deposition on and regular FATES</option>
</options>
</test>
<test name="ERS_D_Ld15" grid="f45_f45_mg37" compset="I2000Clm50FatesRs" testmods="clm/FatesColdDefTreeDamage">
<machines>
<machine name="cheyenne" compiler="intel" category="fates"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Ensure functionality of the tree damage option in FATES</option>
</options>
</test>
<test name="ERS_D_Ld3_PS" grid="f09_g17" compset="I2000Clm50FatesRs" testmods="clm/FatesColdDef">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
Expand Down Expand Up @@ -2060,7 +2078,7 @@
<option name="comment">Short ERP debug FATES test for f19_g17 grid.</option>
</options>
</test>
<test name="ERP_D_P32x2_Ld3" grid="f19_g17" compset="I2000Clm50FatesCru" testmods="clm/FatesColdDef">
<test name="ERP_D_P36x2_Ld3" grid="f19_g17" compset="I2000Clm50FatesCru" testmods="clm/FatesColdDef">
<machines>
<machine name="cheyenne" compiler="intel" category="fates"/>
</machines>
Expand Down Expand Up @@ -2251,6 +2269,24 @@
<option name="comment">Test with DEBUG on for FatesSP mode, NOTE: FatesSp has the largest difference in CTSM code for any FATES mode</option>
</options>
</test>
<test name="SMS_D" grid="1x1_brazil" compset="I2000Clm51FatesSpCruRsGs" testmods="clm/FatesColdDefDryDepReducedComplexSatPhen">
<machines>
<machine name="cheyenne" compiler="gnu" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Run a test with dry deposition on and FATES-SP</option>
</options>
</test>
<test name="SMS_D" grid="1x1_brazil" compset="I2000Clm51FatesSpCruRsGs" testmods="clm/FatesColdDefMeganReducedComplexSatPhen">
<machines>
<machine name="cheyenne" compiler="gnu" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Run a test with MEGAN on and FATES-SP</option>
</options>
</test>
<!-- Don't active this test until #1722 is fixed
<test name="SMS_Ld3" grid="f09_f09_mg17" compset="I2000Clm51FatesCruRsGs" testmods="clm/FatesColdDefReducedComplexSatPhen_prescribed">
<machines>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../FatesColdDef
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./xmlchange CLM_BLDNML_OPTS='--drydep' --append
# The following would be required if you want to run with DryDep and FATES without Fates-SP mode
#./xmlchange CLM_BLDNML_OPTS="--ignore_warnings" --append
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
../FatesColdDefDryDep
../FatesColdDefReducedComplexSatPhen
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../FatesColdDef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./xmlchange CLM_BLDNML_OPTS='--megan' --append
./xmlchange CLM_BLDNML_OPTS="--ignore_warnings" --append
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
../FatesColdDefMegan
../FatesColdDefReducedComplexSatPhen
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../FatesColdDef
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use_fates_tree_damage=.true.
87 changes: 87 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,91 @@
===============================================================
Tag name: ctsm5.1.dev099
Originator(s): rgknox (Ryan Knox)
Date: Tue Jun 21 03:20:42 PM EDT 2022
One-line Summary: Enabling FATES control over the number of patches on the natural land unit

Purpose and description of changes
----------------------------------

This set of changes 1) allows FATES to dictate the number of patches on the naturaly vegetated land unit and 2) is compatible with a version of FATES that updates the parameter file format (changes in parameter naming and parameter set). Efforts were made to adhere to the system of how patches are looped and loop bounds are defined. There is interaction with the reading of the surface file, which previously dictated all patch counts based on the number of PFTs in the file. FATES-SP and biogeography preserves the ability to use surface file weighting factors associated with PFTs and CFTs to drive area fractions in FATES. This change is motivated by FATES-side updates to the parameter file, which includes new settings where the user can control the number of primary "fates_maxpatch_primary" and secondary "fates_maxpatch_secondary" patches. Users should also be aware of a new namelist setting "use_fates_tree_damage" which defaults to false (inoperative).


Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?

None


[ ] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed or introduced
------------------------

CTSM Issues Fixed:
Fixes #1764 "fates test fails to run on dev095"
Fixes #1762 "Change threaded fates test from P32x2 to P36x2"
Fixes #1784 "Get dry-deposition working with FATES-SP mode"

Known bugs introduced in this tag (include issue #): None

Known bugs found since the previous tag (include issue #): None


Notes of particular relevance for users
---------------------------------------

Relevant issue #1785 "Refactor surfrd for FATES"
Relevant issue #1780 "Some collapse options should be disabled with FATES"

In the process of this PR, we learned that FATES is fundamentally incompatible with the dry-deposition code. FATES-SP may be compatibile, but still needs investigation.

Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): There is a new namelist setting for FATES simulations that turns on the crown damage module: "use_fates_tree_damage". Settings for this module can be found in the FATES parameter file. This namelist variable is a binary true/false, and it defaults to false.

Changes to the datasets (e.g., parameter, surface or initial files): Users should also be aware that FATES has a new parameter file format and API. The default file on the ucar dataserver has been updated.

Substantial timing or memory changes: none that we're aware of, but with more refined control of patch counts and allocation should come improvements in memory usage.


Notes of particular relevance for developers:
---------------------------------------------

Caveats for developers (e.g., code that is duplicated that requires double maintenance): None. Some new code was added to surfrdMod.F90, but this is not redundant. Efforts may be made in the future to have more unification there when we have FATES compatable with crops on the crop land-unit.

Changes to tests or testing: Tests were added to cover the new crown damage module, and combinations of dry-deposition and megan with FATES-SP. The build system is also aware that these features will not and should not be used with FATES in a non-SP framework.


Testing summary:
----------------

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

cheyenne ---- OK
izumi ------- OK

fates tests :
cheyenne ---- OK
izumi ------- OK

If the tag used for baseline comparisons was NOT the previous tag, note that here: dev098 was updated to point to the moost recent FATES tag: sci.1.57.4_api.23.0.0.


Answer changes
--------------

Changes answers relative to baseline: NLCOMP changes (differences in namelist fields) were the only differences and they were expected. All other tests generated B4B results.


===============================================================
===============================================================
Tag name: ctsm5.1.dev098
Originator(s): swensosc (Sean Swenson)
Date: Fri May 20 18:15:53 MDT 2022
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.1.dev099 rgknox 06/21/2022 Enabling FATES control over the number of patches on the natural land unit
ctsm5.1.dev098 swensosc 05/20/2022 Correct perched water table calculation
ctsm5.1.dev097 sacks 05/20/2022 Update ccs_config to fix issue on izumi and maybe elsewhere
ctsm5.1.dev096 erik 05/18/2022 Fix a few glitches from the last tag
Expand Down
5 changes: 5 additions & 0 deletions src/biogeochem/DryDepVelocity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,14 @@ Module DryDepVelocity
!------------------------------------------------------------------------
subroutine Init(this, bounds)

use clm_varctl , only : use_fates, use_fates_sp
class(drydepvel_type) :: this
type(bounds_type), intent(in) :: bounds

if ( (.not. use_fates_sp) .and. use_fates .and. (n_drydep > 0 .and. drydep_method == DD_XLND) )then
call endrun( msg='ERROR: Dry-deposition currently does NOT work with FATES outside of FATES-SP mode (see github issue #1044)'//&
errMsg(sourcefile, __LINE__))
end if
call this%InitAllocate(bounds)
call this%InitHistory(bounds)

Expand Down
19 changes: 19 additions & 0 deletions src/biogeochem/EDBGCDynMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,25 @@ subroutine EDBGCDyn(bounds, &
call t_stopf('SoilBiogeochemLittVertTransp')
end if

! Wood product fluxes will eventually be added to FATES-CLM. However
! it is likely this will be implemented during or after we break away from
! using this module. This module and the current coupling stategy bypasses
! a number of processes in CLM, which includes the wood product modules.
! Therefore the following call is a placeholder so that the wood-product
! wrapper code can be copied from here and applied at the right place when the time comes.
! RGK 06-2022

!call FatesWrapWoodProducts(bounds, num_soilc, filter_soilc,c_products_inst)
ekluzek marked this conversation as resolved.
Show resolved Hide resolved
!call t_startf('CNWoodProducts')
!call c_products_inst%UpdateProducts(bounds, &
! num_soilp, filter_soilp, &
! dwt_wood_product_gain_patch = cnveg_carbonflux_inst%dwt_wood_productc_gain_patch(begp:endp), &
! wood_harvest_patch = cnveg_carbonflux_inst%wood_harvestc_patch(begp:endp), &
! dwt_crop_product_gain_patch = cnveg_carbonflux_inst%dwt_crop_productc_gain_patch(begp:endp), &
! crop_harvest_to_cropprod_patch = cnveg_carbonflux_inst%crop_harvestc_to_cropprodc_patch(begp:endp))
!call t_stopf('CNWoodProducts')


end associate

end subroutine EDBGCDyn
Expand Down
Loading