Skip to content

Commit 6ea47ed

Browse files
Merge branch 'ufs/dev' into fix/stc_check
2 parents 8415ad5 + 9e70979 commit 6ea47ed

34 files changed

Lines changed: 8162 additions & 7323 deletions

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
path = physics/MP/TEMPO/TEMPO
77
url = https://github.com/NCAR/TEMPO
88
branch = main
9+
[submodule "physics/SFC_Layer/MYNN/MYNN"]
10+
path = physics/SFC_Layer/MYNN/MYNN
11+
url = https://github.com/NCAR/MYNN-SFC
12+
branch = main

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ physics/SFC_Layer/GFDL/gfdl_sfc_layer.* @Zh
102102
physics/SFC_Layer/GFDL/module_sf_exchcoef.f90 @ZhanZhang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales
103103
physics/SFC_Layer/MYJ/myjsfc_wrapper.* @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales
104104
physics/SFC_Layer/MYJ/module_SF_JSFC.F90 @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales
105-
physics/SFC_Layer/MYNN/mynnsfc_wrapper.* @joeolson42 @grantfirl @rhaesung @Qingfu-Liu @dustinswales
105+
physics/SFC_Layer/MYNN/MYNN/module_sf_mynnsfc.* @joeolson42 @grantfirl @rhaesung @Qingfu-Liu @dustinswales
106106
physics/SFC_Layer/MYNN/module_sf_mynn.F90 @joeolson42 @grantfirl @rhaesung @Qingfu-Liu @dustinswales
107107
physics/SFC_Layer/UFS/date_def.f @XuLi-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales
108108
physics/SFC_Layer/UFS/module_nst* @XuLi-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales

physics/CONV/SAMF/samfdeepcnv.f

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
8585
& clam,c0s,c1,betal,betas,evef,pgcon,asolfac,cscale, &
8686
& do_ca, ca_closure, ca_entr, ca_trigger, nthresh,ca_deep, &
8787
& rainevap,sigmain,sigmaout,omegain,omegaout,betadcu,betamcu, &
88-
& betascu,maxMF,do_mynnedmf,sigmab_coldstart,errmsg,errflg)
88+
& betascu,maxMF,do_mynnedmf,sigmab_coldstart,cat_adj_deep, &
89+
& errmsg,errflg)
8990

9091
!
9192
use machine , only : kind_phys
@@ -137,6 +138,7 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
137138
real(kind=kind_phys), intent(in) :: clam, c0s, c1, &
138139
& betal, betas, asolfac, &
139140
& evef, pgcon
141+
real(kind_phys), intent(in) :: cat_adj_deep
140142
character(len=*), intent(out) :: errmsg
141143
integer, intent(out) :: errflg
142144
!
@@ -2952,7 +2954,7 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
29522954
umean(i) = max(umean(i), 1.)
29532955
tauadv = gdx(i) / umean(i)
29542956
advfac(i) = tauadv / dtconv(i)
2955-
advfac(i) = min(advfac(i), 1.)
2957+
advfac(i) = min(cat_adj_deep*advfac(i), 1.)
29562958
endif
29572959
enddo
29582960

physics/CONV/SAMF/samfdeepcnv.meta

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,14 @@
762762
type = real
763763
kind = kind_phys
764764
intent = out
765+
[cat_adj_deep]
766+
standard_name = adjustment_for_convective_advection_time_for_deep
767+
long_name = adjustment for convective advection time for deep
768+
units = none
769+
dimensions = ()
770+
type = real
771+
kind = kind_phys
772+
intent = in
765773
[errmsg]
766774
standard_name = ccpp_error_message
767775
long_name = error message for error handling in CCPP

physics/CONV/SAMF/samfshalcnv.f

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
5959
& dot,ncloud,hpbl,ud_mf,dt_mf,cnvw,cnvc, &
6060
& clam,c0s,c1,evef,pgcon,asolfac,hwrf_samfshal, &
6161
& sigmain,sigmaout,omegain,omegaout,betadcu,betamcu,betascu, &
62-
& errmsg,errflg)
62+
& cat_adj_shal,errmsg,errflg)
6363
!
6464
use machine , only : kind_phys
6565
use funcphys , only : fpvs
@@ -98,8 +98,10 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
9898
& asolfac, evef, pgcon
9999
logical, intent(in) :: hwrf_samfshal,first_time_step, &
100100
& restart,progsigma,progomega
101+
real(kind_phys), intent(in) :: cat_adj_shal
101102
character(len=*), intent(out) :: errmsg
102103
integer, intent(out) :: errflg
104+
103105
!
104106
! local variables
105107
integer i,j,indx, k, kk, km1, n
@@ -1992,7 +1994,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
19921994
umean(i) = max(umean(i), 1.)
19931995
tauadv = gdx(i) / umean(i)
19941996
advfac(i) = tauadv / dtconv(i)
1995-
advfac(i) = min(advfac(i), 1.)
1997+
advfac(i) = min(cat_adj_shal*advfac(i), 1.)
19961998
endif
19971999
enddo
19982000
c

physics/CONV/SAMF/samfshalcnv.meta

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,14 @@
550550
dimensions = ()
551551
type = real
552552
intent = in
553+
[cat_adj_shal]
554+
standard_name = adjustment_for_convective_advection_time_for_shallow
555+
long_name = adjustment for convective advection time for shallow
556+
units = none
557+
dimensions = ()
558+
type = real
559+
kind = kind_phys
560+
intent = in
553561
[errmsg]
554562
standard_name = ccpp_error_message
555563
long_name = error message for error handling in CCPP

physics/GWD/drag_suite.F90

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,8 +1119,8 @@ subroutine drag_suite_run( &
11191119
! wind direction (similar to above)
11201120
dtfac_meso = 1.0
11211121
if (prsl(i,k).le.plolevmeso) then
1122-
if (taud_ms(i,k).ne.0.) &
1123-
dtfac_meso = min(dtfac_meso,facmeso*abs(velco(i,k) &
1122+
if (taud_ms(i,k).ne.0.) &
1123+
dtfac_meso = min(dtfac_meso,facmeso*abs(velco(i,min(k,km-1)) &
11241124
/(deltim*rcs*taud_ms(i,k))))
11251125
end if
11261126

@@ -1674,10 +1674,9 @@ subroutine drag_suite_psl( &
16741674
real(kind=kind_phys), parameter :: hmt_min = 50.
16751675
real(kind=kind_phys), parameter :: oc_min = 1.0
16761676
real(kind=kind_phys), parameter :: oc_max = 10.0
1677-
! 7.5 mb -- 33 km ... 0.01 kgm-3 reduce gwd drag above cutoff level
1678-
real(kind=kind_phys), parameter :: pcutoff = 7.5e2
1679-
! 0.76 mb -- 50 km ...0.001 kgm-3 --- 0.1 mb 65 km 0.0001 kgm-3
1680-
real(kind=kind_phys), parameter :: pcutoff_den = 0.01 !
1677+
real(kind=kind_phys), parameter :: sgmalolev = 0.5 ! max sigma lvl for dtfac
1678+
real(kind=kind_phys), parameter :: plolevmeso = 70.0 ! pres lvl for mesosphere OGWD reduction (Pa)
1679+
real(kind=kind_phys), parameter :: facmeso = 0.5 ! fractional velocity reduction for OGWD
16811680

16821681
integer,parameter :: kpblmin = 2
16831682

@@ -1691,8 +1690,7 @@ subroutine drag_suite_psl( &
16911690
rcsks,wdir,ti,rdz,tem2,dw2,shr2, &
16921691
bvf2,rdelks,wtkbj,tem,gfobnv,hd,fro, &
16931692
rim,temc,tem1,efact,temv,dtaux,dtauy, &
1694-
dtauxb,dtauyb,eng0,eng1
1695-
real(kind=kind_phys) :: denfac
1693+
dtauxb,dtauyb,eng0,eng1,dtfac_meso
16961694
!
16971695
logical :: ldrag(im),icrilv(im), &
16981696
flag(im)
@@ -1706,7 +1704,7 @@ subroutine drag_suite_psl( &
17061704
rulow(im),bnv(im), &
17071705
oa(im),ol(im),oc(im), &
17081706
oass(im),olss(im), &
1709-
roll(im),dtfac(im,km), &
1707+
roll(im),dtfac(im), &
17101708
brvf(im),xlinv(im), &
17111709
delks(im),delks1(im), &
17121710
bnv2(im,km),usqj(im,km), &
@@ -1776,7 +1774,6 @@ subroutine drag_suite_psl( &
17761774
fdir = mdir / (2.0*pi)
17771775
invgrcs = 1._kind_phys/g*rcs
17781776
kpblmax = km / 2 ! maximum pbl height : # of vertical levels / 2
1779-
denfac = 1.0
17801777

17811778
do i=1,im
17821779
if (slmsk(i)==1. .or. slmsk(i)==2.) then !sea/land/ice mask (=0/1/2) in FV3
@@ -1861,6 +1858,7 @@ subroutine drag_suite_psl( &
18611858
oass(i) = 0.0
18621859
olss(i) = 0.0
18631860
ulow (i) = 0.0
1861+
dtfac(i) = 1.0
18641862
rstoch(i) = 0.0
18651863
ldrag(i) = .false.
18661864
icrilv(i) = .false.
@@ -1877,7 +1875,6 @@ subroutine drag_suite_psl( &
18771875
taud_bl(i,k) = 0.0
18781876
dtaux2d(i,k) = 0.0
18791877
dtauy2d(i,k) = 0.0
1880-
dtfac(i,k) = 1.0
18811878
enddo
18821879
enddo
18831880
!
@@ -2536,30 +2533,38 @@ subroutine drag_suite_psl( &
25362533
taud_bl(i,klcap) = taud_bl(i,klcap) * factop
25372534
enddo
25382535
!
2539-
! if the gravity wave drag would force a critical line
2540-
! in the lower ksmm1 layers during the next deltim timestep,
2541-
! then only apply drag until that critical line is reached.
2536+
! if the gravity wave drag + blocking would force a critical line
2537+
! in the layers below pressure-based 'sigma' level = sgmalolev during the next deltim
2538+
! timestep, then only apply drag until that critical line is reached, i.e.,
2539+
! reduce drag to limit resulting wind components to zero
2540+
! Note: 'sigma' = prsi(k)/prsi(k=1), where prsi(k=1) is the surface pressure
25422541
!
25432542
do k = kts,kpblmax-1
2544-
if ((taud_ls(i,k)+taud_bl(i,k)).ne.0.) then
2545-
dtfac(i,k) = min(dtfac(i,k),abs(velco(i,k) &
2546-
/(deltim*rcs*(taud_ls(i,k)+taud_bl(i,k)))))
2547-
endif
2548-
enddo
2549-
! apply limiter to mesosphere drag, reduce the drag by density factor 10-3
2550-
! prevent wind reversal...
2551-
!
2552-
do k = kpblmax,km-1
2553-
if ((taud_ls(i,k)+taud_bl(i,k)).ne.0..and.prsl(i,k).le.pcutoff) then
2554-
denfac = min(ro(i,k)/pcutoff_den,1.)
2555-
dtfac(i,k) = min(dtfac(i,k),denfac*abs(velco(i,k) &
2543+
if (prsi(i,k).ge.sgmalolev*prsi(i,1)) then
2544+
if ((taud_ls(i,k)+taud_bl(i,k)).ne.0.) &
2545+
dtfac(i) = min(dtfac(i),abs(velco(i,k) &
25562546
/(deltim*rcs*(taud_ls(i,k)+taud_bl(i,k)))))
2557-
endif
2547+
else
2548+
exit
2549+
endif
25582550
enddo
25592551
!
25602552
do k = kts,km
2561-
taud_ls(i,k) = taud_ls(i,k)*dtfac(i,k)* ls_taper(i) *(1.-rstoch(i))
2562-
taud_bl(i,k) = taud_bl(i,k)*dtfac(i,k)* ls_taper(i) *(1.-rstoch(i))
2553+
2554+
! Check if well into mesosphere -- if so, perform similar reduction of
2555+
! velocity tendency due to mesoscale GWD to prevent sudden reversal of
2556+
! wind direction (similar to above)
2557+
dtfac_meso = 1.0
2558+
if (prsl(i,k).le.plolevmeso) then
2559+
if (taud_ls(i,k).ne.0.) &
2560+
dtfac_meso = min(dtfac_meso,facmeso*abs(velco(i,min(k,km-1)) &
2561+
/(deltim*rcs*taud_ls(i,k))))
2562+
end if
2563+
2564+
taud_ls(i,k) = taud_ls(i,k)*dtfac(i)*dtfac_meso* &
2565+
ls_taper(i) *(1.-rstoch(i))
2566+
taud_bl(i,k) = taud_bl(i,k)*dtfac(i)* ls_taper(i) *(1.-rstoch(i))
2567+
25632568
dtaux = taud_ls(i,k) * xn(i)
25642569
dtauy = taud_ls(i,k) * yn(i)
25652570
dtauxb = taud_bl(i,k) * xn(i)

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_post.F90

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ module GFS_surface_composites_post
2323
!! \htmlinclude GFS_surface_composites_post_run.html
2424
!!
2525
subroutine GFS_surface_composites_post_run ( &
26-
im, kice, km, rd, rvrdm1, cplflx, cplwav2atm, cpl_fire, frac_grid, flag_cice, thsfc_loc, islmsk, dry, wet, icy, wind, t1, q1, prsl1, &
27-
landfrac, lakefrac, oceanfrac, zorl, zorlo, zorll, zorli, garea, frac_ice, &
26+
im, kice, km, rd, rvrdm1, cplflx, cplwav2atm, cpl_fire, frac_grid, flag_cice, thsfc_loc, islmsk, dry, wet, icy, &
27+
use_cdeps_data, mask_dat, wind, t1, q1, prsl1, landfrac, lakefrac, oceanfrac, zorl, zorlo, zorll, zorli, garea, frac_ice, &
2828
cd, cd_wat, cd_lnd, cd_ice, cdq, cdq_wat, cdq_lnd, cdq_ice, rb, rb_wat, rb_lnd, rb_ice, stress, stress_wat, stress_lnd, &
2929
stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, &
3030
uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, &
@@ -39,7 +39,7 @@ subroutine GFS_surface_composites_post_run (
3939

4040
integer, intent(in) :: im, kice, km, lkm, iopt_lake, iopt_lake_clm
4141
logical, intent(in) :: cplflx, frac_grid, cplwav2atm, frac_ice, cpl_fire
42-
logical, intent(in) :: lheatstrg
42+
logical, intent(in) :: lheatstrg, use_cdeps_data
4343
logical, dimension(:), intent(in) :: flag_cice, dry, icy
4444
logical, dimension(:), intent(in) :: wet
4545
integer, dimension(:), intent(in) :: islmsk, use_lake_model
@@ -51,7 +51,7 @@ subroutine GFS_surface_composites_post_run (
5151
snowd_lnd, snowd_ice, tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, &
5252
hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, zorlo, zorll, zorli, garea
5353

54-
real(kind=kind_phys), dimension(:), intent(in), optional :: hflx_fire, evap_fire
54+
real(kind=kind_phys), dimension(:), intent(in), optional :: hflx_fire, evap_fire, mask_dat
5555
real(kind=kind_phys), dimension(:), intent(inout) :: zorl, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, &
5656
fh2, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc
5757

@@ -240,7 +240,14 @@ subroutine GFS_surface_composites_post_run (
240240
if (icy(i)) then
241241
!tisfc(i) = tisfc(i) ! over lake or ocean ice when uncoupled
242242
elseif (wet(i)) then
243-
tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
243+
!don't overwrite surface skin temperature over ice when using CDEPS inline over the mask
244+
if (use_cdeps_data) then
245+
if (mask_dat(i) <= 0.0) then
246+
tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
247+
endif
248+
else
249+
tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
250+
endif
244251
else
245252
tisfc(i) = tsfcl(i) ! over land
246253
endif
@@ -256,9 +263,18 @@ subroutine GFS_surface_composites_post_run (
256263
! tisfc(i) = tsfc(i)
257264
! endif
258265
! endif
266+
259267
if (.not. icy(i)) then
260-
hice(i) = zero
261-
cice(i) = zero
268+
!don't overwrite sea ice thickness/fraction when using CDEPS inline over the mask
269+
if (use_cdeps_data) then
270+
if (mask_dat(i) <= 0.0) then
271+
hice(i) = zero
272+
cice(i) = zero
273+
endif
274+
else
275+
hice(i) = zero
276+
cice(i) = zero
277+
endif
262278
endif
263279
enddo
264280

@@ -339,7 +355,14 @@ subroutine composite_wet
339355
tsfco(i) = tsfc_wat(i) ! over lake (and ocean when uncoupled)
340356
tsfc(i) = tsfco(i)
341357
tsfcl(i) = tsfc(i)
342-
tisfc(i) = tsfc(i)
358+
!don't overwrite surface skin temperature over ice when using CDEPS inline over the mask
359+
if (use_cdeps_data) then
360+
if (mask_dat(i) <= 0.0) then
361+
tisfc(i) = tsfc(i)
362+
endif
363+
else
364+
tisfc(i) = tsfc(i)
365+
endif
343366
cmm(i) = cmm_wat(i)
344367
chh(i) = chh_wat(i)
345368
gflx(i) = gflx_wat(i)
@@ -349,8 +372,16 @@ subroutine composite_wet
349372
evap(i) = evap_wat(i)
350373
hflx(i) = hflx_wat(i)
351374
qss(i) = qss_wat(i)
352-
hice(i) = zero
353-
cice(i) = zero
375+
!don't overwrite sea ice thickness/fraction when using CDEPS inline over the mask
376+
if (use_cdeps_data) then
377+
if (mask_dat(i) <= 0.0) then
378+
hice(i) = zero
379+
cice(i) = zero
380+
endif
381+
else
382+
hice(i) = zero
383+
cice(i) = zero
384+
endif
354385
end subroutine composite_wet
355386

356387
subroutine composite_icy(is_clm)

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_post.meta

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,22 @@
144144
dimensions = (horizontal_loop_extent)
145145
type = logical
146146
intent = in
147+
[use_cdeps_data]
148+
standard_name = do_cdeps_inline
149+
long_name = flag for using data provided by CDEPS inline (default false)
150+
units = flag
151+
dimensions = ()
152+
type = logical
153+
intent = in
154+
[mask_dat]
155+
standard_name = land_sea_mask_from_data
156+
long_name = landmask
157+
units = flag
158+
dimensions = (horizontal_loop_extent)
159+
type = real
160+
kind = kind_phys
161+
intent = in
162+
optional = True
147163
[wind]
148164
standard_name = wind_speed_at_lowest_model_layer
149165
long_name = wind speed at lowest model level

0 commit comments

Comments
 (0)