Skip to content

Commit 04e29b3

Browse files
authored
Merge pull request #1002 from GEOS-ESM/bugfix/mathomp4/v11-snomas-fix
v11: Fix for SNOMAS and SRF_TYPE
2 parents 86f63ad + d41df59 commit 04e29b3

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/GEOS_MoistGridComp.F90

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5321,12 +5321,17 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
53215321
call MAPL_GetPointer(IMPORT, FRACI, 'FRACI' , RC=STATUS); VERIFY_(STATUS)
53225322
call MAPL_GetPointer(IMPORT, SNOMAS, 'SNOMAS' , RC=STATUS); VERIFY_(STATUS)
53235323
call MAPL_GetPointer(EXPORT, SRF_TYPE, 'SRF_TYPE' , ALLOC=.TRUE., RC=STATUS); VERIFY_(STATUS)
5324-
SRF_TYPE = 0.0 ! Ocean
5325-
where (FRLAND > 0.1)
5326-
SRF_TYPE = 1.0 ! Land
5327-
end where
5328-
where ( (SNOMAS > 0.1) .OR. (FRLANDICE > 0.5) .OR. (FRACI > 0.5) )
5329-
SRF_TYPE = 2.0 ! Ice/Snow
5324+
5325+
where ( (FRLANDICE > 0.5) .OR. (FRACI > 0.5) )
5326+
SRF_TYPE = 3.0 ! Ice
5327+
elsewhere ( SNOMAS > 0.1 .AND. SNOMAS /= MAPL_UNDEF )
5328+
! NOTE: SNOMAS has UNDEFs so we need to make sure we don't
5329+
! allow that to infect this comparison
5330+
SRF_TYPE = 2.0 ! Snow
5331+
elsewhere (FRLAND > 0.1)
5332+
SRF_TYPE = 1.0 ! Land
5333+
elsewhere
5334+
SRF_TYPE = 0.0 ! Ocean
53305335
end where
53315336

53325337
! Allocatables

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/Process_Library.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module GEOSmoist_Process_Library
3737
real, parameter :: aT_ICE_ALL = 252.16
3838
real, parameter :: aT_ICE_MAX = 268.16
3939
real, parameter :: aICEFRPWR = 2.0
40-
! Over snow/ice SRF_TYPE = 2
40+
! Over snow SRF_TYPE = 2 and over ice SRF_TYPE = 3
4141
real, parameter :: iT_ICE_ALL = 236.16
4242
real, parameter :: iT_ICE_MAX = 261.16
4343
real, parameter :: iICEFRPWR = 6.0
@@ -403,8 +403,8 @@ 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
407-
! Over snow/ice
406+
if (SRF_TYPE >= 2.0) then
407+
! Over snow (SRF_TYPE == 2.0) and ice (SRF_TYPE == 3.0)
408408
if (ICE_RADII_PARAM == 1) then
409409
! Jason formula
410410
ICEFRCT_M = 0.00
@@ -1708,7 +1708,7 @@ subroutine partition_dblgss( fQi, & ! IN
17081708

17091709
! corrtest2 = max(-1.0,min(1.0,wqtntrgs/(sqrtw2*sqrtqt)))
17101710
corrtest2 = max(-1.0,min(1.0,0.5*wqwsec/(sqrtw2*sqrtqt)))
1711-
1711+
17121712
qw1_1 = - corrtest2 / w1_2 ! A.7
17131713
qw1_2 = - corrtest2 / w1_1 ! A.8
17141714

0 commit comments

Comments
 (0)