-
Notifications
You must be signed in to change notification settings - Fork 317
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
Add soil tillage for crops #2040
Merged
Merged
Changes from 103 commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
298845e
First commit bringing tillage in from Mike Graham's code.
samsrabin a2f56c3
Compile fixes to previous.
samsrabin 4c00684
Added namelist setup logic for tillage params.
samsrabin 2adb528
Fixes to reading tillage namelist.
samsrabin ff41083
Replace index vars: i_litr2 → i_cel_lit, i_litr3 → i_lig_lit.
samsrabin 416eae4
Only apply tillage multipliers once per column!
samsrabin 7a006dc
Remove patch loops in get_tillage_multipliers*() subroutines.
samsrabin aefd94a
Is it that crop columns have multiple patches but only 1 is active?
samsrabin e909270
Is it that my filtering of non-crop columns didn't work?
samsrabin 4a447d4
Added TODO: Figure out how to simply identify crop columns.
samsrabin 5dda283
Only set tillage_mults(:) = 1 once per get_tillage_multipliers*() sub…
samsrabin 2453126
Removed unneeded patch stuff from tillage_init().
samsrabin 6c4a6e7
Removed unused indices from get_tillage_multipliers*().
samsrabin f1732c7
Simplified specification of tillage multipliers.
samsrabin e80cfdf
Merged get_tillage_multipliers*() subroutines.
samsrabin 6c36b20
Simplify application of tillage multipliers.
samsrabin aaf20aa
Tillage params now duplicated as private vars.
samsrabin 6e1102f
Added tillage params to namelist_defaults_ctsm.xml.
samsrabin 6fedb42
Added high-intensity tillage from Mike Graham's code.
samsrabin eb42243
Removed a check from tillage_init() that was already in CLMBuildNamel…
samsrabin e132e43
Removed a TODO that was already done.
samsrabin 9386d81
Corrected capitalization of TillageMod's .F90.
samsrabin df7e4de
Moved filling of tillage_mults_allphases to its own subroutine.
samsrabin 2a812c4
Error if called with soil_decomp_method other than CENTURYKoven2013.
samsrabin 270a5cd
Do not loop through soil layers within a loop through soil layers.
samsrabin 2d79b38
Merge tag 'ctsm5.1.dev128' into tillage-reorg02
samsrabin 6a2f1ae
Typo fix.
samsrabin 80ea55c
Replaced do_tillage_* logicals with character tillage_mode.
samsrabin 6acf76e
Discard use_original_tillage_private.
samsrabin 4308802
Run fixes.
samsrabin 6c0049a
Only call tillage_init_century() if doing tillage.
samsrabin e85505e
Allow tillage with FATES.
samsrabin d144df9
Added note about GDP dependence in old code.
samsrabin 44eeaf7
Reorder tillage_mults_allphases fill for consistency.
samsrabin 35b7f23
Removed an old comment in TillageMod.
samsrabin 9090a6e
TillageMod now has its own copies of indices for soil pools.
samsrabin 8c43072
Initialize tillage for MIMICS; not yet applying.
samsrabin a5e770e
Added note.
samsrabin 07a259f
Only pass one patch's idop to get_tillage_multipliers().
samsrabin 48b697e
Generalize tillage to work with multiple active crop patches.
samsrabin 70e65c3
Merge branch 'tillage-multi-patch' into tillage-dev
samsrabin 13f898c
Merge branch 'tillage-dev' into tillage-mimics
samsrabin eb3171d
Moved TillageMod.F90 to soilbiogeochem/
samsrabin 955ec7f
Tillage now applied to MIMICS.
samsrabin 6c4e019
Compile fixes.
samsrabin f9a03e6
Merge branch 'tillage-mimics' into tillage-dev
samsrabin d629ddd
Added script to add tillage parameters to params file.
samsrabin c148410
Tillage multipliers now read from params file.
samsrabin de88db0
Add git status info to params file.
samsrabin 49b15ad
Save paramfile as NETCDF3_CLASSIC.
samsrabin 0441df0
Replaced logical do_tillage_* with integer tillage_intensity.
samsrabin 163147e
Removed unused 'use' in readParams_netcdf().
samsrabin 23a89d6
Renamed nphases to ntill_intensities_max for consistency with netCDF …
samsrabin f61f983
Move present(idop) checks to beginning of decomp_rates_* subroutines.
samsrabin c1757d1
Rework get_apply_tillage_multipliers() to j;c loop instead of c;j.
samsrabin 8cfeafe
Slice decomp_k by column and soil layer before passing to get_apply_t…
samsrabin 750f5b9
Merge branch 'tillage-dev' into tillage
samsrabin 7eaf5e2
Merge tag 'ctsm5.1.dev132' into tillage
samsrabin 4a8adff
Bugfix to check that tillage is off when use_crop false.
samsrabin d856f1b
Improved description of get_tillage_multipliers().
samsrabin b71fa23
Improved description of use_original_tillage parameter.
samsrabin c5ee474
Improved error message when tillage on but use_crop off.
samsrabin fe568e1
Use get_do_tillage() in first readParams_netcdf() return check.
samsrabin 3495f4b
Added a space.
samsrabin 1865649
get_apply_tillage_multipliers(): multiple crop patches are OK.
samsrabin 9063873
get_apply_tillage_multipliers: Check for sumwt < 1.
samsrabin f01adc6
Share idpp calculation code.
samsrabin cb5a889
Prepend bgc_ to till_decompk_multipliers.
samsrabin 86b81fb
Till to 32 cm depth rather than top 5 soil layers.
samsrabin 69451e2
Allow partially-tilled soil layers.
samsrabin 8e67f28
max_tillage_depth is now a namelist parameter.
samsrabin b18572d
Added a comment and TODO.
samsrabin 7af6bf6
Max till depth now 26cm (match text of Graham et al., 2021).
samsrabin ebda444
Renamed var & added text re: original tillage settings.
samsrabin 2d76faa
Moved fraction_tilled calculation to new function get_fraction_tilled().
samsrabin e628c71
Added unit test for get_fraction_tilled().
samsrabin b12c780
Corrected a unit in a comment.
samsrabin c5171fe
get_apply_tillage_multipliers(): Skip non-crop columns more simply.
samsrabin 579ca9a
Bug fix in get_fraction_tilled().
samsrabin 7f7dfc8
test_get_fraction_tilled(): Use nlayers instead of 5.
samsrabin 46da730
test_get_fraction_tilled(): Now works with new function call.
samsrabin 9c1618b
get_fraction_tilled() no longer takes argument j.
samsrabin b87fbd9
get_fraction_tilled() can now handle zero-thickness layers.
samsrabin c0d8784
Simplify and split up test_get_fraction_tilled().
samsrabin 77d0c7d
get_fraction_tilled() receives layer_bottom, not layer_top.
samsrabin 3c24b25
Prevent tillage from being enabled.
samsrabin d43c617
Merge tag 'ctsm5.1.dev142' into tillage
samsrabin c8d6754
Removed a TODO.
samsrabin 7510431
Removed an incorrect comment.
samsrabin d565176
Do not till generic crops.
samsrabin b86402e
Warn instead of fail when trying to enable tillage.
samsrabin 1a3a8b7
Delete add_tillage_to_paramsfile.py.
samsrabin ae56384
Use ntill_intensities_max; set to private.
samsrabin d1f08a7
Add script used to add tillage to paramfile.
samsrabin d566b6d
Specify posNOTonfile=.true. in call of ncd_io() for till_decompk_mult…
samsrabin 693750c
Replace a ntill_stages_max with ntill_intensities_max.
samsrabin 9af1a04
Merge tag 'ctsm5.1.dev159' into tillage
samsrabin fffa851
Typo fix in crop Tech Note.
samsrabin ff610b4
Add tillage documentation to Tech Note.
samsrabin c86e1b6
Add "Running with tillage" section to User's Guide.
samsrabin f344ff1
Add 'till' testdef.
samsrabin 0665754
Use parameter files with tillage multipliers (*.c240105.nc).
samsrabin 2f69473
Remove warning about tillage not being scientifically tested.
samsrabin 142c2c1
Enable tillage in two aux_clm tests.
samsrabin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c231117.nc' | ||
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c240105.nc' | ||
hist_fincl1 = 'CWDC_HR','C13_CWDC_HR','C14_CWDC_HR','CWD_HR_L2','CWD_HR_L2_vr','CWD_HR_L3','CWD_HR_L3_vr' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../crop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tillage_mode = 'high' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
doc/source/users_guide/running-special-cases/Running-with-tillage.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.. _running-with-tillage: | ||
|
||
.. include:: ../substitutions.rst | ||
|
||
===================== | ||
Running with tillage | ||
===================== | ||
|
||
|
||
Cropland tillage (Sect. :numref:`decomp_mgmt_modifiers`) can be toggled by specifying a value of ``'low'`` (low intensity) or ``'high'`` (high intensity) for the ``tillage_mode`` namelist option. By default this option is ``'off'``. | ||
|
||
Depth of tillage can be changed with the ``max_tillage_depth`` parameter (meters; default 0.26). | ||
|
||
Tillage multipliers for different soil pools and time since planting are defined on the parameter file, in variables ``bgc_till_decompk_multipliers`` (for CENTURY soil) and ``mimics_till_decompk_multipliers`` (for MIMICS soil). These variables were originally added with the script at ``tools/contrib/add_tillage_to_paramsfile.py``, which can be modified as needed to change tillage multipliers. | ||
|
||
|
||
Example: Crop simulation with tillage | ||
------------------------------------- | ||
:: | ||
|
||
> cime/scripts/create_newcase -case IHistClm51BgcCrop_till -res f19_g17_gl4 -compset IHistClm51BgcCrop | ||
|
||
|
||
> cd IHistClm51BgcCrop_till | ||
> ./case.setup | ||
|
||
# turn on tillage ('low' or 'high'; default 'off') | ||
> echo "tillage_mode = 'high'" >> user_nl_clm | ||
|
||
Reverting fixes relative to original tillage implementation | ||
----------------------------------------------------------- | ||
|
||
The current implementation of tillage in CTSM is based on work by :ref:`Graham et al. (2021) <Grahametal2021>`, but with fixes to how days after planting is calculated and to default tillage depth. To run without those changes: | ||
|
||
:: | ||
|
||
> echo "use_original_tillage_phases = .true." >> user_nl_clm | ||
> echo "max_tillage_depth = 0.32" >> user_nl_clm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tangential to the work here, and perhaps something you've already done with the prescribed planting dates: Is it worth adding this variable to history to better identify crop phenology? I'm not sure if similar variables exist for leaf emergence and harvest, but it would be great to add (if they don't exist) and write them out. Likely easier to analyze than the current CPHASE variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did indeed add output for day of planting and harvest for the crop calendar work; you can see all the outputs I added here. No such variables exist for emergence and the vegetative-reproductive transition, but they could for sure be added in the future.