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

Hillslope hydrology pre-merge changes #9

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
8197954
Add NYRS_CROP_ACTIVE history variable.
samsrabin Jul 14, 2023
b693456
Merge branch 'master-NYRS_CROP_ACTIVE' into refactor-crop-gdd-runmeans
samsrabin Jul 14, 2023
4308802
Run fixes.
samsrabin Jul 17, 2023
6c0049a
Only call tillage_init_century() if doing tillage.
samsrabin Jul 17, 2023
e85505e
Allow tillage with FATES.
samsrabin Jul 17, 2023
d144df9
Added note about GDP dependence in old code.
samsrabin Jul 17, 2023
44eeaf7
Reorder tillage_mults_allphases fill for consistency.
samsrabin Jul 17, 2023
35b7f23
Removed an old comment in TillageMod.
samsrabin Jul 17, 2023
9090a6e
TillageMod now has its own copies of indices for soil pools.
samsrabin Jul 17, 2023
8c43072
Initialize tillage for MIMICS; not yet applying.
samsrabin Jul 17, 2023
a5e770e
Added note.
samsrabin Jul 7, 2023
07a259f
Only pass one patch's idop to get_tillage_multipliers().
samsrabin Jul 7, 2023
48b697e
Generalize tillage to work with multiple active crop patches.
samsrabin Jul 7, 2023
70e65c3
Merge branch 'tillage-multi-patch' into tillage-dev
samsrabin Jul 18, 2023
13f898c
Merge branch 'tillage-dev' into tillage-mimics
samsrabin Jul 18, 2023
eb3171d
Moved TillageMod.F90 to soilbiogeochem/
samsrabin Jul 18, 2023
955ec7f
Tillage now applied to MIMICS.
samsrabin Jul 18, 2023
6c4e019
Compile fixes.
samsrabin Jul 18, 2023
f9a03e6
Merge branch 'tillage-mimics' into tillage-dev
samsrabin Jul 19, 2023
d629ddd
Added script to add tillage parameters to params file.
samsrabin Jul 24, 2023
c148410
Tillage multipliers now read from params file.
samsrabin Jul 24, 2023
de88db0
Add git status info to params file.
samsrabin Jul 25, 2023
49b15ad
Save paramfile as NETCDF3_CLASSIC.
samsrabin Jul 26, 2023
0441df0
Replaced logical do_tillage_* with integer tillage_intensity.
samsrabin Jul 26, 2023
163147e
Removed unused 'use' in readParams_netcdf().
samsrabin Jul 26, 2023
23a89d6
Renamed nphases to ntill_intensities_max for consistency with netCDF …
samsrabin Jul 26, 2023
f61f983
Move present(idop) checks to beginning of decomp_rates_* subroutines.
samsrabin Jul 26, 2023
c1757d1
Rework get_apply_tillage_multipliers() to j;c loop instead of c;j.
samsrabin Jul 26, 2023
8cfeafe
Slice decomp_k by column and soil layer before passing to get_apply_t…
samsrabin Jul 26, 2023
750f5b9
Merge branch 'tillage-dev' into tillage
samsrabin Jul 26, 2023
255649b
Merge tag 'ctsm5.1.dev132' into refactor-crop-gdd-runmeans
samsrabin Aug 7, 2023
7eaf5e2
Merge tag 'ctsm5.1.dev132' into tillage
samsrabin Aug 9, 2023
4a8adff
Bugfix to check that tillage is off when use_crop false.
samsrabin Aug 9, 2023
9ce4ed9
Merge tag 'ctsm5.1.dev133' into fates-luh2
glemieux Aug 14, 2023
d856f1b
Improved description of get_tillage_multipliers().
samsrabin Aug 14, 2023
b71fa23
Improved description of use_original_tillage parameter.
samsrabin Aug 14, 2023
c5ee474
Improved error message when tillage on but use_crop off.
samsrabin Aug 14, 2023
fe568e1
Use get_do_tillage() in first readParams_netcdf() return check.
samsrabin Aug 14, 2023
3495f4b
Added a space.
samsrabin Aug 14, 2023
1865649
get_apply_tillage_multipliers(): multiple crop patches are OK.
samsrabin Aug 14, 2023
9063873
get_apply_tillage_multipliers: Check for sumwt < 1.
samsrabin Aug 14, 2023
56cb0b0
Initialize history variables to spval instead of nan.
samsrabin Aug 15, 2023
f01adc6
Share idpp calculation code.
samsrabin Aug 14, 2023
cb5a889
Prepend bgc_ to till_decompk_multipliers.
samsrabin Aug 21, 2023
86b81fb
Till to 32 cm depth rather than top 5 soil layers.
samsrabin Aug 21, 2023
69451e2
Allow partially-tilled soil layers.
samsrabin Aug 21, 2023
8e67f28
max_tillage_depth is now a namelist parameter.
samsrabin Aug 21, 2023
b18572d
Added a comment and TODO.
samsrabin Aug 22, 2023
7af6bf6
Max till depth now 26cm (match text of Graham et al., 2021).
samsrabin Aug 22, 2023
ebda444
Renamed var & added text re: original tillage settings.
samsrabin Aug 22, 2023
cc5c4ae
Merge tag 'ctsm5.1.dev135' into fates-luh2
glemieux Aug 22, 2023
28df94e
Revert "Merge branch 'master-NYRS_CROP_ACTIVE' into refactor-crop-gdd…
samsrabin Aug 23, 2023
5249af6
Merge branch 'refactor-crop-gdd-runmeans-dev2' into refactor-crop-gdd…
samsrabin Aug 23, 2023
2d76faa
Moved fraction_tilled calculation to new function get_fraction_tilled().
samsrabin Aug 31, 2023
e628c71
Added unit test for get_fraction_tilled().
samsrabin Aug 31, 2023
b12c780
Corrected a unit in a comment.
samsrabin Sep 1, 2023
c5171fe
get_apply_tillage_multipliers(): Skip non-crop columns more simply.
samsrabin Sep 1, 2023
195d0f3
resolve merge, add fates radiation
rgknox Sep 11, 2023
2183e0a
Placeholders in CN[CN]StateUpdate1Mod, CNPhenologyMod, CNCIsoFluxMod.
samsrabin Jul 19, 2023
8aaa7f3
Add new CNVeg*FluxType members for removed residues. Unused.
samsrabin Jul 19, 2023
d32a49e
Filled to_removedresidue placeholders in CIsoFlux1().
samsrabin Jul 19, 2023
26775c3
Added CIsoFluxCalc() calls for to_removedresiduec pools in CIsoFlux1().
samsrabin Jul 19, 2023
3cb6549
Filled to_removedresidue placeholders in CNCStateUpdate1Mod.
samsrabin Jul 19, 2023
0ba8bed
Filled to_removedresidue placeholders in CNNStateUpdate1Mod.
samsrabin Jul 19, 2023
cc32593
Filled _to_removedresidue placeholders in CNCropHarvestToProductPools()
samsrabin Jul 19, 2023
9621190
Added associate statements for to_removedresidue pools to CNOffsetLit…
samsrabin Jul 19, 2023
74b11d8
Add residue removal code, but removedresidue_fraction 0.
samsrabin Sep 11, 2023
1ec3f62
Add namelist parameter crop_residue_removal_frac.
samsrabin Sep 11, 2023
4e0144d
arguments and hist call updates
rgknox Sep 12, 2023
579ca9a
Bug fix in get_fraction_tilled().
samsrabin Sep 15, 2023
7f7dfc8
test_get_fraction_tilled(): Use nlayers instead of 5.
samsrabin Sep 18, 2023
46da730
test_get_fraction_tilled(): Now works with new function call.
samsrabin Sep 18, 2023
9c1618b
get_fraction_tilled() no longer takes argument j.
samsrabin Sep 18, 2023
b87fbd9
get_fraction_tilled() can now handle zero-thickness layers.
samsrabin Sep 18, 2023
c0d8784
Simplify and split up test_get_fraction_tilled().
samsrabin Sep 18, 2023
77d0c7d
get_fraction_tilled() receives layer_bottom, not layer_top.
samsrabin Sep 18, 2023
7b6f5fa
Merge branch 'clmfates-gru-init-fix' into ctsm5.1.dev139-two-stream
rgknox Sep 20, 2023
3d253a0
Updated temporary two-stream fates branch
rgknox Sep 21, 2023
3c24b25
Prevent tillage from being enabled.
samsrabin Oct 2, 2023
d43c617
Merge tag 'ctsm5.1.dev142' into tillage
samsrabin Oct 2, 2023
595d95d
Merge tag 'ctsm5.1.dev142' into hillslope_hydrology-ssr
samsrabin Oct 4, 2023
c8d6754
Removed a TODO.
samsrabin Oct 5, 2023
7510431
Removed an incorrect comment.
samsrabin Oct 5, 2023
d565176
Do not till generic crops.
samsrabin Oct 5, 2023
b86402e
Warn instead of fail when trying to enable tillage.
samsrabin Oct 5, 2023
1a3a8b7
Delete add_tillage_to_paramsfile.py.
samsrabin Oct 5, 2023
ae56384
Use ntill_intensities_max; set to private.
samsrabin Oct 5, 2023
e1ce650
Merge branch 'hillslope_hydrology' into hillslope_hydrology-ssr
samsrabin Oct 6, 2023
d303ccb
Whitespace alignment in CLMBuildNamelist.pm.
samsrabin Oct 6, 2023
bd4a04e
Remove redundant check in CLMBuildNamelist.pm.
samsrabin Oct 6, 2023
79141f8
Do not allow use_hillslope with transient land cover change.
samsrabin Oct 6, 2023
fa5161f
Compile fixes from merge of ctsm5.1.dev142.
samsrabin Oct 6, 2023
93a18c8
Merge tag 'ctsm5.1.dev138' into fates-luh2
glemieux Oct 9, 2023
53b8719
Add Hillslope test.
samsrabin Nov 3, 2023
0e7a9a9
Removed NTASKS=-2 from shell_commands.
samsrabin Nov 3, 2023
0a4b2cb
Merge tag 'ctsm5.1.dev152' into fates-luh2
glemieux Nov 15, 2023
3bbbc53
update fates setup loging to use remove_leading_and_trailing_quotes f…
glemieux Nov 15, 2023
96b827c
add test to check for namelist build error conditions
glemieux Nov 15, 2023
f795147
define LUH acronym
glemieux Nov 15, 2023
042b7ef
remove erroneous comment in use_fates_luh namelist option
glemieux Nov 15, 2023
87b149f
add clarifying comments for the fates landuse timeseries module
glemieux Nov 15, 2023
b061816
trim filename strings in control mod diagnostic output
glemieux Nov 15, 2023
faee6e5
setting fates external to two-stream feature branch
rgknox Nov 28, 2023
f1f1a91
Updating spacing for fates radiation path join
rgknox Nov 28, 2023
90a297e
Merge tag 'ctsm5.1.dev155' into fates-luh2
glemieux Nov 29, 2023
f2ad048
fates external pointer
rgknox Nov 30, 2023
cd93627
merge up to dev155
rgknox Nov 30, 2023
1f44adf
update fates parameter file name in defaults
glemieux Nov 30, 2023
fd7373d
remove obsolete disturbance variables from base fates testmod
glemieux Nov 30, 2023
97a93b7
add landuse site level variables to default fates testmod
glemieux Nov 30, 2023
c245592
remove obsolete disturbance variables from excluded output of fates_s…
glemieux Nov 30, 2023
8c0b078
add luh2 testmod
glemieux Nov 30, 2023
a0f8ff9
change location of luh2 fates data and make sure default is available
glemieux Dec 1, 2023
89a5671
Merge branch 'hillslope_hydrology' into hillslope_hydrology-ssr
samsrabin Dec 1, 2023
6efd50c
Update externals to work on Derecho.
samsrabin Dec 1, 2023
c477363
Misc. whitespace fixes and reversions.
samsrabin Dec 1, 2023
c7c8130
Remove a commented-out bit.
samsrabin Dec 1, 2023
bb23a70
replace use statements from the fluh_timeseries default setting
glemieux Dec 1, 2023
e2716ca
add build subdirectory for fates landuse timeseries default file
glemieux Dec 1, 2023
ffac03f
add fates to the build tag subdirectory name
glemieux Dec 1, 2023
be78a0b
add resolution to the add_default call for the fates landuse timeseries
glemieux Dec 1, 2023
3def7e3
correct descriptions and diagnostic write
glemieux Dec 1, 2023
e8b0508
correct hlm group name in namelist definition
glemieux Dec 2, 2023
7b77ae0
Merge tag 'ctsm5.1.dev156' into hillslope_hydrology-ssr
samsrabin Dec 4, 2023
55124be
Use DIN_LOC_ROOT in Hillslope test.
samsrabin Dec 4, 2023
ce9ed80
More whitespace fixes/reversions.
samsrabin Dec 4, 2023
7dba402
Fates pointer
rgknox Dec 11, 2023
e6c0cbf
Update fates two-stream b4b pointer
rgknox Dec 11, 2023
1a1ec94
remove wood product flux from fates carbon balance check
glemieux Dec 12, 2023
7c2ec40
Merge tag 'ctsm5.1.dev159' into fates-luh2
glemieux Dec 13, 2023
67426be
update externals with fates landuse tag
glemieux Dec 14, 2023
131308f
update external
rgknox Dec 14, 2023
3425f4d
Revert "Revert "Merge remote-tracking branch 'samsrabin/regrid-shdate…
samsrabin Dec 14, 2023
197e53a
Improve comments/docstrings.
samsrabin Dec 14, 2023
0224c2a
Another comment/docstring improvement.
samsrabin Dec 14, 2023
4bf2384
Rename TestRegridGgcmiShdates to TestUtilsImportCoord.
samsrabin Dec 14, 2023
164357e
regrid_ggcmi_shdates now loads cdo module.
samsrabin Dec 14, 2023
225f092
Update the default fates paramfile
glemieux Dec 15, 2023
809ef08
Pass surfpft bounds as input argumment
glemieux Dec 15, 2023
27b2607
Delete a print(lat).
samsrabin Dec 17, 2023
f39f7b4
Use logging infra for *_ggcmi_shdates.py scripts.
samsrabin Dec 17, 2023
747eda6
chdir out of tempdir in tests and regrid_ggcmi_shdates.
samsrabin Dec 17, 2023
3f3f40c
Call regrid_ggcmi_shdates from tools/crop_calendars.
samsrabin Dec 17, 2023
c6bd829
Update process_ggcmi_shdates to work with reworked regrid_ggcmi_shdates.
samsrabin Dec 17, 2023
9fd3237
Warn instead of failing if process_ggcmi_shdates is missing an input …
samsrabin Dec 17, 2023
9c59d40
process_ggcmi_sdates now respects --crop-list.
samsrabin Dec 18, 2023
e4b4def
Call process_ggcmi_shdates from tools/crop_calendars.
samsrabin Dec 18, 2023
35a2f98
Remove an extraneous #.
samsrabin Dec 18, 2023
a9d9621
Reformatting with black.
samsrabin Dec 18, 2023
d19abd1
Added previous commit to .git-blame-ignore-revs.
samsrabin Dec 18, 2023
6b324ec
Merge tag 'ctsm5.1.dev159' into cropresidues3-dev
samsrabin Dec 18, 2023
aa463cf
add fates luh2 test to derecho
glemieux Dec 18, 2023
8bd8bfe
update changelog
glemieux Dec 19, 2023
35bcc4a
externals
rgknox Dec 19, 2023
cdf1bf9
updated fates externals to two-stream b4b test branch
rgknox Dec 20, 2023
877493f
Updated call to fates history
rgknox Dec 20, 2023
39e5496
merging luh2 and two-stream for fates
rgknox Dec 21, 2023
8607b25
update argument to fates hifrq hist
rgknox Dec 21, 2023
554a6ec
Crop tech note: Biofuel stems are also routed to biofuel pools.
samsrabin Dec 23, 2023
3d23110
Crop tech note: Add info about residue removal.
samsrabin Dec 23, 2023
a4c3741
Crop tech note: Don't show separate eqs for livestem and leaf removal.
samsrabin Dec 23, 2023
c05f728
Crop tech note: Refer to residue removal equations.
samsrabin Dec 23, 2023
6d78b7f
Crop tech note: Remove "leaf" from residue removal eq labels.
samsrabin Dec 23, 2023
1740a97
Crop tech note: Remove "wholly or partially."
samsrabin Dec 23, 2023
701c00f
Merge branch 'cropresidues3-dev' into cropresidues3
samsrabin Dec 23, 2023
84182bd
Updated test nl with updated fates history
rgknox Dec 27, 2023
d1f08a7
Add script used to add tillage to paramfile.
samsrabin Dec 29, 2023
d566b6d
Specify posNOTonfile=.true. in call of ncd_io() for till_decompk_mult…
samsrabin Dec 27, 2023
693750c
Replace a ntill_stages_max with ntill_intensities_max.
samsrabin Dec 29, 2023
9af1a04
Merge tag 'ctsm5.1.dev159' into tillage
samsrabin Dec 29, 2023
fffa851
Typo fix in crop Tech Note.
samsrabin Dec 29, 2023
ff610b4
Add tillage documentation to Tech Note.
samsrabin Dec 29, 2023
c86e1b6
Add "Running with tillage" section to User's Guide.
samsrabin Dec 29, 2023
f344ff1
Add 'till' testdef.
samsrabin Dec 29, 2023
225a510
Change LUH2 test to f09 so there won't be a LUH2 timeseries file for it
ekluzek Dec 31, 2023
6747e8c
Only get a default luh timeseries file if you need one, and ask for o…
ekluzek Dec 31, 2023
4e059c7
LUH file should be for 1850-2000, and add a case for constant until i…
ekluzek Dec 31, 2023
ebc5cd8
Update change files
ekluzek Dec 31, 2023
adbc727
Merge pull request #2076 from glemieux/fates-luh2
ekluzek Dec 31, 2023
c003f82
Merge tag 'ctsm5.1.dev160' into refactor-crop-gdd-runmeans
samsrabin Jan 3, 2024
0d8dc98
Update ChangeLog/ChangeSum.
samsrabin Jan 4, 2024
5753e32
Merge pull request #2060 from samsrabin/refactor-crop-gdd-runmeans
samsrabin Jan 4, 2024
0665754
Use parameter files with tillage multipliers (*.c240105.nc).
samsrabin Jan 5, 2024
2f69473
Remove warning about tillage not being scientifically tested.
samsrabin Jan 5, 2024
1e1f2e4
Point to raw GGCMI calendar files in *ggcmi_shdates scripts.
samsrabin Jan 5, 2024
534847d
Merge tag 'ctsm5.1.dev161' into regrid-shdate-dev2
samsrabin Jan 5, 2024
675205f
Update ChangeLog/ChangeSum.
samsrabin Jan 5, 2024
abd743b
Merge pull request #2292 from samsrabin/regrid-shdate-dev2
samsrabin Jan 5, 2024
3ff0b72
Merge tag 'ctsm5.1.dev162' into cropresidues3
samsrabin Jan 5, 2024
336f848
*_TO_REMOVEDRESIDUEC outputs now off by default.
samsrabin Jan 5, 2024
142c2c1
Enable tillage in two aux_clm tests.
samsrabin Jan 5, 2024
cd6a021
Merge branch 'cropresidues3' into tillage-and-residues4
samsrabin Jan 8, 2024
88519c0
Move numpy-dependent Python functions out of utils.py.
samsrabin Jan 8, 2024
b991db3
Import abort() in ctsm_pylib_dependent_utils.py.
samsrabin Jan 8, 2024
d866510
Formatting with black.
samsrabin Jan 8, 2024
be08199
Add previous commit to .git-blame-ignore-revs.
samsrabin Jan 8, 2024
a61b080
Merge branch 'hillslope_hydrology' into hillslope_hydrology-ssr
samsrabin Jan 8, 2024
1e2fa22
Added fates two-stream test
rgknox Jan 10, 2024
6a9af15
fix len error for fates landuse timeseries
glemieux Jan 10, 2024
db2aa54
Add NEON tests to expected fail list.
samsrabin Jan 10, 2024
77610f1
NEON tests can also fail during RUN.
samsrabin Jan 10, 2024
c7d7cfc
Enable tillage in two aux_clm tests.
samsrabin Jan 5, 2024
3cb6a6a
Remove tillage from CLM4.5 Intel test.
samsrabin Jan 10, 2024
537a422
Add residue removal test.
samsrabin Jan 10, 2024
4fe3a2d
Merge branch 'fix-izumi-runsystests' into tillage-and-residues4
samsrabin Jan 10, 2024
6820720
update seed dispersal test mod to place temp parameter file in case dir
glemieux Jan 10, 2024
3b52933
Merge branch 'tillage' into tillage-and-residues4
samsrabin Jan 10, 2024
65d5f8e
update seed dispersal clm user namelist to look in case dir for temp …
glemieux Jan 10, 2024
0f321ff
Update ChangeLog and ChangeSum
samsrabin Jan 10, 2024
438bcc6
Merge pull request #2311 from samsrabin/tillage-and-residues4
samsrabin Jan 10, 2024
cc2f408
Merge tag 'ctsm5.1.dev163' into fates-two-stream-dev163
rgknox Jan 10, 2024
9413b62
Added two-stream nocomp test
rgknox Jan 10, 2024
674715e
Changed test configuration to be gnu and debug to trigger errors
rgknox Jan 16, 2024
a32174e
reverting PEM seed dispersal test (fates) to use srcdir
rgknox Jan 16, 2024
38d505b
Updated fates external to new tag
rgknox Jan 16, 2024
f81961a
update change logs
rgknox Jan 16, 2024
f0d8017
Update change files
ekluzek Jan 17, 2024
5b72315
Merge pull request #2265 from rgknox/fates-two-stream
ekluzek Jan 17, 2024
efbeef4
Merge remote-tracking branch 'swensosc/hillslope_hydrology' into hill…
samsrabin Jan 19, 2024
54f765a
Hillslope test: Use fixed fsurdat.
samsrabin Jan 19, 2024
55e14eb
Remove EOL whitespace from HillslopeHydrologyMod.
samsrabin Jan 19, 2024
07969f0
Merge tag 'ctsm5.1.dev164' into hillslope_hydrology-ssr
samsrabin Jan 19, 2024
c5be402
Alignment changes in HillslopeHydrologyMod.
samsrabin Jan 22, 2024
51c95e5
Check for unrecognized pft_distribution_method in surfrd_hillslope().
samsrabin Jan 22, 2024
41a7e0d
Error on unhandled soil_profile_method in SetHillslopeSoilThickness().
samsrabin Jan 22, 2024
b1433a0
Fix logic for missing h_bedrock error check.
samsrabin Jan 22, 2024
8abcb55
Remove check_npatches, which was hard-coded true.
samsrabin Jan 22, 2024
00d2b1e
Un-nest "if (masterproc)" in HillslopeHydrologyMod.
samsrabin Jan 22, 2024
8f3d6ab
HillslopeHydrologyMod: Consistent whitespace in if statements.
samsrabin Jan 22, 2024
04bceb0
Check for unrecognized pft_distribution_method in InitHillslope().
samsrabin Jan 22, 2024
12721d4
Point Hillslope test at testdata/ instead of surfdata/.
samsrabin Jan 24, 2024
4d0da3d
Add Hillslope_DominantPftUniform and Hillslope_SoilProfileLinear test…
samsrabin Jan 24, 2024
03cc0f2
Add optional do_not_collapse arg to collapse_to_dominant().
samsrabin Jan 23, 2024
02d2cf7
Use collapse_to_dominant() in surfrd_hillslope().
samsrabin Jan 24, 2024
fd5ed37
Functionize & unit-test HillslopeSoilThicknessProfile_linear().
samsrabin Jan 26, 2024
6513894
Remove a leftover troubleshooting write().
samsrabin Jan 26, 2024
b84720c
Exit early from loop in HillslopeSoilThicknessProfile_linear().
samsrabin Jan 26, 2024
b426ce1
Better unit testing of HillslopeSoilThicknessProfile_linear().
samsrabin Jan 26, 2024
65ac615
Cleanup in HillslopeHydrologyUtils test.
samsrabin Jan 26, 2024
689a550
Rename to test_collapse_to_dom_do_not_collapse.
samsrabin Jan 26, 2024
1c8b468
Add test_collapse_to_dom_do_not_collapse_present_false.
samsrabin Jan 26, 2024
0ce76f0
Fix expected vs. actual in assertEqual() in test_surfrdUtils.
samsrabin Jan 26, 2024
c36280c
Delete 'found on surface data set' msgs from HillslopeHydrologyMod.
samsrabin Jan 27, 2024
0df44c9
Reduce nesting in HillslopeHydrologyMod.
samsrabin Jan 27, 2024
9c0123c
Remove if (masterproc) conditions on error checks outside initializat…
samsrabin Jan 27, 2024
a2b5788
Delete development testmods
samsrabin Jan 29, 2024
83e0bec
Fully specify namelist settings for Hillslope test.
samsrabin Jan 29, 2024
b026e2e
Add 3 new hillslope testmods:
samsrabin Jan 29, 2024
ed5e0ae
Add 4 hillslope tests to testlist_clm.xml:
samsrabin Jan 29, 2024
dbae8b6
Change an intent(out) to inout, satisfying nag test.
samsrabin Jan 29, 2024
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
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ b88e1cd1b28e3609684c79a2ec0e88f26cfc362b
b771971e3299c4fa56534b93421f7a2b9c7282fd
9de88bb57ea9855da408cbec1dc8acb9079eda47
8bc4688e52ea23ef688e283698f70a44388373eb
c8bd4c6f98c0b411391b4355da449507db3aab4e
4ee49e3e516ca7dee5df378f65664f93a7db4415
0207bc98dd5c75cd69a0e788bc53e41093712f5c
e4d38681df23ccca0ae29581a45f8362574e0630
0a5a9e803b56ec1bbd6232eff1c99dbbeef25eb7
810cb346f05ac1aabfff931ab1a2b7b584add241
5933b0018f8e29413e30dda9b906370d147bad45
025d5e7c2e80263717fb029101d65cbbf261c3c4
a9d96219902cf609636886c7073a84407f450d9a
d866510188d26d51bcd6d37239283db690af7e82
# Ran SystemTests and python/ctsm through black python formatter
5364ad66eaceb55dde2d3d598fe4ce37ac83a93c
8056ae649c1b37f5e10aaaac79005d6e3a8b2380
0bc3f00115d86d026a977918661c93779b3b19f9
540b256d1f3382f4619d7b0877c32d54ce5c40b6
8a168bb0895f4f2421608dd2589398e13a6663e6
183fc26a6691bbdf87f515dc47924a64be3ced9b
6fccf682eaf718615407d9bacdd3903b8786a03d
4 changes: 2 additions & 2 deletions Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ tag = cdeps1.0.24
protocol = git
repo_url = https://github.com/ESCOMP/CDEPS.git
local_path = components/cdeps
externals = Externals_CDEPS.cfg
externals = Externals_CDEPS.cfg
required = True

[cpl7]
Expand Down Expand Up @@ -98,4 +98,4 @@ tag = v1.0.8
required = False

[externals_description]
schema_version = 1.0.0
schema_version = 1.0.0
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.68.2_api.31.0.0
tag = sci.1.71.0_api.33.0.0
required = True

[externals_description]
Expand Down
78 changes: 58 additions & 20 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ sub setup_cmdl_fates_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",
"use_fates_nocomp","use_fates_sp","fates_inventory_ctrl_filename","use_fates_logging",
"fates_parteh_mode","use_fates_tree_damage","fates_seeddisp_cadence" );
"fates_parteh_mode","use_fates_tree_damage","fates_seeddisp_cadence","use_fates_luh","fluh_timeseries" );
# dis-allow fates specific namelist items with non-fates runs
foreach my $var ( @list ) {
if ( defined($nl->get_value($var)) ) {
Expand Down Expand Up @@ -1634,6 +1634,11 @@ sub process_namelist_inline_logic {
###############################
setup_logic_crop_inparm($opts, $nl_flags, $definition, $defaults, $nl);

###############################
# namelist group: tillage #
###############################
setup_logic_tillage($opts, $nl_flags, $definition, $defaults, $nl);

###############################
# namelist group: ch4par_in #
###############################
Expand Down Expand Up @@ -2236,12 +2241,28 @@ sub setup_logic_crop_inparm {
}
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "initial_seed_at_planting",
'use_crop'=>$nl->get_value('use_crop') );

my $crop_residue_removal_frac = $nl->get_value('crop_residue_removal_frac');
if ( $crop_residue_removal_frac < 0.0 or $crop_residue_removal_frac > 1.0 ) {
$log->fatal_error("crop_residue_removal_frac must be in range [0, 1]");
}
} else {
error_if_set( $nl, "Can NOT be set without crop on", "baset_mapping", "baset_latvary_slope", "baset_latvary_intercept" );
error_if_set( $nl, "Can NOT be set without crop on", "baset_mapping", "baset_latvary_slope", "baset_latvary_intercept", "crop_residue_removal_frac" );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'crop_fsat_equals_zero' );
}
}

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

sub setup_logic_tillage {
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

my $tillage_mode = remove_leading_and_trailing_quotes( $nl->get_value( "tillage_mode" ) );
if ( $tillage_mode ne "off" && $tillage_mode ne "" && not &value_is_true($nl->get_value('use_crop')) ) {
$log->fatal_error( "Tillage only works on crop columns, so use_crop must be true if tillage is enabled." );
}
}

#-------------------------------------------------------------------------------
sub error_if_set {
# do a fatal_error and exit if any of the input variable names are set
Expand Down Expand Up @@ -2662,6 +2683,8 @@ sub setup_logic_do_transient_pfts {
$cannot_be_true = "$var cannot be combined with use_cndv";
} elsif (&value_is_true($nl->get_value('use_fates'))) {
$cannot_be_true = "$var cannot be combined with use_fates";
} elsif (&value_is_true($nl->get_value('use_hillslope'))) {
$cannot_be_true = "$var cannot be combined with use_hillslope";
}

if ($cannot_be_true) {
Expand Down Expand Up @@ -2737,6 +2760,8 @@ sub setup_logic_do_transient_crops {
# 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 FATES, so for now these two options cannot be combined";
} elsif (&value_is_true($nl->get_value('use_hillslope'))) {
$cannot_be_true = "$var cannot be combined with use_hillslope";
}

if ($cannot_be_true) {
Expand Down Expand Up @@ -2832,6 +2857,8 @@ sub setup_logic_do_transient_lakes {
if (&value_is_true($nl->get_value($var))) {
if (&value_is_true($nl->get_value('collapse_urban'))) {
$log->fatal_error("$var cannot be combined with collapse_urban");
} elsif (&value_is_true($nl->get_value('use_hillslope'))) {
$log->fatal_error("$var cannot be combined with use_hillslope");
}
if ($n_dom_pfts > 0 || $n_dom_landunits > 0 || $toosmall_soil > 0 || $toosmall_crop > 0 || $toosmall_glacier > 0 || $toosmall_lake > 0 || $toosmall_wetland > 0 || $toosmall_urban > 0) {
$log->fatal_error("$var cannot be combined with any of the of the following > 0: n_dom_pfts > 0, n_dom_landunit > 0, toosmall_soil > 0._r8, toosmall_crop > 0._r8, toosmall_glacier > 0._r8, toosmall_lake > 0._r8, toosmall_wetland > 0._r8, toosmall_urban > 0._r8");
Expand Down Expand Up @@ -2895,6 +2922,8 @@ sub setup_logic_do_transient_urban {
if (&value_is_true($nl->get_value($var))) {
if (&value_is_true($nl->get_value('collapse_urban'))) {
$log->fatal_error("$var cannot be combined with collapse_urban");
} elsif (&value_is_true($nl->get_value('use_hillslope'))) {
$log->fatal_error("$var cannot be combined with use_hillslope");
}
if ($n_dom_pfts > 0 || $n_dom_landunits > 0 || $toosmall_soil > 0 || $toosmall_crop > 0 || $toosmall_glacier > 0 || $toosmall_lake > 0 || $toosmall_wetland > 0 || $toosmall_urban > 0) {
$log->fatal_error("$var cannot be combined with any of the of the following > 0: n_dom_pfts > 0, n_dom_landunit > 0, toosmall_soil > 0._r8, toosmall_crop > 0._r8, toosmall_glacier > 0._r8, toosmall_lake > 0._r8, toosmall_wetland > 0._r8, toosmall_urban > 0._r8");
Expand Down Expand Up @@ -3436,22 +3465,18 @@ sub setup_logic_hillslope {
#
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hillslope' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'downscale_hillslope_meteorology' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_head_gradient_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_transmissivity_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_pft_distribution_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_soil_profile_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hillslope_routing', 'use_hillslope'=>$nl_flags->{'use_hillslope'} );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hillslope' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'downscale_hillslope_meteorology' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_head_gradient_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_transmissivity_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_pft_distribution_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_soil_profile_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hillslope_routing', 'use_hillslope'=>$nl_flags->{'use_hillslope'} );
my $use_hillslope = $nl->get_value('use_hillslope');
my $use_hillslope_routing = $nl->get_value('use_hillslope_routing');
if ( (! &value_is_true($use_hillslope)) && &value_is_true($use_hillslope_routing) ) {
$log->fatal_error("Cannot turn on use_hillslope_routing when use_hillslope is off\n" );
}
my $downscale_hillslope_meteorology = $nl->get_value('use_hillslope_routing');
if ( (! &value_is_true($use_hillslope)) && &value_is_true($downscale_hillslope_meteorology) ) {
$log->fatal_error("Cannot turn on downscale_hillslope_meteorology when use_hillslope is off\n" );
}
if ( (! &value_is_true($use_hillslope)) && &value_is_true($use_hillslope_routing) ) {
$log->fatal_error("Cannot turn on use_hillslope_routing when use_hillslope is off\n" );
}
}

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -4389,7 +4414,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","fates_seeddisp_cadence",
"use_fates_logging","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage" );
"use_fates_logging","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage","use_fates_luh" );
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 Expand Up @@ -4417,21 +4442,34 @@ sub setup_logic_fates {
# 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');
}
}
}
}
my $var = "use_fates_inventory_init";
if ( defined($nl->get_value($var)) ) {
if ( &value_is_true($nl->get_value($var)) ) {
$var = "fates_inventory_ctrl_filename";
my $fname = substr $nl->get_value($var), 1, -1; # ignore first and last positions of string because those are quote characters
my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) );
if ( ! defined($nl->get_value($var)) ) {
$log->fatal_error("$var is required when use_fates_inventory_init is set" );
} elsif ( ! -f "$fname" ) {
$log->fatal_error("$fname does NOT point to a valid filename" );
}
}
}
my $var = "use_fates_luh";
if ( defined($nl->get_value($var)) ) {
if ( &value_is_true($nl->get_value($var)) ) {
$var = "fluh_timeseries";
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'phys'=>$nl_flags->{'phys'}, 'hgrid'=>$nl_flags->{'res'}, 'sim_year_range'=>$nl_flags->{'sim_year_range'}, nofail=>1 );
my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) );
if ( ! defined($nl->get_value($var)) ) {
$log->fatal_error("$var is required when use_fates_luh is set" );
} elsif ( ! -f "$fname" ) {
$log->fatal_error("$fname does NOT point to a valid filename" );
}
}
}
}
}

Expand Down Expand Up @@ -4558,7 +4596,7 @@ sub write_output_files {
soil_resis_inparm bgc_shared canopyfluxes_inparm aerosol
clmu_inparm clm_soilstate_inparm clm_nitrogen clm_snowhydrology_inparm hillslope_hydrology_inparm hillslope_properties_inparm
cnprecision_inparm clm_glacier_behavior crop_inparm irrigation_inparm
surfacealbedo_inparm water_tracers_inparm);
surfacealbedo_inparm water_tracers_inparm tillage_inparm);

#@groups = qw(clm_inparm clm_canopyhydrology_inparm clm_soilhydrology_inparm
# finidat_consistency_checks dynpft_consistency_checks);
Expand Down
28 changes: 24 additions & 4 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,15 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- The default filenames are given relative to the root directory
for the CLM2 data in the CESM distribution -->
<!-- Plant function types (relative to {csmdata}) -->
<paramfile phys="clm5_1" >lnd/clm2/paramdata/ctsm51_params.c231117.nc</paramfile>
<paramfile phys="clm5_0" >lnd/clm2/paramdata/clm50_params.c231117.nc</paramfile>
<paramfile phys="clm4_5" >lnd/clm2/paramdata/clm45_params.c231117.nc</paramfile>
<paramfile phys="clm5_1" >lnd/clm2/paramdata/ctsm51_params.c240105.nc</paramfile>
<paramfile phys="clm5_0" >lnd/clm2/paramdata/clm50_params.c240105.nc</paramfile>
<paramfile phys="clm4_5" >lnd/clm2/paramdata/clm45_params.c240105.nc</paramfile>

<!-- ================================================================== -->
<!-- FATES default parameter file -->
<!-- ================================================================== -->

<fates_paramfile>lnd/clm2/paramdata/fates_params_api.25.5.0_12pft_c230628.nc</fates_paramfile>
<fates_paramfile>lnd/clm2/paramdata/fates_params_api.32.0.0_12pft_c231215.nc</fates_paramfile>

<!-- ================================================================== -->
<!-- Default surface roughness parameterization -->
Expand Down Expand Up @@ -553,6 +553,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<use_grainproduct use_crop=".true." phys="clm5_0" >.true.</use_grainproduct> <!-- 1-year grain product pool default to on for clm50 if crop is turned on -->
<use_grainproduct use_crop=".true." phys="clm5_1" >.true.</use_grainproduct> <!-- 1-year grain product pool default to on for clm50 if crop is turned on -->

<crop_residue_removal_frac>0.d+0</crop_residue_removal_frac>

<!-- Crop model options -->
<baset_mapping use_crop=".true." phys="clm4_5" >constant</baset_mapping>
<baset_mapping use_crop=".true." phys="clm5_0" >varytropicsbylat</baset_mapping>
Expand Down Expand Up @@ -1584,6 +1586,15 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1
<flanduse_timeseries hgrid="10x15" sim_year_range="1850-2100" ssp_rcp="SSP5-3.4"
use_crop=".false." >lnd/clm2/surfdata_map/release-clm5.0.18/landuse.timeseries_10x15_SSP5-3.4_16pfts_Irrig_CMIP6_simyr1850-2100_c190228.nc</flanduse_timeseries>

<!-- Land Use Harmonization unified data sets for dynamic FATES land use change -->

<fluh_timeseries hgrid="4x5" sim_year_range="1850-2000" use_fates=".true."
>lnd/clm2/surfdata_map/fates-sci.1.68.3_api.31.0.0_tools.1.0.1/LUH2_states_transitions_management.timeseries_4x5_hist_simyr1850-2015_c231101.nc</fluh_timeseries>

<!-- This one is just for testing until Issue #2304 is resolved -->
<fluh_timeseries hgrid="4x5" sim_year_range="constant" use_fates=".true."
>lnd/clm2/surfdata_map/fates-sci.1.68.3_api.31.0.0_tools.1.0.1/LUH2_states_transitions_management.timeseries_4x5_hist_simyr1850-2015_c231101.nc</fluh_timeseries>

<!-- Fixation and Uptake of Nitrogen Model (FUN2.0) -->
<use_fun phys="clm5_1" use_cn=".true." use_nitrif_denitrif=".true.">.true.</use_fun>
<use_fun phys="clm5_0" use_cn=".true." use_nitrif_denitrif=".true.">.true.</use_fun>
Expand Down Expand Up @@ -2767,6 +2778,7 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1
<use_fates_logging use_fates=".true.">.false.</use_fates_logging>
<use_fates_inventory_init use_fates=".true.">.false.</use_fates_inventory_init>
<use_fates_sp use_fates=".true.">.false.</use_fates_sp>
<use_fates_luh use_fates=".true.">.false.</use_fates_luh>
<fates_parteh_mode use_fates=".true.">1</fates_parteh_mode>
<fates_seeddisp_cadence use_fates=".true.">0</fates_seeddisp_cadence>

Expand Down Expand Up @@ -2808,4 +2820,12 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1
<stream_meshfile_exice use_excess_ice=".true.">lnd/clm2/paramdata/exice_init_0.125x0.125_ESMFmesh_cdf5_c20220802.nc</stream_meshfile_exice>
<stream_mapalgo_exice use_excess_ice=".true.">bilinear</stream_mapalgo_exice>

<!-- ========================================= -->
<!-- Defaults for tillage -->
<!-- ========================================= -->

<tillage_mode>off</tillage_mode>
<use_original_tillage_phases>.false.</use_original_tillage_phases>
<max_tillage_depth>0.26d00</max_tillage_depth>

</namelist_defaults>
Loading
Loading