Skip to content

Commit 48f4274

Browse files
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into prog_closure
2 parents fc79cc3 + 6e58242 commit 48f4274

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

physics/scm_sfc_flux_spec.F90

+13-8
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,11 @@ subroutine scm_sfc_flux_spec_run (im, u1, v1, z1, t1, q1, p1, roughness_length,
153153
frland(i) = 1.0_kind_phys
154154
cice(i) = 0.0_kind_phys
155155
icy(i) = .false.
156-
tsfcl(i) = T_surf(i) !GJF
157156
else
158157
frland(i) = 0.0_kind_phys
159158
if (oceanfrac(i) > 0.0_kind_phys) then
160159
if (cice(i) >= min_seaice) then
161160
icy(i) = .true.
162-
tisfc(i) = T_surf(i) !GJF
163-
tisfc(i) = max(timin, min(tisfc(i), tgice))
164161
! This cplice namelist option was added to deal with the
165162
! situation of the FV3ATM-HYCOM coupling without an active sea
166163
! ice (e.g., CICE6) component. By default, the cplice is true
@@ -186,8 +183,6 @@ subroutine scm_sfc_flux_spec_run (im, u1, v1, z1, t1, q1, p1, roughness_length,
186183
else
187184
if (cice(i) >= min_lakeice) then
188185
icy(i) = .true.
189-
tisfc(i) = T_surf(i) !GJF
190-
tisfc(i) = max(timin, min(tisfc(i), tgice))
191186
islmsk(i) = 2
192187
else
193188
cice(i) = 0.0_kind_phys
@@ -198,13 +193,23 @@ subroutine scm_sfc_flux_spec_run (im, u1, v1, z1, t1, q1, p1, roughness_length,
198193
if (cice(i) < 1.0_kind_phys) then
199194
wet(i) = .true. ! some open lake
200195
endif
201-
if (wet(i)) then ! Water
202-
tsfc_wat(i) = T_surf(i)
203-
endif
204196
endif
205197
endif
206198
if (nint(slmsk(i)) /= 1) slmsk(i) = islmsk(i)
207199
enddo
200+
201+
do i = 1, im
202+
if (wet(i)) then
203+
tsfc_wat(i) = T_surf(i)
204+
end if
205+
if (dry(i)) then
206+
tsfcl(i) = T_surf(i)
207+
end if
208+
if (icy(i)) then
209+
tisfc(i) = T_surf(i)
210+
tisfc(i) = max(timin, min(tisfc(i), tgice))
211+
end if
212+
end do
208213

209214
! to prepare to separate lake from ocean under water category
210215
do i = 1, im

0 commit comments

Comments
 (0)