Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2228 commits
Select commit Hold shift + click to select a range
93444b3
Update Change files
ekluzek Nov 15, 2019
d5f3086
Merge pull request #814 from ekluzek/relfixesfor5028
ekluzek Nov 15, 2019
743ff6c
Point to the newer prescribed soil moisture file that was used in sim…
ekluzek Nov 15, 2019
85fc606
if soilm_ignore_data_if_missing is set and the point is missing from …
ekluzek Nov 15, 2019
007e18c
Have clm4_5 use the same 1850 ndep dataset as clm5_0, fixes #817
ekluzek Nov 15, 2019
3d3967c
Set urbantv years for clm4_5 the same as clm5_0
ekluzek Nov 15, 2019
70706a3
Set tintalgo for soilm and lai, so you could compare to the input str…
ekluzek Nov 15, 2019
0be8a1d
Set prescribe soil moisture over both nat-veg and crop landunits
ekluzek Nov 15, 2019
8861b8e
Add soilm_ignore_data_if_missing=T to the prescribed testmod
ekluzek Nov 18, 2019
d387bd7
Apply changes to update to latest fates_next_api
ekluzek Nov 19, 2019
6e972f5
Mark new izimu failed fates tests
ekluzek Nov 19, 2019
2e88c88
Update change files
ekluzek Nov 19, 2019
c089c8a
Merge pull request #841 from ekluzek/relanswerchangesfor5029
ekluzek Nov 19, 2019
7cf99bb
Merge tag 'release-clm5.0.29' into relfatesupdate
ekluzek Nov 19, 2019
13fb273
Update fates paramfile to one being pointed to on fates_next_api branch
ekluzek Nov 19, 2019
7e8e51c
Add note about expected fail
ekluzek Nov 19, 2019
fb4d553
Update change files
ekluzek Nov 19, 2019
8dce9a6
Updated default fates parameter file for new api 7.4.0 format.
rgknox Dec 13, 2019
76d28ae
corrected wrong fates api, we are on 8.1 not 7.4.
rgknox Dec 13, 2019
020a0a3
updating GetandSetTime function comment referencing correct time func…
glemieux Dec 16, 2019
f6f871b
fixing comment typo
glemieux Dec 16, 2019
978068a
Merge pull request #820 from glemieux/fates_next_api-model-day-fix
rgknox Dec 16, 2019
56c334e
Updated default fates parameter file again after some new changes.
rgknox Dec 16, 2019
eac0131
Updated fates default filename, again, for new parameters
rgknox Dec 18, 2019
913c447
Add figures for tools chapter, the section on the details of running …
ekluzek Jan 2, 2020
48be76a
Add figures to tools for users guide
ekluzek Jan 2, 2020
bc30747
Add missing colons to figure targets
ekluzek Jan 2, 2020
195c9b2
Updated fates default file to newer version of api 8.1
rgknox Jan 3, 2020
5d57fff
Updated fates tag to match api 8.1.0
rgknox Jan 4, 2020
a0803e3
Merge pull request #870 from rgknox/fates-api-8.1.0
rgknox Jan 4, 2020
5ad8a8d
Merge pull request #770 from rgknox/fateshydro-uninit-transp
glemieux Jan 6, 2020
f9c1c88
Update externals for rtm mosart and cime
ekluzek Jan 13, 2020
a356da3
Merge branch 'relfatesupdate' of github.com:ekluzek/ctsm into relfate…
ekluzek Jan 13, 2020
a7eab48
Also add a check for gridcell weights, fixing #847
ekluzek Jan 13, 2020
34ba59a
Update to RTM and MOSART tags, rather than branch, and uppercase ESCO…
ekluzek Jan 14, 2020
ab9ee92
Merge remote-tracking branch 'escomp/fates_next_api' into relfatesupdate
ekluzek Jan 14, 2020
30e8977
Merge branch 'relfatesupdate' of github.com:ekluzek/ctsm into relfate…
ekluzek Jan 14, 2020
9a10f7b
Remove the non-fates test with the land-ice model from the fates test…
ekluzek Jan 14, 2020
0569c62
Backup fates update to sci.1.30.0_api.8.0.0 rather than very latest o…
ekluzek Jan 16, 2020
615a306
Fix #871 so resolution is NOT checked before running build-namelist
ekluzek Jan 16, 2020
137cd0e
Update to latest cism release version for cesm2.1.2
ekluzek Jan 16, 2020
380887b
Merge branch 'relfatesupdate' of github.com:ekluzek/ctsm into relfate…
ekluzek Jan 16, 2020
2887c56
Fix the threading problem by declaring numdims as private
ekluzek Jan 18, 2020
73977e5
Update module init version, and remove version specific information f…
ekluzek Jan 20, 2020
258bdea
Update change files
ekluzek Jan 21, 2020
90f5989
Pass git-describe down, since you can only get it from within the git…
ekluzek Jan 21, 2020
67690f5
Merge branch 'relfatesupdate' of github.com:ekluzek/ctsm into relfate…
ekluzek Jan 21, 2020
4713406
Update PTCLM
ekluzek Jan 21, 2020
30ceef0
Update change file
ekluzek Jan 21, 2020
eea20af
Update doc
ekluzek Jan 21, 2020
2aebe6f
Merge pull request #846 from ekluzek/relfatesupdate
ekluzek Jan 21, 2020
3d52a38
Fix #921
ekluzek Mar 23, 2020
60efa37
Squashed 'manage_externals/' changes from fc5acdab..fde04e4d
ekluzek Mar 23, 2020
a6d663e
Merge commit '60efa371be6e3993dda50cd60eeccb0aa035a6d3' into rel2300ext
ekluzek Mar 23, 2020
fb7e1c8
Add some more notes about how to create SSP scenarios, this addressed…
ekluzek Mar 24, 2020
bd18373
Add test for when ndep file is missing
ekluzek Mar 24, 2020
45d62b7
Change missing ndep file into a warning that can be bypassed, and als…
ekluzek Mar 24, 2020
38dc392
Add the SSP5-8.5 2101-2300 extension for mksurfdata_map
ekluzek Mar 24, 2020
6828c83
Add raw data for the SSP5-3.4 extension 2101-2300
ekluzek Mar 24, 2020
a191aef
Add SSP1-2.6 extension for raw data files from 2101-2300
ekluzek Mar 24, 2020
503ca5a
Add 2100-2300 year range
ekluzek Mar 24, 2020
3c13661
Changes to add build-namelist extension of 2100-2300 for SSP5-8.5, cu…
ekluzek Mar 24, 2020
4bb145d
Add test for 2100-2300_SSP5-8.5_transient
ekluzek Mar 25, 2020
17ba079
Bring file from /glade/p/cesm/sdwg_dev/thesis/data/cesm_tools/anomaly…
ekluzek Mar 25, 2020
50c7774
Rename file to remove the python extension
ekluzek Mar 25, 2020
c473bbf
Some changes to get it to work with python3 and check that paths are …
ekluzek Mar 25, 2020
26d4022
Make time an unlimited dimension, add creation date, change subdirect…
ekluzek Mar 26, 2020
84ca818
Add some more metadata and print more information on the status
ekluzek Mar 26, 2020
77f9a25
Update README file
ekluzek Mar 26, 2020
55fba5f
Update cime to latest cime5.6 and cism-wrapper to latest release
ekluzek Mar 26, 2020
eb9c11a
Update ChangeLog
ekluzek Mar 26, 2020
ee42079
Mark PGI tests as working on izumi
ekluzek Mar 26, 2020
30f3990
Merge branch 'rel2300ext' of github.com:ekluzek/ctsm into rel2300ext
ekluzek Mar 26, 2020
1249e7c
Update Change files
ekluzek Mar 29, 2020
0b2b840
Merge pull request #949 from ekluzek/rel2300ext
ekluzek Mar 29, 2020
5113721
Add in 2100-2300 extension datasets, and add build-namelist tests for…
ekluzek Mar 30, 2020
3e4c49f
Fix 2100 fsurdat datasets for they point to the right SSP fixing #955
ekluzek Mar 31, 2020
90dcef2
Point to a cime branch to bring in the needed changes
ekluzek Mar 31, 2020
f8879f0
Add all three 2100-2300 extension compsets and add a test for it
ekluzek Mar 31, 2020
6447ea7
Settings needed for extension datasets 2100-2300
ekluzek Mar 31, 2020
03954bf
Ask for SSP for fsurdat since needed for 2100 files
ekluzek Mar 31, 2020
fb05de4
Merge commit '03954bf6' into rel2300ext
ekluzek Mar 31, 2020
0d34a1f
Correct dataset names for SSP extensions
ekluzek Apr 1, 2020
70c2b83
Add a shell_commands file to turn ignore_warnings on for the CMIP6 WA…
ekluzek Apr 1, 2020
82d4e75
Point to cime5.6.33 rather than branch tag
ekluzek Apr 1, 2020
868239d
Update change files
ekluzek Apr 2, 2020
8e1309a
Merge pull request #959 from ekluzek/rel2300ext
ekluzek Apr 2, 2020
c6bead8
Add SSP2-4.5 to the anomoly forcing script, point to a different head…
ekluzek Apr 7, 2020
26e2faa
Set irrigate to on for 2100-2300 extensions
ekluzek Apr 7, 2020
565c9b4
Change some of the units to be UDUNITS compliant for #966
ekluzek Apr 7, 2020
f4fb1ff
Change zero_nonveg_pfts to zero_nonveg_landunits according to #935
ekluzek Apr 7, 2020
ddc7334
Merge branch 'rel2300ext' of https://github.com/ekluzek/ctsm into rel…
ekluzek Apr 7, 2020
f439052
Fix Python3 problem in SSP fixes #974
ekluzek Apr 7, 2020
abbba05
Merge commit 'bc307472' into doc_source_release
billsacks Apr 7, 2020
73765e5
Add external for documentation images
billsacks Mar 22, 2020
7ed836a
Move documentation images up a level
billsacks Mar 22, 2020
0929ce5
Update paths etc. to allow documentation build from here
billsacks Mar 22, 2020
28c45da
Fixes for pdf
billsacks Mar 23, 2020
c8e99dc
Point to a rewritten version of the images repo
billsacks Mar 26, 2020
cbd6209
Update plant hydraulics to point to new svg version of the image
billsacks Mar 26, 2020
f3d0639
Remove old UsersGuide, no longer used
billsacks Mar 26, 2020
1221b81
Use git LFS to track image files
billsacks Mar 26, 2020
fd99824
By default, don't fetch files stored in LFS
billsacks Mar 26, 2020
9074c49
Store images directly in repository, managed by git LFS
billsacks Mar 26, 2020
cd5d63e
Before building html or pdf, automatically obtain all of the images
billsacks Mar 27, 2020
789b535
Use git lfs to track pdf files
billsacks Mar 27, 2020
d385c44
Add a pdf version of phs_iteration_schematic
billsacks Mar 27, 2020
7ec3e3a
Remove near-duplicated Makefiles and conf.py files
billsacks Mar 28, 2020
510c813
Change copyright, version, and other metadata
billsacks Mar 28, 2020
1c2ed61
Change html build to make versioned documentation with a dropdown menu
billsacks Mar 28, 2020
0bdc764
Documentation: Add CSS to improve the look of equations
billsacks Mar 30, 2020
fb84b6b
Update some version information
billsacks Apr 7, 2020
98b3812
Update version information for the release branch
billsacks Apr 7, 2020
a8b720c
Update the change files
ekluzek Apr 7, 2020
72a2987
Merge pull request #975 from ekluzek/rel2300ext
ekluzek Apr 7, 2020
0380be4
Use generic branch name for release, rather than specific tag
billsacks Apr 7, 2020
116b047
Merge branch 'release-clm5.0' into rel2300ext
ekluzek Apr 14, 2020
59e5505
Use the zero percent urban file when sim_year=PtVg, this requires put…
ekluzek Apr 14, 2020
84eef85
Add in a zero GDP and missing ABM file for PtVg
ekluzek Apr 14, 2020
82bbd1f
Merge pull request #976 from billsacks/doc_source_release
ekluzek Apr 20, 2020
f2a7edb
Merge branch 'release-clm5.0' of github.com:ESCOMP/ctsm into rel2300ext
ekluzek Apr 20, 2020
a37cb85
Update change files
ekluzek Apr 20, 2020
a2bc697
Add mksrfdt_f09_PtVg test
ekluzek Apr 20, 2020
0e2490b
Move section until when sim_yr0 is determined and use it rather than …
ekluzek Apr 20, 2020
27ed276
Update date
ekluzek Apr 21, 2020
e6ee5ea
Merge pull request #986 from ekluzek/rel2300ext
ekluzek Apr 21, 2020
8501a5e
Remove Copyright file
billsacks Apr 28, 2020
a2989b0
Merge pull request #999 from billsacks/remove_copyright_release
ekluzek May 1, 2020
6f51b15
Add .zenodo.json file
billsacks May 7, 2020
4941e4a
Change README to markdown
billsacks May 7, 2020
fee917c
Fix a link
billsacks May 7, 2020
c69bb49
Add names in core CTSM code management team
billsacks May 7, 2020
dc46cea
Bring in other changes from README file on master
billsacks May 14, 2020
0b38504
modified: README
Aug 7, 2020
cdc544d
Update README to version on master
billsacks Aug 13, 2020
0596876
Update README.md
ekluzek Nov 4, 2020
6f606d8
Merge branch 'release-clm5.0' into document_authorship_releaseclm50
ekluzek Nov 4, 2020
86949af
Merge pull request #1015 from billsacks/document_authorship_releaseclm50
ekluzek Nov 4, 2020
65ddb3a
Add doc-builder as an optional external
billsacks Oct 30, 2020
22a1e56
Update version of doc-builder
billsacks Oct 30, 2020
fa19f30
Update version of doc-builder
billsacks Nov 1, 2020
85d3548
Rely on build_docs to run 'make fetch-images' rather than Makefile rule
billsacks Nov 6, 2020
8099717
Update doc-builder
billsacks Nov 6, 2020
b41a09b
add anomaly forcing section
swensosc Nov 3, 2020
b0d4990
Call out the version dropdown menu
billsacks Nov 6, 2020
98739eb
Change version_label for release branch
billsacks Nov 6, 2020
c1e0e69
Revert "Change version_label for release branch"
billsacks Nov 7, 2020
15a1eaf
Tweak handling of version_label to reduce duplication
billsacks Nov 7, 2020
acca763
Change version_label for release branch
billsacks Nov 7, 2020
6645130
Tweak "important" call-out
billsacks Nov 7, 2020
dc5ea97
Fixes for latest sphinx version
billsacks Jul 30, 2020
3c00edf
Bringing a copy of master_list_file.rst to the release-clm5.0 branch
slevis-lmwg Sep 7, 2021
4d9bb14
Merge pull request #1480 from slevisconsulting/master_hist_list_updates
billsacks Sep 8, 2021
d035667
Fix errors in technical note Eq. 2.3.16
olyson Nov 30, 2021
d2b2706
Merge pull request #1568 from olyson/releasedoc
billsacks Nov 30, 2021
9fa4d0d
Implement CLM-FruitTree sub-model for deciduous fruit trees
odombro Feb 8, 2022
c4f164e
Update README
odombro Feb 8, 2022
2a1f5b9
Update README
odombro Feb 9, 2022
7b82320
Update README
odombro Feb 9, 2022
64c8749
Update README
odombro Feb 9, 2022
87b35be
Correct orchard rotation/replanting trigger
odombro Mar 14, 2022
093c985
Make taper and nstem PFT parameters to be set in parameter file
odombro May 5, 2022
2a6d95e
Update parameter file with taper and nstem parameters
odombro May 5, 2022
57586d7
added references to CLM-Palm (Fan et al. 2015)
odombro May 22, 2022
ad3d25b
Bug fix in CNPhenology and CNVegStructUpdateMod, and parameter value …
odombro May 30, 2022
7c9a3bb
Included harvest trigger when leaf offset starts
odombro Aug 17, 2022
17f3e8a
debug planting of fruit trees, make two more CFTs active
odombro Oct 18, 2022
2a21cb0
Fix orchard rotation carbon balance error
odombro Nov 4, 2022
a6bd8de
added new subroutine for orchard rotation
odombro Nov 15, 2022
7edde0b
cleaned up some scripts, added some crop types to active CFTs
odombro Nov 15, 2022
59b6a30
Corrected flux assignment from column to patch level
odombro Jul 17, 2023
d4c6a1b
Update README
odombro Dec 18, 2023
2c1722c
Update README
odombro Dec 18, 2023
e68cba1
Replace name variables citrus by apple, irrig_citrus by irrig_apple, …
AGonzalezNicolas Apr 19, 2024
5a01bbc
Merge WinterCrops into FruitTree_namesVar_v2
AGonzalezNicolas Apr 30, 2024
eaf4f9b
Replace 'citrus' by 'apple' after merging WC into FT_namesVar
AGonzalezNicolas Apr 30, 2024
457f7a4
Move clm5 files from src to src_clm5
AGonzalezNicolas Jul 12, 2024
b377297
Add eCLM-style src folder/remove temporary folder
AGonzalezNicolas Jul 12, 2024
53ccb0a
Remove files & folders not in src, base for eCLM
AGonzalezNicolas Jul 12, 2024
8f7eddd
Join eCLM into release-clm5_FTWC
AGonzalezNicolas Jul 12, 2024
39d0b4b
Functional CMake build scripts (PR Nr 1)
AGonzalezNicolas Jul 12, 2024
6a25563
Added SetBuildOptions.cmake (PR Nr 2)
AGonzalezNicolas Jul 12, 2024
0a313e5
clm5nl-gen - CLM5 namelist generator script (PR Nr 3)
AGonzalezNicolas Jul 12, 2024
7f710da
Created namelist generator scripts for driver, datm, mosart, and mode…
AGonzalezNicolas Jul 12, 2024
47554a0
Refactored namelist generator scripts (PR Nr 5) Merge commit 'f00d96b…
AGonzalezNicolas Jul 12, 2024
3954750
Added minimal README and removed bootstrap script Merge commit '67bcc…
AGonzalezNicolas Jul 12, 2024
474df44
Updated LICENSE and README
AGonzalezNicolas Jul 12, 2024
534263a
Fixed parsing errors and incorrectly set namelist parametrs (PR Nr 6)…
AGonzalezNicolas Jul 12, 2024
0aadb9c
clm5nl-gen v0.5 (PR Nr 7) Merge commit 'ce4a59a5154fd758fbde896eb06c5…
AGonzalezNicolas Jul 12, 2024
b72b807
Updated README with a brief project description and current developme…
AGonzalezNicolas Jul 12, 2024
1f4d881
CMake refactoring (PR Nr 8) Merge commit '48437852ecf61d83e4799b1e5a2…
AGonzalezNicolas Jul 12, 2024
074d0b4
Added section on running a sample test case, Merge commit 'c31f6f25aa…
AGonzalezNicolas Jul 12, 2024
65f5e8d
NetCDF lib finder fixes for non-CMAke installs, Merge commit '23746a6…
AGonzalezNicolas Jul 12, 2024
07f4703
Updated README - fixed typos and removed support for BUILD_MCT, Merge…
AGonzalezNicolas Jul 12, 2024
4b45c44
OASIS-MCT integration initial developments (PR Nr 9), Merge commit '2…
AGonzalezNicolas Jul 12, 2024
ab6531a
Fixes for incorrect coupling field data (PR Nr 10), Merge commit '3c1…
AGonzalezNicolas Jul 12, 2024
170dcfb
Removed optional argument var_noshape in oasis_def_var, Merge commit …
AGonzalezNicolas Jul 12, 2024
38b9248
clm5nl-gen v0.6 (PR Nr 16), Merge commit '9a2cb72e7cd90af138468b7d6bd…
AGonzalezNicolas Jul 12, 2024
46d58a5
eCLM-ParFlow coupling (PR Nr 17), Merge commit '81383687999c70d529a43…
AGonzalezNicolas Jul 12, 2024
6cb797f
eCLM-ICON coupling (PR Nr 18), Merge commit '954e9b221eb232393e30ce27…
AGonzalezNicolas Jul 12, 2024
43e018b
PDFA support (PR Nr 23), Merge commit '709eccf2e35649c4ea809e4101b7eb…
AGonzalezNicolas Jul 12, 2024
45ab64a
USE_PDAF: `mpi_init` call in `cime_comp_mod` switched off for PDAF (P…
AGonzalezNicolas Jul 12, 2024
f6bfd47
Enabled automatic compilation check via GitHub CI pipeline (PR Nr 27)…
AGonzalezNicolas Jul 12, 2024
d414825
Modify CI workflow for branch eclm
AGonzalezNicolas Jul 12, 2024
b47a18f
Update CI.yml
AGonzalezNicolas Jul 12, 2024
4a12c55
Update README.md
AGonzalezNicolas Jul 12, 2024
c732122
Delete not used files by eCLM
AGonzalezNicolas Jul 23, 2024
a9a5114
Updated README file
AGonzalezNicolas Jul 23, 2024
50654ef
Create CI.yml
AGonzalezNicolas Jul 23, 2024
d6b4545
Update CI.yml
AGonzalezNicolas Jul 23, 2024
c05b378
Change permissions in `src/externals/mct`
jjokella Jul 25, 2024
83ea56f
Fixed "Map Grid Size mismatch error" and "array PARTITION error (Nr 2…
AGonzalezNicolas Jul 25, 2024
d36d2de
Build fixes in GitHub actions and Levante (Nr 31)
AGonzalezNicolas Jul 25, 2024
9cf9069
Speed up CI build (Nr 32)
AGonzalezNicolas Jul 25, 2024
bff59cc
Supported POINTS partitioning and tested coupled builds tests in CI (…
AGonzalezNicolas Jul 25, 2024
172be94
PDFAF: refactor cime/mct routines, Merge commit '23721d49438834d1db67…
AGonzalezNicolas Jul 25, 2024
7c28e0e
Introduce `cime_run(ntsteps)`, callable for TSMP-PDAF (Nr 36), Merge …
AGonzalezNicolas Jul 25, 2024
a72229c
Refactor to modify x2l instead of atm2lnd (Nr 40), Merge commit 'b882…
AGonzalezNicolas Jul 25, 2024
6466ad3
tboas: organic carbon fertilization from farmyard manure (cfert)
tboas May 7, 2026
a0bf8ff
tboas: cfert v2 — single-timestep application, litter fractions, inje…
tboas May 8, 2026
b3fd97a
feat: add optional use_covercropping switch with dyn-path rotation
tboas Jul 20, 2026
450b99b
feat: file-driven cover-crop rotation via transient_landuse_file
tboas Jul 20, 2026
d331083
docs: add README for cover-cropping source code changes
tboas Jul 20, 2026
30190ed
feat: complete file-driven cover-crop rotation implementation
tboas Jul 20, 2026
5576459
feat: add use_fruittree namelist switch for backward compat
tboas Jul 21, 2026
0c1ff6d
feat: backward compat for fruittree/covercrop with old param files
tboas Jul 21, 2026
17cd3d0
feat: calendar-date rotation switch + IVT history output
tboas Jul 27, 2026
8781065
feat: calendar-date crop rotation + IVT history output
tboas Jul 29, 2026
a80f46f
wip: post-harvest crop switching + xsmrpool/onset flag reset
tboas Jul 31, 2026
7039471
Fix crop rotation phase-2 lockout after PFT switch
tboas Aug 4, 2026
4780a06
Two-date calendar crop rotation replacing post-harvest switch
tboas Aug 4, 2026
6959e84
Sugar beet season length + autumn sowing retry
tboas Aug 4, 2026
a8849bf
Remove dead manure_lignin_frac declaration
tboas Aug 5, 2026
390125b
Winter cover-crop slot and window-driven autumn sowing
tboas Aug 6, 2026
f75eb5e
Per-patch use_grainproduct, cached rotation reads, hoisted date test
tboas Aug 6, 2026
e20d038
Disable per-patch debug writes in the vernalization and FUN paths
tboas Aug 18, 2026
ff3643d
eCLM_FYM correctness fixes
tboas Aug 20, 2026
7c2a70d
Fire/allometry params, grainproduct bcast, CFT list, manure date
tboas Aug 20, 2026
44790da
Add case-setup tutorial, generic rotation-file template, reference pa…
tboas Aug 24, 2026
ab27d2e
dynHarvestMod: guard cover-crop termination to actual cover-crop patches
tboas Aug 24, 2026
cfa2b6b
Add eCLM_FYM implementation matrix doc
tboas Aug 26, 2026
58a506c
Merge branch 'master' into eCLM_FYM_fixes
jjokella Sep 29, 2026
dcbae20
.github: remove CTSM files
jjokella Sep 29, 2026
70d4c8a
src: mode changes of several files
jjokella Sep 29, 2026
b3a6d62
remove whitespace
jjokella Sep 29, 2026
ce5c1a3
.gitignore: master-version, move test-files to docs/params
jjokella Sep 29, 2026
2d97260
whitespace
jjokella Sep 29, 2026
e797676
remove comments
jjokella Sep 29, 2026
cde4946
AI summary of changes
jjokella Sep 29, 2026
7109836
Merge branch 'master' into eCLM_FYM_fixes_merged_with_master
jjokella Oct 23, 2026
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
166 changes: 166 additions & 0 deletions README_FYM_fixes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# eCLM_FYM — correctness fixes before production runs

Branch: `eCLM_FYM_fixes` (branched from `eCLM_FYM`)
All changes are marked in the source with `tboas-fix`.

Verified: RELEASE and DEBUG builds complete and link (GCC 13, OpenMPI, netCDF 4.9.2,
PnetCDF 1.12.3).

---

## 1. CropType restart state (`src/clm5/biogeochem/CropType.F90`)

The 12 patch variables added for winter-cereal cold hardening and perennial crop
age were never written to the restart file. They initialise to `spval` (~1e36)
and `huge(1)`, so any restart during hardening or during a perennial's growing
season fed garbage into

rateh = Hparam*(10-tcrown)*(lt50-lt50max) (CNPhenologyMod:~3324)
fsurv = 2**(-(|tcrown|/|lt50|)**4)
idpp = dayspyr*(kyr-yrop) + jday - idop (CNPhenologyMod:~1802, ~3675)

`yrop` is an integer, so `kyr - huge(1)` overflowed.

`yrop`, `lt50`, `wdd`, `rateh`, `rated`, `rates`, `rater`, `fsurv`, `accfsurv`,
`countfsurv`, `ck` and `tcrown` are now restarted. Reading a pre-fix restart file
is handled: `yrop` falls back to the current year and the hardening state falls
back to the values `CropPhenology` assigns at planting (`lt50=-5`, `fsurv=1`,
`accfsurv=1`, `countfsurv=1`, rates `=0`). Both fallbacks log on `masterproc`.

**This is the fix that matters most for spinup**, because a long spinup is by
definition a restart chain.

## 2. Manure nitrogen was counted twice

`manunitro(ivt(p))` was applied in full as immediately-available mineral N
*and* used again, multiplied by `manure_CN_ratio`, to size a pulse of organic
carbon that carried no nitrogen at all.

Now, when `use_cfert = .true.`:

* `manure_nh4_frac` (new, default **0.25**) of the manure N goes to the mineral
pool on the existing fertiliser schedule — the ammoniacal fraction.
* the remaining `(1 - manure_nh4_frac)` enters the litter pools as organic N
together with the manure C, at exactly `manure_CN_ratio`, and is mineralised
by the decomposition cascade. This is the DNDC/DayCent convention.
* the manure C is sized from the **organic** N only, so no nitrogen is used twice.
* the `manure_freq_years` / `manure_apply_month` gate now applies to the mineral
part as well. Previously the gate only governed the carbon, so manure N was
applied every year even in years when no manure carbon was.

With `use_cfert = .false.` the behaviour is unchanged: `manunitro` is treated
purely as mineral fertiliser N, exactly as in stock CLM5.

Typical `manure_nh4_frac`: ~0.25 solid farmyard manure, ~0.5–0.6 cattle/pig slurry.

New patch flux `fertN_patch` (history field `Norg_FERT`, gN/m²/s, inactive by
default) mirrors the existing `fertC_patch` / `Corg_FERT`, and is restarted.

## 3. Mass-conservation checks restored

`CNBalanceCheckMod` had its abort thresholds hardcoded to `100` gC and gN
m⁻² per timestep — roughly a season of NPP, i.e. the check was off. They are
back at the CLM5 default `1e-7`, now via `cn_balance_tol_c` / `cn_balance_tol_n`
so a tolerance can be widened *deliberately and visibly* while debugging. Any
value above `1e-6` prints a "do not use for production" warning at startup.

The underlying imbalance is also fixed. `covercrop_switch_ivt` set
`xsmrpool_patch(p) = 0`, and `xsmrpool` is inside `totc_patch` — so that
statement destroyed carbon (or created it, when the pool held a respiration
debt) with no matching flux. It now moves into `xsmrpool_loss_patch`, which is
also inside `totc_patch`, and `CNCStateUpdate1Mod` releases it through
`xsmrpool_to_atm` — a flux the C balance already counts as an output. A branch
was added there so the pool still drains when `dribble_crophrv_xsmrpool_2atm`
is off, which is the default.

The manure C and N balance terms are now aggregated over active patches only,
matching how `CNCSoilFert` actually applies them.

## 4. Out-of-bounds write on the PFT table (`pftconMod.F90`)

`set_is_pft_known_to_model` marked literal indices `27, 28, 55, 56, 59, 60, 65,
66, 78, 79`. `mxpft = 78` and the array is allocated `(0:mxpft)`, so **index 79
was out of bounds** — trapped in DEBUG, silent heap corruption in RELEASE. And
per `expected_pftnames`, `covercrop_1`/`covercrop_2` are at 77/78, not 78/79, so
the cover-crop pair was off by one and `covercrop_1` was never marked.

The list is now resolved by name (`nwbarley`, `nirrig_wbarley`, `npotatoes`,
`nirrig_potatoes`, `nrapeseed`, `nirrig_rapeseed`, `nsugarbeet`,
`nirrig_sugarbeet`, `ncovercrop_1`, `ncovercrop_2`) using the same idiom already
used for `apple` and `covercrop_1`, so it survives a change of parameter file.
Each resolved index is range-checked against `[npcropmin, mxpft]` and echoed to
the log with the PFT name found there.

> Please confirm this name list is what was intended. It was reverse-engineered
> from the literal indices against `expected_pftnames`.

## 5. Uninitialised landunit index (`CNVegCarbonStateType.F90`)

In the AD-spinup reseed block, `lun%itype(l)` was read one statement *before*
`l = patch%landunit(i)` was assigned, so it used the previous loop iteration's
value. `l = patch%landunit(i)` now comes first. Confirmed with gfortran: the
pre-fix file emits `'l' may be used uninitialized` at that line; the fixed file
does not.

`deadstemc_soy` / `deadstemc_storage_soy` / `deadstemn_soy` are also now included
in the x10 / ÷10 AAD-spinup rescaling applied to `deadstemc` / `deadstemn`, since
they are compared against those pools.

## 6. Per-patch debug writes

15 `write(iulog,*)` statements in `dynHarvestMod`, `dynCovercropFileMod`,
`CNPhenologyMod` and `CNBalanceCheckMod` fired once per patch, from every MPI
rank, with no `masterproc` guard — on rotation dates that is O(10⁵) lines per
rank at 1 km, and the `coldtolerance` and `cbalance warning` traces fired every
timestep.

They are now behind `debug_covercrop`, a `logical, parameter` in `clm_varctl`
(default `.false.`), so the compiler removes them entirely. Set it to `.true.`
and rebuild for single-point debugging.

---

## New namelist variables (`&cfert_inparm`)

| Variable | Type | Default | Meaning |
|---|---|---|---|
| `manure_nh4_frac` | real | 0.25 | Ammoniacal fraction of applied manure N. The rest becomes organic N in litter. Range-checked to [0,1]. |
| `cn_balance_tol_c` | real | 1e-7 | C mass-conservation abort threshold, gC/m²/timestep. |
| `cn_balance_tol_n` | real | 1e-7 | N mass-conservation abort threshold, gN/m²/timestep. |

The Python namelist generator does not need to know about these; the Fortran
defaults apply when they are absent from `lnd_in`.

## Also worth setting, unchanged by this branch

`use_grainproduct = .true.`. It defaults to `.false.`, and when false
`grainc_to_food` is routed into `litfall` (`CNVegCarbonFluxType:~4367`) — the
harvested grain never leaves the domain and is eventually respired back, which
biases cropland NEE/NBP.

## 7. Calendar-date manure application

`manure_apply_month > 0` never worked: the gate sat inside the leaf-emergence
onset block, which fires on a single timestep once per season, so a fixed
calendar date essentially never coincided with it and the manure was silently
never applied. Only `manure_apply_month = 0` was functional.

The date-driven case is now handled at the top of the crop patch loop, where it
is reached every timestep, and the onset path is restricted to
`manure_apply_month == 0` so the two cannot both fire. Only the organic C and N
are date-driven; the ammoniacal fraction stays on the standard fertiliser
schedule, metered from onset over `ndays_on`, since that is plant-available N.
The `manure_freq_years` gate now applies to the ammoniacal N on both paths.

Because the new block sits before the perennial branch, fruit-tree patches also
receive manure for the first time -- `FruitTreePhenology` writes no `fertC` /
`fertN` of its own, so with `manure_apply_month = 0` perennials still get none.

## Not addressed here

* The single-timestep manure C pulse (`fertC = manureC / dtrad`) is kept, as
requested. It is numerically violent; if the balance check trips at a manure
application date, spreading it over `ndays_on` is the first thing to try.
* In `CNNStateUpdate1Mod`, the perennial-woody branch skips
`livestemn_to_litter` while `CNPhenologyMod` may still route that flux into
the litter pools. If the N balance trips on fruit-tree patches, look there.
Loading
Loading