-
Notifications
You must be signed in to change notification settings - Fork 312
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
Fixes for the LUNA dayl bugs #961
Changes from 1 commit
89704ce
19d0518
a415e30
d94ba6f
9181698
11446f1
e4cc5a0
5027353
9f3bf0a
414de83
1bdf47a
9497f00
2c1c99f
344b976
3b1e861
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 |
---|---|---|
|
@@ -183,6 +183,8 @@ module PhotosynthesisMod | |
! LUNA specific variables | ||
real(r8), pointer, public :: vcmx25_z_patch (:,:) ! patch leaf Vc,max25 (umol CO2/m**2/s) for canopy layer | ||
real(r8), pointer, public :: jmx25_z_patch (:,:) ! patch leaf Jmax25 (umol electron/m**2/s) for canopy layer | ||
real(r8), pointer, public :: vcmx_prevyr (:,:) ! patch leaf Vc,max25 previous year running avg | ||
real(r8), pointer, public :: jmx_prevyr (:,:) ! patch leaf Jmax25 previous year running avg | ||
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. As in LunaMod, this comment is misleading since we're not taking the running average. We should be consistent with LunaMod. 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. We'll fix this in #1060 |
||
real(r8), pointer, public :: pnlc_z_patch (:,:) ! patch proportion of leaf nitrogen allocated for light capture for canopy layer | ||
real(r8), pointer, public :: enzs_z_patch (:,:) ! enzyme decay status 1.0-fully active; 0-all decayed during stress | ||
real(r8), pointer, public :: fpsn24_patch (:) ! 24 hour mean patch photosynthesis (umol CO2/m**2 ground/day) | ||
|
@@ -328,6 +330,8 @@ subroutine InitAllocate(this, bounds) | |
! statements. | ||
allocate(this%vcmx25_z_patch (begp:endp,1:nlevcan)) ; this%vcmx25_z_patch (:,:) = 30._r8 | ||
allocate(this%jmx25_z_patch (begp:endp,1:nlevcan)) ; this%jmx25_z_patch (:,:) = 60._r8 | ||
allocate(this%vcmx_prevyr (begp:endp,1:nlevcan)) ; this%vcmx_prevyr (:,:) = 85._r8 | ||
allocate(this%jmx_prevyr (begp:endp,1:nlevcan)) ; this%jmx_prevyr (:,:) = 50._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. hopefully doesn't really matter, but the hard coded values we're replacing in LUNA are were for 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. Thank you for raising this point here @wwieder . In addition to cold start, times I can think of when these initial values will matter are (1) in the first year of existence of a crop that newly appears in a grid cell in a transient case; and (2) in the first year after restart for cases using old restart files, including all cases run from master until we update our out-of-the-box finidat files. So, while these values may not be hugely important, they seem more important than your typical cold start initialization value. 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. See also comment from @lmbirch89: #947 (comment) 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. Since, our simulations have been run with these values -- we'll need to get the correct values on #947. 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. We'll fix this for #1107 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 coming in with my PR #1102 |
||
allocate(this%pnlc_z_patch (begp:endp,1:nlevcan)) ; this%pnlc_z_patch (:,:) = 0.01_r8 | ||
allocate(this%fpsn24_patch (begp:endp)) ; this%fpsn24_patch (:) = nan | ||
allocate(this%enzs_z_patch (begp:endp,1:nlevcan)) ; this%enzs_z_patch (:,:) = 1._r8 | ||
|
@@ -833,6 +837,14 @@ subroutine Restart(this, bounds, ncid, flag) | |
dim1name='pft', dim2name='levcan', switchdim=.true., & | ||
long_name='Maximum carboxylation rate at 25 celcius for canopy layers', units='umol CO2/m**2/s', & | ||
interpinic_flag='interp', readvar=readvar, data=this%jmx25_z_patch) | ||
call restartvar(ncid=ncid, flag=flag, varname='vcmx_prevyr', xtype=ncd_double, & | ||
dim1name='pft', dim2name='levcan', switchdim=.true., & | ||
long_name='avg carboxylation rate at 25 celsius for canopy layers', units='umol CO2/m**2/s', & | ||
interpinic_flag='interp', readvar=readvar, data=this%vcmx_prevyr) | ||
call restartvar(ncid=ncid, flag=flag, varname='jmx_prevyr', xtype=ncd_double, & | ||
dim1name='pft', dim2name='levcan', switchdim=.true., & | ||
long_name='avg carboxylation rate at 25 celsius for canopy layers', units='umol CO2/m**2/s', & | ||
interpinic_flag='interp', readvar=readvar, data=this%jmx_prevyr) | ||
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. long names here should match what we're using in the description above, something about the previous year? Minor correction, but 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. We'll fix this in #1060 |
||
call restartvar(ncid=ncid, flag=flag, varname='pnlc_z', xtype=ncd_double, & | ||
dim1name='pft', dim2name='levcan', switchdim=.true., & | ||
long_name='proportion of leaf nitrogen allocated for light capture', units='unitless', & | ||
|
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.
The comments here should just not be the
previous year avg
, but the values from the end of the growing season for the previous year. @billsacks did you have thoughts about how to name this variable in the first place?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.
My main thought was to avoid having "yr" / "year" in the name. I suggested
vcmx_last_active_day
, but I'm not sure if that's the best. @ekluzek suggested something including "last_valid", which also seems reasonable. Good naming is so hard... (and yet so important).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.
Another note about these names: they need
_patch
suffixes. Also, it's probably best if they maintain the25_z
that appears invcmx25_z
andjmx25_z
variable names, to show the correspondence between these variables.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.
We'll fix this in #1060