Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: restart can reproduce with lake ice #511

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions physics/GFS_surface_composites.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx
tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, &
weasd, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat,&
tsfc_lnd, tsfc_ice, tisfc, tice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, &
gflx_ice, tgice, islmsk, semis_rad, semis_wat, semis_lnd, semis_ice, &
gflx_ice, tgice, islmsk, slmsk, semis_rad, semis_wat, semis_lnd, semis_ice, &
qss, qss_wat, qss_lnd, qss_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, &
min_lakeice, min_seaice, errmsg, errflg)

Expand All @@ -57,7 +57,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx
real(kind=kind_phys), intent(in ) :: tgice
integer, dimension(im), intent(inout) :: islmsk
real(kind=kind_phys), dimension(im), intent(in ) :: semis_rad
real(kind=kind_phys), dimension(im), intent(inout) :: semis_wat, semis_lnd, semis_ice
real(kind=kind_phys), dimension(im), intent(inout) :: semis_wat, semis_lnd, semis_ice, slmsk
real(kind=kind_phys), intent(in ) :: min_lakeice, min_seaice

! CCPP error handling
Expand Down Expand Up @@ -92,6 +92,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx
icy(i) = .true.
if (cice(i) < one) wet(i) = .true. ! some open ocean/lake water exists
islmsk(i) = 2
slmsk(i) = 2
else
cice(i) = zero
! islmsk(i) = 0
Expand Down Expand Up @@ -121,19 +122,21 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx
else
frland(i) = zero
if (flag_cice(i)) then
if (cice(i) > min_seaice) then
if (cice(i) >= min_seaice) then
icy(i) = .true.
else
cice(i) = zero
flag_cice(i) = .false.
islmsk(i) = 0
slmsk(i) = 0
endif
else
if (cice(i) > min_lakeice) then
if (cice(i) >= min_lakeice) then
icy(i) = .true.
else
cice(i) = zero
islmsk(i) = 0
slmsk(i) = 0
endif
endif
if (cice(i) < one) then
Expand Down Expand Up @@ -548,7 +551,7 @@ subroutine GFS_surface_composites_post_run (
tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled)
zorl(i) = cice(i) * zorl_ice(i) + (one - cice(i)) * zorl_wat(i)
elseif (wet(i)) then
if (cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice
if (cice(i) >= min_seaice) then ! this was already done for lake ice in sfc_sice
txi = cice(i)
txo = one - txi
evap(i) = txi * evap_ice(i) + txo * evap_wat(i)
Expand Down
11 changes: 10 additions & 1 deletion physics/GFS_surface_composites.meta
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,16 @@
units = flag
dimensions = (horizontal_loop_extent)
type = integer
intent = in
intent = inout
optional = F
[slmsk]
standard_name = sea_land_ice_mask_real
long_name = landmask: sea/land/ice=0/1/2
units = flag
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
optional = F
[semis_rad]
standard_name = surface_longwave_emissivity
Expand Down
2 changes: 1 addition & 1 deletion physics/sfc_sice.f
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ subroutine sfc_sice_run &
else
tem = min_lakeice
endif
if (fice(i) > tem) then
if (fice(i) >= tem) then
islmsk_local(i) = 2
tice(i) =min( tice(i), tgice)
endif
Expand Down