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

Update dtc/develop from EMC develop 2020/06/29 #56

Merged
12 changes: 8 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[submodule "atmos_cubed_sphere"]
path = atmos_cubed_sphere
url = https://github.com/NCAR/GFDL_atmos_cubed_sphere
branch = dtc/develop
#url = https://github.com/NCAR/GFDL_atmos_cubed_sphere
#branch = dtc/develop
url = https://github.com/climbfuji/GFDL_atmos_cubed_sphere
branch = update_dtc_develop_from_emc_and_delz_diag_bugfix
[submodule "ccpp/framework"]
path = ccpp/framework
url = https://github.com/NCAR/ccpp-framework
branch = dtc/develop
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = dtc/develop
#url = https://github.com/NCAR/ccpp-physics
#branch = dtc/develop
url = https://github.com/climbfuji/ccpp-physics
branch = update_dtc_develop_from_master_20200629
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ target_link_libraries(fv3core PRIVATE fms)
target_link_libraries(fv3core PRIVATE gfsphysics)
target_link_libraries(fv3core PRIVATE ipd)

target_include_directories(fv3core PRIVATE ${ESMF_MOD})
target_include_directories(fv3core PRIVATE atmos_cubed_sphere ${ESMF_MOD})

# end of fv3core

Expand Down
10 changes: 5 additions & 5 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module atmos_model_mod
use atmosphere_mod, only: atmosphere_scalar_field_halo
use atmosphere_mod, only: atmosphere_get_bottom_layer
use atmosphere_mod, only: set_atmosphere_pelist
use atmosphere_mod, only: Atm, mytile
use atmosphere_mod, only: Atm, mygrid
use block_control_mod, only: block_control_type, define_blocks_packed
use DYCORE_typedefs, only: DYCORE_data_type, DYCORE_diag_type
#ifdef CCPP
Expand Down Expand Up @@ -604,8 +604,8 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
Init_parm%area => Atmos%area
Init_parm%tracer_names => tracer_names
#ifdef CCPP
Init_parm%restart = Atm(mytile)%flagstruct%warm_start
Init_parm%hydrostatic = Atm(mytile)%flagstruct%hydrostatic
Init_parm%restart = Atm(mygrid)%flagstruct%warm_start
Init_parm%hydrostatic = Atm(mygrid)%flagstruct%hydrostatic
#endif

#ifdef INTERNAL_FILE_NML
Expand Down Expand Up @@ -677,7 +677,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
endif
endif

Atm(mytile)%flagstruct%do_skeb = IPD_Control%do_skeb
Atm(mygrid)%flagstruct%do_skeb = IPD_Control%do_skeb

! initialize the IAU module
call iau_initialize (IPD_Control,IAU_data,Init_parm)
Expand All @@ -698,7 +698,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
call FV3GFS_diag_register (IPD_Diag, Time, Atm_block, IPD_Control, Atmos%lon, Atmos%lat, Atmos%axes)
call IPD_initialize_rst (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart, Init_parm)
#ifdef CCPP
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain, Atm(mytile)%flagstruct%warm_start)
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain, Atm(mygrid)%flagstruct%warm_start)
#else
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain)
#endif
Expand Down
4 changes: 2 additions & 2 deletions gfsphysics/GFS_layer/GFS_physics_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2387,7 +2387,7 @@ subroutine GFS_physics_driver &
call satmedmfvdifq(ix, im, levs, nvdiff, ntcw, ntiw, ntke, &
dvdt, dudt, dtdt, dqdt, &
Statein%ugrs, Statein%vgrs, Statein%tgrs, Statein%qgrs, &
Radtend%htrsw, Radtend%htrlw, xmu, garea, &
Radtend%htrsw, Radtend%htrlw, xmu, garea, islmsk, snowd3, &
Statein%prsik(1,1), rb, Sfcprop%zorl, Diag%u10m, Diag%v10m, &
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, hflxq, evapq, &
stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Expand Down Expand Up @@ -2640,7 +2640,7 @@ subroutine GFS_physics_driver &
call satmedmfvdifq(ix, im, levs, nvdiff, ntcw, ntiwx, ntkev, &
dvdt, dudt, dtdt, dvdftra, &
Statein%ugrs, Statein%vgrs, Statein%tgrs, vdftra, &
Radtend%htrsw, Radtend%htrlw, xmu, garea, &
Radtend%htrsw, Radtend%htrlw, xmu, garea, islmsk, snowd3, &
Statein%prsik(1,1), rb, Sfcprop%zorl, Diag%u10m, Diag%v10m, &
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, hflxq, evapq, &
stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Expand Down
2 changes: 1 addition & 1 deletion gfsphysics/physics/radsw_datatb.f
Original file line number Diff line number Diff line change
Expand Up @@ -2552,7 +2552,7 @@ module module_radsw_sflux !
!> band index (3rd index in array sfluxref described below)
integer, dimension(nblow:nbhgh), public :: ibx

data layreffr/ 18,30, 6, 3, 3, 8, 2, 6, 1, 2, 0,32,58,49 /
data layreffr/ 18,30, 6, 3, 3, 8, 2, 6, 1, 2, 0,32,42,49 /
data ix1 / 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 3, 0 /
data ix2 / 5, 2, 5, 2, 0, 2, 6, 0, 6, 0, 0, 0, 6, 0 /
data ibx / 1, 1, 1, 2, 2, 3, 4, 3, 5, 4, 5, 6, 2, 7 /
Expand Down
6 changes: 2 additions & 4 deletions gfsphysics/physics/samfdeepcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ subroutine samfdeepcnv(im,ix,km,delt,itc,ntc,ntk,ntr,delp,
parameter(clamd=0.03,tkemx=0.65,tkemn=0.05)
parameter(dtke=tkemx-tkemn)
parameter(dbeta=0.1)
parameter(cthk=200.,dthk=25.)
parameter(cthk=150.,dthk=25.)
parameter(cinpcrmx=180.,cinpcrmn=120.)
! parameter(cinacrmx=-120.,cinacrmn=-120.)
parameter(cinacrmx=-120.,cinacrmn=-80.)
Expand Down Expand Up @@ -1191,9 +1191,7 @@ subroutine samfdeepcnv(im,ix,km,delt,itc,ntc,ntk,ntr,delp,
!
k = kbcon(i)
dp = 1000. * del(i,k)
xmbmax(i) = dp / (2. * g * dt2)
!
! xmbmax(i) = dp / (g * dt2)
xmbmax(i) = dp / (g * dt2)
!
! mbdt(i) = 0.1 * dp / g
!
Expand Down
43 changes: 35 additions & 8 deletions gfsphysics/physics/satmedmfvdifq.f
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
!
!----------------------------------------------------------------------
subroutine satmedmfvdifq(ix,im,km,ntrac,ntcw,ntiw,ntke,
& dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea,
!wz & dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea,
& dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea,islimsk,snwdph,
& psk,rbsoil,zorl,u10m,v10m,fm,fh,
& tsea,heat,evap,stress,spd1,kpbl,
& prsi,del,prsl,prslk,phii,phil,delt,
Expand All @@ -38,6 +39,10 @@ subroutine satmedmfvdifq(ix,im,km,ntrac,ntcw,ntiw,ntke,
!----------------------------------------------------------------------
integer ix, im, km, ntrac, ntcw, ntiw, ntke
integer kpbl(im), kinver(im)
!
!wz
integer islimsk(im)
real(kind=kind_phys), dimension(im,3), intent(in) :: snwdph
!
real(kind=kind_phys) delt, xkzm_m, xkzm_h, xkzm_s, dspfac,
& bl_upfr, bl_dnfr
Expand Down Expand Up @@ -156,6 +161,8 @@ subroutine satmedmfvdifq(ix,im,km,ntrac,ntcw,ntiw,ntke,
& zlup, zldn, bsum,
& tem, tem1, tem2,
& ptem, ptem0, ptem1, ptem2
!wz
real(kind=kind_phys) xkzm_mp, xkzm_hp
!
real(kind=kind_phys) ck0, ck1, ch0, ch1, ce0, rchck
!
Expand All @@ -173,7 +180,7 @@ subroutine satmedmfvdifq(ix,im,km,ntrac,ntcw,ntiw,ntke,
parameter(gamcrt=3.,gamcrq=0.,sfcfrac=0.1)
parameter(vk=0.4,rimin=-100.)
parameter(rbcr=0.25,zolcru=-0.02,tdzmin=1.e-3)
parameter(rlmn=30.,rlmn1=5.,rlmn2=15.)
parameter(rlmn=30.,rlmn1=5.,rlmn2=10.)
parameter(rlmx=300.,elmx=300.)
parameter(prmin=0.25,prmax=4.0)
parameter(pr0=1.0,prtke=1.0,prscu=0.67)
Expand All @@ -183,7 +190,7 @@ subroutine satmedmfvdifq(ix,im,km,ntrac,ntcw,ntiw,ntke,
parameter(aphi5=5.,aphi16=16.)
parameter(elmfac=1.0,elefac=1.0,cql=100.)
parameter(dw2min=1.e-4,dkmax=1000.,xkgdx=5000.)
parameter(qlcr=3.5e-5,zstblmax=2500.,xkzinv=0.15)
parameter(qlcr=3.5e-5,zstblmax=2500.,xkzinv=0.1)
parameter(h1=0.33333333)
parameter(ck0=0.4,ck1=0.15,ch0=0.4,ch1=0.15)
parameter(ce0=0.4)
Expand Down Expand Up @@ -254,17 +261,37 @@ subroutine satmedmfvdifq(ix,im,km,ntrac,ntcw,ntiw,ntke,
! xkzm_hx = 0.01 + (xkzm_h - 0.01)/(xkgdx-5.) * (gdx-5.)
! xkzm_mx = 0.01 + (xkzm_h - 0.01)/(xkgdx-5.) * (gdx-5.)
!
!wz
do i=1,im
xkzm_mp = xkzm_m
xkzm_hp = xkzm_h
!
if( islimsk(i) == 1 .and. snwdph(i,1) > 10.0 ) then ! over land
if (rbsoil(i) > 0. .and. rbsoil(i) <= 0.25) then
xkzm_mp = xkzm_m * (1.0 - rbsoil(i)/0.25)**2 +
& 0.1 * (1.0 - (1.0-rbsoil(i)/0.25)**2)
xkzm_hp = xkzm_h * (1.0 - rbsoil(i)/0.25)**2 +
& 0.1 * (1.0 - (1.0-rbsoil(i)/0.25)**2)
else if (rbsoil(i) > 0.25) then
xkzm_mp = 0.1
xkzm_hp = 0.1
endif
endif
!#
kx1(i) = 1
tx1(i) = 1.0 / prsi(i,1)
tx2(i) = tx1(i)
if(gdx(i) >= xkgdx) then
xkzm_hx(i) = xkzm_h
xkzm_mx(i) = xkzm_m
!wz xkzm_hx(i) = xkzm_h
!wz xkzm_mx(i) = xkzm_m
xkzm_hx(i) = xkzm_hp
xkzm_mx(i) = xkzm_mp
else
tem = 1. / (xkgdx - 5.)
tem1 = (xkzm_h - 0.01) * tem
tem2 = (xkzm_m - 0.01) * tem
!wz tem1 = (xkzm_h - 0.01) * tem
!wz tem2 = (xkzm_m - 0.01) * tem
tem1 = (xkzm_hp - 0.01) * tem
tem2 = (xkzm_mp - 0.01) * tem
ptem = gdx(i) - 5.
xkzm_hx(i) = 0.01 + tem1 * ptem
xkzm_mx(i) = 0.01 + tem2 * ptem
Expand Down Expand Up @@ -699,7 +726,7 @@ subroutine satmedmfvdifq(ix,im,km,ntrac,ntcw,ntiw,ntke,
! tem1 = (tvx(i,k+1)-tvx(i,k)) * rdzt(i,k)
! if(tem1 > 1.e-5) then
tem1 = tvx(i,k+1)-tvx(i,k)
if(tem1 > 0.) then
if(tem1 > 0. .and. islimsk(i) /= 1 ) then
xkzo(i,k) = min(xkzo(i,k), xkzinv)
xkzmo(i,k) = min(xkzmo(i,k), xkzinv)
rlmnz(i,k) = min(rlmnz(i,k), rlmn2)
Expand Down
28 changes: 9 additions & 19 deletions gfsphysics/physics/sfc_diff.f
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,12 @@ subroutine sfc_diff(im,ps,t1,q1,z1, wind, !intent(in)
z0max = max(z0max, 1.0e-6)

! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil
! czilc = 0.8

! tem1 = 1.0 - sigmaf(i)
! ztmax = z0max*exp( - tem1*tem1
! & * czilc*ca*sqrt(ustar(i,1)*(0.01/1.5e-05)))
!
czilc = 10.0 ** (- 4. * z0max) ! Trier et al. (2011, WAF)
ztmax = z0max * exp( - czilc * ca
& * 258.2 * sqrt(ustar(i,1)*z0max) )

czilc = 0.8

tem1 = 1.0 - sigmaf(i)
ztmax = z0max*exp( - tem1*tem1
& * czilc*ca*sqrt(ustar(i,1)*(0.01/1.5e-05)))

! mg, sfc-perts: add surface perturbations to ztmax/z0max ratio over land
if (ztpert(i) /= 0.0) then
ztmax = ztmax * (10.**ztpert(i))
Expand Down Expand Up @@ -183,16 +178,11 @@ subroutine sfc_diff(im,ps,t1,q1,z1, wind, !intent(in)

! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height
! dependance of czil
! czilc = 0.8
czilc = 0.8

! tem1 = 1.0 - sigmaf(i)
! ztmax = z0max*exp( - tem1*tem1
! & * czilc*ca*sqrt(ustar(i,2)*(0.01/1.5e-05)))
!
czilc = 10.0 ** (- 4. * z0max) ! Trier et al. (2011, WAF)
ztmax = z0max * exp( - czilc * ca
& * 258.2 * sqrt(ustar(i,2)*z0max) )
!
tem1 = 1.0 - sigmaf(i)
ztmax = z0max*exp( - tem1*tem1
& * czilc*ca*sqrt(ustar(i,2)*(0.01/1.5e-05)))
ztmax = max(ztmax, 1.0e-6)
!
call stability
Expand Down
2 changes: 2 additions & 0 deletions io/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
endif
endif

#ifdef CCPP
if (nint(sfc_var3ice(1,1,1)) == -9999) then
if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing tiice')
do nb = 1, Atm_block%nblks
Expand All @@ -1186,6 +1187,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
enddo
endif

#endif
!#endif

if(Model%frac_grid) then ! 3-way composite
Expand Down