Skip to content

Commit accd726

Browse files
committed
Use nint() for safety
1 parent 4ce8537 commit accd726

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/Process_Library.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ function ICE_FRACTION_SC (TEMP,CNV_FRACTION,SRF_TYPE) RESULT(ICEFRCT)
403403
ICEFRCT_C = MAX(ICEFRCT_C,0.00)
404404
ICEFRCT_C = ICEFRCT_C**aICEFRPWR
405405
! Sigmoidal functions like figure 6b/6c of Hu et al 2010, doi:10.1029/2009JD012384
406-
if (SRF_TYPE >= 2.0) then
406+
if (nint(SRF_TYPE) >= 2) then
407407
! Over snow (SRF_TYPE == 2.0) and ice (SRF_TYPE == 3.0)
408408
if (ICE_RADII_PARAM == 1) then
409409
! Jason formula
@@ -424,7 +424,7 @@ function ICE_FRACTION_SC (TEMP,CNV_FRACTION,SRF_TYPE) RESULT(ICEFRCT)
424424
ICEFRCT_M = MIN(ICEFRCT_M,1.00)
425425
ICEFRCT_M = MAX(ICEFRCT_M,0.00)
426426
ICEFRCT_M = ICEFRCT_M**iICEFRPWR
427-
else if (SRF_TYPE == 1.0) then
427+
else if (nint(SRF_TYPE) == 1) then
428428
! Over Land
429429
ICEFRCT_M = 0.00
430430
if ( TEMP <= lT_ICE_ALL ) then

0 commit comments

Comments
 (0)