-
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
Changes from 59 commits
298845e
a2f56c3
4c00684
2adb528
ff41083
416eae4
7a006dc
aefd94a
e909270
4a447d4
5dda283
2453126
6c4a6e7
f1732c7
e80cfdf
6c36b20
aaf20aa
6e1102f
6fedb42
eb42243
e132e43
9386d81
df7e4de
2a812c4
270a5cd
2d79b38
6a2f1ae
80ea55c
6acf76e
4308802
6c0049a
e85505e
d144df9
44eeaf7
35b7f23
9090a6e
8c43072
a5e770e
07a259f
48b697e
70e65c3
13f898c
eb3171d
955ec7f
6c4e019
f9a03e6
d629ddd
c148410
de88db0
49b15ad
0441df0
163147e
23a89d6
f61f983
c1757d1
8cfeafe
750f5b9
7eaf5e2
4a8adff
d856f1b
b71fa23
c5ee474
fe568e1
3495f4b
1865649
9063873
f01adc6
cb5a889
86b81fb
69451e2
8e67f28
b18572d
7af6bf6
ebda444
2d76faa
e628c71
b12c780
c5171fe
579ca9a
7f7dfc8
46da730
9c1618b
b87fbd9
c0d8784
77d0c7d
3c24b25
d43c617
c8d6754
7510431
d565176
b86402e
1a3a8b7
ae56384
d1f08a7
d566b6d
693750c
9af1a04
fffa851
ff610b4
c86e1b6
f344ff1
0665754
2f69473
142c2c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2881,5 +2881,18 @@ Mapping method from excess ice input stream data to the model resolution | |
none = no interpolation | ||
</entry> | ||
|
||
<!-- ======================================================================================== --> | ||
<!-- Namelist items controlling tillage --> | ||
<!-- ======================================================================================== --> | ||
|
||
<entry id="tillage_mode" type="char*8" category="physics" | ||
group="tillage_inparm" valid_values="off,low,high"> | ||
Whether to till crop soil, and if so, with what intensity. | ||
</entry> | ||
|
||
<entry id="use_original_tillage" type="logical" category="physics" | ||
group="tillage_inparm" valid_values="" value=".false."> | ||
Toggle to use original tillage logic | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the 'original' logic what was included in Mike's code with potential bugs, or Sam Levis' original code? Can we specify here by including a reference? You have Mike's, and here's a link to Sam's earlier work: https://gmd.copernicus.org/articles/7/613/2014/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately I can't tell where it was introduced. It's present in Mike's code, but the git history isn't helpful; there's no link to Sam L.'s code in the publication you linked. Ultimately I think it doesn't matter where it was introduced, though, because Sam L.'s paper only looked at sites in the US Midwest, where I don't expect seasons to ever cross into a new calendar year. I've updated the description with commit b71fa23:
What do you think? |
||
</entry> | ||
|
||
</namelist_definition> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,8 +229,6 @@ subroutine init_decompcascade_bgc(bounds, soilbiogeochem_state_inst, soilstate_i | |
! initialize rate constants and decomposition pathways following the decomposition cascade of the BGC model. | ||
! written by C. Koven | ||
! | ||
! !USES: | ||
! | ||
! !ARGUMENTS: | ||
type(bounds_type) , intent(in) :: bounds | ||
type(soilbiogeochem_state_type) , intent(inout) :: soilbiogeochem_state_inst | ||
|
@@ -511,7 +509,8 @@ end subroutine init_decompcascade_bgc | |
|
||
!----------------------------------------------------------------------- | ||
subroutine decomp_rate_constants_bgc(bounds, num_soilc, filter_soilc, & | ||
soilstate_inst, temperature_inst, ch4_inst, soilbiogeochem_carbonflux_inst) | ||
soilstate_inst, temperature_inst, ch4_inst, soilbiogeochem_carbonflux_inst, & | ||
idop) | ||
! | ||
! !DESCRIPTION: | ||
! calculate rate constants and decomposition pathways for the CENTURY decomposition cascade model | ||
|
@@ -521,6 +520,9 @@ subroutine decomp_rate_constants_bgc(bounds, num_soilc, filter_soilc, & | |
use clm_time_manager , only : get_average_days_per_year, get_step_size | ||
use shr_const_mod , only : SHR_CONST_PI | ||
use clm_varcon , only : secspday | ||
use TillageMod , only : get_do_tillage | ||
use TillageMod , only : get_apply_tillage_multipliers | ||
use landunit_varcon , only : istcrop | ||
! | ||
! !ARGUMENTS: | ||
type(bounds_type) , intent(in) :: bounds | ||
|
@@ -530,6 +532,7 @@ subroutine decomp_rate_constants_bgc(bounds, num_soilc, filter_soilc, & | |
type(temperature_type) , intent(in) :: temperature_inst | ||
type(ch4_type) , intent(in) :: ch4_inst | ||
type(soilbiogeochem_carbonflux_type) , intent(inout) :: soilbiogeochem_carbonflux_inst | ||
integer, optional , intent(in) :: idop(:) ! patch day of planting | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
! | ||
! !LOCAL VARIABLES: | ||
real(r8), parameter :: eps = 1.e-6_r8 | ||
|
@@ -595,6 +598,10 @@ subroutine decomp_rate_constants_bgc(bounds, num_soilc, filter_soilc, & | |
errMsg(sourcefile, __LINE__)) | ||
endif | ||
|
||
if (get_do_tillage() .and. .not. present(idop)) then | ||
call endrun("Do not enable tillage without providing idop to decomp_rate_constants_bgc().") | ||
end if | ||
|
||
days_per_year = get_average_days_per_year() | ||
dt = real( get_step_size(), r8 ) | ||
|
||
|
@@ -895,6 +902,12 @@ subroutine decomp_rate_constants_bgc(bounds, num_soilc, filter_soilc, & | |
decomp_k(c,j,i_cwd) = k_frag * t_scalar(c,j) * w_scalar(c,j) * & | ||
depth_scalar(c,j) * o_scalar(c,j) * spinup_geogterm_cwd(c) | ||
end if | ||
|
||
! Tillage | ||
if (get_do_tillage()) then | ||
call get_apply_tillage_multipliers(idop, c, j, decomp_k(c,j,:)) | ||
end if | ||
|
||
! Above into soil matrix | ||
if(use_soil_matrixcn)then | ||
! same for cwd but only if fates is not enabled; fates handles CWD | ||
|
@@ -904,6 +917,7 @@ subroutine decomp_rate_constants_bgc(bounds, num_soilc, filter_soilc, & | |
end if !use_soil_matrixcn | ||
end do | ||
end do | ||
|
||
pathfrac_decomp_cascade(bounds%begc:bounds%endc,1:nlevdecomp,i_l1s1) = 1.0_r8 | ||
pathfrac_decomp_cascade(bounds%begc:bounds%endc,1:nlevdecomp,i_l2s1) = 1.0_r8 | ||
pathfrac_decomp_cascade(bounds%begc:bounds%endc,1:nlevdecomp,i_l3s2) = 1.0_r8 | ||
|
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.
Would it make sense to have this be more explicit? "Tillage only works on crop columns, so use_crop must be true"
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.
Good thinking. I've changed this with commit c5ee474: