12 use machine,
only: kind_phys
13 use physcons,
only : pi => con_pi, grav => con_g, rd => con_rd, &
14 rv => con_rv, cpd => con_cp, fv => con_fvirt,&
18 real(kind=kind_phys),
parameter :: grcp = grav/cpd, rgrav = 1.0d0/grav, &
20 gor = grav/rd, gr2 = grav*gor, gocp = grav/cpd, &
21 rcpd = 1./cpd, rcpd2 = 0.5*rcpd, &
22 pi2 = pi + pi, omega1 = pi2/86400.0, &
23 omega2 = omega1+omega1, &
24 rad_to_deg=180.0/pi, deg_to_rad=pi/180.0, &
25 dw2min=1.0, bnv2min=1.e-6, velmin=sqrt(dw2min)
37 subroutine init_global_gwdis_v0(levs, zkm, pmb, kvg, ktg, krad, kion)
41 real,
intent(in) :: zkm(levs), pmb(levs)
42 real,
intent(out),
dimension(levs+1) :: kvg, ktg, krad, kion
47 real,
parameter :: vusurf = 2.e-5
48 real,
parameter :: musurf = vusurf/1.95
49 real,
parameter :: hpmol = 8.5
51 real,
parameter :: kzmin = 0.1
52 real,
parameter :: kturbo = 100.
53 real,
parameter :: zturbo = 130.
54 real,
parameter :: zturw = 30.
55 real,
parameter :: inv_pra = 3.
57 real,
parameter :: alpha = 1./86400./15.
59 real,
parameter :: kdrag = 1./86400./10.
60 real,
parameter :: zdrag = 100.
61 real,
parameter :: zgrow = 50.
63 real :: vumol, mumol, keddy, ion_drag
66 vumol = vusurf*exp(-zkm(k)/hpmol)
67 mumol = musurf*exp(-zkm(k)/hpmol)
69 keddy = kturbo*exp(-((zkm(k)-zturbo) /zturw)**2)
71 kvg(k) = vumol + keddy
72 ktg(k) = mumol + keddy*inv_pra
87 end subroutine init_global_gwdis_v0
101 use ugwp_common_v0,
only : bnv2min, grav, grcp, fv, grav, cpd, grcp, pi
109 character(len=8) :: strver =
'gfs_2018'
110 character(len=8) :: strbase =
'gfs_2018'
111 real,
parameter :: rimin=-10., ric=0.25
114 real,
parameter :: efmin=0.5, efmax=10.0
115 real,
parameter :: hpmax=2400.0, hpmin=25.0
116 real,
parameter :: sigma_std=1./100., gamm_std=1.0
118 real,
parameter :: frmax=10., frc =1.0, frmin =0.01
121 real,
parameter :: ce=0.8, ceofrc=ce/frc, cg=0.5
122 real,
parameter :: gmax=1.0, veleps=1.0, factop=0.5
124 real,
parameter :: rlolev=50000.0
126 real,
parameter :: hncrit=9000.
130 real,
parameter :: sigfac=4.0
131 real,
parameter :: hminmt=50.
132 real,
parameter :: minwnd=1.0
133 real,
parameter :: dpmin=5000.0
135 real,
parameter :: kxoro=6.28e-3/200.
136 real,
parameter :: coro = 0.0
137 integer,
parameter :: nridge=2
145 integer,
parameter :: mdir = 8
146 real,
parameter :: fdir=.5*mdir/pi
149 data nwdir/6,7,5,8,2,3,1,4/
152 real,
parameter :: odmin = 0.1, odmax = 10.0
157 integer,
parameter :: n_tofd = 2
158 real,
parameter :: const_tofd = 0.0759
159 real,
parameter :: ze_tofd = 1500.0
160 real,
parameter :: a12_tofd = 0.0002662*0.005363
161 real,
parameter :: ztop_tofd = 10.*ze_tofd
164 real,
parameter :: fcrit_sm = 0.7, fcrit_sm2 = fcrit_sm * fcrit_sm
165 real,
parameter :: fcrit_gfs = 0.7
166 real,
parameter :: fcrit_mtb = 0.7
168 real,
parameter :: lzmax = 18.e3
169 real,
parameter :: mkzmin = 6.28/lzmax
170 real,
parameter :: mkz2min = mkzmin*mkzmin
171 real,
parameter :: zbr_pi = (3.0/2.0)*pi
172 real,
parameter :: zbr_ifs = 0.5*pi
176 subroutine init_oro_gws_v0(nwaves, nazdir, nstoch, effac, &
180 integer :: nwaves, nazdir, nstoch
191 real,
parameter :: lonr_refmb = 4.0 * 192.0
192 real,
parameter :: lonr_refgw = 192.0
200 cdmbx = lonr_refmb/float(lonr)
202 if (cdmbgwd(1) >= 0.0) cdmb = cdmb * cdmbgwd(1)
204 cleff = 0.5e-5 * sqrt(lonr_refgw/float(lonr))
208 if (cdmbgwd(2) >= 0.0) cleff = cleff * cdmbgwd(2)
216 end subroutine init_oro_gws_v0
233 integer :: nwav, nazd
236 integer,
parameter :: incdim = 4, iazdim = 4
240 subroutine initsolv_lsatdis_v0(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw)
244 integer :: me, master
245 integer :: nwaves, nazdir
254 integer :: inc, jk, jl, iazi, i, j, k
256 if( nwaves == 0 .or. nstoch == 1 )
then
270 end subroutine initsolv_lsatdis_v0
281 real,
parameter :: maxdudt = 250.e-5
283 real,
parameter :: hpscale= 7000., rhp2 = 0.5/hpscale
284 real,
parameter :: omega2 = 2.*6.28/86400
285 real,
parameter :: gptwo=2.0
287 real,
parameter :: dked_min =0.01
288 real,
parameter :: gssec = (6.28/30.)**2
289 real,
parameter :: bv2min = (6.28/60./120.)**2
290 real,
parameter :: minvel = 0.5
296 real,
parameter :: v_kxw = 6.28e-3/200.
297 real,
parameter :: v_kxw2 = v_kxw*v_kxw
298 real,
parameter :: tamp_mpa = 30.e-3
299 real,
parameter :: zfluxglob= 3.75e-3
301 real ,
parameter :: nslope=1
303 integer ,
parameter :: iazidim=4
304 integer ,
parameter :: incdim=25
305 real ,
parameter :: ucrit2=0.5
307 real ,
parameter :: zcimin = ucrit2
308 real ,
parameter :: zcimax = 125.0
309 real ,
parameter :: zgam = 0.25
310 real ,
parameter :: zms_l = 2000.0, zms = pi2 / zms_l, zmsi = 1.0 / zms
316 integer :: nwav, nazd, nst
320 real,
allocatable :: zci(:), zci4(:), zci3(:),zci2(:), zdci(:)
321 real,
allocatable :: zcosang(:), zsinang(:)
324 subroutine initsolv_wmsdis_v0(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw)
332 integer :: me, master, nwaves, nazdir, nstoch
338 integer :: inc, jk, jl, iazi
340 real :: zang, zang1, znorm
341 real :: zx1, zx2, ztx, zdx, zxran, zxmin, zxmax, zx, zpexp
343 if( nwaves == 0)
then
362 allocate ( zci(nwav), zci4(nwav), zci3(nwav),zci2(nwav), zdci(nwav) )
363 allocate ( zcosang(nazd), zsinang(nazd) )
365 if (me == master)
then
366 print *,
'ugwp_v0: init_gw_wmsdis_control '
368 print *,
'ugwp_v0: WMSDIS launch layer ', ilaunch
369 print *,
'ugwp_v0: WMSDID tot_mflux in mpa', tamp_mpa*1000.
378 zang = pi2 / float(nazd)
385 zang1 = (iazi-1)*zang
386 zcosang(iazi) = cos(zang1)
387 zsinang(iazi) = sin(zang1)
388 znorm = znorm + abs(zcosang(iazi))
391 zaz_fct = 2.0 / znorm
401 zxran = zxmax - zxmin
402 zdx = zxran / real(nwav-1)
404 zx1 = zxran/(exp(zxran/zgam)-1.0 )
414 ztx = real(inc-1)*zdx+zxmin
415 zx = zx1*exp((ztx-zxmin)/zgam)+zx2
417 zdci(inc) = zci(inc)**2*(zx1/zgam)*exp((ztx-zxmin)/zgam)*zdx
418 zci4(inc) = (zms*zci(inc))**4
419 zci2(inc) = (zms*zci(inc))**2
420 zci3(inc) = (zms*zci(inc))**3
427 if (me == master)
then
429 print *,
'ugwp_v0: zcimin=' , zcimin
430 print *,
'ugwp_v0: zcimax=' , zcimax
431 print *,
'ugwp_v0: cd_crit=', zgam
432 print *,
'ugwp_v0: launch_level', ilaunch
433 print *,
' ugwp_v0 zms_l=', zms_l
434 print *,
' ugwp_vgw nslope=', nslope
439 end subroutine initsolv_wmsdis_v0
This module contains UGWP v0 initialization schemes.
This module contains initialization of wave solvers for UGWP v0.
This module contains orographic wave source schemes for UGWP v0.
This module contains init-solvers for "broad" non-stationary multi-wave spectra.