Skip to content

Commit

Permalink
TYPE: bugfix
Browse files Browse the repository at this point in the history
KEYWORDS: Noah-MP

SOURCE: Michael Barlage (NCAR)

DESCRIPTION OF CHANGES:

Bug fix introduced in wrf-model#399 where divide by zero can occur if LAI is zero. Added check in IF statement. This calculation is only for diagnostics so shouldn't change answers, except to prevent model crash.

LIST OF MODIFIED FILES:

M phys/module_sf_noahmpdrv.F

TESTS CONDUCTED:

Summer and winter 24-hr case
  • Loading branch information
davegill committed Oct 1, 2018
1 parent 55fb574 commit 63442dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phys/module_sf_noahmpdrv.F
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ SUBROUTINE noahmplsm(ITIMESTEP, YR, JULIAN, COSZIN,XLAT,XLONG, & ! IN
RB = MAX(RB, 0.0)
! New Calculation of total Canopy/Stomatal Conductance Based on Bonan et al. (2011)
! -- Inverse of Canopy Resistance (below)
IF(RSSUN .le. 0.0 .and. RSSHA .le. 0.0) THEN
IF(RSSUN .le. 0.0 .or. RSSHA .le. 0.0 .or. LAISUN .eq. 0.0 .or. LAISHA .eq. 0.0) THEN
RS (I,J) = 0.0
ELSE
RS (I,J) = ((1.0/(RSSUN+RB)*LAISUN) + ((1.0/(RSSHA+RB))*LAISHA))
Expand Down

0 comments on commit 63442dc

Please sign in to comment.