From 37b28c755fb359d4f64ac91b65ffc77cc3066f0b Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Sat, 17 Oct 2020 18:18:50 +0000 Subject: [PATCH 1/2] Bug fix: (1) changed islmsk to intent(inout) in meta file to be consistent with fortran code; (2) updated slmsk whenever islmsk is updated. This enables restart to be reproducible when lake ice exists. --- physics/GFS_surface_composites.F90 | 9 +++++---- physics/GFS_surface_composites.meta | 11 ++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index b3000b008..61c5d97b8 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -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) @@ -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 @@ -129,11 +129,12 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx islmsk(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 @@ -548,7 +549,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) diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 71765b9a2..2e0dd25aa 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -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 From 7512739db9ee61ecd0f268875f0c206b402da64a Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Sat, 31 Oct 2020 17:11:03 +0000 Subject: [PATCH 2/2] Updating slmsk together with islmsk; Changing "> min ice" to ">= min ice"; --- physics/GFS_surface_composites.F90 | 6 ++++-- physics/sfc_sice.f | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 61c5d97b8..80405f322 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -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 @@ -121,12 +122,13 @@ 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 @@ -134,7 +136,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx else cice(i) = zero islmsk(i) = 0 - slmsk(i) = 0 + slmsk(i) = 0 endif endif if (cice(i) < one) then diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index ab67f849e..d3c2cc9d9 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -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