Skip to content

Commit

Permalink
changing vcmx_prevyr to vcmx25_z_last_valid_patch as suggested in PR E…
Browse files Browse the repository at this point in the history
  • Loading branch information
negin513 committed Sep 2, 2020
1 parent 01d0f52 commit 0b31e4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/biogeophys/LunaMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,14 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, &
t_veg_night => temperature_inst%t_veg_night_patch , & ! Input: [real(r8) (:) ] nighttime mean vegetation temperature (Kelvin)
t_veg10_day => temperature_inst%t_veg10_day_patch , & ! Input: [real(r8) (:) ] 10-day mean daytime vegetation temperature (Kelvin)
t_veg10_night => temperature_inst%t_veg10_night_patch , & ! Input: [real(r8) (:) ] 10-day mean nighttime vegetation temperature (Kelvin)
rh10_p => waterdiagnosticbulk_inst%rh10_af_patch , & ! Input: [real(r8) (:) ] 10-day mean canopy air relative humidity at the pacth (unitless)
rh10_p => waterdiagnosticbulk_inst%rh10_af_patch , & ! Input: [real(r8) (:) ] 10-day mean canopy air relative humidity at the pacth (unitless)
rb10_p => frictionvel_inst%rb10_patch , & ! Input: [real(r8) (:) ] 10-day mean boundary layer resistance at the pacth (s/m)
gpp_day => photosyns_inst%fpsn24_patch , & ! Input: [real(r8) (:) ] patch 24 hours mean gpp(umol CO2/m**2 ground/day) for canopy layer
vcmx25_z => photosyns_inst%vcmx25_z_patch , & ! Output: [real(r8) (:,:) ] patch leaf Vc,max25 (umol/m2 leaf/s) for canopy layer
jmx25_z => photosyns_inst%jmx25_z_patch , & ! Output: [real(r8) (:,:) ] patch leaf Jmax25 (umol electron/m**2/s) for canopy layer
pnlc_z => photosyns_inst%pnlc_z_patch , & ! Output: [real(r8) (:,:) ] patch proportion of leaf nitrogen allocated for light capture for canopy layer
enzs_z => photosyns_inst%enzs_z_patch , & ! Output: [real(r8) (:,:) ] enzyme decay status 1.0-fully active; 0-all decayed during stress
vcmx_prevyr => photosyns_inst%vcmx_prevyr , & ! Output: [real(r8) (:,:) ] patch leaf Vc,max25 from end of the growing season for the previous year
vcmx25_z_last_valid_patch => photosyns_inst%vcmx25_z_last_valid_patch , & ! Output: [real(r8) (:,:) ] patch leaf Vc,max25 from end of the growing season for the previous year
jmx_prevyr => photosyns_inst%jmx_prevyr & ! Output: [real(r8) (:,:) ] patch leaf Jmax25 from the end of the growing season for the previous year
)
!----------------------------------------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -425,7 +425,7 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, &
chg = vcmx25_opt-vcmx25_z(p, z)
chg_constrn = min(abs(chg),vcmx25_z(p, z)*max_daily_pchg)
vcmx25_z(p, z) = vcmx25_z(p, z)+sign(1.0_r8,chg)*chg_constrn
vcmx_prevyr(p,z) = vcmx25_z(p,z)
vcmx25_z_last_valid_patch(p,z) = vcmx25_z(p,z)

chg = jmx25_opt-jmx25_z(p, z)
chg_constrn = min(abs(chg),jmx25_z(p, z)*max_daily_pchg)
Expand Down Expand Up @@ -490,7 +490,7 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, &
else
do z = 1 , nrad(p)
jmx25_z(p, z) = jmx_prevyr(p,z)
vcmx25_z(p, z) = vcmx_prevyr(p,z)
vcmx25_z(p, z) = vcmx25_z_last_valid_patch(p,z)
end do
endif !checking for LAI and LNC
endif !the first daycheck
Expand Down
10 changes: 5 additions & 5 deletions src/biogeophys/PhotosynthesisMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,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
real(r8), pointer, public :: vcmx25_z_last_valid_patch (:,:) ! patch leaf Vc,max25 at the end of the growing season for the previous year
real(r8), pointer, public :: jmx_prevyr (:,:) ! patch leaf Jmax25 at the end of the growing season for the previous year
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)
Expand Down Expand Up @@ -346,7 +346,7 @@ 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 (:,:) = 30._r8
allocate(this%vcmx25_z_last_valid_patch (begp:endp,1:nlevcan)) ; this%vcmx25_z_last_valid_patch (:,:) = 30._r8
allocate(this%jmx_prevyr (begp:endp,1:nlevcan)) ; this%jmx_prevyr (:,:) = 60._r8
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
Expand Down Expand Up @@ -892,10 +892,10 @@ 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, &
call restartvar(ncid=ncid, flag=flag, varname='vcmx25_z_last_valid_patch', 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)
interpinic_flag='interp', readvar=readvar, data=this%vcmx25_z_last_valid_patch)
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', &
Expand Down

0 comments on commit 0b31e4f

Please sign in to comment.