From 2fd1b263acba91e8656538e918644aff0b6d504a Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Mon, 30 Nov 2020 22:08:56 +0000 Subject: [PATCH 1/2] -- Pointing to Moorthi's modifications in ccpp/physics, which fixed the crash when running GFDL MP with frac_grid=T; -- Not setting fice to zero in order to leave lake ice untouched; -- Restart in the coupled model with the default physics is reproducible, if bad water temperature is only filtered at initial time; Co-authored-with: Shrinivas Moorthi Co-authored-with: Denise Worthen --- .gitmodules | 4 ++-- atmos_model.F90 | 3 +-- ccpp/physics | 2 +- io/FV3GFS_io.F90 | 45 +++++++++++++++++++++++++++------------------ 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/.gitmodules b/.gitmodules index d253f6966..28c6dbe15 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,5 @@ branch = master [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = master + url = https://github.com/shansun6/ccpp-physics + branch = bugfix_gfdl_SM_2mod_20201130 diff --git a/atmos_model.F90 b/atmos_model.F90 index f61735eb8..051f5918d 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -1764,7 +1764,6 @@ subroutine assign_importdata(rc) nb = Atm_block%blkno(i,j) ix = Atm_block%ixp(i,j) - IPD_Data(nb)%Sfcprop%fice(ix) = zero IPD_Data(nb)%Coupling%slimskin_cpl(ix) = IPD_Data(nb)%Sfcprop%slmsk(ix) ofrac = IPD_Data(nb)%Sfcprop%oceanfrac(ix) if (ofrac > zero) then @@ -1779,7 +1778,7 @@ subroutine assign_importdata(rc) if (abs(one-ofrac) < epsln) then IPD_Data(nb)%Sfcprop%slmsk(ix) = zero IPD_Data(nb)%Coupling%slimskin_cpl(ix) = zero - end if + endif endif endif enddo diff --git a/ccpp/physics b/ccpp/physics index 4e39b50a2..bc4fcb0dc 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 4e39b50a248fc093c055fc6a8ae245065da7c730 +Subproject commit bc4fcb0dc1a5d00c2f4a2cc31435709547572d3a diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 08f792b05..03871255e 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -1066,14 +1066,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain) endif if(Model%frac_grid) then ! obtain slmsk from landfrac -!! next 5 lines are temporary till lake model is available - if (Sfcprop(nb)%lakefrac(ix) > zero) then -! Sfcprop(nb)%lakefrac(ix) = nint(Sfcprop(nb)%lakefrac(ix)) - Sfcprop(nb)%landfrac(ix) = one - Sfcprop(nb)%lakefrac(ix) - if (Sfcprop(nb)%lakefrac(ix) == zero) Sfcprop(nb)%fice(ix) = zero - endif - Sfcprop(nb)%slmsk(ix) = ceiling(Sfcprop(nb)%landfrac(ix)) - if (Sfcprop(nb)%fice(ix) > Model%min_lakeice .and. Sfcprop(nb)%landfrac(ix) == zero) Sfcprop(nb)%slmsk(ix) = 2 ! land dominates ice if co-exist + Sfcprop(nb)%slmsk(ix) = ceiling(Sfcprop(nb)%landfrac(ix)) !nint/floor are options else ! obtain landfrac from slmsk if (Sfcprop(nb)%slmsk(ix) > 1.9_r8) then Sfcprop(nb)%landfrac(ix) = zero @@ -1084,16 +1077,32 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain) if (Sfcprop(nb)%lakefrac(ix) > zero) then Sfcprop(nb)%oceanfrac(ix) = zero ! lake & ocean don't coexist in a cell -! if (Sfcprop(nb)%fice(ix) < Model%min_lakeice) then -! Sfcprop(nb)%fice(ix) = zero -! if (Sfcprop(nb)%slmsk(ix) == 2) Sfcprop(nb)%slmsk(ix) = 0 -! endif + if (Sfcprop(nb)%slmsk(ix) /= one) then + if (Sfcprop(nb)%fice(ix) >= Model%min_lakeice) then + if (Sfcprop(nb)%slmsk(ix) < 1.9_r8) & + write(*,'(a,2i3,3f6.2)') 'reset lake slmsk=2 at nb,ix=' & + ,nb,ix,Sfcprop(nb)%fice(ix),Sfcprop(nb)%slmsk(ix),Sfcprop(nb)%lakefrac(ix) + Sfcprop(nb)%slmsk(ix) = 2. + else if (Sfcprop(nb)%slmsk(ix) > 1.e-7) then + write(*,'(a,2i3,3f6.2)') 'reset lake slmsk=0 at nb,ix=' & + ,nb,ix,Sfcprop(nb)%fice(ix),Sfcprop(nb)%slmsk(ix),Sfcprop(nb)%lakefrac(ix) + Sfcprop(nb)%slmsk(ix) = zero + end if + end if else Sfcprop(nb)%oceanfrac(ix) = one - Sfcprop(nb)%landfrac(ix) -! if (Sfcprop(nb)%fice(ix) < Model%min_seaice) then -! Sfcprop(nb)%fice(ix) = zero -! if (Sfcprop(nb)%slmsk(ix) == 2) Sfcprop(nb)%slmsk(ix) = 0 -! endif + if (Sfcprop(nb)%slmsk(ix) /= one) then + if (Sfcprop(nb)%fice(ix) >= Model%min_seaice) then + if (Sfcprop(nb)%slmsk(ix) < 1.9_r8) & + write(*,'(a,2i3,3f6.2)') 'reset sea slmsk=2 at nb,ix=' & + ,nb,ix,Sfcprop(nb)%fice(ix),Sfcprop(nb)%slmsk(ix),Sfcprop(nb)%landfrac(ix) + Sfcprop(nb)%slmsk(ix) = 2. + else if (Sfcprop(nb)%slmsk(ix) > 1.e-7) then + write(*,'(a,2i3,4f6.2)') 'reset sea slmsk=0 at nb,ix=' & + ,nb,ix,Sfcprop(nb)%fice(ix),Sfcprop(nb)%slmsk(ix),Sfcprop(nb)%landfrac(ix) + Sfcprop(nb)%slmsk(ix) = zero + end if + end if endif ! !--- NSSTM variables @@ -1336,7 +1345,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain) endif if (sfc_var2(i,j,nvar_s2m) < -9990.0_r8) then - if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing zorli') + if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing zorlw') !$omp parallel do default(shared) private(nb, ix) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) @@ -1351,7 +1360,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain) !$omp parallel do default(shared) private(nb, ix, tem, tem1) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - Sfcprop(nb)%tsfco(ix) = max(con_tice, Sfcprop(nb)%tsfco(ix)) + if( Model%phour < 1.e-7) Sfcprop(nb)%tsfco(ix) = max(con_tice, Sfcprop(nb)%tsfco(ix)) ! this may break restart reproducibility tem1 = one - Sfcprop(nb)%landfrac(ix) tem = tem1 * Sfcprop(nb)%fice(ix) ! tem = ice fraction wrt whole cell Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorll(ix) * Sfcprop(nb)%landfrac(ix) & From 522d8e98ab8335cf343961537454763a7679fa99 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Wed, 2 Dec 2020 16:08:27 +0000 Subject: [PATCH 2/2] Pointing to the latest ccpp/physics --- .gitmodules | 4 ++-- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 28c6dbe15..d253f6966 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,5 @@ branch = master [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/shansun6/ccpp-physics - branch = bugfix_gfdl_SM_2mod_20201130 + url = https://github.com/NCAR/ccpp-physics + branch = master diff --git a/ccpp/physics b/ccpp/physics index bc4fcb0dc..d076cc2ba 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit bc4fcb0dc1a5d00c2f4a2cc31435709547572d3a +Subproject commit d076cc2bac2e34fc22a00e145ce6423def61abdb