Skip to content

Commit

Permalink
Merge pull request #33 from davegill/unary_operator_bf2
Browse files Browse the repository at this point in the history
NoahMP unary operator bug fix 2
  • Loading branch information
cenlinhe authored Jan 28, 2022
2 parents 0c04aea + 9ea4b6e commit 39357fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/module_sf_noahmplsm.F
Original file line number Diff line number Diff line change
Expand Up @@ -8493,7 +8493,7 @@ SUBROUTINE SMITH_PARLANGE_INFIL(parameters,NSOIL,ZSOIL,SMC,SICE,QINSUR,FACC,FSUR
CALL WDFCND2 (parameters,WDF,WCND,parameters%SMCWLT(ISOIL),0.0,ISOIL)

! Maximum infiltrability based on the Eq. 6.25. (m/s)
JJ = parameters%GDVIC * (parameters%SMCMAX(ISOIL) - parameters%SMCWLT(ISOIL)) * -1.0 * ZSOIL(ISOIL)
JJ = parameters%GDVIC * (parameters%SMCMAX(ISOIL) - parameters%SMCWLT(ISOIL)) * (-1.0) * ZSOIL(ISOIL)
FSUR = parameters%DKSAT(ISOIL) + (GAM * (parameters%DKSAT(ISOIL) - WCND) / (EXP(GAM * FACC / JJ) -1.0))

! infiltration rate at surface
Expand All @@ -8510,7 +8510,7 @@ SUBROUTINE SMITH_PARLANGE_INFIL(parameters,NSOIL,ZSOIL,SMC,SICE,QINSUR,FACC,FSUR
CALL WDFCND2 (parameters,WDF,WCND,SMC(ISOIL),SICE(ISOIL),ISOIL)

! Maximum infiltrability based on the Eq. 6.25. (m/s)
JJ = parameters%GDVIC * max(0.0,(parameters%SMCMAX(ISOIL) - SMC(ISOIL))) * -1.0 * ZSOIL(ISOIL)
JJ = parameters%GDVIC * max(0.0,(parameters%SMCMAX(ISOIL) - SMC(ISOIL))) * (-1.0) * ZSOIL(ISOIL)

IF(JJ == 0.0)THEN ! infiltration at surface == saturated hydraulic conductivity
FSUR = WCND
Expand Down Expand Up @@ -8571,7 +8571,7 @@ SUBROUTINE GREEN_AMPT_INFIL(parameters,NSOIL,ZSOIL,SMC,SICE,QINSUR,FACC,FSUR,INF
CALL WDFCND2 (parameters,WDF,WCND,parameters%SMCWLT(ISOIL),0.0,ISOIL)

! Maximum infiltrability based on the Eq. 6.25. (m/s)
JJ = parameters%GDVIC * (parameters%SMCMAX(ISOIL) - parameters%SMCWLT(ISOIL)) * -1.0 * ZSOIL(ISOIL)
JJ = parameters%GDVIC * (parameters%SMCMAX(ISOIL) - parameters%SMCWLT(ISOIL)) * (-1.0) * ZSOIL(ISOIL)
FSUR = parameters%DKSAT(ISOIL) + ((JJ/1E-05) * (parameters%DKSAT(ISOIL) - WCND))

!maximum infiltration rate at surface
Expand All @@ -8583,7 +8583,7 @@ SUBROUTINE GREEN_AMPT_INFIL(parameters,NSOIL,ZSOIL,SMC,SICE,QINSUR,FACC,FSUR,INF
CALL WDFCND2 (parameters,WDF,WCND,SMC(ISOIL),SICE(ISOIL),ISOIL)

! Maximum infiltrability based on the Eq. 6.25. (m/s)
JJ = parameters%GDVIC * max(0.0,(parameters%SMCMAX(ISOIL) - SMC(ISOIL))) * -1.0 * ZSOIL(ISOIL)
JJ = parameters%GDVIC * max(0.0,(parameters%SMCMAX(ISOIL) - SMC(ISOIL))) * (-1.0) * ZSOIL(ISOIL)
FSUR = parameters%DKSAT(ISOIL) + ((JJ/FACC) * (parameters%DKSAT(ISOIL) - WCND))

! infiltration rate at surface
Expand Down

0 comments on commit 39357fe

Please sign in to comment.