Skip to content

Commit

Permalink
One-off diffs to try to get bit-for-bit with o3 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
billsacks committed Aug 6, 2021
1 parent 114c495 commit 011c79f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/biogeophys/LunaMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR
call NUE(O2a10, ci, tair10, tleafd10c, NUEj, NUEc, Kj2Kc)
call Nitrogen_investments (KcKjFlag,FNCa, Nlc, forc_pbot10, relh10, CO2a10,O2a10, PARi10c, PARimx10c,rb10, hourpd, tair10, &
tleafd10c,tleafn10c, &
Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref, NUEr, Kc, Kj, ci, &
Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref, NUEr, 1._r8, Kc, Kj, ci, &
Vcmax, Jmax,JmeanL,JmaxL, Net, Ncb, Nresp, PSN, RESP)

Npsntarget = Nlc + Ncb + Net !target nitrogen allocated to photosynthesis, which may be lower or higher than Npsn_avail
Expand All @@ -934,7 +934,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR
KcKjFlag = 1
call Nitrogen_investments (KcKjFlag,FNCa, Nlc2, forc_pbot10, relh10, CO2a10,O2a10, PARi10c, PARimx10c,rb10, hourpd, &
tair10, tleafd10c,tleafn10c, &
Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref,NUEr, Kc, Kj, ci, &
Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref,NUEr, 1._r8, Kc, Kj, ci, &
Vcmax, Jmax,JmeanL,JmaxL, Net2, Ncb2, Nresp2, PSN2, RESP2)

Npsntarget2 = Nlc2 + Ncb2 + Net2
Expand Down Expand Up @@ -962,7 +962,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR
KcKjFlag = 1
call Nitrogen_investments (KcKjFlag,FNCa, Nlc1,forc_pbot10, relh10, CO2a10,O2a10, PARi10c, PARimx10c,rb10, hourpd, &
tair10, tleafd10c,tleafn10c, &
Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref,NUEr, Kc, Kj, ci,&
Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref,NUEr, 1._r8, Kc, Kj, ci,&
Vcmax, Jmax,JmeanL,JmaxL, Net1, Ncb1, Nresp1, PSN1, RESP1)
Npsntarget1 = Nlc1 + Ncb1 + Net1
Carboncost1 = (Npsntarget - Npsntarget1) * NMCp25 * Cv * (RespTBernacchi(tleafd10c) * hourpd + &
Expand Down Expand Up @@ -992,7 +992,7 @@ end subroutine NitrogenAllocation

subroutine Nitrogen_investments (KcKjFlag, FNCa, Nlc, forc_pbot10, relh10, &
CO2a10, O2a10, PARi10, PARimx10, rb10, hourpd, tair10, tleafd10, tleafn10, &
Kj2Kc, JmaxCoef, Fc, Fj, NUEc, NUEj, NUEcref, NUEjref, NUEr, Kc, &
Kj2Kc, JmaxCoef, Fc, Fj, NUEc, NUEj, NUEcref, NUEjref, NUEr, o3coefjmax, Kc, &
Kj, ci, Vcmax, Jmax, JmeanL, JmaxL, Net, Ncb, Nresp, PSN, RESP)
implicit none
integer, intent (in) :: KcKjFlag !flag to indicate whether to update the Kc and Kj using the photosynthesis subroutine; 0--Kc and Kj need to be calculated; 1--Kc and Kj is prescribed.
Expand All @@ -1018,6 +1018,7 @@ subroutine Nitrogen_investments (KcKjFlag, FNCa, Nlc, forc_pbot10, relh10, &
real(r8), intent (in) :: NUEcref !nitrogen use efficiency for carboxylation under reference climates
real(r8), intent (in) :: NUEjref !nitrogen use efficiency for electron transport under reference climates
real(r8), intent (in) :: NUEr !nitrogen use efficiency for respiration
real(r8), intent (in) :: o3coefjmax !ozone coef jmax
real(r8), intent (inout) :: Kc !conversion factors from Vc,max to Wc
real(r8), intent (inout) :: Kj !conversion factor from electron transport rate to Wj
real(r8), intent (inout) :: ci !inter-cellular CO2 concentration (Pa)
Expand Down Expand Up @@ -1046,7 +1047,7 @@ subroutine Nitrogen_investments (KcKjFlag, FNCa, Nlc, forc_pbot10, relh10, &
theta = 0.292_r8 / (1.0_r8 + 0.076_r8 / (Nlc * Cb))
ELTRNabsorb = theta * PARi10
Jmaxb0act = params_inst%jmaxb0 * FNCa * Fj
Jmax = Jmaxb0act + JmaxCoef * ELTRNabsorb
Jmax = Jmaxb0act + JmaxCoef * ELTRNabsorb * o3coefjmax
JmaxL = theta * PARimx10 / (sqrt(1.0_r8 + (theta * PARimx10 / Jmax)**2.0_r8))
NUEchg = (NUEc / NUEcref) * (NUEjref / NUEj)
Wc2Wj = params_inst%wc2wjb0 * (NUEchg**0.5_r8)
Expand Down

0 comments on commit 011c79f

Please sign in to comment.