-
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
Arctic Carbon Cycle Updates #947
Changes from all commits
64aa4d9
d91b2ee
8a5252e
ea984f5
6432dd2
35b7098
298235a
0f0305a
61cf54f
aa0f31f
dd0cbec
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 |
---|---|---|
|
@@ -252,7 +252,7 @@ subroutine CNPhenology (bounds, num_soilc, filter_soilc, num_soilp, & | |
cnveg_state_inst, cnveg_carbonstate_inst, cnveg_nitrogenstate_inst, cnveg_carbonflux_inst, cnveg_nitrogenflux_inst) | ||
|
||
call CNSeasonDecidPhenology(num_soilp, filter_soilp, & | ||
temperature_inst, cnveg_state_inst, dgvs_inst, & | ||
temperature_inst, waterdiagnosticbulk_inst, cnveg_state_inst, dgvs_inst, & | ||
cnveg_carbonstate_inst, cnveg_nitrogenstate_inst, cnveg_carbonflux_inst, cnveg_nitrogenflux_inst) | ||
|
||
call CNStressDecidPhenology(num_soilp, filter_soilp, & | ||
|
@@ -627,7 +627,7 @@ end subroutine CNEvergreenPhenology | |
|
||
!----------------------------------------------------------------------- | ||
subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , & | ||
temperature_inst, cnveg_state_inst, dgvs_inst , & | ||
temperature_inst, waterdiagnosticbulk_inst, cnveg_state_inst, dgvs_inst , & | ||
cnveg_carbonstate_inst, cnveg_nitrogenstate_inst, cnveg_carbonflux_inst, cnveg_nitrogenflux_inst) | ||
! | ||
! !DESCRIPTION: | ||
|
@@ -644,6 +644,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , & | |
integer , intent(in) :: num_soilp ! number of soil patches in filter | ||
integer , intent(in) :: filter_soilp(:) ! filter for soil patches | ||
type(temperature_type) , intent(in) :: temperature_inst | ||
type(waterdiagnosticbulk_type) , intent(in) :: waterdiagnosticbulk_inst | ||
type(cnveg_state_type) , intent(inout) :: cnveg_state_inst | ||
type(dgvs_type) , intent(inout) :: dgvs_inst | ||
type(cnveg_carbonstate_type) , intent(inout) :: cnveg_carbonstate_inst | ||
|
@@ -656,6 +657,8 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , & | |
integer :: fp !lake filter patch index | ||
real(r8):: ws_flag !winter-summer solstice flag (0 or 1) | ||
real(r8):: crit_onset_gdd !critical onset growing degree-day sum | ||
real(r8):: crit_daylat !latitudinal light gradient in arctic-boreal | ||
real(r8):: onset_thresh !flag onset threshold | ||
real(r8):: soilt | ||
!----------------------------------------------------------------------- | ||
|
||
|
@@ -668,7 +671,10 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , & | |
season_decid => pftcon%season_decid , & ! Input: binary flag for seasonal-deciduous leaf habit (0 or 1) | ||
|
||
t_soisno => temperature_inst%t_soisno_col , & ! Input: [real(r8) (:,:) ] soil temperature (Kelvin) (-nlevsno+1:nlevgrnd) | ||
|
||
soila10 => temperature_inst%soila10_patch , & ! Input: [real(r8) (:) ] | ||
t_a5min => temperature_inst%t_a5min_patch , & ! input: [real(r8) (:) ] | ||
snow_5day => waterdiagnosticbulk_inst%snow_5day_col , & ! input: [real(r8) (:) ] | ||
|
||
pftmayexist => dgvs_inst%pftmayexist_patch , & ! Output: [logical (:) ] exclude seasonal decid patches from tropics | ||
|
||
annavg_t2m => cnveg_state_inst%annavg_t2m_patch , & ! Input: [real(r8) (:) ] annual average 2m air temperature (K) | ||
|
@@ -742,6 +748,8 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , & | |
) | ||
|
||
! start patch loop | ||
|
||
|
||
do fp = 1,num_soilp | ||
p = filter_soilp(fp) | ||
c = patch%column(p) | ||
|
@@ -838,7 +846,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , & | |
|
||
! test for switching from dormant period to growth period | ||
if (dormant_flag(p) == 1.0_r8) then | ||
|
||
onset_thresh = 0.0_r8 | ||
! Test to turn on growing degree-day sum, if off. | ||
! switch on the growing degree day sum on the winter solstice | ||
|
||
|
@@ -865,13 +873,21 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , & | |
if (onset_gddflag(p) == 1.0_r8 .and. soilt > SHR_CONST_TKFRZ) then | ||
onset_gdd(p) = onset_gdd(p) + (soilt-SHR_CONST_TKFRZ)*fracday | ||
end if | ||
|
||
!separate into Arctic boreal and lower latitudes | ||
billsacks marked this conversation as resolved.
Show resolved
Hide resolved
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. @ekluzek & @billsacks What's the best way to wrap this into a namelist flag to maintain backwards compatibility with CLM5 but also make sure the code is readable? 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.
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.
|
||
if (onset_gdd(p) > crit_onset_gdd .and. abs(grc%latdeg(g))<45.0_r8) then | ||
onset_thresh=1.0_r8 | ||
else if (onset_gddflag(p) == 1.0_r8 .and. soila10(p) > SHR_CONST_TKFRZ .and. & | ||
t_a5min(p) > SHR_CONST_TKFRZ .and. ws_flag==1.0_r8 .and. & | ||
dayl(g)>(crit_dayl/2.0_r8) .and. snow_5day(c)<0.1_r8) then | ||
onset_thresh=1.0_r8 | ||
end if | ||
! set onset_flag if critical growing degree-day sum is exceeded | ||
if (onset_gdd(p) > crit_onset_gdd) then | ||
if (onset_thresh == 1.0_r8) then | ||
onset_flag(p) = 1.0_r8 | ||
dormant_flag(p) = 0.0_r8 | ||
onset_gddflag(p) = 0.0_r8 | ||
onset_gdd(p) = 0.0_r8 | ||
onset_thresh = 0.0_r8 | ||
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. With my above request to initialize |
||
onset_counter(p) = ndays_on * secspday | ||
|
||
! move all the storage pools into transfer pools, | ||
|
@@ -913,8 +929,15 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , & | |
if (days_active(p) > 355._r8) pftmayexist(p) = .false. | ||
end if | ||
|
||
! use 15 hr (54000 min) at ~65N from eitel 2019, to ~11hours in temperate regions | ||
! 15hr-11hr/(65N-45N)=linear slope = 720 min/latitude | ||
crit_daylat=54000-720*(65-abs(grc%latdeg(g))) | ||
if (crit_daylat < crit_dayl) then | ||
crit_daylat = crit_dayl !maintain previous offset from White 2001 as minimum | ||
end if | ||
|
||
! only begin to test for offset daylength once past the summer sol | ||
if (ws_flag == 0._r8 .and. dayl(g) < crit_dayl) then | ||
if (ws_flag == 0._r8 .and. dayl(g) < crit_daylat) then | ||
offset_flag(p) = 1._r8 | ||
offset_counter(p) = ndays_off * secspday | ||
prev_leafc_to_litter(p) = 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.
It looks like you're using this effectively as a logical value. Please change it to a logical, such as:
(I realize that some other flags in this routine are real-valued like this... it's possible that's needed for some other reason, or possible that that shouldn't have been done that way in the past. In either case, let's keep new code cleaner in this respect.)