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

Merge fates_main_api into master #1264

Merged
merged 176 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from 153 commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
f80b00f
Removing calls to retired machine edison. Adding a SMS test to the
glemieux Jan 31, 2020
daca97b
reinstating edison tests to prebeta
glemieux Feb 1, 2020
728d9d7
Initialize soil moisture to a higher value for cold-starts when fates…
rgknox Sep 20, 2019
b7f1b4c
Added surface runoff modifier to the fates interface to account for s…
rgknox Jan 11, 2020
b827ac7
Condition the zeroing of qflx bc_in upon having hydro on.
rgknox Jan 30, 2020
812112a
Update fates interface to use a call to fatesglobals instead of just …
rgknox Feb 5, 2020
97f2471
Updating fates tag and default parameter file match api 8.1
rgknox Feb 5, 2020
d18d552
Provisions for fates-hydro, supersaturating soils.
rgknox Feb 13, 2020
f49862a
Allowing soilpsi_col diagnostic with fates
rgknox Feb 13, 2020
41a61b2
Allowing soilpsi_col diagnostic with fates
rgknox Feb 13, 2020
e906294
fates-hydro: changed subroutine arguments
rgknox Feb 14, 2020
5f3c439
Fixed hydro restart bug (needed to initialize bcs prior to initializi…
rgknox Feb 19, 2020
5e6fdab
fates-hydro: removed dependence on qflx_drain_vr_col
rgknox Feb 19, 2020
f76d039
fixed reverting files to the wrong version of fates_next_api
rgknox Feb 19, 2020
a5f4e8b
Add a new fates dimension to track cohort age. Add
Jan 2, 2020
f37d7ba
[ Add a new hlm_use flag for turning on cohort age tracking ]
JessicaNeedham Mar 12, 2020
d81ca0e
Added FATESSizeAge test protocol
rgknox Mar 12, 2020
b5e9637
[Add NPLANT_CAPF to user_nl_clm ]
JessicaNeedham Mar 24, 2020
4bed4f9
Fixed fates size-age-mortality test length to be splitable
rgknox Mar 25, 2020
f1b579a
update manage externals config file to pull correect fates tag
glemieux Mar 26, 2020
9eda517
remove temp writes to iulog in clmfates_interface
glemieux Mar 26, 2020
415f89f
removing remnant of old code from htape_addfld
glemieux Mar 26, 2020
683d14e
fates-hydro, api update for hydro refactors, bug fix
rgknox Apr 20, 2020
df9e930
added time-step argument to fix nep calculations
rgknox Apr 21, 2020
6a7d5b5
fates-hydro: updated test user_nl_clm
rgknox Apr 20, 2020
c669928
updated fates parameter file, backwards compatible
rgknox Apr 20, 2020
5f71faf
Updating fates tag in the externals pointer
rgknox Apr 22, 2020
31a59ef
no for real this time, fixing merge conflicts
glemieux May 5, 2020
77a21d4
fates interface refactor. this interface refactor is intended to cons…
rgknox May 7, 2020
93b03e1
Removed site level veg24 since it was meaningless
rgknox May 7, 2020
423cbea
fates interface - fixed module use calls
rgknox May 8, 2020
38809a7
updated module use statement in subgridMod for fates globals
rgknox May 8, 2020
496e48b
Updating fates tag to api 11
rgknox May 13, 2020
d44323d
changed fire variables to uppercase per PR640
glemieux May 12, 2020
e599635
Updating FATES default parameter file to api 11.1
rgknox May 29, 2020
d2af2b4
updateing externals_clm.cfg to point to the associated fates tag
glemieux Jun 3, 2020
41e5989
added BC_IN to call to set_site_properties
rosiealice Apr 9, 2020
ecb65e7
transmit wt_nat_patch to fates interface
rosiealice Apr 13, 2020
3e14076
behold, a new namelist variable!
rosiealice Apr 14, 2020
f90c8be
adding files for fates fixed biogeo testing
glemieux May 12, 2020
fc04937
update user_nl_clm to use_fates_fixed_biogeog
glemieux May 13, 2020
5e6ab82
fixing typo in testmod
glemieux May 13, 2020
25f7417
moved fixed biogeo directory up on directory to reduce complex direct…
glemieux May 13, 2020
485c1fc
fixing typos again
glemieux May 13, 2020
cd5be0c
fixing call to FatesColdDef
glemieux May 13, 2020
c54f625
removing dead code
glemieux May 19, 2020
8b90363
adding fix for pft indexing bounds
glemieux May 22, 2020
8de0d35
updating pointer to correct fates tag for recently merged biogeog fat…
glemieux Jun 5, 2020
6bd4514
cleaning up build errors that came up due to rebase
glemieux Jun 29, 2020
9b2656e
Fix circular dependency
glemieux Jun 30, 2020
1dd0850
fix missing biogeog setting
glemieux Jun 30, 2020
d972d9d
fixing missed usage of ratio that cause CompareBulkToTracer runtime e…
glemieux Jul 3, 2020
d495c31
matching Fates testdefs to fates_next_api
glemieux Jul 8, 2020
7e5f059
Merge branch 'fna-rebase-testdefs-fix' into fates_next_api-rebase
glemieux Jul 31, 2020
0b7aa8a
Extend CNFireMethodMod with a FATESFireData class
slevis-lmwg Apr 24, 2020
2336a24
Revisions based on code review by @ekluzek
slevis-lmwg Apr 27, 2020
c53979d
Revisions part 2 based on comments by @ekluzek @jkshuman @lmkueppers
slevis-lmwg Apr 29, 2020
d4d6094
Revisions part 3 based on @ekluzek's review
slevis-lmwg Apr 29, 2020
3653aee
Move InterpFileInputs and Init2 to clmfates_interfaceMod
slevis-lmwg May 7, 2020
1b3871f
Added if (use_cn) around reading/interpolating population density
slevis-lmwg May 7, 2020
5cb716d
Corrections that reduce the number of compilation errors to two
slevis-lmwg May 8, 2020
af1641b
Corrections for the code to compile
slevis-lmwg May 8, 2020
737487a
Changes needed so that fates_fire_data_method is local to clmfates_in…
ekluzek May 8, 2020
5eced0c
Update to Sam's FATES branch for the lightning reading
ekluzek May 8, 2020
f959daa
Make lnfm24 data private add an get method for it
ekluzek May 8, 2020
34aa9f4
Get everything consistent and building
ekluzek May 29, 2020
a8f8fdf
Use integer value for use_fates_spitfire now
ekluzek May 29, 2020
9e227b3
Add FATES fire base class
ekluzek May 29, 2020
9ae963b
Minor corrections for clm-fates to run with a lightning dataset
slevis-lmwg Jun 4, 2020
35996d4
Additional conflicts resolved; revisions in response to rgknox's review
slevis-lmwg Jun 5, 2020
7da5ec9
Added new FATES test that exercises the lightning dataset code
slevis-lmwg Jun 7, 2020
10915c0
Minor corrections from self-reviewing the PR
slevis-lmwg Jun 8, 2020
2d4d64f
Reassigned expected test fail to issue #667
slevis-lmwg Jun 8, 2020
4d276cc
Updates needed for anthropogenic ignitions in FATES-SPITFIRE
slevis-lmwg Jul 11, 2020
8844da9
Minor clean-up
slevis-lmwg Jul 11, 2020
e19350a
Small corrections to get test simulation to run
slevis-lmwg Jul 12, 2020
bc7a095
Added some comments to the code
slevis-lmwg Jul 12, 2020
5acd34c
Changed walltime on new test to avoid timeout
slevis-lmwg Jul 12, 2020
06dc679
Update bld/namelist_files/namelist_definition_clm4_5.xml
slevis-lmwg Jul 14, 2020
e28c57d
Update cime_config/testdefs/testmods_dirs/clm/Fates_nat_and_anthro_ig…
slevis-lmwg Jul 14, 2020
9b61c08
Update src/main/clm_varctl.F90
slevis-lmwg Jul 14, 2020
e20879d
Update src/main/clm_varctl.F90
slevis-lmwg Jul 15, 2020
79d3c2a
Made spitfire_mode flags public for use throughout CTSM-FATES
slevis-lmwg Jul 18, 2020
f5821fc
updating externals_clm configuration
glemieux Jul 22, 2020
c384c8e
fates-interface: added fixes to lightning interface
rgknox Jul 29, 2020
184b8be
enabling in bld/CLMBuildNamelist.pm the possibility of running with F…
ckoven May 6, 2020
045c894
adding harvest-type-resolved data structure and reading subroutine
ckoven May 6, 2020
b79422e
some initial updates towards sending land-use drivers to fates
ckoven May 7, 2020
dc46152
first attempt to link ctsm to fates with harvest
ckoven May 20, 2020
f629d6a
bugfixes to get ctsm to compile and run
ckoven May 21, 2020
5dc01b2
fixed runtime bugs
ckoven May 28, 2020
d2e1bef
added pass of bc_in to history dynamics subroutine to allow outputtin…
ckoven Jun 9, 2020
3a55f83
Revert "added pass of bc_in to history dynamics subroutine to allow o…
ckoven Jun 9, 2020
07e6e7f
made a bunch of changes based on code review
ckoven Jul 1, 2020
0ca2231
moved harvest unit specification to bc_in structure
ckoven Jul 2, 2020
1cfb7a7
fixing changes requested in code review
ckoven Jul 28, 2020
89e277e
compile-time bugfixes on prior
ckoven Jul 28, 2020
bf0d97a
applying GetAndSetTime patch
glemieux Jul 14, 2020
f8d1e8a
Updating externals configuration to point to expected fates tag
glemieux Jul 23, 2020
b1f7a79
fixing duplicate integer definition missed in merge
glemieux Jul 23, 2020
452be1a
Updated fates in externals
rgknox Jul 30, 2020
af8e815
fixing small typos in CLMBuildNamelist due to rebase
glemieux Aug 5, 2020
d6ef097
fixing build errors due to rebase of lu and lightning updates
glemieux Aug 5, 2020
e7f9d59
updating cime to 5.6.23 earlier to incorporate a fix to rel_path
glemieux Aug 5, 2020
a88a0e8
Merge branch 'fna-rebase_2-testing_fixes' into fates_main_api
glemieux Aug 5, 2020
aa04fcf
revert cime back to 5.8.19 to avoid ctsm issue 1013
glemieux Aug 7, 2020
c56788f
updating pointer to updated fates tag bug fix for lu
glemieux Aug 11, 2020
b1eefc2
added timing calls to all subroutines in clmfates_interfaceMod.F90
ckoven Aug 14, 2020
e467920
Merge pull request #2 from ckoven/timing
glemieux Aug 25, 2020
4fdffa6
Merge tag 'ctsm1.0.dev095' into fma-merge-ctsm1.0.dev095
glemieux Aug 25, 2020
725f9d6
updating need_lightning_and_popdens in fates fire data types for inte…
glemieux Aug 26, 2020
62ff02f
correcting error in create_cnfire_method due to merge
glemieux Aug 26, 2020
fde33f5
Merge pull request #1124 from glemieux/fma-merge-ctsm1.0.dev095
rgknox Aug 27, 2020
cf66419
Merge tag 'ctsm1.0.dev105' into fma-merge-ctsm1.0.dev105
glemieux Aug 28, 2020
e0f02da
Initial set of changes necessary for updating api to FATES CNP
rgknox Sep 4, 2020
3d95dd0
Fates CNP fixes, expand namelist range for prt 2
rgknox Sep 8, 2020
bca9d65
FATES CNP coupling. Swapped call sequence order between FATES dynamic…
rgknox Sep 17, 2020
68b913b
FATES CNP, added an ERS test for fates_parteh_mode=2, which includes …
rgknox Sep 18, 2020
503112a
updating fates default parameter file.
rgknox Sep 21, 2020
53ee045
updated fates allvars list of history variables
rgknox Sep 24, 2020
c4edfba
Merge branch 'fates_cnp_v0' of github.com:rgknox/ctsm into fates_cnp_v0
rgknox Sep 24, 2020
f6893b1
Changed the fates parteh 2 test to debug mode, removed an untested va…
rgknox Sep 24, 2020
75d2118
adding update for daily history output to FatesHydro testmod for ERS_…
glemieux Sep 24, 2020
3482a7a
Merge branch 'hydrotest-historyout' into fma-merge-ctsm1.0.dev105
glemieux Sep 24, 2020
bd9e8ad
Updating fates pointer to 1.42 api 14
rgknox Sep 24, 2020
332beef
cleanup typo and empty logic set
glemieux Sep 25, 2020
d2a2ef9
Merge pull request #2 from glemieux/cnp-emptyif
rgknox Sep 25, 2020
c724747
Merge pull request #1148 from rgknox/fates_cnp_v0
glemieux Sep 25, 2020
81fe6ea
adding soilbiogeochem scalar outputs pass to fates bc_in
glemieux Sep 25, 2020
4fec1b1
updating fates tag to latest
glemieux Oct 8, 2020
78a3ea1
Merge branch 'fates_main_api' into fma-merge-ctsm1.0.dev105
glemieux Oct 8, 2020
7a59b93
Merge pull request #1137 from glemieux/fma-merge-ctsm1.0.dev105
rgknox Oct 8, 2020
68054ec
updating externals_CLM.cfg
glemieux Oct 29, 2020
5c43ef5
Merge branch 'fates_main_api' into t_scalar-to-fates-deconflict
glemieux Nov 2, 2020
7ae28f2
fixing merge de-conflict error in externals tags
glemieux Nov 2, 2020
7138ab0
Merge pull request #1180 from glemieux/t_scalar-to-fates
rgknox Nov 2, 2020
d828aa0
initial attempt at creating new age x fuel size class dimension
glemieux Nov 19, 2020
aec6dd0
change naming of age x fuel size class to agefuel
glemieux Nov 19, 2020
0392347
fixing error due to missing use of FatesInterfaceTypesMod
glemieux Nov 19, 2020
77790c1
updated externals tag for fates
glemieux Dec 7, 2020
aff0ff9
Merge pull request #1220 from glemieux/newdim-patchage-by-fuelclass
rgknox Dec 14, 2020
359ec1d
Merge tag 'ctsm1.0.dev113' into fma-merge-ctsm1.0.dev113
glemieux Dec 18, 2020
1e15627
fixing calls to refactored CNFireFactoryMod
glemieux Dec 18, 2020
a7e020f
Merge pull request #1231 from glemieux/fma-merge-ctsm1.0.dev113
rgknox Jan 11, 2021
341834d
Merge tag 'ctsm5.1.dev020' into fma-merge-ctsm5.1.dev020
glemieux Jan 12, 2021
3dd33b1
simple CNFireArea fix attempt
glemieux Jan 14, 2021
fa0a369
adding missing use calls
glemieux Jan 14, 2021
340f5f2
adding missing abortutils and contain statement
glemieux Jan 14, 2021
bc2bc2f
adding more missing use cases
glemieux Jan 14, 2021
e09dc51
Implement CNFire subroutines to the FATES Fire base class, they are r…
ekluzek Jan 15, 2021
5f348ca
Merge pull request #1257 from glemieux/fma-merge-ctsm5.1.dev020
rgknox Jan 26, 2021
4c9a4c1
Merge branch 'fates_main_api' into fates_main_api-merge-ctsm_master
glemieux Jan 26, 2021
377ec15
updating Changelog
glemieux Jan 27, 2021
292c8b6
removing unnecessary spitfire addition to cnfire_inparm group
glemieux Jan 28, 2021
677f422
add hgrid setting to lightning stream filename setting
glemieux Jan 29, 2021
0fe37c0
adding clarifying comments
glemieux Jan 29, 2021
6672926
strike out dated edison test
glemieux Jan 29, 2021
b1a6080
updating changelog notes
glemieux Jan 29, 2021
62439ab
adding comments to all fates testmods
glemieux Jan 29, 2021
0a563fb
Remove most of the notes about FATES being experimental, make the not…
ekluzek Jan 31, 2021
cfbf7a7
Merge branch 'fates_main_api-merge-ctsm_master' of github.com:glemieu…
ekluzek Jan 31, 2021
afc8276
Set light_res default according to some a few attributes rather than …
ekluzek Feb 1, 2021
08b1f87
create FATES version of fire factory
glemieux Feb 1, 2021
deb57e0
adding FATESFireFactoryMod
glemieux Feb 1, 2021
1ab763c
Merge branch 'fates_main_api-merge-ctsm_master' into fates_firemods_r…
glemieux Feb 1, 2021
b8abb88
fixing missing end module name
glemieux Feb 1, 2021
c8b2339
removing old call to fire_method = spitfire in ignitions testmod
glemieux Feb 1, 2021
9f0916b
Set T62 lightning dataset for fates as well, set light_res for fates …
ekluzek Feb 3, 2021
0e645ea
Merge branch 'fates_main_api-merge-ctsm_master' of github.com:glemieu…
ekluzek Feb 3, 2021
2f27c68
Remove the use_cn and use_fates settings for lightning variables so d…
ekluzek Feb 3, 2021
089eb79
updating changelog template
glemieux Feb 4, 2021
0643ad4
Remove all non-debug nag tests
billsacks Feb 4, 2021
0d52de5
updating changelog notes for dev022 and removing fates checkbox from …
glemieux Feb 4, 2021
50d5e71
Merge branch 'fates_main_api-merge-ctsm_master' of github.com:glemieu…
ekluzek Feb 5, 2021
5ee6ce2
Add two fail tests for light-res set to none, but fire required to be on
ekluzek Feb 5, 2021
c49dcbc
Some more work with the Change files
ekluzek Feb 5, 2021
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.30.0_api.8.0.0
tag = sci.1.43.2_api.14.2.0
required = True

[PTCLM]
Expand Down
137 changes: 68 additions & 69 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,9 @@ sub setup_cmdl_fates_mode {
}
} else {
# dis-allow fates specific namelist items with non-fates runs
my @list = ( "use_fates_spitfire", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys",
"use_fates_inventory_init", "fates_inventory_ctrl_filename","use_fates_logging","fates_parteh_mode" );
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", "fates_inventory_ctrl_filename","use_fates_logging","fates_parteh_mode" );
foreach my $var ( @list ) {
if ( defined($nl->get_value($var)) ) {
$log->fatal_error("$var is being set, but can ONLY be set when -bgc fates option is used.\n");
Expand Down Expand Up @@ -913,46 +914,47 @@ sub setup_cmdl_fire_light_res {
if ( defined($fire_method) && $val ne "none" ) {
if ( $fire_method eq "nofire" ) {
$log->fatal_error("-$var option used with fire_method='nofire'. -$var can ONLY be used without the nofire option");
}
}
my $stream_fldfilename_lightng = remove_leading_and_trailing_quotes( $nl->get_value('stream_fldfilename_lightng') );
if ( defined($stream_fldfilename_lightng) && $val ne "none" ) {
$log->fatal_error("-$var option used while also explicitly setting stream_fldfilename_lightng filename which is a contradiction. Use one or the other not both.");
}
if ( ! &value_is_true($nl->get_value('use_cn')) ) {
$log->fatal_error("-$var option used CN is NOT on. -$var can only be used when CN is on (with bgc: cn or bgc)");
}
if ( &value_is_true($nl->get_value('use_cn')) && $val eq "none" ) {
$log->fatal_error("-$var option is set to none, but CN is on (with bgc: cn or bgc) which is a contradiction");
}
$nl_flags->{$var} = $val;
}
my $group = $definition->get_group_name($var);
$nl->set_variable_value($group, $var, quote_string($nl_flags->{$var}) );
if ( ! $definition->is_valid_value( $var, $nl_flags->{$var}, 'noquotes'=>1 ) ) {
my @valid_values = $definition->get_valid_values( $var );
$log->fatal_error("$var has a value (".$nl_flags->{$var}.") that is NOT valid. Valid values are: @valid_values");
}
$log->verbose_message("Using $nl_flags->{$var} for $var.");
#
# Set flag if cn-fires are on or not
#
$var = "cnfireson";
if ( &value_is_true($nl->get_value('use_cn')) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fire_method');
}
my $fire_method = remove_leading_and_trailing_quotes( $nl->get_value('fire_method') );
if ( defined($fire_method) && ! &value_is_true($nl_flags->{'use_cn'}) ) {
$log->fatal_error("fire_method is being set even though bgc is NOT cn or bgc.");
}
if ( defined($fire_method) && $fire_method eq "nofire" ) {
$nl_flags->{$var} = ".false.";
} elsif ( &value_is_true($nl->get_value('use_cn')) ) {
$nl_flags->{$var} = ".true.";
} else {
$nl_flags->{$var} = ".false.";
}
}
my $stream_fldfilename_lightng = remove_leading_and_trailing_quotes( $nl->get_value('stream_fldfilename_lightng') );
if ( defined($stream_fldfilename_lightng) && $val ne "none" ) {
$log->fatal_error("-$var option used while also explicitly setting stream_fldfilename_lightng filename which is a contradiction. Use one or the other not both.");
}
if ( ! &value_is_true($nl->get_value('use_cn')) ) {
$log->fatal_error("-$var option used CN is NOT on. -$var can only be used when CN is on (with bgc: cn or bgc)");
}
if ( &value_is_true($nl->get_value('use_cn')) && $val eq "none" ) {
$log->fatal_error("-$var option is set to none, but CN is on (with bgc: cn or bgc) which is a contradiction");
}
$nl_flags->{$var} = $val;
}
my $group = $definition->get_group_name($var);
$nl->set_variable_value($group, $var, quote_string($nl_flags->{$var}) );
if ( ! $definition->is_valid_value( $var, $nl_flags->{$var}, 'noquotes'=>1 ) ) {
my @valid_values = $definition->get_valid_values( $var );
$log->fatal_error("$var has a value (".$nl_flags->{$var}.") that is NOT valid. Valid values are: @valid_values");
}
$log->verbose_message("Using $nl_flags->{$var} for $var.");
#
# Set flag if cn-fires are on or not
#
$var = "cnfireson";
if ( &value_is_true($nl->get_value('use_cn')) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fire_method');
}
my $fire_method = remove_leading_and_trailing_quotes( $nl->get_value('fire_method') );
if ( defined($fire_method) && ! &value_is_true($nl_flags->{'use_cn'}) && ! &value_is_true($nl_flags->{'use_fates'}) ) {
$log->fatal_error("fire_method is being set while use_cn and use_fates are both false.");
}
if ( defined($fire_method) && $fire_method eq "nofire" ) {
$nl_flags->{$var} = ".false.";
# } elsif ( &value_is_true($nl->get_value('use_cn')) || $nl_flags->{'fates_spitfire_mode'} > 1 ) {
} elsif ( &value_is_true($nl->get_value('use_cn')) || &value_is_true($nl->get_value('use_fates')) ) {
$nl_flags->{$var} = ".true.";
} else {
$nl_flags->{$var} = ".false.";
}
}
}

#-------------------------------------------------------------------------------

Expand Down Expand Up @@ -2176,9 +2178,6 @@ sub setup_logic_surface_dataset {
if ($flanduse_timeseries ne "null" && &value_is_true($nl_flags->{'use_cndv'}) ) {
$log->fatal_error( "dynamic PFT's (setting flanduse_timeseries) are incompatible with dynamic vegetation (use_cndv=.true)." );
}
if ($flanduse_timeseries ne "null" && &value_is_true($nl_flags->{'use_fates'}) ) {
$log->fatal_error( "dynamic PFT's (setting flanduse_timeseries) are incompatible with ecosystem dynamics (use_fates=.true)." );
}
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fsurdat',
'hgrid'=>$nl_flags->{'res'}, 'ssp_rcp'=>$nl_flags->{'ssp_rcp'},
'sim_year'=>$nl_flags->{'sim_year'}, 'irrigate'=>$nl_flags->{'irrigate'},
Expand Down Expand Up @@ -2619,17 +2618,17 @@ sub setup_logic_do_harvest {
# in any of these cases, a fatal error will be generated
my $cannot_be_true = "";

if (string_is_undef_or_empty($nl->get_value('flanduse_timeseries'))) {
$cannot_be_true = "$var can only be set to true when running a transient case (flanduse_timeseries non-blank)";
} elsif (!&value_is_true($nl->get_value('use_cn'))) {
$cannot_be_true = "$var can only be set to true when running with CN (use_cn = true)";
} elsif (&value_is_true($nl->get_value('use_fates'))) {
$cannot_be_true = "$var currently doesn't work with ED";
}
if (string_is_undef_or_empty($nl->get_value('flanduse_timeseries'))) {
$cannot_be_true = "$var can only be set to true when running a transient case (flanduse_timeseries non-blank)";
}

if ($cannot_be_true) {
$default_val = ".false.";
}
elsif (!&value_is_true($nl->get_value('use_cn')) && !&value_is_true($nl->get_value('use_fates'))) {
$cannot_be_true = "$var can only be set to true when running with either CN or FATES";
}

if ($cannot_be_true) {
$default_val = ".false.";
}

if (!$cannot_be_true) {
# Note that, if the variable cannot be true, we don't call add_default
Expand Down Expand Up @@ -3370,19 +3369,19 @@ sub setup_logic_lightning_streams {
# lightning streams require CN/BGC
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

if ( &value_is_true($nl_flags->{'cnfireson'}) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'lightngmapalgo', 'use_cn'=>$nl_flags->{'use_cn'},
'hgrid'=>$nl_flags->{'res'},
'clm_accelerated_spinup'=>$nl_flags->{'clm_accelerated_spinup'} );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_year_first_lightng', 'use_cn'=>$nl_flags->{'use_cn'},
'sim_year'=>$nl_flags->{'sim_year'},
'sim_year_range'=>$nl_flags->{'sim_year_range'});
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_year_last_lightng', 'use_cn'=>$nl_flags->{'use_cn'},
'sim_year'=>$nl_flags->{'sim_year'},
'sim_year_range'=>$nl_flags->{'sim_year_range'});
# Set align year, if first and last years are different
if ( $nl->get_value('stream_year_first_lightng') !=
$nl->get_value('stream_year_last_lightng') ) {
if ( &value_is_true($nl_flags->{'cnfireson'}) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'lightngmapalgo', 'use_cn'=>$nl_flags->{'use_cn'},
'hgrid'=>$nl_flags->{'res'},
'clm_accelerated_spinup'=>$nl_flags->{'clm_accelerated_spinup'} );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_year_first_lightng', 'use_cn'=>$nl_flags->{'use_cn'},
'sim_year'=>$nl_flags->{'sim_year'},
'sim_year_range'=>$nl_flags->{'sim_year_range'});
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_year_last_lightng', 'use_cn'=>$nl_flags->{'use_cn'},
'sim_year'=>$nl_flags->{'sim_year'},
'sim_year_range'=>$nl_flags->{'sim_year_range'});
# Set align year, if first and last years are different
if ( $nl->get_value('stream_year_first_lightng') !=
$nl->get_value('stream_year_last_lightng') ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'model_year_align_lightng', 'sim_year'=>$nl_flags->{'sim_year'},
'sim_year_range'=>$nl_flags->{'sim_year_range'});
}
Expand Down Expand Up @@ -3866,8 +3865,8 @@ sub setup_logic_fates {

if (&value_is_true( $nl_flags->{'use_fates'}) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fates_paramfile', 'phys'=>$nl_flags->{'phys'});
my @list = ( "use_fates_spitfire", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys",
"use_fates_inventory_init", "use_fates_logging","fates_parteh_mode" );
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_logging","fates_parteh_mode", "use_fates_cohort_age_tracking" );
ekluzek marked this conversation as resolved.
Show resolved Hide resolved
foreach my $var ( @list ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'use_fates'=>$nl_flags->{'use_fates'} );
}
Expand Down
58 changes: 56 additions & 2 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,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.8.0.0_12pft_c191216.nc</fates_paramfile>
<fates_paramfile>lnd/clm2/paramdata/fates_params_api.14.0.0_12pft_c200921.nc</fates_paramfile>

<!-- ======================================================================================== -->
<!-- clm 5.0 BGC nitrogen model -->
Expand Down Expand Up @@ -1572,14 +1572,20 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts
<light_res use_cn=".true." phys="clm4_5" >94x192</light_res>
<light_res use_cn=".true." phys="clm5_0" >94x192</light_res>
<light_res use_cn=".true." phys="clm5_1" >360x720</light_res>
<light_res use_fates=".true." phys="clm4_5" >360x720</light_res>
ekluzek marked this conversation as resolved.
Show resolved Hide resolved
<light_res use_fates=".true." phys="clm5_0" >360x720</light_res>

<stream_year_first_lightng use_cn=".true." >0001</stream_year_first_lightng>
<stream_year_last_lightng use_cn=".true." >0001</stream_year_last_lightng>
<stream_year_first_lightng use_fates=".true.">0001</stream_year_first_lightng>
<stream_year_last_lightng use_fates=".true.">0001</stream_year_last_lightng>

<stream_fldfilename_lightng hgrid="94x192" use_cn=".true." >atm/datm7/NASA_LIS/clmforc.Li_2012_climo1995-2011.T62.lnfm_Total_c140423.nc</stream_fldfilename_lightng>
<stream_fldfilename_lightng hgrid="360x720" use_cn=".true." >atm/datm7/NASA_LIS/clmforc.Li_2016_climo1995-2013.360x720.lnfm_Total_c160825.nc</stream_fldfilename_lightng>
<stream_fldfilename_lightng use_fates=".true." >atm/datm7/NASA_LIS/clmforc.Li_2016_climo1995-2013.360x720.lnfm_Total_c160825.nc</stream_fldfilename_lightng>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have the hgrid setting, so that you can toggle between the two files. This could be useful if you are fine with a lower resolution lightning file, it would save some time and CPU.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roger that, I think I see what you're saying. So it would be:
<stream_fldfilename_lightng hgrid="360x720" use_fates=".true. >atm/datm7/NASA_LIS/clmforc.Li_2016_climo1995-2013.360x720.lnfm_Total_c160825.nc</stream_fldfilename_lightng>"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and I'd add the T62 file in as an option as well. Just so you could use it if you wanted to.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated via 677f422.


<lightngmapalgo use_cn=".true." >bilinear</lightngmapalgo>
<lightngmapalgo use_fates=".true." >bilinear</lightngmapalgo>

<lightngmapalgo use_cn=".true." hgrid="1x1_brazil" >nn</lightngmapalgo>
<lightngmapalgo use_cn=".true." hgrid="1x1_mexicocityMEX" >nn</lightngmapalgo>
Expand Down Expand Up @@ -1620,6 +1626,24 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts
<stream_year_first_popdens use_cn=".true." sim_year="constant" sim_year_range="1000-1004" >2000</stream_year_first_popdens>
<stream_year_last_popdens use_cn=".true." sim_year="constant" sim_year_range="1000-1004" >2000</stream_year_last_popdens>

<stream_year_first_popdens use_fates=".true." sim_year="2010" >2010</stream_year_first_popdens>
<stream_year_last_popdens use_fates=".true." sim_year="2010" >2010</stream_year_last_popdens>

<stream_year_first_popdens use_fates=".true." sim_year="2000" >2000</stream_year_first_popdens>
<stream_year_last_popdens use_fates=".true." sim_year="2000" >2000</stream_year_last_popdens>

<stream_year_first_popdens use_fates=".true." sim_year="1850" >1850</stream_year_first_popdens>
<stream_year_last_popdens use_fates=".true." sim_year="1850" >1850</stream_year_last_popdens>

<stream_year_first_popdens use_fates=".true." sim_year="1000" >2000</stream_year_first_popdens>
<stream_year_last_popdens use_fates=".true." sim_year="1000" >2000</stream_year_last_popdens>

<stream_year_first_popdens use_fates=".true." sim_year="constant" sim_year_range="1000-1002" >2000</stream_year_first_popdens>
<stream_year_last_popdens use_fates=".true." sim_year="constant" sim_year_range="1000-1002" >2000</stream_year_last_popdens>

<stream_year_first_popdens use_fates=".true." sim_year="constant" sim_year_range="1000-1004" >2000</stream_year_first_popdens>
<stream_year_last_popdens use_fates=".true." sim_year="constant" sim_year_range="1000-1004" >2000</stream_year_last_popdens>

<stream_fldfilename_popdens hgrid="0.5x0.5" use_cn=".true." >lnd/clm2/firedata/clmforc.Li_2017_HYDEv3.2_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2016_c180202.nc</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_cn=".true." ssp_rcp="SSP1-1.9" >lnd/clm2/firedata/clmforc.Li_2018_SSP1_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>
Expand All @@ -1638,6 +1662,24 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts
<stream_fldfilename_popdens hgrid="0.5x0.5" use_cn=".true." ssp_rcp="SSP5-3.4" >lnd/clm2/firedata/clmforc.Li_2018_SSP5_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>

<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." >lnd/clm2/firedata/clmforc.Li_2017_HYDEv3.2_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2016_c180202.nc</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." ssp_rcp="SSP1-1.9" >lnd/clm2/firedata/clmforc.Li_2018_SSP1_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." ssp_rcp="SSP1-2.6" >lnd/clm2/firedata/clmforc.Li_2018_SSP1_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." ssp_rcp="SSP2-4.5" >lnd/clm2/firedata/clmforc.Li_2018_SSP2_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." ssp_rcp="SSP3-7.0" >lnd/clm2/firedata/clmforc.Li_2018_SSP3_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." ssp_rcp="SSP4-6.0" >lnd/clm2/firedata/clmforc.Li_2018_SSP4_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." ssp_rcp="SSP4-3.4" >lnd/clm2/firedata/clmforc.Li_2018_SSP4_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." ssp_rcp="SSP5-8.5" >lnd/clm2/firedata/clmforc.Li_2018_SSP5_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>
<stream_fldfilename_popdens hgrid="0.5x0.5" use_fates=".true." ssp_rcp="SSP5-3.4" >lnd/clm2/firedata/clmforc.Li_2018_SSP5_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c181205.nc
</stream_fldfilename_popdens>

<popdensmapalgo use_cn=".true." >bilinear</popdensmapalgo>

<popdensmapalgo use_cn=".true." hgrid="1x1_brazil" >nn</popdensmapalgo>
Expand All @@ -1648,6 +1690,16 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts
<popdensmapalgo use_cn=".true." hgrid="1x1_asphaltjungleNJ" >nn</popdensmapalgo>
<popdensmapalgo use_cn=".true." hgrid="5x5_amazon" >nn</popdensmapalgo>

<popdensmapalgo use_fates=".true." >bilinear</popdensmapalgo>

<popdensmapalgo use_fates=".true." hgrid="1x1_brazil" >nn</popdensmapalgo>
<popdensmapalgo use_fates=".true." hgrid="1x1_mexicocityMEX" >nn</popdensmapalgo>
<popdensmapalgo use_fates=".true." hgrid="1x1_vancouverCAN" >nn</popdensmapalgo>
<popdensmapalgo use_fates=".true." hgrid="1x1_urbanc_alpha" >nn</popdensmapalgo>
<popdensmapalgo use_fates=".true." hgrid="1x1_camdenNJ" >nn</popdensmapalgo>
<popdensmapalgo use_fates=".true." hgrid="1x1_asphaltjungleNJ" >nn</popdensmapalgo>
<popdensmapalgo use_fates=".true." hgrid="5x5_amazon" >nn</popdensmapalgo>

ekluzek marked this conversation as resolved.
Show resolved Hide resolved
<!-- Urban time varying streams namelist defaults -->
<stream_year_first_urbantv phys="clm5_1" sim_year_range="1850-2100" >2015</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_1" sim_year_range="1850-2100" >2106</stream_year_last_urbantv>
Expand Down Expand Up @@ -3587,12 +3639,14 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts
<use_nitrif_denitrif bgc_mode="fates" >.false.</use_nitrif_denitrif>

<!-- ===== FATES DEFAULTS =========== -->
<use_fates_spitfire use_fates=".true.">.false.</use_fates_spitfire>
<fates_spitfire_mode use_fates=".true.">0</fates_spitfire_mode>
<use_fates_planthydro use_fates=".true.">.false.</use_fates_planthydro>
<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>
<use_fates_logging use_fates=".true.">.false.</use_fates_logging>
<use_fates_inventory_init use_fates=".true.">.false.</use_fates_inventory_init>
<use_fates_fixed_biogeog use_fates=".true.">.false.</use_fates_fixed_biogeog>
<fates_parteh_mode use_fates=".true.">1</fates_parteh_mode>

<!-- ========================================= -->
Expand Down
Loading