From 50d66fc32da9fd5fc6baef21386787fe96b54327 Mon Sep 17 00:00:00 2001 From: wx20hw Date: Thu, 3 Jun 2021 12:50:43 +0000 Subject: [PATCH 01/14] fix the snet bug for Noah LSM --- ccpp/data/GFS_typedefs.F90 | 16 ++-- io/FV3GFS_io.F90 | 156 ++++++++++++++++++------------------- 2 files changed, 82 insertions(+), 90 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 6f2099bab..ebde948e9 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -2298,6 +2298,10 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%fice (IM)) ! allocate (Sfcprop%hprim (IM)) allocate (Sfcprop%hprime (IM,Model%nmtvr)) + allocate(Sfcprop%albdvis_lnd (IM)) + allocate(Sfcprop%albdnir_lnd (IM)) + allocate(Sfcprop%albivis_lnd (IM)) + allocate(Sfcprop%albinir_lnd (IM)) allocate (Sfcprop%emis_lnd (IM)) Sfcprop%slmsk = clear_val @@ -2319,6 +2323,10 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%fice = clear_val ! Sfcprop%hprim = clear_val Sfcprop%hprime = clear_val + Sfcprop%albdvis_lnd = clear_val + Sfcprop%albdnir_lnd = clear_val + Sfcprop%albivis_lnd = clear_val + Sfcprop%albinir_lnd = clear_val Sfcprop%emis_lnd = clear_val !--- In (radiation only) @@ -2473,20 +2481,12 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate(Sfcprop%iceprv (IM)) allocate(Sfcprop%snowprv (IM)) allocate(Sfcprop%graupelprv(IM)) - allocate(Sfcprop%albdvis_lnd (IM)) - allocate(Sfcprop%albdnir_lnd (IM)) - allocate(Sfcprop%albivis_lnd (IM)) - allocate(Sfcprop%albinir_lnd (IM)) Sfcprop%raincprv = clear_val Sfcprop%rainncprv = clear_val Sfcprop%iceprv = clear_val Sfcprop%snowprv = clear_val Sfcprop%graupelprv = clear_val - Sfcprop%albdvis_lnd = clear_val - Sfcprop%albdnir_lnd = clear_val - Sfcprop%albivis_lnd = clear_val - Sfcprop%albinir_lnd = clear_val end if ! Noah MP allocate and init when used ! diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 364f38efd..e65686c49 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -178,7 +178,7 @@ subroutine FV3GFS_GFS_checksum (Model, GFS_Data, Atm_block) nsfcprop2d = nsfcprop2d + 1 endif else - nsfcprop2d = 102 + nsfcprop2d = 107 endif allocate (temp2d(isc:iec,jsc:jec,nsfcprop2d+Model%ntot3d+Model%nctp)) @@ -303,8 +303,13 @@ subroutine FV3GFS_GFS_checksum (Model, GFS_Data, Atm_block) temp2d(i,j,84) = GFS_Data(nb)%Radtend%sfcflw(ix)%dnfx0 temp2d(i,j,85) = GFS_Data(nb)%Sfcprop%tiice(ix,1) temp2d(i,j,86) = GFS_Data(nb)%Sfcprop%tiice(ix,2) + temp2d(i,j,87) = GFS_Data(nb)%Sfcprop%albdvis_lnd(ix) + temp2d(i,j,88) = GFS_Data(nb)%Sfcprop%albdnir_lnd(ix) + temp2d(i,j,89) = GFS_Data(nb)%Sfcprop%albivis_lnd(ix) + temp2d(i,j,90) = GFS_Data(nb)%Sfcprop%albinir_lnd(ix) + temp2d(i,j,91) = GFS_Data(nb)%Sfcprop%emis_lnd(ix) - idx_opt = 87 + idx_opt = 92 if (Model%lsm == Model%lsm_noahmp) then temp2d(i,j,idx_opt) = GFS_Data(nb)%Sfcprop%snowxy(ix) temp2d(i,j,idx_opt+1) = GFS_Data(nb)%Sfcprop%tvxy(ix) @@ -356,11 +361,6 @@ subroutine FV3GFS_GFS_checksum (Model, GFS_Data, Atm_block) temp2d(i,j,idx_opt+46) = GFS_Data(nb)%Sfcprop%zsnsoxy(ix,2) temp2d(i,j,idx_opt+47) = GFS_Data(nb)%Sfcprop%zsnsoxy(ix,3) temp2d(i,j,idx_opt+48) = GFS_Data(nb)%Sfcprop%zsnsoxy(ix,4) - temp2d(i,j,idx_opt+49) = GFS_Data(nb)%Sfcprop%albdvis_lnd(ix) - temp2d(i,j,idx_opt+50) = GFS_Data(nb)%Sfcprop%albdnir_lnd(ix) - temp2d(i,j,idx_opt+51) = GFS_Data(nb)%Sfcprop%albivis_lnd(ix) - temp2d(i,j,idx_opt+52) = GFS_Data(nb)%Sfcprop%albinir_lnd(ix) - temp2d(i,j,idx_opt+53) = GFS_Data(nb)%Sfcprop%emis_lnd(ix) idx_opt = 141 elseif (Model%lsm == Model%lsm_ruc) then temp2d(i,j,idx_opt) = GFS_Data(nb)%Sfcprop%wetness(ix) @@ -373,19 +373,14 @@ subroutine FV3GFS_GFS_checksum (Model, GFS_Data, Atm_block) temp2d(i,j,idx_opt+7) = GFS_Data(nb)%Sfcprop%snowfallac_land(ix) temp2d(i,j,idx_opt+8) = GFS_Data(nb)%Sfcprop%snowfallac_ice(ix) temp2d(i,j,idx_opt+9) = GFS_Data(nb)%Sfcprop%sncovr_ice(ix) - temp2d(i,j,idx_opt+10) = GFS_Data(nb)%Sfcprop%albdvis_lnd(ix) - temp2d(i,j,idx_opt+11) = GFS_Data(nb)%Sfcprop%albdnir_lnd(ix) - temp2d(i,j,idx_opt+12) = GFS_Data(nb)%Sfcprop%albivis_lnd(ix) - temp2d(i,j,idx_opt+13) = GFS_Data(nb)%Sfcprop%albinir_lnd(ix) - temp2d(i,j,idx_opt+14) = GFS_Data(nb)%Sfcprop%sfalb_lnd(ix) - temp2d(i,j,idx_opt+15) = GFS_Data(nb)%Sfcprop%sfalb_lnd_bck(ix) - temp2d(i,j,idx_opt+16) = GFS_Data(nb)%Sfcprop%albdvis_ice(ix) - temp2d(i,j,idx_opt+17) = GFS_Data(nb)%Sfcprop%albdnir_ice(ix) - temp2d(i,j,idx_opt+18) = GFS_Data(nb)%Sfcprop%albivis_ice(ix) - temp2d(i,j,idx_opt+19) = GFS_Data(nb)%Sfcprop%albinir_ice(ix) - temp2d(i,j,idx_opt+20) = GFS_Data(nb)%Sfcprop%sfalb_ice(ix) - temp2d(i,j,idx_opt+21) = GFS_Data(nb)%Sfcprop%emis_lnd(ix) - temp2d(i,j,idx_opt+22) = GFS_Data(nb)%Sfcprop%emis_ice(ix) + temp2d(i,j,idx_opt+10) = GFS_Data(nb)%Sfcprop%sfalb_lnd(ix) + temp2d(i,j,idx_opt+11) = GFS_Data(nb)%Sfcprop%sfalb_lnd_bck(ix) + temp2d(i,j,idx_opt+12) = GFS_Data(nb)%Sfcprop%albdvis_ice(ix) + temp2d(i,j,idx_opt+13) = GFS_Data(nb)%Sfcprop%albdnir_ice(ix) + temp2d(i,j,idx_opt+14) = GFS_Data(nb)%Sfcprop%albivis_ice(ix) + temp2d(i,j,idx_opt+15) = GFS_Data(nb)%Sfcprop%albinir_ice(ix) + temp2d(i,j,idx_opt+16) = GFS_Data(nb)%Sfcprop%sfalb_ice(ix) + temp2d(i,j,idx_opt+17) = GFS_Data(nb)%Sfcprop%emis_ice(ix) idx_opt = 110 if (Model%rdlai) then temp2d(i,j,idx_opt+23) = GFS_Data(nb)%Sfcprop%xlaixy(ix) @@ -517,9 +512,9 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta if (Model%lsm == Model%lsm_ruc .and. warm_start) then if(Model%rdlai) then - nvar_s2r = 24 + nvar_s2r = 19 else - nvar_s2r = 23 + nvar_s2r = 18 end if nvar_s3 = 5 else @@ -532,7 +527,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta endif if (Model%lsm == Model%lsm_noahmp) then - nvar_s2mp = 34 !mp 2D + nvar_s2mp = 29 !mp 2D nvar_s3mp = 5 !mp 3D else nvar_s2mp = 0 !mp 2D @@ -628,7 +623,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta enddo ! if (Model%frac_grid) then ! needs more variables - nvar_s2m = 37 + nvar_s2m = 42 ! else ! nvar_s2m = 32 ! endif @@ -789,6 +784,11 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta sfc_name2(36) = 'tsfc' !tsfc composite sfc_name2(37) = 'zorl' !zorl composite ! endif + sfc_name2(38) = 'albdvis_lnd' + sfc_name2(39) = 'albdnir_lnd' + sfc_name2(40) = 'albivis_lnd' + sfc_name2(41) = 'albinir_lnd' + sfc_name2(42) = 'emis_lnd' if(Model%cplwav) then sfc_name2(nvar_s2m) = 'zorlwav' !zorl on land portion of a cell endif @@ -813,7 +813,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta sfc_name2(nvar_s2m+17) = 'dt_cool' sfc_name2(nvar_s2m+18) = 'qrain' ! -! Only needed when Noah MP LSM is used - 34 2D +! Only needed when Noah MP LSM is used - 29 2D ! if (Model%lsm == Model%lsm_noahmp) then sfc_name2(nvar_s2m+19) = 'snowxy' @@ -845,11 +845,6 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta sfc_name2(nvar_s2m+45) = 'smcwtdxy' sfc_name2(nvar_s2m+46) = 'deeprechxy' sfc_name2(nvar_s2m+47) = 'rechxy' - sfc_name2(nvar_s2m+48) = 'albdvis_lnd' - sfc_name2(nvar_s2m+49) = 'albdnir_lnd' - sfc_name2(nvar_s2m+50) = 'albivis_lnd' - sfc_name2(nvar_s2m+51) = 'albinir_lnd' - sfc_name2(nvar_s2m+52) = 'emis_lnd' else if (Model%lsm == Model%lsm_ruc .and. warm_start) then sfc_name2(nvar_s2m+19) = 'wetness' sfc_name2(nvar_s2m+20) = 'clw_surf_land' @@ -861,21 +856,16 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta sfc_name2(nvar_s2m+26) = 'snowfall_acc_land' sfc_name2(nvar_s2m+27) = 'snowfall_acc_ice' sfc_name2(nvar_s2m+28) = 'sncovr_ice' - sfc_name2(nvar_s2m+29) = 'albdvis_lnd' - sfc_name2(nvar_s2m+30) = 'albdnir_lnd' - sfc_name2(nvar_s2m+31) = 'albivis_lnd' - sfc_name2(nvar_s2m+32) = 'albinir_lnd' - sfc_name2(nvar_s2m+33) = 'sfalb_lnd' - sfc_name2(nvar_s2m+34) = 'sfalb_lnd_bck' - sfc_name2(nvar_s2m+35) = 'albdvis_ice' - sfc_name2(nvar_s2m+36) = 'albdnir_ice' - sfc_name2(nvar_s2m+37) = 'albivis_ice' - sfc_name2(nvar_s2m+38) = 'albinir_ice' - sfc_name2(nvar_s2m+39) = 'sfalb_ice' - sfc_name2(nvar_s2m+40) = 'emis_lnd' - sfc_name2(nvar_s2m+41) = 'emis_ice' + sfc_name2(nvar_s2m+29) = 'sfalb_lnd' + sfc_name2(nvar_s2m+30) = 'sfalb_lnd_bck' + sfc_name2(nvar_s2m+31) = 'albdvis_ice' + sfc_name2(nvar_s2m+32) = 'albdnir_ice' + sfc_name2(nvar_s2m+33) = 'albivis_ice' + sfc_name2(nvar_s2m+34) = 'albinir_ice' + sfc_name2(nvar_s2m+35) = 'sfalb_ice' + sfc_name2(nvar_s2m+36) = 'emis_ice' if (Model%rdlai) then - sfc_name2(nvar_s2m+42) = 'lai' + sfc_name2(nvar_s2m+37) = 'lai' endif else if (Model%lsm == Model%lsm_ruc .and. Model%rdlai) then sfc_name2(nvar_s2m+19) = 'lai' @@ -886,7 +876,10 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta var2_p => sfc_var2(:,:,num) if (trim(sfc_name2(num)) == 'sncovr'.or. trim(sfc_name2(num)) == 'tsfcl' .or. trim(sfc_name2(num)) == 'zorll' & .or. trim(sfc_name2(num)) == 'zorli' .or. trim(sfc_name2(num)) == 'zorlwav' & - .or. trim(sfc_name2(num)) == 'tsfc' .or. trim(sfc_name2(num)) == 'zorl') then + .or. trim(sfc_name2(num)) == 'tsfc' .or. trim(sfc_name2(num)) == 'zorl' & + .or.trim(sfc_name2(num)) == 'albdvis_lnd' .or. trim(sfc_name2(num)) == 'albdnir_lnd' & + .or.trim(sfc_name2(num)) == 'albivis_lnd' .or. trim(sfc_name2(num)) == 'albinir_lnd' & + .or.trim(sfc_name2(num)) == 'emis_lnd' ) then id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain, mandatory=.false.) else id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain) @@ -1044,6 +1037,11 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta ! Sfcprop(nb)%zorll(ix) = Sfcprop(nb)%zorlw(ix) ! Sfcprop(nb)%zorli(ix) = Sfcprop(nb)%zorlw(ix) ! endif + Sfcprop(nb)%albdvis_lnd(ix)= sfc_var2(i,j,37) + Sfcprop(nb)%albdnir_lnd(ix)= sfc_var2(i,j,38) + Sfcprop(nb)%albivis_lnd(ix)= sfc_var2(i,j,39) + Sfcprop(nb)%albinir_lnd(ix)= sfc_var2(i,j,40) + Sfcprop(nb)%emis_lnd(ix) = sfc_var2(i,j,41) if(Model%cplwav) then Sfcprop(nb)%zorlwav(ix) = sfc_var2(i,j,nvar_s2m) !--- (zorw from wave model) else @@ -1146,21 +1144,16 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta Sfcprop(nb)%snowfallac_land(ix) = sfc_var2(i,j,nvar_s2m+26) Sfcprop(nb)%snowfallac_ice(ix) = sfc_var2(i,j,nvar_s2m+27) Sfcprop(nb)%sncovr_ice(ix) = sfc_var2(i,j,nvar_s2m+28) - Sfcprop(nb)%albdvis_lnd(ix) = sfc_var2(i,j,nvar_s2m+29) - Sfcprop(nb)%albdnir_lnd(ix) = sfc_var2(i,j,nvar_s2m+30) - Sfcprop(nb)%albivis_lnd(ix) = sfc_var2(i,j,nvar_s2m+31) - Sfcprop(nb)%albinir_lnd(ix) = sfc_var2(i,j,nvar_s2m+32) - Sfcprop(nb)%sfalb_lnd(ix) = sfc_var2(i,j,nvar_s2m+33) - Sfcprop(nb)%sfalb_lnd_bck(ix) = sfc_var2(i,j,nvar_s2m+34) - Sfcprop(nb)%albdvis_ice(ix) = sfc_var2(i,j,nvar_s2m+35) - Sfcprop(nb)%albdnir_ice(ix) = sfc_var2(i,j,nvar_s2m+36) - Sfcprop(nb)%albivis_ice(ix) = sfc_var2(i,j,nvar_s2m+37) - Sfcprop(nb)%albinir_ice(ix) = sfc_var2(i,j,nvar_s2m+38) - Sfcprop(nb)%sfalb_ice(ix) = sfc_var2(i,j,nvar_s2m+39) - Sfcprop(nb)%emis_lnd(ix) = sfc_var2(i,j,nvar_s2m+40) - Sfcprop(nb)%emis_ice(ix) = sfc_var2(i,j,nvar_s2m+41) + Sfcprop(nb)%sfalb_lnd(ix) = sfc_var2(i,j,nvar_s2m+29) + Sfcprop(nb)%sfalb_lnd_bck(ix) = sfc_var2(i,j,nvar_s2m+30) + Sfcprop(nb)%albdvis_ice(ix) = sfc_var2(i,j,nvar_s2m+31) + Sfcprop(nb)%albdnir_ice(ix) = sfc_var2(i,j,nvar_s2m+32) + Sfcprop(nb)%albivis_ice(ix) = sfc_var2(i,j,nvar_s2m+33) + Sfcprop(nb)%albinir_ice(ix) = sfc_var2(i,j,nvar_s2m+34) + Sfcprop(nb)%sfalb_ice(ix) = sfc_var2(i,j,nvar_s2m+35) + Sfcprop(nb)%emis_ice(ix) = sfc_var2(i,j,nvar_s2m+36) if (Model%rdlai) then - Sfcprop(nb)%xlaixy(ix) = sfc_var2(i,j,nvar_s2m+42) + Sfcprop(nb)%xlaixy(ix) = sfc_var2(i,j,nvar_s2m+37) endif else if (Model%lsm == Model%lsm_ruc) then ! Initialize RUC snow cover on ice from snow cover @@ -1199,11 +1192,6 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta Sfcprop(nb)%smcwtdxy(ix) = sfc_var2(i,j,nvar_s2m+45) Sfcprop(nb)%deeprechxy(ix) = sfc_var2(i,j,nvar_s2m+46) Sfcprop(nb)%rechxy(ix) = sfc_var2(i,j,nvar_s2m+47) - Sfcprop(nb)%albdvis_lnd(ix)= sfc_var2(i,j,nvar_s2m+48) - Sfcprop(nb)%albdnir_lnd(ix)= sfc_var2(i,j,nvar_s2m+49) - Sfcprop(nb)%albivis_lnd(ix)= sfc_var2(i,j,nvar_s2m+50) - Sfcprop(nb)%albinir_lnd(ix)= sfc_var2(i,j,nvar_s2m+51) - Sfcprop(nb)%emis_lnd(ix) = sfc_var2(i,j,nvar_s2m+52) endif if (Model%lsm == Model%lsm_noah .or. Model%lsm == Model%lsm_noahmp .or. Model%lsm == Model%lsm_noah_wrfv4 .or. (.not.warm_start)) then @@ -1390,7 +1378,7 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta real(kind=kind_phys), pointer, dimension(:,:,:) :: var3_p3 => NULL() ! if (Model%frac_grid) then ! needs more variables - nvar2m = 37 + nvar2m = 42 ! else ! nvar2m = 32 ! endif @@ -1398,9 +1386,9 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta nvar2o = 18 if (Model%lsm == Model%lsm_ruc) then if (Model%rdlai) then - nvar2r = 24 + nvar2r = 19 else - nvar2r = 23 + nvar2r = 18 endif nvar3 = 5 else @@ -1502,6 +1490,11 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_name2(36) = 'tsfc' !tsfc composite sfc_name2(37) = 'zorl' !zorl composite ! endif + sfc_name2(38) = 'albdvis_lnd' + sfc_name2(39) = 'albdnir_lnd' + sfc_name2(40) = 'albivis_lnd' + sfc_name2(41) = 'albinir_lnd' + sfc_name2(42) = 'emis_lnd' if (Model%cplwav) then sfc_name2(nvar2m) = 'zorlwav' !zorl on land portion of a cell endif @@ -1535,21 +1528,16 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_name2(nvar2m+26) = 'snowfall_acc_land' sfc_name2(nvar2m+27) = 'snowfall_acc_ice' sfc_name2(nvar2m+28) = 'sncovr_ice' - sfc_name2(nvar2m+29) = 'albdvis_lnd' - sfc_name2(nvar2m+30) = 'albdnir_lnd' - sfc_name2(nvar2m+31) = 'albivis_lnd' - sfc_name2(nvar2m+32) = 'albinir_lnd' - sfc_name2(nvar2m+33) = 'sfalb_lnd' - sfc_name2(nvar2m+34) = 'sfalb_lnd_bck' - sfc_name2(nvar2m+35) = 'albdvis_ice' - sfc_name2(nvar2m+36) = 'albdnir_ice' - sfc_name2(nvar2m+37) = 'albivis_ice' - sfc_name2(nvar2m+38) = 'albinir_ice' - sfc_name2(nvar2m+39) = 'sfalb_ice' - sfc_name2(nvar2m+40) = 'emis_lnd' - sfc_name2(nvar2m+41) = 'emis_ice' + sfc_name2(nvar2m+29) = 'sfalb_lnd' + sfc_name2(nvar2m+30) = 'sfalb_lnd_bck' + sfc_name2(nvar2m+31) = 'albdvis_ice' + sfc_name2(nvar2m+32) = 'albdnir_ice' + sfc_name2(nvar2m+33) = 'albivis_ice' + sfc_name2(nvar2m+34) = 'albinir_ice' + sfc_name2(nvar2m+35) = 'sfalb_ice' + sfc_name2(nvar2m+36) = 'emis_ice' if (Model%rdlai) then - sfc_name2(nvar2m+42) = 'lai' + sfc_name2(nvar2m+37) = 'lai' endif else if(Model%lsm == Model%lsm_noahmp) then ! Only needed when Noah MP LSM is used - 29 2D @@ -1588,7 +1576,11 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta do num = 1,nvar2m var2_p => sfc_var2(:,:,num) if (trim(sfc_name2(num)) == 'sncovr'.or.trim(sfc_name2(num)) == 'tsfcl'.or.trim(sfc_name2(num)) == 'zorll' & - .or.trim(sfc_name2(num)) == 'zorli' .or.trim(sfc_name2(num)) == 'zorlwav') then + .or.trim(sfc_name2(num)) == 'zorli' .or.trim(sfc_name2(num)) == 'zorlwav' & + .or.trim(sfc_name2(num)) == 'albdvis_lnd' .or. trim(sfc_name2(num)) == 'albdnir_lnd' & + .or.trim(sfc_name2(num)) == 'albivis_lnd' .or. trim(sfc_name2(num)) == 'albinir_lnd' & + .or.trim(sfc_name2(num)) == 'emis_lnd' ) then + id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain, mandatory=.false.) else id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain) From 021e2c576640b9de8a9646bdb8974aa528135fff Mon Sep 17 00:00:00 2001 From: wx20hw Date: Thu, 3 Jun 2021 13:07:18 +0000 Subject: [PATCH 02/14] update .gitmodules --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index afe6f27dd..ee2bd161e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,5 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + url = https://github.com/HelinWei-NOAA/ccpp-physics + branch = remove_snet_from_noah_lsm From fc01b2496b85457ef372d97e233f770c2fc28153 Mon Sep 17 00:00:00 2001 From: Helin Wei Date: Thu, 3 Jun 2021 20:34:56 -0400 Subject: [PATCH 03/14] update branch --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 24cc09ed0..90229c86c 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 24cc09ed037c80659992cd3a9ef0900ed2d76785 +Subproject commit 90229c86c9a3c3abd0baefb001d2da979df75ed2 From 68e6fb6e8b920786ea5de332cb226f93833c4b68 Mon Sep 17 00:00:00 2001 From: Helin Wei Date: Sun, 6 Jun 2021 16:09:04 -0400 Subject: [PATCH 04/14] correct an error from RTs --- io/FV3GFS_io.F90 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index e65686c49..473ad507f 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -1714,6 +1714,11 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_var2(i,j,36) = Sfcprop(nb)%tsfc(ix) !--- tsfc composite sfc_var2(i,j,37) = Sfcprop(nb)%zorl(ix) !--- zorl composite ! endif + sfc_var2(i,j,38) = Sfcprop(nb)%albdvis_lnd(ix) + sfc_var2(i,j,39) = Sfcprop(nb)%albdnir_lnd(ix) + sfc_var2(i,j,40) = Sfcprop(nb)%albivis_lnd(ix) + sfc_var2(i,j,41) = Sfcprop(nb)%albinir_lnd(ix) + sfc_var2(i,j,42) = Sfcprop(nb)%emis_lnd(ix) if (Model%cplwav) then sfc_var2(i,j,nvar2m) = Sfcprop(nb)%zorlwav(ix) !--- zorlwav (zorl from wav) endif @@ -1751,21 +1756,16 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_var2(i,j,nvar2m+26) = Sfcprop(nb)%snowfallac_land(ix) sfc_var2(i,j,nvar2m+27) = Sfcprop(nb)%snowfallac_ice(ix) sfc_var2(i,j,nvar2m+28) = Sfcprop(nb)%sncovr_ice(ix) - sfc_var2(i,j,nvar2m+29) = Sfcprop(nb)%albdvis_lnd(ix) - sfc_var2(i,j,nvar2m+30) = Sfcprop(nb)%albdnir_lnd(ix) - sfc_var2(i,j,nvar2m+31) = Sfcprop(nb)%albivis_lnd(ix) - sfc_var2(i,j,nvar2m+32) = Sfcprop(nb)%albinir_lnd(ix) - sfc_var2(i,j,nvar2m+33) = Sfcprop(nb)%sfalb_lnd(ix) - sfc_var2(i,j,nvar2m+34) = Sfcprop(nb)%sfalb_lnd_bck(ix) - sfc_var2(i,j,nvar2m+35) = Sfcprop(nb)%albdvis_ice(ix) - sfc_var2(i,j,nvar2m+36) = Sfcprop(nb)%albdnir_ice(ix) - sfc_var2(i,j,nvar2m+37) = Sfcprop(nb)%albivis_ice(ix) - sfc_var2(i,j,nvar2m+38) = Sfcprop(nb)%albinir_ice(ix) - sfc_var2(i,j,nvar2m+39) = Sfcprop(nb)%sfalb_ice(ix) - sfc_var2(i,j,nvar2m+40) = Sfcprop(nb)%emis_lnd(ix) - sfc_var2(i,j,nvar2m+41) = Sfcprop(nb)%emis_ice(ix) + sfc_var2(i,j,nvar2m+29) = Sfcprop(nb)%sfalb_lnd(ix) + sfc_var2(i,j,nvar2m+30) = Sfcprop(nb)%sfalb_lnd_bck(ix) + sfc_var2(i,j,nvar2m+31) = Sfcprop(nb)%albdvis_ice(ix) + sfc_var2(i,j,nvar2m+32) = Sfcprop(nb)%albdnir_ice(ix) + sfc_var2(i,j,nvar2m+33) = Sfcprop(nb)%albivis_ice(ix) + sfc_var2(i,j,nvar2m+34) = Sfcprop(nb)%albinir_ice(ix) + sfc_var2(i,j,nvar2m+35) = Sfcprop(nb)%sfalb_ice(ix) + sfc_var2(i,j,nvar2m+36) = Sfcprop(nb)%emis_ice(ix) if (Model%rdlai) then - sfc_var2(i,j,nvar2m+42) = Sfcprop(nb)%xlaixy(ix) + sfc_var2(i,j,nvar2m+37) = Sfcprop(nb)%xlaixy(ix) endif else if (Model%lsm == Model%lsm_noahmp) then !--- Extra Noah MP variables From 01aea57a7399f44dfcfe01077c2a6870590480bb Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 26 Jun 2021 13:21:15 -0600 Subject: [PATCH 05/14] Update .gitmodules and submodule pointer for ccpp-physics for code review and testing --- .gitmodules | 6 ++++-- ccpp/physics | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index afe6f27dd..32460fab1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,7 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + #url = https://github.com/NCAR/ccpp-physics + #branch = main + url = https://github.com/climbfuji/ccpp-physics + branch = bugfix_thompson_pass_correct_timestep diff --git a/ccpp/physics b/ccpp/physics index f6b19b587..4ccbbeb4b 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f6b19b587850b7f2f1af93a4819b5342ac09c015 +Subproject commit 4ccbbeb4b8d244b67493099426bbde87608be9c9 From 2865f51ee4049d57834769ee847021a5d5391011 Mon Sep 17 00:00:00 2001 From: Ruiyu Sun Date: Sun, 27 Jun 2021 20:10:14 +0000 Subject: [PATCH 06/14] adding inner loop namelist variable for the Thompson microphysics --- ccpp/data/GFS_typedefs.F90 | 7 ++++- ccpp/data/GFS_typedefs.meta | 7 +++++ io/post_gfs.F90 | 61 ++++++++++++++++++++++++++++++++++--- 3 files changed, 69 insertions(+), 6 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 1e4f4c082..021c3030a 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -785,6 +785,7 @@ module GFS_typedefs logical :: lradar !< flag for radar reflectivity real(kind=kind_phys) :: nsradar_reset !< seconds between resetting radar reflectivity calculation real(kind=kind_phys) :: ttendlim !< temperature tendency limiter per time step in K/s + real(kind=kind_phys) :: dt_inner !< time step for the inner loop in s !--- GFDL microphysical paramters logical :: lgfdlmprad !< flag for GFDL mp scheme and radiation consistency @@ -3155,6 +3156,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: lradar = .false. !< flag for radar reflectivity real(kind=kind_phys) :: nsradar_reset = -999.0 !< seconds between resetting radar reflectivity calculation, set to <0 for every time step real(kind=kind_phys) :: ttendlim = -999.0 !< temperature tendency limiter, set to <0 to deactivate + real(kind=kind_phys) :: dt_inner = 600. !< time step for the inner loop !--- GFDL microphysical parameters logical :: lgfdlmprad = .false. !< flag for GFDLMP radiation interaction @@ -3503,7 +3505,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & mg_ncnst, mg_ninst, mg_ngnst, sed_supersat, do_sb_physics, & mg_alf, mg_qcmin, mg_do_ice_gmao, mg_do_liq_liu, & ltaerosol, lradar, nsradar_reset, lrefres, ttendlim, & - lgfdlmprad, & + lgfdlmprad, dt_inner, & !--- max hourly avg_max_length, & !--- land/surface model control @@ -3930,6 +3932,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%lradar = lradar Model%nsradar_reset = nsradar_reset Model%ttendlim = ttendlim + Model%dt_inner = dt_inner !--- F-A MP parameters Model%rhgrd = rhgrd Model%spec_adv = spec_adv @@ -4795,6 +4798,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & if (Model%me == Model%master) print *,' Using Thompson double moment microphysics', & ' ltaerosol = ',Model%ltaerosol, & ' ttendlim =',Model%ttendlim, & + ' dt_inner =',Model%dt_inner, & ' effr_in =',Model%effr_in, & ' lradar =',Model%lradar, & ' nsradar_reset =',Model%nsradar_reset, & @@ -5104,6 +5108,7 @@ subroutine control_print(Model) print *, ' nsradar_reset : ', Model%nsradar_reset print *, ' lrefres : ', Model%lrefres print *, ' ttendlim : ', Model%ttendlim + print *, ' dt_inner : ', Model%dt_inner print *, ' ' endif if (Model%imp_physics == Model%imp_physics_mg) then diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 5e73ea1ec..308136cc4 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -3426,6 +3426,13 @@ dimensions = () type = real kind = kind_phys +[dt_inner] + standard_name = time_step_for_inner_loop + long_name = time step for inner loop + units = s + dimensions = () + type = real + kind = kind_phys [lgfdlmprad] standard_name = flag_for_GFDL_microphysics_radiation_interaction long_name = flag for GFDL microphysics-radiation interaction diff --git a/io/post_gfs.F90 b/io/post_gfs.F90 index 0907d7d76..105172a86 100644 --- a/io/post_gfs.F90 +++ b/io/post_gfs.F90 @@ -22,6 +22,7 @@ subroutine post_run_gfs(wrt_int_state,mypei,mpicomp,lead_write, & ! ! revision history: ! Jul 2019 J. Wang create interface to run inline post for FV3 +! Apr 2021 R. Sun Added variables for Thomspon MP ! !----------------------------------------------------------------------- !*** run post on write grid comp @@ -342,7 +343,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & use vrbls3d, only: t, q, uh, vh, wh, alpint, dpres, zint, zmid, o3, & qqr, qqs, cwm, qqi, qqw, qqg, omga, cfr, pmid, & q2, rlwtt, rswtt, tcucn, tcucns, train, el_pbl, & - pint, exch_h, ref_10cm + pint, exch_h, ref_10cm, qqni,qqnr,qqnwfa,qqnifa use vrbls2d, only: f, pd, sigt4, fis, pblh, ustar, z0, ths, qs, twbs,& qwbs, avgcprate, cprate, avgprec, prec, lspa, sno,& cldefi, th10, q10, tshltr, pshltr, tshltr, albase,& @@ -2182,8 +2183,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo endif -! for GFDL MP - if (imp_physics == 11) then +! for GFDL MP or Thompson MP + if (imp_physics == 11 .or. imp_physics == 8) then ! model level cloud water mixing ratio if(trim(fieldname)=='clwmr') then !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqw,arrayr43d) @@ -2243,6 +2244,56 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo endif + + if(imp_physics == 8) then + ! model level rain number + if(trim(fieldname)=='ncrain') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnr,arrayr43d) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqnr(i,j,l)=arrayr43d(i,j,l) + enddo + enddo + enddo + endif + + ! model level rain number + if(trim(fieldname)=='ncice') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqni,arrayr43d) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqni(i,j,l)=arrayr43d(i,j,l) + enddo + enddo + enddo + endif + + ! model level rain number + if(trim(fieldname)=='nwfa') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnwfa,arrayr43d) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqnwfa(i,j,l)=arrayr43d(i,j,l) + enddo + enddo + enddo + endif + + ! model level rain number + if(trim(fieldname)=='nifa') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnifa,arrayr43d) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqnifa(i,j,l)=arrayr43d(i,j,l) + enddo + enddo + enddo + endif + endif !if(imp_physics == 8) then !gfdlmp endif @@ -2400,8 +2451,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo -! compute cwm for gfdlmp - if( imp_physics == 11 ) then +! compute cwm for gfdlmp or Thompson + if( imp_physics == 11 .or. imp_physics == 8) then do l=1,lm !$omp parallel do default(none) private(i,j) shared(l,jsta,jend,ista,iend,cwm,qqg,qqs,qqr,qqi,qqw) do j=jsta,jend From 29039405e3f55ee79dc07021c2a51d2ba5a68558 Mon Sep 17 00:00:00 2001 From: Ruiyu Sun Date: Sun, 27 Jun 2021 20:25:38 +0000 Subject: [PATCH 07/14] update .gitmodules and ccpp/pysics for the inner loop in Thompson microphysics --- .gitmodules | 4 ++-- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index afe6f27dd..6f63ea294 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,5 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + url = https://github.com/RuiyuSun/ccpp-physics + branch = innerloop diff --git a/ccpp/physics b/ccpp/physics index f6b19b587..dd04dc3e6 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f6b19b587850b7f2f1af93a4819b5342ac09c015 +Subproject commit dd04dc3e689854661f460c759bd4efe5991b723e From 70ad914a66faaed5b449b2b799bbd54d09c65714 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 28 Jun 2021 12:19:26 -0600 Subject: [PATCH 08/14] Update submodule pointer for ccpp-physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 4ccbbeb4b..1ccfb69bd 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 4ccbbeb4b8d244b67493099426bbde87608be9c9 +Subproject commit 1ccfb69bd8fc55e044875629506114cd2e34538c From 30fbeb172a40f8f6b8d011c346ae6680683fc260 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 16 Jul 2021 16:34:06 -0600 Subject: [PATCH 09/14] Update io/FV3GFS_io.F90 so that IC zorl gets read into zorl and not zorlw, update logic to compute missing fields --- io/FV3GFS_io.F90 | 59 +++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index d30f157d1..f044fbd72 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -789,10 +789,10 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta sfc_name2(35) = 'zorli' !zorl on ice portion of a cell sfc_name2(36) = 'snodl' !snowd on land portion of a cell sfc_name2(37) = 'tsfc' !tsfc composite - sfc_name2(38) = 'zorl' !zorl composite + sfc_name2(38) = 'zorlw' !zorl on water portion of a cell sfc_name2(39) = 'weasdl'!weasd on land portion of a cell if(Model%cplwav) then - sfc_name2(nvar_s2m) = 'zorlwav' !zorl on land portion of a cell + sfc_name2(nvar_s2m) = 'zorlwav' !zorl from wave component endif !--- NSSTM inputs only needed when (nstf_name(1) > 0) .and. (nstf_name(2)) == 0) @@ -889,7 +889,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta if (trim(sfc_name2(num)) == 'sncovr'.or. trim(sfc_name2(num)) == 'tsfcl' .or. trim(sfc_name2(num)) == 'zorll' & .or. trim(sfc_name2(num)) == 'zorli' .or. trim(sfc_name2(num)) == 'zorlwav' & .or. trim(sfc_name2(num)) == 'snodl' .or. trim(sfc_name2(num)) == 'weasdl' & - .or. trim(sfc_name2(num)) == 'tsfc' .or. trim(sfc_name2(num)) == 'zorl') then + .or. trim(sfc_name2(num)) == 'tsfc' .or. trim(sfc_name2(num)) == 'zorlw') then id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain, mandatory=.false.) else id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain) @@ -1006,7 +1006,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta Sfcprop(nb)%tsfco(ix) = sfc_var2(i,j,2) !--- tsfc (tsea in sfc file) Sfcprop(nb)%weasd(ix) = sfc_var2(i,j,3) !--- weasd (sheleg in sfc file) Sfcprop(nb)%tg3(ix) = sfc_var2(i,j,4) !--- tg3 - Sfcprop(nb)%zorlw(ix) = sfc_var2(i,j,5) !--- zorl on water + Sfcprop(nb)%zorl(ix) = sfc_var2(i,j,5) !--- zorl composite Sfcprop(nb)%alvsf(ix) = sfc_var2(i,j,6) !--- alvsf Sfcprop(nb)%alvwf(ix) = sfc_var2(i,j,7) !--- alvwf Sfcprop(nb)%alnsf(ix) = sfc_var2(i,j,8) !--- alnsf @@ -1039,7 +1039,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta Sfcprop(nb)%zorli(ix) = sfc_var2(i,j,35) !--- zorli (zorl on ice portion of a cell) Sfcprop(nb)%snodl(ix) = sfc_var2(i,j,36) !--- snodl (snowd on land portion of a cell) Sfcprop(nb)%tsfc(ix) = sfc_var2(i,j,37) !--- tsfc composite - Sfcprop(nb)%zorl(ix) = sfc_var2(i,j,38) !--- zorl composite + Sfcprop(nb)%zorlw(ix) = sfc_var2(i,j,38) !--- zorlw (zorl on water portion of a cell) Sfcprop(nb)%weasdl(ix) = sfc_var2(i,j,39) !--- weasdl (weasd on land portion of a cell) if(Model%cplwav) then Sfcprop(nb)%zorlwav(ix) = sfc_var2(i,j,nvar_s2m) !--- (zorw from wave model) @@ -1327,7 +1327,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta !$omp parallel do default(shared) private(nb, ix) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - Sfcprop(nb)%zorll(ix) = Sfcprop(nb)%zorlw(ix) !--- compute zorll from existing variables + Sfcprop(nb)%zorll(ix) = Sfcprop(nb)%zorl(ix) !--- compute zorll from existing variables enddo enddo endif @@ -1337,7 +1337,17 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta !$omp parallel do default(shared) private(nb, ix) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - Sfcprop(nb)%zorli(ix) = Sfcprop(nb)%zorlw(ix) !--- compute zorli from existing variables + Sfcprop(nb)%zorli(ix) = Sfcprop(nb)%zorl(ix) !--- compute zorli from existing variables + enddo + enddo + endif + + if (sfc_var2(i,j,38) < -9990.0_r8) then + 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) + Sfcprop(nb)%zorlw(ix) = Sfcprop(nb)%zorl(ix) !--- compute zorlw from existing variables enddo enddo endif @@ -1359,20 +1369,16 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta enddo endif - ! Fill in composite tsfc and zorl for coldstart runs - compute_tsfc_zorl_for_colstart: if (.not. warm_start) then + ! Fill in composite tsfc for coldstart runs + compute_tsfc_for_colstart: if (.not. warm_start) then if(Model%frac_grid) then ! 3-way composite - if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing composite tsfc and zorl') + if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing composite tsfc') !$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)) ! 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) & - + Sfcprop(nb)%zorli(ix) * tem & - + Sfcprop(nb)%zorlw(ix) * (tem1-tem) - Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfcl(ix) * Sfcprop(nb)%landfrac(ix) & + Sfcprop(nb)%tisfc(ix) * tem & + Sfcprop(nb)%tsfco(ix) * (tem1-tem) @@ -1384,26 +1390,23 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta do ix = 1, Atm_block%blksz(nb) !--- specify tsfcl/zorll/zorli from existing variable tsfco/zorlw if (Sfcprop(nb)%slmsk(ix) == 1) then - Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorll(ix) Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfcl(ix) else tem = one - Sfcprop(nb)%fice(ix) - Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorli(ix) * Sfcprop(nb)%fice(ix) & - + Sfcprop(nb)%zorlw(ix) * tem Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tisfc(ix) * Sfcprop(nb)%fice(ix) & + Sfcprop(nb)%tsfco(ix) * tem endif enddo enddo endif - endif compute_tsfc_zorl_for_colstart + endif compute_tsfc_for_colstart 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 zorlwav') !$omp parallel do default(shared) private(nb, ix) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - Sfcprop(nb)%zorlwav(ix) = Sfcprop(nb)%zorlw(ix) !--- compute zorlwav from existing variables + Sfcprop(nb)%zorlwav(ix) = Sfcprop(nb)%zorl(ix) !--- compute zorlwav from existing variables enddo enddo endif @@ -1564,11 +1567,11 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_name2(35) = 'zorli' !zorl on ice portion of a cell sfc_name2(36) = 'snodl' !snowd on land portion of a cell sfc_name2(37) = 'tsfc' !tsfc composite - sfc_name2(38) = 'zorl' !zorl composite + sfc_name2(38) = 'zorlw' !zorl on water portion of a cell sfc_name2(39) = 'weasd' !weasd on land portion of a cell ! endif if (Model%cplwav) then - sfc_name2(nvar2m) = 'zorlwav' !zorl on land portion of a cell + sfc_name2(nvar2m) = 'zorlwav' !zorl from wave component endif !--- NSSTM inputs only needed when (nstf_name(1) > 0) .and. (nstf_name(2)) == 0) sfc_name2(nvar2m+1) = 'tref' @@ -1655,7 +1658,7 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta if (trim(sfc_name2(num)) == 'sncovr' .or. trim(sfc_name2(num)) == 'tsfcl' .or.trim(sfc_name2(num)) == 'zorll' & .or. trim(sfc_name2(num)) == 'zorli' .or.trim(sfc_name2(num)) == 'zorlwav' & .or. trim(sfc_name2(num)) == 'snodl' .or. trim(sfc_name2(num)) == 'weasdl' & - .or. trim(sfc_name2(num)) == 'tsfc' .or. trim(sfc_name2(num)) == 'zorl') then + .or. trim(sfc_name2(num)) == 'tsfc' .or. trim(sfc_name2(num)) == 'zorlw') then id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain, mandatory=.false.) else id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain) @@ -1745,16 +1748,10 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta i = Atm_block%index(nb)%ii(ix) - isc + 1 j = Atm_block%index(nb)%jj(ix) - jsc + 1 sfc_var2(i,j,1) = Sfcprop(nb)%slmsk(ix) !--- slmsk -! if (Model%frac_grid) then - sfc_var2(i,j,2) = Sfcprop(nb)%tsfco(ix) !--- tsfc (tsea in sfc file) - sfc_var2(i,j,5) = Sfcprop(nb)%zorlw(ix) !--- zorlw -! else -! sfc_var2(i,j,2) = Sfcprop(nb)%tsfc(ix) !--- tsfc (tsea in sfc file) -! sfc_var2(i,j,5) = Sfcprop(nb)%zorl(ix) !--- zorl -! endif + sfc_var2(i,j,2) = Sfcprop(nb)%tsfco(ix) !--- tsfc (tsea in sfc file) sfc_var2(i,j,3) = Sfcprop(nb)%weasd(ix) !--- weasd (sheleg in sfc file) sfc_var2(i,j,4) = Sfcprop(nb)%tg3(ix) !--- tg3 -! sfc_var2(i,j,5) = Sfcprop(nb)%zorl(ix) !--- zorl + sfc_var2(i,j,5) = Sfcprop(nb)%zorl(ix) !--- zorl sfc_var2(i,j,6) = Sfcprop(nb)%alvsf(ix) !--- alvsf sfc_var2(i,j,7) = Sfcprop(nb)%alvwf(ix) !--- alvwf sfc_var2(i,j,8) = Sfcprop(nb)%alnsf(ix) !--- alnsf @@ -1787,7 +1784,7 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_var2(i,j,35) = Sfcprop(nb)%zorli(ix) !--- zorli (zorl on ice) sfc_var2(i,j,36) = Sfcprop(nb)%snodl(ix) !--- snodl (snowd on land) sfc_var2(i,j,37) = Sfcprop(nb)%tsfc(ix) !--- tsfc composite - sfc_var2(i,j,38) = Sfcprop(nb)%zorl(ix) !--- zorl composite + sfc_var2(i,j,38) = Sfcprop(nb)%zorlw(ix) !--- zorl (zorl on water) sfc_var2(i,j,39) = Sfcprop(nb)%weasdl(ix) !--- weasdl (weasd on land) if (Model%cplwav) then sfc_var2(i,j,nvar2m) = Sfcprop(nb)%zorlwav(ix) !--- zorlwav (zorl from wav) From b7f3158080ffb675c87706ac8100e421f0d2e10b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 16 Jul 2021 17:25:00 -0600 Subject: [PATCH 10/14] Rearrange order of fields --- io/FV3GFS_io.F90 | 67 +++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index f044fbd72..122f8b2e6 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -784,13 +784,13 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta sfc_name2(31) = 'snoalb' !--- variables below here are optional sfc_name2(32) = 'sncovr' - sfc_name2(33) = 'tsfcl' !temp on land portion of a cell - sfc_name2(34) = 'zorll' !zorl on land portion of a cell - sfc_name2(35) = 'zorli' !zorl on ice portion of a cell - sfc_name2(36) = 'snodl' !snowd on land portion of a cell - sfc_name2(37) = 'tsfc' !tsfc composite - sfc_name2(38) = 'zorlw' !zorl on water portion of a cell - sfc_name2(39) = 'weasdl'!weasd on land portion of a cell + sfc_name2(33) = 'snodl' !snowd on land portion of a cell + sfc_name2(34) = 'weasdl'!weasd on land portion of a cell + sfc_name2(35) = 'tsfc' !tsfc composite + sfc_name2(36) = 'tsfcl' !temp on land portion of a cell + sfc_name2(37) = 'zorlw' !zorl on water portion of a cell + sfc_name2(38) = 'zorll' !zorl on land portion of a cell + sfc_name2(39) = 'zorli' !zorl on ice portion of a cell if(Model%cplwav) then sfc_name2(nvar_s2m) = 'zorlwav' !zorl from wave component endif @@ -1034,17 +1034,17 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta Sfcprop(nb)%slope(ix) = sfc_var2(i,j,30) !--- slope Sfcprop(nb)%snoalb(ix) = sfc_var2(i,j,31) !--- snoalb Sfcprop(nb)%sncovr(ix) = sfc_var2(i,j,32) !--- sncovr - Sfcprop(nb)%tsfcl(ix) = sfc_var2(i,j,33) !--- sfcl (temp on land portion of a cell) - Sfcprop(nb)%zorll(ix) = sfc_var2(i,j,34) !--- zorll (zorl on land portion of a cell) - Sfcprop(nb)%zorli(ix) = sfc_var2(i,j,35) !--- zorli (zorl on ice portion of a cell) - Sfcprop(nb)%snodl(ix) = sfc_var2(i,j,36) !--- snodl (snowd on land portion of a cell) - Sfcprop(nb)%tsfc(ix) = sfc_var2(i,j,37) !--- tsfc composite - Sfcprop(nb)%zorlw(ix) = sfc_var2(i,j,38) !--- zorlw (zorl on water portion of a cell) - Sfcprop(nb)%weasdl(ix) = sfc_var2(i,j,39) !--- weasdl (weasd on land portion of a cell) + Sfcprop(nb)%snodl(ix) = sfc_var2(i,j,33) !--- snodl (snowd on land portion of a cell) + Sfcprop(nb)%weasdl(ix) = sfc_var2(i,j,34) !--- weasdl (weasd on land portion of a cell) + Sfcprop(nb)%tsfc(ix) = sfc_var2(i,j,35) !--- tsfc composite + Sfcprop(nb)%tsfcl(ix) = sfc_var2(i,j,36) !--- tsfcl (temp on land portion of a cell) + Sfcprop(nb)%zorlw(ix) = sfc_var2(i,j,37) !--- zorlw (zorl on water portion of a cell) + Sfcprop(nb)%zorll(ix) = sfc_var2(i,j,38) !--- zorll (zorl on land portion of a cell) + Sfcprop(nb)%zorli(ix) = sfc_var2(i,j,39) !--- zorli (zorl on ice portion of a cell) if(Model%cplwav) then Sfcprop(nb)%zorlwav(ix) = sfc_var2(i,j,nvar_s2m) !--- (zorw from wave model) else - Sfcprop(nb)%zorlwav(ix) = Sfcprop(nb)%zorlw(ix) + Sfcprop(nb)%zorlwav(ix) = Sfcprop(nb)%zorl(ix) endif if (Model%frac_grid) then @@ -1388,7 +1388,6 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta !$omp parallel do default(shared) private(nb, ix, tem) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - !--- specify tsfcl/zorll/zorli from existing variable tsfco/zorlw if (Sfcprop(nb)%slmsk(ix) == 1) then Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfcl(ix) else @@ -1559,21 +1558,19 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_name2(29) = 'shdmax' sfc_name2(30) = 'slope' sfc_name2(31) = 'snoalb' - !--- variables below here are optional + !--- variables below here are optional sfc_name2(32) = 'sncovr' -! if (Model%frac_grid) then - sfc_name2(33) = 'tsfcl' !temp on land portion of a cell - sfc_name2(34) = 'zorll' !zorl on land portion of a cell - sfc_name2(35) = 'zorli' !zorl on ice portion of a cell - sfc_name2(36) = 'snodl' !snowd on land portion of a cell - sfc_name2(37) = 'tsfc' !tsfc composite - sfc_name2(38) = 'zorlw' !zorl on water portion of a cell - sfc_name2(39) = 'weasd' !weasd on land portion of a cell -! endif + sfc_name2(33) = 'snodl' !snowd on land portion of a cell + sfc_name2(34) = 'weasdl'!weasd on land portion of a cell + sfc_name2(35) = 'tsfc' !tsfc composite + sfc_name2(36) = 'tsfcl' !temp on land portion of a cell + sfc_name2(37) = 'zorlw' !zorl on water portion of a cell + sfc_name2(38) = 'zorll' !zorl on land portion of a cell + sfc_name2(39) = 'zorli' !zorl on ice portion of a cell if (Model%cplwav) then sfc_name2(nvar2m) = 'zorlwav' !zorl from wave component endif - !--- NSSTM inputs only needed when (nstf_name(1) > 0) .and. (nstf_name(2)) == 0) + !--- NSSTM inputs only needed when (nstf_name(1) > 0) .and. (nstf_name(2)) == 0) sfc_name2(nvar2m+1) = 'tref' sfc_name2(nvar2m+2) = 'z_c' sfc_name2(nvar2m+3) = 'c_0' @@ -1778,14 +1775,14 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_var2(i,j,29) = Sfcprop(nb)%shdmax(ix)!--- shdmax sfc_var2(i,j,30) = Sfcprop(nb)%slope(ix) !--- slope sfc_var2(i,j,31) = Sfcprop(nb)%snoalb(ix)!--- snoalb - sfc_var2(i,j,32) = Sfcprop(nb)%sncovr(ix)!--- sncovr - sfc_var2(i,j,33) = Sfcprop(nb)%tsfcl(ix) !--- tsfcl (temp on land) - sfc_var2(i,j,34) = Sfcprop(nb)%zorll(ix) !--- zorll (zorl on land) - sfc_var2(i,j,35) = Sfcprop(nb)%zorli(ix) !--- zorli (zorl on ice) - sfc_var2(i,j,36) = Sfcprop(nb)%snodl(ix) !--- snodl (snowd on land) - sfc_var2(i,j,37) = Sfcprop(nb)%tsfc(ix) !--- tsfc composite - sfc_var2(i,j,38) = Sfcprop(nb)%zorlw(ix) !--- zorl (zorl on water) - sfc_var2(i,j,39) = Sfcprop(nb)%weasdl(ix) !--- weasdl (weasd on land) + sfc_var2(i,j,32) = Sfcprop(nb)%sncovr(ix) !--- sncovr + sfc_var2(i,j,33) = Sfcprop(nb)%snodl(ix) !--- snodl (snowd on land) + sfc_var2(i,j,34) = Sfcprop(nb)%weasdl(ix) !--- weasdl (weasd on land) + sfc_var2(i,j,35) = Sfcprop(nb)%tsfc(ix) !--- tsfc composite + sfc_var2(i,j,36) = Sfcprop(nb)%tsfcl(ix) !--- tsfcl (temp on land) + sfc_var2(i,j,37) = Sfcprop(nb)%zorlw(ix) !--- zorl (zorl on water) + sfc_var2(i,j,38) = Sfcprop(nb)%zorll(ix) !--- zorll (zorl on land) + sfc_var2(i,j,39) = Sfcprop(nb)%zorli(ix) !--- zorli (zorl on ice) if (Model%cplwav) then sfc_var2(i,j,nvar2m) = Sfcprop(nb)%zorlwav(ix) !--- zorlwav (zorl from wav) endif From 5f1c842c9c5ca58a11c5ed78bc9209b8be445c2a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 21 Jul 2021 16:06:26 -0600 Subject: [PATCH 11/14] Update .gitmodules and submodule pointer for ccpp-physics for code review and testing --- .gitmodules | 6 ++++-- ccpp/physics | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index afe6f27dd..aad8c355c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,7 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + #url = https://github.com/NCAR/ccpp-physics + #branch = main + url = https://github.com/climbfuji/ccpp-physics + branch = thompson_inner_loop_subcycling_bugfix_noah_bugfix diff --git a/ccpp/physics b/ccpp/physics index 09faa73b9..54867fbdb 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 09faa73b9659a682e904b35ee6c6e127a4c4c2cf +Subproject commit 54867fbdb7c3b0348ef38b712e01ce52299c3a0a From 616e36a0d354c0e37ec5752bb0acd9c435abc3ba Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 22 Jul 2021 09:01:15 -0600 Subject: [PATCH 12/14] Update submodule pointer for ccpp-physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 54867fbdb..cdbe3749f 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 54867fbdb7c3b0348ef38b712e01ce52299c3a0a +Subproject commit cdbe3749f365ca178dc0ee533e66f693eef5835a From 3fd09d02e09d51791478a88c635bcc420a5c7b87 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 22 Jul 2021 11:37:18 -0600 Subject: [PATCH 13/14] Bug fixes in io/FV3GFS_io.F90: wrong indices used in several places --- io/FV3GFS_io.F90 | 77 +++++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 9e018f5a2..03c9ebfda 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -1298,39 +1298,47 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta i = Atm_block%index(1)%ii(1) - isc + 1 j = Atm_block%index(1)%jj(1) - jsc + 1 - - if (sfc_var2(i,j,33) < -9990.0_r8) then - if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing tsfcl') -!$omp parallel do default(shared) private(nb, ix) + if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing snodl') +!$omp parallel do default(shared) private(nb, ix, tem) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - Sfcprop(nb)%tsfcl(ix) = Sfcprop(nb)%tsfco(ix) !--- compute tsfcl from existing variables + if (Sfcprop(nb)%landfrac(ix) > zero) then + tem = one / Sfcprop(nb)%landfrac(ix) + Sfcprop(nb)%snodl(ix) = Sfcprop(nb)%snowd(ix) * tem + else + Sfcprop(nb)%snodl(ix) = zero + endif enddo enddo endif if (sfc_var2(i,j,34) < -9990.0_r8) then - if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing zorll') -!$omp parallel do default(shared) private(nb, ix) + if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing weasdl') +!$omp parallel do default(shared) private(nb, ix, tem) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - Sfcprop(nb)%zorll(ix) = Sfcprop(nb)%zorl(ix) !--- compute zorll from existing variables + if (Sfcprop(nb)%landfrac(ix) > zero) then + tem = one / Sfcprop(nb)%landfrac(ix) + Sfcprop(nb)%weasdl(ix) = Sfcprop(nb)%weasd(ix) * tem + else + Sfcprop(nb)%weasdl(ix) = zero + endif enddo enddo endif - if (sfc_var2(i,j,35) < -9990.0_r8) then - if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing zorli') + if (sfc_var2(i,j,36) < -9990.0_r8) then + if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing tsfcl') !$omp parallel do default(shared) private(nb, ix) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - Sfcprop(nb)%zorli(ix) = Sfcprop(nb)%zorl(ix) !--- compute zorli from existing variables + Sfcprop(nb)%tsfcl(ix) = Sfcprop(nb)%tsfco(ix) !--- compute tsfcl from existing variables enddo enddo endif - if (sfc_var2(i,j,38) < -9990.0_r8) then + if (sfc_var2(i,j,37) < -9990.0_r8) then 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 @@ -1340,31 +1348,34 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta enddo endif - if (sfc_var2(i,j,36) < -9990.0_r8) then - if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - using snowd') -!$omp parallel do default(shared) private(nb, ix, tem) + if (sfc_var2(i,j,38) < -9990.0_r8) then + if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing zorll') +!$omp parallel do default(shared) private(nb, ix) do nb = 1, Atm_block%nblks do ix = 1, Atm_block%blksz(nb) - if (Sfcprop(nb)%landfrac(ix) > zero) then - tem = one / Sfcprop(nb)%landfrac(ix) - Sfcprop(nb)%snodl(ix) = Sfcprop(nb)%snowd(ix) * tem - Sfcprop(nb)%weasdl(ix) = Sfcprop(nb)%weasd(ix) * tem - else - Sfcprop(nb)%snodl(ix) = zero - Sfcprop(nb)%weasdl(ix) = zero - endif + Sfcprop(nb)%zorll(ix) = Sfcprop(nb)%zorl(ix) !--- compute zorll from existing variables enddo enddo endif - ! Fill in composite tsfc for coldstart runs - compute_tsfc_for_colstart: if (.not. warm_start) then + if (sfc_var2(i,j,39) < -9990.0_r8) then + if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing zorli') +!$omp parallel do default(shared) private(nb, ix) + do nb = 1, Atm_block%nblks + do ix = 1, Atm_block%blksz(nb) + Sfcprop(nb)%zorli(ix) = Sfcprop(nb)%zorl(ix) !--- compute zorli from existing variables + enddo + enddo + endif + + ! Fill in composite tsfc for coldstart runs - must happen after tsfcl is computed + compute_tsfc_for_colstart: if (sfc_var2(i,j,35) < -9990.0_r8) then + if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing composite tsfc') if(Model%frac_grid) then ! 3-way composite - if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing composite tsfc') !$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)) ! this may break restart reproducibility + 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)%tsfc(ix) = Sfcprop(nb)%tsfcl(ix) * Sfcprop(nb)%landfrac(ix) & @@ -1551,11 +1562,11 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta sfc_name2(37) = 'zorlw' !zorl on water portion of a cell sfc_name2(38) = 'zorll' !zorl on land portion of a cell sfc_name2(39) = 'zorli' !zorl on ice portion of a cell - sfc_name2(38) = 'albdvis_lnd' - sfc_name2(39) = 'albdnir_lnd' - sfc_name2(40) = 'albivis_lnd' - sfc_name2(41) = 'albinir_lnd' - sfc_name2(42) = 'emis_lnd' + sfc_name2(40) = 'albdvis_lnd' + sfc_name2(41) = 'albdnir_lnd' + sfc_name2(42) = 'albivis_lnd' + sfc_name2(43) = 'albinir_lnd' + sfc_name2(44) = 'emis_lnd' if (Model%cplwav) then sfc_name2(nvar2m) = 'zorlwav' !zorl from wave component endif @@ -1732,7 +1743,7 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta i = Atm_block%index(nb)%ii(ix) - isc + 1 j = Atm_block%index(nb)%jj(ix) - jsc + 1 sfc_var2(i,j,1) = Sfcprop(nb)%slmsk(ix) !--- slmsk - sfc_var2(i,j,2) = Sfcprop(nb)%tsfco(ix) !--- tsfc (tsea in sfc file) + sfc_var2(i,j,2) = Sfcprop(nb)%tsfco(ix) !--- tsfc (tsea in sfc file) sfc_var2(i,j,3) = Sfcprop(nb)%weasd(ix) !--- weasd (sheleg in sfc file) sfc_var2(i,j,4) = Sfcprop(nb)%tg3(ix) !--- tg3 sfc_var2(i,j,5) = Sfcprop(nb)%zorl(ix) !--- zorl From ecef817026a9e77f424a9b87322f2d388f9e3a15 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 23 Jul 2021 07:05:21 -0600 Subject: [PATCH 14/14] Revert change to .gitmodules and update submoduel pointer for ccpp-physics --- .gitmodules | 6 ++---- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index aad8c355c..afe6f27dd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,7 +8,5 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - #url = https://github.com/NCAR/ccpp-physics - #branch = main - url = https://github.com/climbfuji/ccpp-physics - branch = thompson_inner_loop_subcycling_bugfix_noah_bugfix + url = https://github.com/NCAR/ccpp-physics + branch = main diff --git a/ccpp/physics b/ccpp/physics index cdbe3749f..610fbcb9c 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit cdbe3749f365ca178dc0ee533e66f693eef5835a +Subproject commit 610fbcb9cda926b4a734e9479784f79bdae85c15