Skip to content

Commit

Permalink
Winter cereal added based on Yaqiong Lu et al.,2017
Browse files Browse the repository at this point in the history
  • Loading branch information
evasinha committed Feb 8, 2025
1 parent e6e93f0 commit 96a3a37
Show file tree
Hide file tree
Showing 4 changed files with 265 additions and 96 deletions.
17 changes: 16 additions & 1 deletion components/elm/src/biogeochem/AllocationMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
use elm_varctl , only : carbonphosphorus_only!
use pftvarcon , only: npcropmin, declfact, bfact, aleaff, arootf, astemf, noveg
use pftvarcon , only: arooti, fleafi, allconsl, allconss, grperc, grpnow, nsoybean
use pftvarcon , only: iscft, percrop
use pftvarcon , only: iscft, percrop, nwcereal, nwcerealirrig
use elm_varpar , only: nlevdecomp
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
!
Expand Down Expand Up @@ -456,6 +456,8 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp

hui => crop_vars%gddplant_patch , & ! Input: [real(r8) (:) ] =gdd since planting (gddplant)
leafout => crop_vars%gddtsoi_patch , & ! Input: [real(r8) (:) ] =gdd from top soil layer temperature
vf => crop_vars%vf_patch , & ! Output: [real(r8) (:) ] vernalization factor
cphase => crop_vars%cphase_patch , & ! Output: [real(r8) (:) ] phenology phase

xsmrpool => veg_cs%xsmrpool , & ! Input: [real(r8) (:) ] (gC/m2) temporary photosynthate C pool
leafc => veg_cs%leafc , & ! Input: [real(r8) (:) ]
Expand Down Expand Up @@ -717,6 +719,13 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
aleafi(p) = aleaf(p) ! to reproductive phenology stage begins
grain_flag(p) = 0._r8 ! setting to 0 while in phase 2

! Added based on Yaqiong Lu et al., 2017 in Geosci. Model Dev.
! when peaklai==1, astem=0 and then astemi=0, so the astem in phase 3 will
! equal to 0 and therefore resulted a very large arepr and grainc
if(peaklai(p)==1 .and. (ivt(p) == nwcereal .or. ivt(p) == nwcerealirrig)) then
astemi(p)=0.8_r8
end if

! Phase 2 completed:
! ==================
! shift allocation either when enough gdd are accumulated or maximum number
Expand Down Expand Up @@ -775,6 +784,12 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp

arepr(p) = 1._r8 - aroot(p) - astem(p) - aleaf(p)

! Added based on Yaqiong Lu et al., 2017 in Geosci. Model Dev.
if(cphase(p) == 3 .and. (ivt(p) == nwcereal .or. ivt(p) == nwcerealirrig)) then
arepr(p) = arepr(p) * vf(p)
aroot(p) = 1._r8 - aleaf(p) - astem(p) - arepr(p)
end if

else ! pre emergence
aleaf(p) = 1.e-5_r8 ! allocation coefficients should be irrelevant
astem(p) = 0._r8 ! because crops have no live carbon pools;
Expand Down
33 changes: 29 additions & 4 deletions components/elm/src/biogeochem/CropType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ module CropType
logical , pointer :: croplive_patch (:) ! patch Flag, true if planted, not harvested
logical , pointer :: cropplant_patch (:) ! patch Flag, true if planted
integer , pointer :: harvdate_patch (:) ! patch harvest date
real(r8), pointer :: rateh_patch (:) ! increase of tolerance caused by cold hardening index
real(r8), pointer :: rated_patch (:) ! loss of tolerance caused by dehardening
real(r8), pointer :: rates_patch (:) ! loss of tolerance caused by low temperature
real(r8), pointer :: rater_patch (:) ! loss of tolerance caused by respiration under snow
real(r8), pointer :: lt50_patch (:) ! the lethal temperature at which 50% of the individuals are damaged
real(r8), pointer :: fsurv_patch (:) ! winter wheat survival rate
real(r8), pointer :: accfsurv_patch (:) ! accumulated winter wheat survival rate
real(r8), pointer :: countfsurv_patch (:) ! count of accumulated winter wheat survival rate
real(r8), pointer :: wdd_patch (:) ! winter wheat weighted cumulated degree days
real(r8), pointer :: tcrown_patch (:) ! crown temperature
real(r8), pointer :: fertnitro_patch (:) ! patch fertilizer nitrogen
real(r8), pointer :: fertphosp_patch (:) ! patch fertilizer phosphorus
real(r8), pointer :: gddplant_patch (:) ! patch accum gdd past planting date for crop (ddays)
Expand Down Expand Up @@ -128,6 +138,16 @@ subroutine InitAllocate(this, bounds)
allocate(this%croplive_patch (begp:endp)) ; this%croplive_patch (:) = .false.
allocate(this%cropplant_patch (begp:endp)) ; this%cropplant_patch (:) = .false.
allocate(this%harvdate_patch (begp:endp)) ; this%harvdate_patch (:) = huge(1)
allocate(this%rateh_patch (begp:endp)) ; this%rateh_patch (:) = spval
allocate(this%rated_patch (begp:endp)) ; this%rated_patch (:) = spval
allocate(this%rates_patch (begp:endp)) ; this%rates_patch (:) = spval
allocate(this%rater_patch (begp:endp)) ; this%rater_patch (:) = spval
allocate(this%lt50_patch (begp:endp)) ; this%lt50_patch (:) = spval
allocate(this%fsurv_patch (begp:endp)) ; this%fsurv_patch (:) = spval
allocate(this%accfsurv_patch (begp:endp)) ; this%accfsurv_patch (:) = spval
allocate(this%countfsurv_patch (begp:endp)) ; this%countfsurv_patch (:) = spval
allocate(this%wdd_patch (begp:endp)) ; this%wdd_patch (:) = spval
allocate(this%tcrown_patch (begp:endp)) ; this%tcrown_patch (:) = spval
allocate(this%fertnitro_patch (begp:endp)) ; this%fertnitro_patch (:) = spval
allocate(this%fertphosp_patch (begp:endp)) ; this%fertphosp_patch (:) = spval
allocate(this%gddplant_patch (begp:endp)) ; this%gddplant_patch (:) = spval
Expand Down Expand Up @@ -669,7 +689,9 @@ subroutine UpdateAccVars(this, bounds, temperature_vars)
rbufslp(p) = max(0._r8, min(mxtmp(ivt), &
veg_es%t_ref2m(p)-(SHR_CONST_TKFRZ + baset(ivt)))) &
* dtime/SHR_CONST_CDAY
if (ivt == nwcereal .or. ivt == nwcerealirrig) then
! Modified based on Yaqiong Lu et al., 2017 in Geosci. Model Dev.
!if (ivt == nwcereal .or. ivt == nwcerealirrig) then
if ((ivt == nwcereal .or. ivt == nwcerealirrig) .and. this%cphase_patch(p) > 1) then
rbufslp(p) = rbufslp(p)*this%vf_patch(p)
end if
else
Expand All @@ -691,9 +713,12 @@ subroutine UpdateAccVars(this, bounds, temperature_vars)
((col_es%t_soisno(c,1)*col_pp%dz(c,1) + &
col_es%t_soisno(c,2)*col_pp%dz(c,2))/(col_pp%dz(c,1)+col_pp%dz(c,2))) - &
(SHR_CONST_TKFRZ + baset(ivt)))) * dtime/SHR_CONST_CDAY
if (ivt == nwcereal .or. ivt == nwcerealirrig) then
rbufslp(p) = rbufslp(p)*this%vf_patch(p)
end if
! Modified based on Yaqiong Lu et al., 2017 in Geosci. Model Dev.
! Removed the vf control on gddtsoil, because the vernalization
! occurs after leaf emerge and end at flowering
!if (ivt == nwcereal .or. ivt == nwcerealirrig) then
! rbufslp(p) = rbufslp(p)*this%vf_patch(p)
!end if
else
rbufslp(p) = accumResetVal
end if
Expand Down
Loading

0 comments on commit 96a3a37

Please sign in to comment.