Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
13e5437
Add tests for fire_emis with SP bgc mode or BGC mode with nofire, the…
ekluzek Oct 3, 2024
36126dc
Make CLM_BLDNML_OPTS explicitly turn off drv_flds_in options off for …
ekluzek Oct 11, 2024
d6bbcc2
Update namelist_defaults with ne3np4 fsurdat/landuse files
slevis-lmwg Oct 16, 2024
d48575b
Add ne3np4 fsurdat/landuse generation to Makefile
slevis-lmwg Oct 16, 2024
8002a9d
Small important correction to namelist_defaults_ctsm.xml
slevis-lmwg Oct 16, 2024
8f6905c
Add build-namelist tests for ne3np4 same as existing ne3np4.pg3
slevis-lmwg Oct 16, 2024
8653d35
Start adding a unit tests for CNFireFactory with just a single simple…
ekluzek Oct 23, 2024
b98fe8c
Start adding a unit tests for CNFireFactory with just a single simple…
ekluzek Oct 23, 2024
cfff96a
Merge remote-tracking branch 'escomp/cesm3_0_beta04_changes' into fir…
ekluzek Oct 23, 2024
23bb341
Update namelist_defaults with ne3np4 fsurdat/landuse files
slevis-lmwg Oct 16, 2024
7254256
Add ne3np4 fsurdat/landuse generation to Makefile
slevis-lmwg Oct 16, 2024
99dd05a
Small important correction to namelist_defaults_ctsm.xml
slevis-lmwg Oct 16, 2024
68eec54
Add build-namelist tests for ne3np4 same as existing ne3np4.pg3
slevis-lmwg Oct 16, 2024
f1f3be7
Change ptsRLA and ptsRLO tests to ne3 in testlist_clm.xml
slevis-lmwg Oct 23, 2024
f37d0b5
Merge remote-tracking branch 'slevis-lmwg/ne3np4_to_defaults_and_make…
slevis-lmwg Oct 23, 2024
981c1b0
Updating the ptsRLA and ptsRLO tests to the correct ne3 grid
slevis-lmwg Oct 23, 2024
8dc7355
Merge branch 'cesm3_0_beta04_changes' into ne3np4_to_defaults_and_mak…
slevis-lmwg Oct 24, 2024
87afe5c
updates for ne3np4 scam
jtruesdal Nov 4, 2024
a389e6d
Merge branch 'cesm3_0_beta04_changes' into ne3np4_to_defaults_and_mak…
slevis-lmwg Nov 8, 2024
46015e9
ctsm warm_start mods
jtruesdal Dec 4, 2024
5f1c6d8
Bring back clm5-cam6 init_interp_attributes for ne0CONUS grid
slevis-lmwg Dec 5, 2024
8404f5c
Merge pull request #2901 from slevis-lmwg/fix_failing_ne0_tests
slevis-lmwg Dec 20, 2024
36d95e0
bug fix for scam clm warmstart - SCT cam6_prep now produces BFB resul…
jtruesdal Jan 11, 2025
1e43d01
Merge pull request #17 from jtruesdal/ctsm_warmstart
slevis-lmwg Jan 23, 2025
d013bf7
Merge remote-tracking branch 'escomp/master' into ne3np4_to_defaults_…
slevis-lmwg Jan 23, 2025
6cf536b
Replace comment explaining `allow_scm` with the correct one
slevis-lmwg Jan 24, 2025
af8cd54
Improve `allow_scm` comment further
slevis-lmwg Jan 24, 2025
5f8d812
Add comment explaining the read_noscm flag
slevis-lmwg Jan 24, 2025
52d77cc
Merge remote-tracking branch 'escomp/cesm3_0_beta04_changes' into ne3…
slevis-lmwg Feb 4, 2025
bcaab45
Merge pull request #2835 from slevis-lmwg/ne3np4_to_defaults_and_make…
slevis-lmwg Feb 4, 2025
69e1ccf
Merge remote-tracking branch 'escomp/cesm3_0_beta04_changes' into fir…
ekluzek Feb 6, 2025
2c330c0
Change to full ESMF library
ekluzek Feb 6, 2025
6d0f1e5
Add tests for each of the Li fire types
ekluzek Feb 7, 2025
3d81a1b
Add LAI stream to compile list
ekluzek Mar 4, 2025
9f7527e
Add check_dim_size
ekluzek Mar 4, 2025
e022783
Add FireClean method
ekluzek Mar 4, 2025
29b5b61
Make pointers set to NULL, and add BaseFireClean method
ekluzek Mar 4, 2025
61826eb
Add shr_expr and fire_emis to list
ekluzek Mar 4, 2025
de0c358
Add more setup and teardown, and also add several more tests, and inc…
ekluzek Mar 4, 2025
d4707b6
Initialize pointer to NULL, add clean method, add some returns after …
ekluzek Mar 4, 2025
fad3d1b
Add a note about the call to the base BaseFireClean method failing at…
ekluzek Mar 4, 2025
2fcc081
Get one of the failing tests working by implementing an init method t…
ekluzek Mar 5, 2025
39661d6
Get the last test working by aborting if fire-emissions are on in SP …
ekluzek Mar 5, 2025
ed88834
Add CNFireSetFireMethod for unit testing of the CNFireFactory, remove…
ekluzek Mar 5, 2025
570c5fe
Initialize fire_method to UNSET, so it will fail if it isn't set by s…
ekluzek Mar 6, 2025
6bcac0c
The unit testing actually doesn't need to call the fire_emis namelist…
ekluzek Mar 6, 2025
ad3d766
Add FATES Fire factory files to list
ekluzek Mar 6, 2025
4e36aa4
Add unit-tester for FATESFireFactory, two tests pass, two fail becaus…
ekluzek Mar 7, 2025
52c290a
Add unit-tester for FATESFireFactory, two tests pass, two fail becaus…
ekluzek Mar 7, 2025
a6fb39a
Get another test working, by checking that fire-emissions are off for…
ekluzek Mar 7, 2025
bbcc2a1
Merge tag 'ctsm5.3.030' into fire_emis
ekluzek Mar 7, 2025
99676ab
Don't allocate cnfire if NOT a BGC case
ekluzek Mar 10, 2025
bf6170e
Don't set stream types to NULL as they aren't pointers
ekluzek Mar 10, 2025
236a0a4
Make sure fire-emissions is off for FatesSp and FatesSt3 modes, which…
ekluzek Mar 11, 2025
14ad093
Add a fates_use_ed_st3 test and make sure it works
ekluzek Mar 11, 2025
1e5bfff
Get new namelist tests to work
ekluzek Mar 12, 2025
ccc6b17
Merge tag 'ctsm5.3.030' into cesm3_0_beta04_changes
ekluzek Mar 13, 2025
ae3fc28
Add failing test that both fates_sp and fates_st3 can be active at th…
ekluzek Mar 13, 2025
d7a23c7
Merge remote-tracking branch 'escomp/cesm3_0_beta04_changes' into fir…
ekluzek Mar 13, 2025
d0ba1ac
Change query of use_fates_sp to use nl_flags
ekluzek Mar 13, 2025
026d24f
Another update to use nl_flags query for use_fates_sp
ekluzek Mar 13, 2025
8caba7c
Don't allow both use_fates_sp and use_fates_ed_st3 to be on at the sa…
ekluzek Mar 13, 2025
e91f427
Add checking around if ESMF is already initialized or not, and add no…
ekluzek Mar 18, 2025
5c01edc
Refactor so FireInit doesn't include NLFilename or namelist reads, an…
ekluzek Mar 28, 2025
461887b
Add some documentation about how some tests are standalone, and one i…
ekluzek Mar 28, 2025
4bd0eb8
Remove namelist file as no longer needed
ekluzek Mar 31, 2025
23de87c
Improve the error message as noticed in the review
ekluzek Mar 31, 2025
cd7c8c9
Successful ignitions doesn't need to be specially handled
ekluzek Apr 11, 2025
658414b
Add a check to die when fire_emission and fates is on for now, the un…
ekluzek Apr 11, 2025
3669784
Get unit test working again
ekluzek Apr 14, 2025
178f164
Fix typo
ekluzek Apr 14, 2025
5905eba
Correct fire_emis option in CLM_BLD_NML_OPTS
ekluzek Apr 14, 2025
b4298e2
Fix fire initialization for full cases
ekluzek Apr 16, 2025
771652a
Put nofireemis first in the include file so that nofireemis is turned…
ekluzek Apr 17, 2025
0c79edf
Merge tag 'ctsm5.3.040' into cesm3_0_beta04_changes
ekluzek Apr 17, 2025
08e4d58
Merge pull request #3074 from ekluzek/update_cleanup_to_ctsm5340
ekluzek Apr 17, 2025
2c22d92
Merge remote-tracking branch 'escomp/cesm3_0_beta04_changes' into fir…
ekluzek Apr 17, 2025
c8fb17f
Fix more Sp tests to have nofireemis
ekluzek Apr 18, 2025
dacf60b
Explicit check that use_cn is false so that drydepnomegan tests will …
ekluzek Apr 18, 2025
e8315ff
draft to start updating to CMIP7 data for CTSM5.4
wwieder Apr 23, 2025
1901125
remove urban comment
wwieder Apr 23, 2025
6eb3d8b
change to active account key
wwieder Apr 23, 2025
88a963c
Merge tag 'ctsm5.3.040' into alpha-ctsm5.4.CMIP7
ekluzek Apr 23, 2025
10603ad
Merge pull request #3085 from ekluzek/update_ctsm5.4.alpha_to_ctsm5.3…
ekluzek Apr 23, 2025
db03d97
Merge branch 'alpha-ctsm5.4.CMIP7' into mksrf_5.4
ekluzek Apr 23, 2025
a6f1716
Merge pull request #3083 from wwieder/mksrf_5.4
ekluzek Apr 23, 2025
02a3e83
Merge pull request #3086 from wwieder/mksrf_5.4
ekluzek Apr 23, 2025
f4eda47
urban mesh update
wwieder Apr 24, 2025
e83e76d
Merge branch 'mksrf_5.4' of https://github.com/wwieder/CTSM into mksr…
wwieder Apr 24, 2025
a0e6e64
remove full path for urban mesh
wwieder Apr 25, 2025
9ec9740
corrected TBD area pre1900
wwieder Apr 28, 2025
6fc87c7
Add nofireemis to two more ClmSp tests
ekluzek Apr 29, 2025
1f99862
Merge pull request #3089 from wwieder/mksrf_5.4
ekluzek Apr 29, 2025
09c06a8
Fix a few more tests that need to use nofireemis
ekluzek May 9, 2025
a576300
Merge tag 'ctsm5.3.043' into fire_emis
ekluzek May 9, 2025
38798b0
Allocate cnfire_method for fates as nofire, because it's passed down …
ekluzek May 10, 2025
996341b
Merge tag 'ctsm5.3.052' into alpha-ctsm5.4.CMIP7
slevis-lmwg May 30, 2025
a3ce6a7
Change snow_thermal_cond_glc_method and _lake_method for clm6_0
slevis-lmwg May 30, 2025
a75e488
Update to new temporary default paramfile for clm6_0
slevis-lmwg May 30, 2025
b1890ac
Update to new non-final ctsm5.4 f09 & ne30 fsurdat/landuse files
slevis-lmwg May 30, 2025
607b96b
Merge tag 'ctsm5.3.053' into fire_emis
ekluzek Jun 2, 2025
5bc74e8
Update comments about how do_grossunrep gets set in CLMBuildNamelist.pm
slevis-lmwg Jun 2, 2025
31598a0
Make use_c1* isotope settings true for Clm6Bgc cases
slevis-lmwg Jun 2, 2025
3a8c432
Update to new ctsm5.4 f09 and ne30 finidat files for 1850 and 2000
slevis-lmwg Jun 2, 2025
b13597c
Changes needed for use_c1* variables to get their default values
slevis-lmwg Jun 3, 2025
5bce0ed
Remove unnecessary "if ( defined" statements as per code review
slevis-lmwg Jun 5, 2025
6fd3fc1
Merge tag 'ctsm5.3.055' into update_defaults_iss3137
slevis-lmwg Jun 5, 2025
84dcbe0
Increase wallclock on izumi tests running out of wallclock
slevis-lmwg Jun 6, 2025
b947acc
update fates seed dispersal PEM test
glemieux Jun 10, 2025
4079aef
remove now invalid expected RUN fail case for fates seed dispersal
glemieux Jun 10, 2025
caa977c
add PEM test to aux_clm on derecho
glemieux Jun 10, 2025
2be63ee
Add GitHub workflow to check clm6 compset aliases.
samsrabin Jun 12, 2025
a516de4
Fix clm60 compset aliases that were giving CLM50 longnames.
samsrabin Jun 12, 2025
f7dc9aa
Update LII2FINIDATAREAS tests from Clm5 to Clm6 and update exp. fails
slevis-lmwg Jun 12, 2025
59d3408
Merge pull request #3206 from slevis-lmwg/update_defaults_iss3137
slevis-lmwg Jun 12, 2025
f57e7a7
Merge tag 'ctsm5.3.056' into fates-pem-otf_param-fix
glemieux Jun 13, 2025
538079e
update changelog
glemieux Jun 13, 2025
701266c
Add intel version of failing PEM test to expected fails.
samsrabin Jun 13, 2025
a0fdd58
Merge pull request #3243 from glemieux/fates-pem-otf_param-fix
samsrabin Jun 13, 2025
0d7f836
Merge tag 'ctsm5.3.057' into fix-clm6-aliases
samsrabin Jun 13, 2025
11f313d
Fix more tests with sp that need nofireemis
ekluzek Jun 14, 2025
f8ad8a1
Another nofireemis change
ekluzek Jun 14, 2025
027adc5
Merge tag 'ctsm5.3.057' into cesm3_0_beta04_changes
ekluzek Jun 14, 2025
99aed55
Merge branch 'cesm3_0_beta04_changes' into fire_emis
ekluzek Jun 14, 2025
61955c5
Merge pull request #2844 from ekluzek/fire_emis
ekluzek Jun 14, 2025
8d08f07
Convert ISSP tests in aux_clm from Clm50 to Clm60.
samsrabin Jun 16, 2025
7748109
Fix compset aliases for updated ISSP tests.
samsrabin Jun 16, 2025
662c8c8
Change updated ISSP tests to all use 245.
samsrabin Jun 16, 2025
a900c82
Update ChangeLog/Sum.
samsrabin Jun 16, 2025
407f2e8
check-clm6-aliases: Be more precise in check.
samsrabin Jun 16, 2025
5b85251
Merge pull request #3248 from samsrabin/fix-clm6-aliases
samsrabin Jun 16, 2025
7581e10
Merge tag 'ctsm5.3.058' into cesm3_0_beta04_changes
ekluzek Jun 16, 2025
3c6fb50
Get the parse cs.status script to work in a CESM checkout
ekluzek Jun 17, 2025
3191d14
Change directory name of mizuroute to match what is in CESM
ekluzek Jun 17, 2025
b965969
Change name for mizuRoute so it's all lower case the same as it is in…
ekluzek Jun 18, 2025
6b195a0
Merge tag 'ctsm5.3.058' into prelim_upd_ctsm54_defaults
slevis-lmwg Jun 20, 2025
68a0db0
Update change files
ekluzek Jun 20, 2025
231e79d
Fix a couple ctsm_sci tests that were failing as they need nofiremis …
ekluzek Jun 20, 2025
7a728dd
Draft ChangeLog/ChangeSum
slevis-lmwg Jun 20, 2025
4a5dfb5
Bring back gen_mksurfdata_namelist.xml from ctsm5.3.058
slevis-lmwg Jun 20, 2025
f85c0b8
Small update to the ChangeLog
slevis-lmwg Jun 20, 2025
2b321d1
Adjust some tests as per #2863 adding a few more to aux_cime_baseline…
ekluzek Jun 21, 2025
e8e5ea6
Add an izumi_nag mpi-serial non-DEBUG test for aux_clm and prealpha
ekluzek Jun 21, 2025
9a3b98e
Actually we don't want any non-DEBUG izumi_nag tests
ekluzek Jun 22, 2025
c9fbb84
Add some tests to aux_cime_baselines to cover more build types
ekluzek Jun 22, 2025
96d06e1
Add a threaded derecho_gnu test to prebeta and aux_cime_baselines
ekluzek Jun 22, 2025
e8a7a05
Final update of change files
ekluzek Jun 23, 2025
586286b
Merge pull request #2950 from ESCOMP/cesm3_0_beta04_changes
ekluzek Jun 23, 2025
3d3d182
Merge tag 'ctsm5.3.059' into prelim_upd_ctsm54_defaults
slevis-lmwg Jun 23, 2025
a1df199
Add ISSP245 test to expected failures
slevis-lmwg Jun 23, 2025
2458ed9
Update ChangeLog
slevis-lmwg Jun 23, 2025
33b80b6
Revisions addressing code review
slevis-lmwg Jun 24, 2025
5e894e2
Update ChangeLog/ChangeSum
slevis-lmwg Jun 24, 2025
7788b6b
Merge pull request #3268 from slevis-lmwg/prelim_upd_ctsm54_defaults
slevis-lmwg Jun 25, 2025
4af8cbc
Merge tag 'ctsm5.3.060' into merge-b4bdev-20250625
slevis-lmwg Jun 25, 2025
b2330f4
Update ChangeLog and ChangeSum
slevis-lmwg Jun 26, 2025
4c379f2
Merge pull request #3283 from slevis-lmwg/merge-b4bdev-20250625
slevis-lmwg Jun 26, 2025
21eb393
Merge tag 'ctsm5.3.061' into merge-master-20250626
slevis-lmwg Jun 26, 2025
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
25 changes: 25 additions & 0 deletions .github/workflows/check-clm6-aliases.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e

# Check that clm6* compset aliases return CLM6* longnames

# Change to top level of clone
cd "$(git rev-parse --show-toplevel)"

# Check that query_config can run without error
cime/scripts/query_config --compsets 1>/dev/null

# Find bad compsets
OLD_IFS=$IFS
IFS='\n'
set +e
# Relies on case sensitivity here: Alias should have Clm6 and longname should have CLM6
bad_compsets="$(cime/scripts/query_config --compsets | sort | uniq | grep Clm6 | grep -v CLM6)"
set -e
if [[ "${bad_compsets}" != "" ]]; then
echo "One or more compsets with Clm6 alias but not CLM6 longname:" >&2
echo $bad_compsets >&2
exit 1
fi

exit 0
40 changes: 40 additions & 0 deletions .github/workflows/check-clm6-aliases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check that clm6* compset aliases return CLM6* longnames
# Only check files in our repo that AREN'T in submodules
# Use a Python command to check each file because xmllint isn't available on GH runners

on:
push:
# Run when a change to these files is pushed to any branch. Without the "branches:" line, for some reason this will be run whenever a tag is pushed, even if the listed files aren't changed.
branches: ['*']
paths:
- '.github/workflows/check-clm6-aliases.sh'
- 'cime/**'
- 'cime_config/config_compsets.xml'

pull_request:
# Run on pull requests that change the listed files
paths:
- '.github/workflows/check-clm6-aliases.sh'
- 'cime/**'
- 'cime_config/config_compsets.xml'

workflow_dispatch:

jobs:
check-clm6-aliases:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout submodules
run: |
bin/git-fleximod update

- name: Install xmllint for CIME
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends -y libxml2-utils

- name: Check aliases
run: |
.github/workflows/check-clm6-aliases.sh
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/MOSART

[submodule "mizuRoute"]
path = components/mizuRoute
url = https://github.com/ESCOMP/mizuRoute
path = components/mizuroute
url = https://github.com/ESCOMP/mizuRoute
fxtag = cesm-coupling.n03_v2.2.0
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ components/cmeps -------------------- CESM top level driver (for NUOPC driver [w
components/cdeps -------------------- CESM top level data model shared code (for NUOPC driver).
components/cism --------------------- CESM Community land Ice Sheet Model.
components/mosart ------------------- Model for Scale Adaptive River Transport
components/mizuRoute ---------------- Reached based river transport model for water routing
components/mizuroute ---------------- Reached based river transport model for water routing
(allows both gridded river and Hydrologic Responce Unit river grids)
components/rtm ---------------------- CESM River Transport Model.

Expand Down
124 changes: 64 additions & 60 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,7 @@ sub process_namelist_inline_logic {
setup_logic_cnmatrix($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref);
setup_logic_spinup($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_supplemental_nitrogen($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_c_isotope($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_snowpack($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_fates($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_z0param($opts, $nl_flags, $definition, $defaults, $nl);
Expand Down Expand Up @@ -1737,7 +1738,6 @@ sub process_namelist_inline_logic {
# namelist group: ch4par_in #
###############################
setup_logic_methane($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_c_isotope($opts, $nl_flags, $definition, $defaults, $nl);

###############################
# namelist group: ndepdyn_nml #
Expand Down Expand Up @@ -3175,10 +3175,11 @@ sub setup_logic_do_grossunrep {

my $var = 'do_grossunrep';

# Start by assuming a default value of '.true.'. Then check a number of
# Start by assuming a default value of '.false.'. Then check a number of
# conditions under which do_grossunrep cannot be true. Under these
# conditions: (1) set default value to '.false.'; (2) make sure that the
# conditions: (1) set default value to '.false.' again; (2) make sure that the
# value is indeed false (e.g., that the user didn't try to set it to true).
# Ideally the default value would be set in namelist_defaults

my $default_val = ".false.";

Expand Down Expand Up @@ -3703,63 +3704,53 @@ sub setup_logic_c_isotope {
#
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_c13', 'bgc_mode'=>$nl_flags->{'bgc_mode'}, 'phys'=>$nl_flags->{'phys'});
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_c14', 'bgc_mode'=>$nl_flags->{'bgc_mode'}, 'phys'=>$nl_flags->{'phys'});
my $use_c13 = $nl->get_value('use_c13');
my $use_c14 = $nl->get_value('use_c14');
if ( $nl_flags->{'bgc_mode'} ne "sp" && $nl_flags->{'bgc_mode'} ne "fates" ) {
if ( $nl_flags->{'bgc_mode'} ne "bgc" ) {
if ( defined($use_c13) && &value_is_true($use_c13) ) {
if ( &value_is_true($use_c13) ) {
$log->warning("use_c13 is ONLY scientifically validated with the bgc=BGC configuration" );
}
if ( defined($use_c14) && &value_is_true($use_c14) ) {
if ( &value_is_true($use_c14) ) {
$log->warning("use_c14 is ONLY scientifically validated with the bgc=BGC configuration" );
}
}
if ( defined($use_c14) ) {
if ( &value_is_true($use_c14) ) {
my $use_c14_bombspike = $nl->get_value('use_c14_bombspike');
if ( defined($use_c14_bombspike) && &value_is_true($use_c14_bombspike) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'atm_c14_filename',
'use_c14'=>$use_c14, 'use_cn'=>$nl_flags->{'use_cn'}, 'use_c14_bombspike'=>$nl->get_value('use_c14_bombspike'),
'ssp_rcp'=>$nl_flags->{'ssp_rcp'} );
}
} else {
if ( defined($nl->get_value('use_c14_bombspike')) ||
defined($nl->get_value('atm_c14_filename')) ) {
$log->fatal_error("use_c14 is FALSE and use_c14_bombspike or atm_c14_filename set");
}
if ( &value_is_true($use_c14) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_c14_bombspike', 'bgc_mode'=>$nl_flags->{'bgc_mode'}, 'phys'=>$nl_flags->{'phys'});
my $use_c14_bombspike = $nl->get_value('use_c14_bombspike');
if ( &value_is_true($use_c14_bombspike) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'atm_c14_filename',
'use_c14'=>$use_c14, 'use_cn'=>$nl_flags->{'use_cn'}, 'use_c14_bombspike'=>$nl->get_value('use_c14_bombspike'),
'ssp_rcp'=>$nl_flags->{'ssp_rcp'} );
}
} else {
if ( defined($nl->get_value('use_c14_bombspike')) ||
defined($nl->get_value('atm_c14_filename')) ) {
$log->fatal_error("use_c14 NOT set to .true., but use_c14_bompspike/atm_c14_filename defined.");
$log->fatal_error("use_c14 is FALSE and use_c14_bombspike or atm_c14_filename set");
}
}
if ( defined($use_c13) ) {
if ( &value_is_true($use_c13) ) {
my $use_c13_timeseries = $nl->get_value('use_c13_timeseries');
if ( defined($use_c13_timeseries) && &value_is_true($use_c13_timeseries) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'atm_c13_filename',
'use_c13'=>$use_c13, 'use_cn'=>$nl_flags->{'use_cn'}, 'use_c13_timeseries'=>$nl->get_value('use_c13_timeseries'),
'ssp_rcp'=>$nl_flags->{'ssp_rcp'} );
}
} else {
if ( defined($nl->get_value('use_c13_timeseries')) ||
defined($nl->get_value('atm_c13_filename')) ) {
$log->fatal_error("use_c13 is FALSE and use_c13_timeseries or atm_c13_filename set");
}
if ( &value_is_true($use_c13) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_c13_timeseries', 'bgc_mode'=>$nl_flags->{'bgc_mode'}, 'phys'=>$nl_flags->{'phys'});
my $use_c13_timeseries = $nl->get_value('use_c13_timeseries');
if ( &value_is_true($use_c13_timeseries) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'atm_c13_filename',
'use_c13'=>$use_c13, 'use_cn'=>$nl_flags->{'use_cn'}, 'use_c13_timeseries'=>$nl->get_value('use_c13_timeseries'),
'ssp_rcp'=>$nl_flags->{'ssp_rcp'} );
}
} else {
if ( defined($nl->get_value('use_c13_timeseries')) ||
defined($nl->get_value('atm_c13_filename')) ) {
$log->fatal_error("use_c13 NOT set to .true., but use_c13_bompspike/atm_c13_filename defined.");
$log->fatal_error("use_c13 is FALSE and use_c13_timeseries or atm_c13_filename set");
}
}
} else {
if ( defined($use_c13) ||
defined($use_c14) ||
defined($nl->get_value('use_c14_bombspike')) ||
if ( &value_is_true($use_c13) ||
&value_is_true($use_c14) ||
&value_is_true($nl->get_value('use_c14_bombspike')) ||
defined($nl->get_value('atm_c14_filename')) ||
defined($nl->get_value('use_c13_timeseries')) ||
&value_is_true($nl->get_value('use_c13_timeseries')) ||
defined($nl->get_value('atm_c13_filename')) ) {
$log->fatal_error("bgc=sp and C isotope namelist variables were set, both can't be used at the same time");
}
Expand Down Expand Up @@ -4071,7 +4062,16 @@ sub setup_logic_fire_emis {
if ( &value_is_true( $nl_flags->{'use_fates'} ) ) {
$log->warning("Fire emission option $var can NOT be on when FATES is also on.\n" .
" DON'T use the '--fire_emis' option when '--bgc fates' is activated");
}
} elsif ( ! &value_is_true( $nl_flags->{'use_cn'} ) ) {
$log->fatal_error("Fire emission option $var can NOT be on when BGC SP (i.e. Satellite Phenology) is also on.\n" .
" DON'T use the '--fire_emis' option when '--bgc sp' is activated");
} elsif ( &value_is_true( $nl_flags->{'use_cn'}) ) {
my $fire_method = remove_leading_and_trailing_quotes( $nl->get_value('fire_method') );
if ( $fire_method eq "nofire" ) {
$log->fatal_error("Fire emission option $var can NOT be on with BGC and fire_method=='nofire'.\n" .
" DON'T use the '--fire_emis' option when fire_method is nofire");
}
}
}
}
}
Expand Down Expand Up @@ -4235,7 +4235,7 @@ sub setup_logic_lai_streams {
if ( &value_is_true($nl_flags->{'use_crop'}) && &value_is_true($nl->get_value('use_lai_streams')) ) {
$log->fatal_error("turning use_lai_streams on is incompatable with use_crop set to true.");
}
if ( $nl_flags->{'bgc_mode'} eq "sp" || ($nl_flags->{'bgc_mode'} eq "fates" && &value_is_true($nl->get_value('use_fates_sp')) )) {
if ( $nl_flags->{'bgc_mode'} eq "sp" || ($nl_flags->{'bgc_mode'} eq "fates" && &value_is_true($nl_flags->{'use_fates_sp'}) )) {
if ( &value_is_true($nl->get_value('use_lai_streams')) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_lai_streams');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'lai_mapalgo',
Expand Down Expand Up @@ -4749,29 +4749,26 @@ sub setup_logic_fates {
# For FATES SP mode make sure no-competetiion, and fixed-biogeography are also set
# And also check for other settings that can't be trigged on as well
#
my $var = "use_fates_sp";
if ( defined($nl->get_value($var)) ) {
if ( &value_is_true($nl->get_value($var)) ) {
my @list = ( "use_fates_nocomp", "use_fates_fixed_biogeog" );
foreach my $var ( @list ) {
if ( ! &value_is_true($nl->get_value($var)) ) {
$log->fatal_error("$var is required when FATES SP is on (use_fates_sp)" );
}
}
# spit-fire can't be on with FATES SP mode is active
if ( $nl->get_value('fates_spitfire_mode') > 0 ) {
$log->fatal_error('fates_spitfire_mode can NOT be set to greater than 0 when use_fates_sp is true');
}
if ( &value_is_true($nl_flags->{'use_fates_sp'}) ) {
my @list = ( "use_fates_nocomp", "use_fates_fixed_biogeog" );
foreach my $var ( @list ) {
if ( ! &value_is_true($nl->get_value($var)) ) {
$log->fatal_error("$var is required when FATES SP is on (use_fates_sp)" );
}
}
# spit-fire can't be on with FATES SP mode is active
if ( $nl->get_value('fates_spitfire_mode') > 0 ) {
$log->fatal_error('fates_spitfire_mode can NOT be set to greater than 0 when use_fates_sp is true');
}

# fates landuse can't be on with FATES SP mode is active
if ( &value_is_true($nl->get_value('use_fates_luh')) ) {
$log->fatal_error('use_fates_luh can NOT be true when use_fates_sp is true');
}
# fates landuse can't be on with FATES SP mode is active
if ( &value_is_true($nl->get_value('use_fates_luh')) ) {
$log->fatal_error('use_fates_luh can NOT be true when use_fates_sp is true');
}

# hydro isn't currently supported to work when FATES SP mode is active
if (&value_is_true( $nl->get_value('use_fates_planthydro') )) {
$log->fatal_error('fates sp mode is currently not supported to work with fates hydro');
}
# hydro isn't currently supported to work when FATES SP mode is active
if (&value_is_true( $nl->get_value('use_fates_planthydro') )) {
$log->fatal_error('fates sp mode is currently not supported to work with fates hydro');
}
}
my $var = "use_fates_inventory_init";
Expand All @@ -4796,6 +4793,13 @@ sub setup_logic_fates {
}
}
}
# Check that both FaTES-SP and FATES ST3 aren't both on
my $var = "use_fates_ed_st3";
if ( defined($nl->get_value($var)) ) {
if ( &value_is_true($nl->get_value($var)) && &value_is_true($nl_flags->{'use_fates_sp'}) ) {
$log->fatal_error("$var can NOT also be true with use_fates_sp true" );
}
}
# check that fates landuse change mode has the necessary luh2 landuse timeseries data
# and add the default if not defined. Do not add default if use_fates_potentialveg is true.
# If fixed biogeography is on, make sure that flandusepftdat is avilable.
Expand Down
Loading
Loading