Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
a999afb
big commit
lifang0209 May 30, 2025
88a32eb
Include abm = 13 values when determining dominant abm in mksurfdata_esmf
slevis-lmwg Jun 4, 2025
7477372
Change unsetmon from 13 to 14
slevis-lmwg Jun 4, 2025
16a1921
Adding comments explaining some of mkagfirepkmonthMod.F90
slevis-lmwg Jun 4, 2025
7d7a49e
mkagfirepkmonthMod: Add some TODOs.
samsrabin Jun 5, 2025
7f28c6f
Remove unsetmon as recommended in the code review
slevis-lmwg Jun 5, 2025
1469512
Document more variables as recommended in the code review
slevis-lmwg Jun 5, 2025
f70e958
Merge tag 'ctsm5.3.055' into abm_dominant_in_mksurfdata_esmf
slevis-lmwg Jun 5, 2025
27259b1
Update paths in gen_mksurfdata_namelist.xml and get mods from #3224
slevis-lmwg Jun 6, 2025
b9feb79
Merge remote-tracking branch 'escomp/alpha-ctsm5.4.CMIP7' into abm_do…
slevis-lmwg Jun 13, 2025
ff3bc9e
Correct a message to the user in gen_mksurfdata_jobscript_*.py files
slevis-lmwg Jun 13, 2025
bd3ce96
Corrections to messages to the user
slevis-lmwg Jun 13, 2025
5d426ba
Refine message to the user
slevis-lmwg Jun 13, 2025
bd0c628
Bring back unsetmon but equal to 14 for ocean to not skew the regridding
slevis-lmwg Jun 17, 2025
9e5c37b
Merge branch 'abm_dominant_in_mksurfdata_esmf' into mk_ctsm54_datasets
slevis-lmwg Jun 17, 2025
fd503dc
Merge remote-tracking branch 'samsrabin/subset_data-lon-fixes' into m…
slevis-lmwg Jun 17, 2025
f84e650
Update Makefile and .cfg file to accommodate changes in subset_data
slevis-lmwg Jun 18, 2025
7fc50e4
Merge pull request #3224 from slevis-lmwg/abm_dominant_in_mksurfdata_…
slevis-lmwg Jun 18, 2025
c106c33
Correct inadvertent conflict that crept in with one of the merges
slevis-lmwg Jun 18, 2025
f6a903e
Update to new abm raw dataset provided today by Fang Li
slevis-lmwg Jul 15, 2025
4f71910
Merge tag 'ctsm5.3.063' into alpha-ctsm5.4.CMIP7
slevis-lmwg Jul 22, 2025
b38e5f8
Merge pull request #3344 from slevis-lmwg/merge_master_to_alpha
slevis-lmwg Jul 22, 2025
9790364
Merge tag 'ctsm5.3.063' into mk_ctsm54_datasets
slevis-lmwg Jul 22, 2025
d3cf177
Update default popdens stream file
slevis-lmwg Jul 22, 2025
bf0cb1c
Merge tag 'alpha-ctsm5.4.CMIP7.03.ctsm5.3.063' into mk_ctsm54_datasets
slevis-lmwg Jul 23, 2025
fd3c96b
Merge pull request #3233 from slevis-lmwg/mk_ctsm54_datasets
slevis-lmwg Jul 23, 2025
a945178
Urban mesh was pointing to a 3x3min instead of a 0.25x0.25 file
slevis-lmwg Jul 23, 2025
d10ee57
Merge pull request #3347 from slevis-lmwg/urban_mesh_correction
slevis-lmwg Jul 23, 2025
473db81
Add ctsm54 ne30, f09, f19 fsurdat/landuse files to namelist defaults
slevis-lmwg Jul 24, 2025
2b9a05b
Merge pull request #3349 from slevis-lmwg/upd_nml_default_fsurdat_lan…
slevis-lmwg Jul 24, 2025
d6f97ff
New hdm stream file should be used only with clm6 by default
slevis-lmwg Jul 25, 2025
1f19dbb
Merge pull request #3361 from slevis-lmwg/new_hdm_clm6_only
slevis-lmwg Jul 25, 2025
66b83d1
Remove 64bitoffset suffix from finidat to use the unmodified files
slevis-lmwg Jul 25, 2025
204198a
Remove LII2 tests from expected fails
slevis-lmwg Jul 25, 2025
1483483
Merge pull request #3362 from slevis-lmwg/fix_failing_LII2_tests
slevis-lmwg Jul 25, 2025
16e5391
Merge pull request #3406 from slevis-lmwg/megan_use_gamma_sm_false
slevis-lmwg Aug 11, 2025
d67ed0c
Merge remote-tracking branch 'escomp/alpha-ctsm5.4.CMIP7' into ctsm6_…
samsrabin Aug 12, 2025
5cc650a
defo_fire_precip_thresh_bet now 3.0 for li2024crujra.
samsrabin Aug 12, 2025
b1a9acd
cropfire_a1 now 0.32 for li2024crujra.
samsrabin Aug 12, 2025
dec8131
CNFireLi2024Mod: Improve comments.
samsrabin Aug 12, 2025
cfb4648
cli_scale updated for li2024* fire methods.
samsrabin Aug 12, 2025
8fa0747
Set init_interp_fill_missing_urban_with_HD = .true. always
slevis-lmwg Aug 15, 2025
0991175
Merge pull request #3419 from slevis-lmwg/init_interp_fill_missing_ur…
slevis-lmwg Aug 16, 2025
1fec91a
Merge remote-tracking branch 'samsrabin/b4b-dev-merge-20250822' into …
samsrabin Aug 22, 2025
57c4a15
Update clm6_0 paramfile with Fang's fire changes.
samsrabin Aug 22, 2025
baa7660
CNFireLi2024Mod: Delete ">10% crop" condition.
samsrabin Aug 22, 2025
71f9680
li2024crujra cropfire_a1: was 0.32, now 0.34.
samsrabin Aug 22, 2025
365e10b
Merge tag 'alpha-ctsm5.4.CMIP7.09.ctsm5.3.068' into ctsm6_li2024
samsrabin Aug 22, 2025
9c59d7e
namelist_defaults_ctsm.xml: Group stream_fldfilename_cultivar_gdds li…
samsrabin Aug 25, 2025
f4694d7
Update default stream_fldfilename_cultivar_gdds.
samsrabin Aug 25, 2025
bfd9e64
Merge tag 'ctsm5.3.071' into ctsm5.4_update5.3.071
ekluzek Aug 30, 2025
d526c5a
Merge pull request #3464 from ekluzek/ctsm5.4_update5.3.071
slevis-lmwg Sep 8, 2025
3123c32
Merge tag 'alpha-ctsm5.4.CMIP7.09.ctsm5.3.071' into ctsm6_li2024
samsrabin Sep 9, 2025
6c08359
Add LII2FINIDATAREAS tests to expected fails.
samsrabin Sep 9, 2025
ab03812
Add ISSP test to expected fails.
samsrabin Sep 9, 2025
1b214aa
Merge tag 'alpha-ctsm5.4.CMIP7.09.ctsm5.3.071' into make_ctsm54_datasets
slevis-lmwg Sep 9, 2025
32a4310
Merge pull request #3204 from lifang0209/ctsm6_li2024
samsrabin Sep 9, 2025
30006c4
Merge tag 'alpha-ctsm5.4.CMIP7.10.ctsm5.3.071' into crujra-crop-inputs
samsrabin Sep 9, 2025
77f0580
Failed attempt to fix stream_fldfilename_cultivar_gdds logic.
samsrabin Sep 10, 2025
f28f74c
Fix stream_fldfilename_cultivar_gdds logic.
samsrabin Sep 10, 2025
70e89cc
Fix stream_fldfilename_cultivar_gdds logic???
samsrabin Sep 10, 2025
5e41f47
Revert failed attempts to fix stream_fldfilename_cultivar_gdds logic.
samsrabin Sep 10, 2025
e7fa6e5
cropcals_rx_adapt fallback to correct stream_fldfilename_cultivar_gdds.
samsrabin Sep 10, 2025
e69570a
Update Makefile/_multi.py to accommodate new fsurdat/landuse needs
slevis-lmwg Sep 10, 2025
86331ef
ClmBuildNamelist: Add lnd_tuning_mode to stream_fldfilename_cultivar_…
samsrabin Sep 10, 2025
4faa434
Merge tag 'alpha-ctsm5.4.CMIP7.10.ctsm5.3.071' into make_ctsm54_datasets
slevis-lmwg Sep 10, 2025
7d2e398
Merge pull request #3474 from samsrabin/crujra-crop-inputs
samsrabin Sep 11, 2025
0247d55
Update Makefile/_multi.py for fsurdat/landuse updates in ctsm54 (part 2)
slevis-lmwg Sep 12, 2025
ffede38
Rm unnecessary 400pt_sparse grid from gen_mksurfdata_jobscript_multi.py
slevis-lmwg Sep 15, 2025
7b6a268
Makefile corrections after first test of `make all` (part 1)
slevis-lmwg Sep 15, 2025
98ee059
Makefile / _multi.py updates after first test of 'make all' (part 2)
slevis-lmwg Sep 17, 2025
60e1907
Makefile / _multi.py updates after first test of 'make all' (part 3)
slevis-lmwg Sep 17, 2025
8c7a0de
Add input_pftdata_filename variable to landuse.timeseries files
slevis-lmwg Sep 17, 2025
883012b
Update README.md with how to turn on DEBUG in mksurfdata_esmf
slevis-lmwg Sep 17, 2025
889bb38
Merge tag 'alpha-ctsm5.4.CMIP7.11.ctsm5.3.071' into make_ctsm54_datasets
slevis-lmwg Sep 17, 2025
136c42a
Merge tag 'ctsm5.3.075' into upd_54branch_to_075
slevis-lmwg Sep 18, 2025
14cab8a
Add new expected failure for issue #3495
slevis-lmwg Sep 19, 2025
ffbdcb4
Merge pull request #3493 from slevis-lmwg/upd_54branch_to_075
slevis-lmwg Sep 19, 2025
70e778b
Merge tag 'alpha-ctsm5.4.CMIP7.11.ctsm5.3.075' into make_ctsm54_datasets
slevis-lmwg Sep 19, 2025
e66386b
Introduce cmip_era flag (= cmip6 or cmip7) to namelist_defaults
slevis-lmwg Sep 24, 2025
0f4808c
Introduce CLM_CMIP_ERA flag to env_run.xml (= cmip6 or cmip7)
slevis-lmwg Sep 24, 2025
a30efab
Remove newly introduced namelist_defaults_cmip_era.xml
slevis-lmwg Sep 26, 2025
f408835
Add cmip7 flag also for historical landuse files (f09, f19, ne30)
slevis-lmwg Sep 26, 2025
0cf3e80
Add the cmip_era flag to all fsurdat/landuse add_default calls
slevis-lmwg Sep 26, 2025
6101487
Rm previously expected failures requiring finidat with c13/c14 to PASS
slevis-lmwg Sep 30, 2025
3a0870f
Rm another expected failure that required finidat with c13/c14 to PASS
slevis-lmwg Sep 30, 2025
db3540d
Mention CLM_CMIP_ERA in namelist error message for easier debugging
slevis-lmwg Oct 1, 2025
3b15fbc
namelist_defaults updates for better error catching
slevis-lmwg Oct 1, 2025
1283fb7
Remove another expected failure documented in issue #1733
slevis-lmwg Oct 1, 2025
14f647d
Remove expected failure in MODEL_BUILD documented in issue #3182
slevis-lmwg Oct 1, 2025
6c8128a
Add details to CLM_CMIP_ERA documentation in env_run.xml
slevis-lmwg Oct 2, 2025
a812454
Add back the cmip6 flanduse defaults for f09, f19, ne30
slevis-lmwg Oct 2, 2025
968eb7b
Add back the cmip6 fsurdat default for f09 2000
slevis-lmwg Oct 2, 2025
d4af81e
Add another detail to the CLM_CMIP_ERA documentation in env_run.xml
slevis-lmwg Oct 2, 2025
7bf8c5b
Add same details to the cmip_era documentation in namelist_definition
slevis-lmwg Oct 2, 2025
edf26a7
Put back use_init_interp that I removed in 71f2db2
slevis-lmwg Oct 2, 2025
26d8088
Remove SSP test from expected fails
slevis-lmwg Oct 2, 2025
c429f5f
Changing build-namelist_test.pl; corresponding bug-fix in nml defaults
slevis-lmwg Oct 8, 2025
db26aaa
Fix 2 build-namelist tests that started failing in ctsm5.3.032
slevis-lmwg Oct 9, 2025
f16276d
Rename 2nd inventoryfileDNE test to useFATESLUH2fileDNE
slevis-lmwg Oct 9, 2025
8100fa8
Resolve build-namelist tests, though not all, yet
slevis-lmwg Oct 9, 2025
3beef40
Resolved remaining fails (except 2 expected ones) in build-namelist
slevis-lmwg Oct 9, 2025
807040d
Change from "if a equals b" to "if a contains b" where b are SSP cases
slevis-lmwg Oct 13, 2025
826cee4
Add LAI streams test to expected fails for now
slevis-lmwg Oct 13, 2025
2e271ca
Remove unnecessary change to namelist_definition_ctsm.xml
slevis-lmwg Oct 13, 2025
92dd6d5
Add comment explaining why I split hist-ne3 into three separate jobs
slevis-lmwg Oct 14, 2025
c3e1ca1
Point to corrected raw lai file and correspondng soil color file
slevis-lmwg Oct 14, 2025
5a09596
Added back 1x1_brazil_transient to the mksurfdata_esmf Makefile
slevis-lmwg Oct 14, 2025
2ea100a
Revert c3e1ca1 "Point to corrected raw lai file and corresp. soil color"
slevis-lmwg Oct 14, 2025
4ff9e68
New and updated comments pertaining to CLM_CMIP_ERA
slevis-lmwg Oct 14, 2025
e19a51e
Merge pull request #3501 from slevis-lmwg/cmip_era_support
slevis-lmwg Oct 14, 2025
11235f4
Merge remote-tracking branch 'escomp/alpha-ctsm5.4.CMIP7' into make_c…
slevis-lmwg Oct 14, 2025
21c9a87
Merge tag 'ctsm5.3.079' into make_ctsm54_datasets
slevis-lmwg Oct 14, 2025
92ee1a1
Point to corrected raw lai file and corresp. soil color file
slevis-lmwg Oct 15, 2025
f1ea888
Correction to soilcolor file name
slevis-lmwg Oct 15, 2025
e64f426
Upd. to latest 1700-2023 & noanthro landuse files
slevis-lmwg Oct 16, 2025
bbc9e40
Add test back to expected failures (issue #1733)
slevis-lmwg Oct 16, 2025
6a5ecfe
Merge tag 'ctsm5.3.079' into upd_alpha54_to_079
slevis-lmwg Oct 16, 2025
37ae51e
Stop NOANTHRO from defaulting to cmip_era cmip6
slevis-lmwg Oct 17, 2025
f4f59ca
Merge branch 'make_ctsm54_datasets' into new_raw_lai_and_soilcolor
slevis-lmwg Oct 17, 2025
2cca29a
Merge pull request #3554 from slevis-lmwg/upd_alpha54_to_079
slevis-lmwg Oct 17, 2025
157d3ae
Merge branch 'alpha-ctsm5.4.CMIP7' into make_ctsm54_datasets
slevis-lmwg Oct 17, 2025
b9b9c73
Merge pull request #3482 from slevis-lmwg/make_ctsm54_datasets
slevis-lmwg Oct 17, 2025
eb4c385
Merge branch 'alpha-ctsm5.4.CMIP7' into new_raw_lai_and_soilcolor
slevis-lmwg Oct 17, 2025
5399e09
Change VR and ne120 year range from 1979-2030 to 1979-2023
slevis-lmwg Oct 17, 2025
ad3b2c9
Upd. to ccs_config_cesm1.0.61_add_domain_ne3np4.pg2_1 to gen. datasets
slevis-lmwg Oct 20, 2025
fb4306b
Add comments as recommended in code review
slevis-lmwg Oct 21, 2025
7e9c184
Merge pull request #3555 from slevis-lmwg/new_raw_lai_and_soilcolor
slevis-lmwg Oct 22, 2025
6c1cc2d
CTSM5.4 updates to default_data_[1850,2000].cfg & modify_smallville.sh
slevis-lmwg Oct 23, 2025
637c86b
Merge pull request #3562 from slevis-lmwg/make_all_subset
slevis-lmwg Oct 23, 2025
1a3fe3f
Merge tag 'ctsm5.3.082' into upd_alpha54_to_082
slevis-lmwg Oct 27, 2025
8e669a4
Merge pull request #3569 from slevis-lmwg/upd_alpha54_to_082
slevis-lmwg Oct 28, 2025
05baeec
Prevent IHist ne0np4 from ending up with SSP designation
slevis-lmwg Oct 28, 2025
a94b45f
Update fsurdat/landuse paths in namelist_defaults (WIP)
slevis-lmwg Oct 28, 2025
7fa5d7a
Merge tag 'alpha-ctsm5.4.CMIP7.15.ctsm5.3.082' into upd_nml_defaults_…
slevis-lmwg Oct 28, 2025
8325e76
Add/remove fsurdat/landuse paths according to the grids spreadsheet
slevis-lmwg Oct 29, 2025
a41b9c5
CTSM5.4 updates to finidata (not all tests pass so troubleshooting)
slevis-lmwg Oct 30, 2025
ad7251d
hgrid="10x15" needed cmip6/cmip7 distinction for tests to pass
slevis-lmwg Oct 30, 2025
9104e37
Add back use_init_interp for failing f09 test, ne30 test
slevis-lmwg Oct 31, 2025
db6c43f
Additions in prep for the next PR where we add tests for new grids
slevis-lmwg Oct 31, 2025
2f70dc3
Merge pull request #3576 from slevis-lmwg/upd_nml_defaults_ctsm54
slevis-lmwg Nov 6, 2025
a11cede
Add ctsm_sci tests for new grids (ctsm5.4)
slevis-lmwg Nov 6, 2025
6d702a2
namelist_defaults updates for ne120pg3 to pick up correct finidat
slevis-lmwg Nov 7, 2025
cc4ba82
Add IHist test for the new ne3pg2 grid
slevis-lmwg Nov 10, 2025
bc311fc
Merge tag 'ctsm5.3.085' into merge-master-20251114
slevis-lmwg Nov 14, 2025
01a7a64
Merge pull request #3610 from slevis-lmwg/merge-master-20251114
slevis-lmwg Nov 14, 2025
69453b7
finidat update from code review, plus a typo correction
slevis-lmwg Nov 14, 2025
ff015ae
Merge pull request #3587 from slevis-lmwg/ctsm_sci_tests_for_new_grids
slevis-lmwg Nov 14, 2025
aae49a0
fsurdat validation tool
slevis-lmwg Nov 14, 2025
eca1eb0
Revised validation tool based on Erik's code review
slevis-lmwg Nov 18, 2025
a5b18cc
Merge pull request #3612 from slevis-lmwg/fsurdat_validation_tool
slevis-lmwg Nov 18, 2025
d371cfe
Bring back a hardcoded mesh file of a half degree grid
ekluzek Nov 19, 2025
1e1ee1a
Remove whitespace at the end of lines, and add a subroutine to check …
ekluzek Nov 19, 2025
e584244
Correct the assert taking into account that begg is 1
ekluzek Nov 19, 2025
fe66c55
Run the check on the size of the stream pointer data
ekluzek Nov 19, 2025
1d8b770
Change namelist_defaults so lii2 tests pick up correct finidats
slevis-lmwg Nov 19, 2025
e684a9b
Remove VEGWP[LN,PD] from restarts for lii2 tests to pass
slevis-lmwg Nov 19, 2025
88025fa
Add the stream Advance in the StreamInit phase, so that data will be …
ekluzek Nov 19, 2025
5da18e3
Add taxmode and tintalgo namelist control for C13/C14
ekluzek Nov 19, 2025
d8c845b
Add namelist control of stream_meshfile_atm_c14
ekluzek Nov 19, 2025
2070a83
Correct datatypes of new namelist streams items, fix CheckPtrSize so …
ekluzek Nov 19, 2025
57b8fbf
Merge remote-tracking branch 'escomp/b4b-dev' into carbon_isotopes_in…
ekluzek Nov 19, 2025
aaf6f82
Put VEGWP[LN,PD] back on restart (= revert e684a9b) + rm from history
slevis-lmwg Nov 20, 2025
454d23c
Add handling for all the carbon isotope namelist variables
ekluzek Nov 20, 2025
bcca9ad
Correct c13 filename
ekluzek Nov 21, 2025
d08cb28
Comment out CMIP6 Carbon isotope option, so can test with the new CMI…
ekluzek Nov 21, 2025
78b8dd2
Fix model_year align to stream_model_year_align for carbon isotopes
ekluzek Nov 21, 2025
50fd113
Remove comments so it goes back to the standard namelist for CMIP6 c-…
ekluzek Nov 21, 2025
3529f60
Add a note about the limitations of this test
ekluzek Nov 21, 2025
0cb5592
Update bld/CLMBuildNamelist.pm
ekluzek Nov 21, 2025
3387aeb
Update bld/namelist_files/namelist_defaults_ctsm.xml
ekluzek Nov 21, 2025
8db2e53
Rm use_init_interp=.T. from files clmi.f09_interp... & clmi.f19_twice...
slevis-lmwg Nov 21, 2025
24fff08
Move c14 to the final place as Sam L pointed out in review
ekluzek Nov 21, 2025
10f4cfb
Add a fail test for stream_meshfile_atm_c14==none that properly fails…
ekluzek Nov 21, 2025
7a27d02
Die with warning if you are using the c14 stream file, but meshfile i…
ekluzek Nov 21, 2025
1e6a5f1
Add ignore warnings to this test that isn't quite right
ekluzek Nov 21, 2025
6eb4558
Merge branch 'carbon_isotopes_in_streams' of github.com:ekluzek/CTSM …
ekluzek Nov 21, 2025
a5136fc
File path and name updated to ctsm5.4 values for unit test to PASS
slevis-lmwg Nov 22, 2025
30f7c9e
Correct mapalgo for c13 and add some error checking in
ekluzek Nov 22, 2025
f1f7bde
Add Check1DPtrSize to unit test stub
ekluzek Nov 22, 2025
1e70b0d
When meshfile is none, mapalgo needs to be set to none temporarily un…
ekluzek Nov 24, 2025
cd6a6c2
Merge pull request #3613 from slevis-lmwg/fix_lii2_tests
slevis-lmwg Nov 24, 2025
fabf7e4
Merge pull request #3627 from ekluzek/carbon_isotopes_in_streams
ekluzek Nov 24, 2025
b108ef3
Merge branch 'b4b-dev' into ciso_b4b_changes_to_ctsm5.4
ekluzek Nov 25, 2025
9116351
Merge remote-tracking branch 'escomp/alpha-ctsm5.4.CMIP7' into ciso_b…
ekluzek Nov 25, 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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
[submodule "ccs_config"]
path = ccs_config
url = https://github.com/ESMCI/ccs_config_cesm.git
fxtag = ccs_config_cesm1.0.61
fxtag = ccs_config_cesm1.0.61_add_domain_ne3np4.pg2_1
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
Expand Down
89 changes: 87 additions & 2 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,14 @@ sub setup_cmdl_resolution {
$log->verbose_message( "This is NOT a NEON site" );
}

#
# To determine CMIP era
# TODO slevis: Ideally this line would occupy a new subroutine, e.g.
# subr. process_envxml_flags that would get called from
# process_namelist_user_input. This would allow other such
# XML variables to be set in the same place in the future (issue #3547).
$nl_flags->{'cmip_era'} = $envxml_ref->{'CLM_CMIP_ERA'};

}

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -2367,6 +2375,7 @@ sub setup_logic_urban {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_hac');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_explicit_ac');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_traffic');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'init_interp_fill_missing_urban_with_HD');
}

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -2513,11 +2522,13 @@ sub setup_logic_demand {
# For landuse.timeseries try with crop on first eise try with exact settings
# Logic for this is identical for fsurdat
if ( $item eq "flanduse_timeseries" ) {
$settings{'cmip_era'} = $nl_flags->{'cmip_era'};
$settings{'use_crop'} = ".true.";
$settings{'nofail'} = 1;
}
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $item, %settings );
if ( $item eq "flanduse_timeseries" ) {
$settings{'cmip_era'} = $nl_flags->{'cmip_era'};
$settings{'nofail'} = 0;
$settings{'use_crop'} = $nl_flags->{'use_crop'};
if ( ! defined($nl->get_value( $item )) ) {
Expand Down Expand Up @@ -2567,6 +2578,7 @@ sub setup_logic_surface_dataset {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var,
'hgrid'=>$nl_flags->{'res'}, 'ssp_rcp'=>$nl_flags->{'ssp_rcp'},
'neon'=>$nl_flags->{'neon'}, 'neonsite'=>$nl_flags->{'neonsite'},
'cmip_era'=>$nl_flags->{'cmip_era'},
'sim_year'=>$nl_flags->{'sim_year'}, 'use_vichydro'=>$nl_flags->{'use_vichydro'},
'use_crop'=>".true.", 'use_fates'=>$nl_flags->{'use_fates'}, 'nofail'=>1);
}
Expand All @@ -2580,6 +2592,7 @@ sub setup_logic_surface_dataset {
'hgrid'=>$nl_flags->{'res'}, 'ssp_rcp'=>$nl_flags->{'ssp_rcp'}, 'use_vichydro'=>$nl_flags->{'use_vichydro'},
'sim_year'=>$nl_flags->{'sim_year'}, 'use_fates'=>$nl_flags->{'use_fates'},
'neon'=>$nl_flags->{'neon'}, 'neonsite'=>$nl_flags->{'neonsite'},
'cmip_era'=>$nl_flags->{'cmip_era'},
'use_crop'=>$nl_flags->{'use_crop'} );
}
#
Expand Down Expand Up @@ -3746,6 +3759,8 @@ sub setup_logic_c_isotope {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_c14',
'bgc_mode'=>$nl_flags->{'bgc_mode'}, 'phys'=>$nl_flags->{'phys'},
'lnd_tuning_mode'=>$nl_flags->{'lnd_tuning_mode'}, ssp_rcp=>$nl_flags->{'ssp_rcp'} );
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c13" );
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c14" );
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" ) {
Expand All @@ -3765,6 +3780,7 @@ sub setup_logic_c_isotope {
$use_c14_bombspike = $nl->get_value('use_c14_bombspike');
if ( &value_is_true($use_c14_bombspike) ) {
if ( defined($stream_fldfilename_atm_c14) ) {
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c14_bombspike" );
setup_logic_c14_streams($opts, $nl_flags, $definition, $defaults, $nl);
} else {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'atm_c14_filename',
Expand All @@ -3784,6 +3800,8 @@ sub setup_logic_c_isotope {
$log->fatal_error("use_c14 is FALSE and use_c14_bombspike, stream_fldfilename_atm_c14 or atm_c14_filename set");
}
}
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c14_bombspike" );

my $use_c13_timeseries = $nl->get_value('use_c13_timeseries');
my $stream_fldfilename_atm_c13 = $nl->get_value('stream_fldfilename_atm_c13');
my $atm_c13_filename = $nl->get_value('atm_c13_filename');
Expand All @@ -3792,6 +3810,7 @@ sub setup_logic_c_isotope {
$use_c13_timeseries = $nl->get_value('use_c13_timeseries');
if ( &value_is_true($use_c13_timeseries) ) {
if ( defined($stream_fldfilename_atm_c13) ) {
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c13_timeseries" );
setup_logic_c13_streams($opts, $nl_flags, $definition, $defaults, $nl);
} else {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'atm_c13_filename',
Expand Down Expand Up @@ -3823,6 +3842,8 @@ sub setup_logic_c_isotope {
$log->fatal_error("bgc=sp and C isotope namelist variables were set, both can't be used at the same time");
}
}
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c13_timeseries" );
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c13_bombspike" );
}

#-------------------------------------------------------------------------------
Expand All @@ -3832,6 +3853,23 @@ sub setup_logic_c13_streams {
#
# C13 stream file settings
#
# Just return if use_c13 and use_c13_timeseries aren't both TRUE
if ( ! &value_is_true($nl_flags->{'use_c13'}) ) { return; }
if ( ! &value_is_true($nl_flags->{'use_c13_timeseries'}) ) { return; }

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_atm_c13',
'use_c13'=>$nl_flags->{'use_c13'}, 'use_c13_timeseries'=>$nl_flags->{'use_c13_timeseries'},
'ssp_rcp'=>$nl_flags->{'ssp_rcp'});

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_year_first_atm_c13',
'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_atm_c13',
'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_atm_c13') != $nl->get_value('stream_year_last_atm_c13') ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_model_year_align_atm_c13',
'sim_year'=>$nl_flags->{'sim_year'}, 'sim_year_range'=>$nl_flags->{'sim_year_range'});
}
}

#-------------------------------------------------------------------------------
Expand All @@ -3841,6 +3879,30 @@ sub setup_logic_c14_streams {
#
# C14 stream file settings
#
# Just return if use_c14 and use_c14_bombspike aren't both TRUE
if ( ! &value_is_true($nl_flags->{'use_c14'}) ) { return; }
if ( ! &value_is_true($nl_flags->{'use_c14_bombspike'}) ) { return; }

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_atm_c14',
'use_c14'=>$nl_flags->{'use_c14'}, 'use_c14_bombspike'=>$nl_flags->{'use_c14_bombspike'},
'ssp_rcp'=>$nl_flags->{'ssp_rcp'});

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_meshfile_atm_c14',
'use_c14'=>$nl_flags->{'use_c14'}, 'use_c14_bombspike'=>$nl_flags->{'use_c14_bombspike'});
if ( &remove_leading_and_trailing_quotes( $nl->get_value( "stream_meshfile_atm_c14") ) eq "none" ) {
# TODP: Change this to a fatal when we start using this
$log->warning( "stream_meshfile_atm_c14 is set to 'none' which will only copy the first latitude to the globe")
}

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_year_first_atm_c14',
'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_atm_c14',
'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_atm_c14') != $nl->get_value('stream_year_last_atm_c14') ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_model_year_align_atm_c14',
'sim_year'=>$nl_flags->{'sim_year'}, 'sim_year_range'=>$nl_flags->{'sim_year_range'});
}
}

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -4430,7 +4492,9 @@ sub setup_logic_cropcal_streams {
if ( &value_is_true($cropcals_rx) or &value_is_true($cropcals_rx_adapt) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldFileName_swindow_start');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldFileName_swindow_end');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_cultivar_gdds');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_cultivar_gdds',
'lnd_tuning_mode'=>$nl_flags->{'lnd_tuning_mode'}
);
if ( &value_is_true($cropcals_rx_adapt) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldFileName_gdd20_baseline', 'stream_gdd20_seasons'=>$stream_gdd20_seasons);
}
Expand Down Expand Up @@ -5495,7 +5559,7 @@ sub add_default {
" Are defaults provided for this resolution and land mask?" );
} else {
$log->fatal_error("No default value found for $var.\n" .
" Are defaults provided for this resolution and land mask?");
" Are defaults provided in namelist_defaults for this resolution, land mask, and CLM_CMIP_ERA (set in env_run.xml)?");
}
}
else {
Expand Down Expand Up @@ -5937,6 +6001,27 @@ sub logical_to_fortran {

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

sub add_logical_to_nl_flags {
# Add a logical setting to the $nl_flsgs hash, so can be used in attribute checking
# This is important to do to make sure that the attribute is matched exactly as
# either: .true. or .false.
# Also sets nl_flags to .false. when the namelist variable is NOT set
my ($nl_flags, $nl, $var) = @_;

my $val = $nl->get_value($var);
if ( defined($val) ) {
if ( &value_is_true($val)) {
$nl_flags->{$var} = ".true.";
} else {
$nl_flags->{$var} = ".false.";
}
} else {
$nl_flags->{$var} = ".false.";
}
}

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

sub string_is_undef_or_empty {
# Return true if the given string is undefined or only spaces, false otherwise.
# A quoted empty string (' ' or " ") is treated as being empty.
Expand Down
Loading
Loading