Skip to content

Commit

Permalink
further bug fix for FVEG scale in stomatal resistance
Browse files Browse the repository at this point in the history
  • Loading branch information
cenlinhe committed Oct 22, 2023
1 parent 218eb5a commit 4ecebec
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/module_sf_noahmplsm.F
Original file line number Diff line number Diff line change
Expand Up @@ -5067,6 +5067,8 @@ SUBROUTINE STOMATA (parameters,VEGTYP ,MPE ,APAR ,FOLN ,ILOC , JLO
REAL :: J !electron transport (umol co2/m2/s)
REAL :: CEA !constrain ea or else model blows up
REAL :: CF !s m2/umol -> s/m
REAL :: APAR_scale !APAR scaled by FVEG from grid level to stand scale


F1(AB,BC) = AB**((BC-25.0)/10.0)
F2(AB) = 1.0 + EXP((-2.2E05+710.0*(AB+273.16))/(8.314*(AB+273.16)))
Expand All @@ -5076,16 +5078,16 @@ SUBROUTINE STOMATA (parameters,VEGTYP ,MPE ,APAR ,FOLN ,ILOC , JLO
! initialize RS=RSMAX and PSN=0 because will only do calculations
! for APAR > 0, in which case RS <= RSMAX and PSN >= 0

APAR = APAR / max(FVEG,1.0e-6) ! scaling APAR back to stand scale
APAR_scale = APAR / max(FVEG,1.0e-6) ! scaling APAR back to stand scale
CF = SFCPRS/(8.314*SFCTMP)*1.0e06
RS = 1.0/parameters%BP * CF
PSN = 0.0

IF (APAR .LE. 0.0) RETURN
IF (APAR_scale .LE. 0.0) RETURN

FNF = MIN( FOLN/MAX(MPE,parameters%FOLNMX), 1.0 )
TC = TV-TFRZ
PPF = 4.6*APAR
PPF = 4.6*APAR_scale
J = PPF*parameters%QE25
KC = parameters%KC25 * F1(parameters%AKC,TC)
KO = parameters%KO25 * F1(parameters%AKO,TC)
Expand Down Expand Up @@ -5175,9 +5177,10 @@ SUBROUTINE CANRES (parameters,PAR ,SFCTMP,RCSOIL ,EAH ,SFCPRS , FVEG, & !in
REAL :: RCS
REAL :: RCT
REAL :: FF
REAL :: Q2 !water vapor mixing ratio (kg/kg)
REAL :: Q2SAT !saturation Q2
REAL :: DQSDT2 !d(Q2SAT)/d(T)
REAL :: Q2 !water vapor mixing ratio (kg/kg)
REAL :: Q2SAT !saturation Q2
REAL :: DQSDT2 !d(Q2SAT)/d(T)
REAL :: PAR_scale !PAR scaled by FVEG from grid level to stand scale

! RSMIN, RSMAX, TOPT, RGL, HS are canopy stress parameters set in REDPRM
! ----------------------------------------------------------------------
Expand All @@ -5187,7 +5190,7 @@ SUBROUTINE CANRES (parameters,PAR ,SFCTMP,RCSOIL ,EAH ,SFCPRS , FVEG, & !in
RCS = 0.0
RCT = 0.0
RCQ = 0.0
PAR = PAR / max(FVEG,1.0e-6) ! scaling PAR back to stand scale
PAR_scale = PAR / max(FVEG,1.0e-6) ! scaling PAR back to stand scale

! compute Q2 and Q2SAT

Expand All @@ -5198,7 +5201,7 @@ SUBROUTINE CANRES (parameters,PAR ,SFCTMP,RCSOIL ,EAH ,SFCPRS , FVEG, & !in

! contribution due to incoming solar radiation

FF = 2.0 * PAR / parameters%RGL
FF = 2.0 * PAR_scale / parameters%RGL
RCS = (FF + parameters%RSMIN / parameters%RSMAX) / (1.0+ FF)
RCS = MAX (RCS,0.0001)

Expand Down

0 comments on commit 4ecebec

Please sign in to comment.