57 qflx_sgs_momz, qflx_sgs_momx, qflx_sgs_momy, & ! (out)
58 qflx_sgs_rhot, qflx_sgs_rhoq, &
60 tke_t, nu_c, ri, pr, n2, &
61 momz, momx, momy, rhot, dens, qtrc, &
62 sflx_mw, sflx_mu, sflx_mv, sflx_sh, sflx_qv, &
63 gsqrt, j13g, j23g, j33g, mapf, dt )
68 real(RP),
intent(out) :: qflx_sgs_momz(
ka,
ia,
ja,3)
69 real(RP),
intent(out) :: qflx_sgs_momx(
ka,
ia,
ja,3)
70 real(RP),
intent(out) :: qflx_sgs_momy(
ka,
ia,
ja,3)
71 real(RP),
intent(out) :: qflx_sgs_rhot(
ka,
ia,
ja,3)
72 real(RP),
intent(out) :: qflx_sgs_rhoq(
ka,
ia,
ja,3,
qa)
74 real(RP),
intent(inout) :: tke (
ka,
ia,
ja)
75 real(RP),
intent(out) :: tke_t(
ka,
ia,
ja)
76 real(RP),
intent(out) :: nu_c(
ka,
ia,
ja)
77 real(RP),
intent(out) :: ri (
ka,
ia,
ja)
78 real(RP),
intent(out) :: pr (
ka,
ia,
ja)
79 real(RP),
intent(out) :: n2 (
ka,
ia,
ja)
81 real(RP),
intent(in) :: momz(
ka,
ia,
ja)
82 real(RP),
intent(in) :: momx(
ka,
ia,
ja)
83 real(RP),
intent(in) :: momy(
ka,
ia,
ja)
84 real(RP),
intent(in) :: rhot(
ka,
ia,
ja)
85 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
86 real(RP),
intent(in) :: qtrc(
ka,
ia,
ja,
qa)
88 real(RP),
intent(in) :: sflx_mw(
ia,
ja)
89 real(RP),
intent(in) :: sflx_mu(
ia,
ja)
90 real(RP),
intent(in) :: sflx_mv(
ia,
ja)
91 real(RP),
intent(in) :: sflx_sh(
ia,
ja)
92 real(RP),
intent(in) :: sflx_qv(
ia,
ja)
94 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja,7)
95 real(RP),
intent(in) :: j13g (
ka,
ia,
ja,7)
96 real(RP),
intent(in) :: j23g (
ka,
ia,
ja,7)
97 real(RP),
intent(in) :: j33g
98 real(RP),
intent(in) :: mapf (
ia,
ja,2,4)
99 real(DP),
intent(in) :: dt
102 procedure(tb),
pointer ::
sgs_tb => null()
103 procedure(tb),
pointer :: pbl_tb => null()
104 real(RP),
allocatable :: frac_sgs(:,:)
105 real(RP),
allocatable :: frac_pbl(:,:)
106 real(RP),
allocatable :: frac_sgs_tke(:,:)
107 real(RP),
allocatable :: frac_pbl_tke(:,:)
125 character(len=*),
intent(in) :: TB_TYPE
127 real(RP),
intent(in) :: CDZ(
ka)
128 real(RP),
intent(in) :: CDX(
ia)
129 real(RP),
intent(in) :: CDY(
ja)
130 real(RP),
intent(in) :: CZ (
ka,
ia,
ja)
132 real(RP) :: ATMOS_PHY_TB_HYBRID_SGS_DX = 100.0_rp
133 real(RP) :: ATMOS_PHY_TB_HYBRID_PBL_DX = 500.0_rp
134 character(len=H_SHORT) :: ATMOS_PHY_TB_HYBRID_SGS_TYPE =
'SMAGORINSKY' 135 character(len=H_SHORT) :: ATMOS_PHY_TB_HYBRID_PBL_TYPE =
'MYNN' 137 character(len=H_SHORT) :: ATMOS_PHY_TB_HYBRID_TKE_TYPE =
'PBL' 139 namelist / param_atmos_phy_tb_hybrid / &
140 atmos_phy_tb_hybrid_sgs_dx, &
141 atmos_phy_tb_hybrid_pbl_dx, &
142 atmos_phy_tb_hybrid_sgs_type, &
143 atmos_phy_tb_hybrid_pbl_type, &
144 atmos_phy_tb_hybrid_tke_type
154 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[TURBULENCE] / Categ[ATMOS PHYSICS] / Origin[SCALElib]' 155 if(
io_l )
write(
io_fid_log,*)
'+++ SGS-parameterization hybrid Model' 157 if ( tb_type /=
'HYBRID' )
then 158 write(*,*)
'xxx ATMOS_PHY_TB_TYPE is not HYBRID. Check!' 165 read(
io_fid_conf,nml=param_atmos_phy_tb_hybrid,iostat=ierr)
167 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 168 elseif( ierr > 0 )
then 169 write(*,*)
'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_TB_HYBRID. Check!' 174 select case ( atmos_phy_tb_hybrid_sgs_type )
177 atmos_phy_tb_hybrid_sgs_type, &
182 write(*,*)
'xxx ATMOS_PHY_TB_HYBRID_SGS_TYPE is invalid' 186 select case ( atmos_phy_tb_hybrid_pbl_type )
189 atmos_phy_tb_hybrid_pbl_type, &
194 write(*,*)
'xxx ATMOS_PHY_TB_HYBRID_PBL_TYPE is invalid' 198 allocate( frac_sgs(
ia,
ja) )
199 allocate( frac_pbl(
ia,
ja) )
200 allocate( frac_sgs_tke(
ia,
ja) )
201 allocate( frac_pbl_tke(
ia,
ja) )
205 dxy = sqrt( ( cdx(i)**2 + cdy(j)**2 )*0.5_rp )
209 ( dxy - atmos_phy_tb_hybrid_sgs_dx ) &
210 / ( atmos_phy_tb_hybrid_pbl_dx - atmos_phy_tb_hybrid_sgs_dx ) ) )
211 frac_sgs(i,j) = 1.0_rp - frac_pbl(i,j)
215 select case ( atmos_phy_tb_hybrid_tke_type )
217 frac_pbl_tke(:,:) = 0.0_rp
218 frac_sgs_tke(:,:) = 1.0_rp
220 frac_pbl_tke(:,:) = 1.0_rp
221 frac_sgs_tke(:,:) = 0.0_rp
223 frac_pbl_tke(:,:) = frac_pbl(:,:)
224 frac_sgs_tke(:,:) = frac_sgs(:,:)
226 write(*,*)
'xxx ATMOS_PHY_TB_HYBRID_TKE_TYPE is invalid' 235 qflx_sgs_momz, qflx_sgs_momx, qflx_sgs_momy, & ! (out)
236 qflx_sgs_rhot, qflx_sgs_rhoq, &
238 tke_t, nu, ri, pr, n2, &
239 momz, momx, momy, rhot, dens, qtrc, &
240 sflx_mw, sflx_mu, sflx_mv, sflx_sh, sflx_qv, &
241 gsqrt, j13g, j23g, j33g, mapf, dt )
249 real(RP),
intent(out) :: qflx_sgs_momz(
ka,
ia,
ja,3)
250 real(RP),
intent(out) :: qflx_sgs_momx(
ka,
ia,
ja,3)
251 real(RP),
intent(out) :: qflx_sgs_momy(
ka,
ia,
ja,3)
252 real(RP),
intent(out) :: qflx_sgs_rhot(
ka,
ia,
ja,3)
253 real(RP),
intent(out) :: qflx_sgs_rhoq(
ka,
ia,
ja,3,
qa)
255 real(RP),
intent(inout) :: tke (
ka,
ia,
ja)
256 real(RP),
intent(out) :: tke_t(
ka,
ia,
ja)
257 real(RP),
intent(out) :: Nu(
ka,
ia,
ja)
258 real(RP),
intent(out) :: Pr(
ka,
ia,
ja)
259 real(RP),
intent(out) :: Ri(
ka,
ia,
ja)
260 real(RP),
intent(out) :: N2(
ka,
ia,
ja)
262 real(RP),
intent(in) :: MOMZ(
ka,
ia,
ja)
263 real(RP),
intent(in) :: MOMX(
ka,
ia,
ja)
264 real(RP),
intent(in) :: MOMY(
ka,
ia,
ja)
265 real(RP),
intent(in) :: RHOT(
ka,
ia,
ja)
266 real(RP),
intent(in) :: DENS(
ka,
ia,
ja)
267 real(RP),
intent(in) :: QTRC(
ka,
ia,
ja,
qa)
269 real(RP),
intent(in) :: SFLX_MW(
ia,
ja)
270 real(RP),
intent(in) :: SFLX_MU(
ia,
ja)
271 real(RP),
intent(in) :: SFLX_MV(
ia,
ja)
272 real(RP),
intent(in) :: SFLX_SH(
ia,
ja)
273 real(RP),
intent(in) :: SFLX_QV(
ia,
ja)
275 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja,7)
276 real(RP),
intent(in) :: J13G (
ka,
ia,
ja,7)
277 real(RP),
intent(in) :: J23G (
ka,
ia,
ja,7)
278 real(RP),
intent(in) :: J33G
279 real(RP),
intent(in) :: MAPF (
ia,
ja,2,4)
280 real(DP),
intent(in) :: dt
282 real(RP) :: w_qflx_sgs_momz(
ka,
ia,
ja,3,2)
283 real(RP) :: w_qflx_sgs_momx(
ka,
ia,
ja,3,2)
284 real(RP) :: w_qflx_sgs_momy(
ka,
ia,
ja,3,2)
285 real(RP) :: w_qflx_sgs_rhot(
ka,
ia,
ja,3,2)
286 real(RP) :: w_qflx_sgs_rhoq(
ka,
ia,
ja,3,
qa,2)
288 real(RP) :: w_tke(
ka,
ia,
ja,2)
289 real(RP) :: w_tke_t(
ka,
ia,
ja,2)
290 real(RP) :: w_Nu(
ka,
ia,
ja,2)
291 real(RP) :: w_Ri(
ka,
ia,
ja,2)
292 real(RP) :: w_Pr(
ka,
ia,
ja,2)
293 real(RP) :: w_N2(
ka,
ia,
ja,2)
295 integer :: k, i, j, iq
300 w_tke(k,i,j,1) = tke(k,i,j)
301 w_tke(k,i,j,2) = tke(k,i,j)
307 w_qflx_sgs_momz(:,:,:,:,1), w_qflx_sgs_momx(:,:,:,:,1), &
308 w_qflx_sgs_momy(:,:,:,:,1), w_qflx_sgs_rhot(:,:,:,:,1), &
309 w_qflx_sgs_rhoq(:,:,:,:,:,1), &
312 w_nu(:,:,:,1), w_ri(:,:,:,1), w_pr(:,:,:,1), w_n2(:,:,:,1), &
313 momz, momx, momy, rhot, dens, qtrc, &
314 sflx_mw, sflx_mu, sflx_mv, sflx_sh, sflx_qv, &
315 gsqrt, j13g, j23g, j33g, mapf, dt )
318 w_qflx_sgs_momz(:,:,:,:,2), w_qflx_sgs_momx(:,:,:,:,2), &
319 w_qflx_sgs_momy(:,:,:,:,2), w_qflx_sgs_rhot(:,:,:,:,2), &
320 w_qflx_sgs_rhoq(:,:,:,:,:,2), &
323 w_nu(:,:,:,2), w_ri(:,:,:,2), w_pr(:,:,:,2), w_n2(:,:,:,2), &
324 momz, momx, momy, rhot, dens, qtrc, &
325 sflx_mw, sflx_mu, sflx_mv, sflx_sh, sflx_qv, &
326 gsqrt, j13g, j23g, j33g, mapf, dt )
331 qflx_sgs_momz(k,i,j,
zdir) = w_qflx_sgs_momz(k,i,j,
zdir,1) * frac_sgs(i,j) &
332 + w_qflx_sgs_momz(k,i,j,
zdir,2) * frac_pbl(i,j)
333 qflx_sgs_momz(k,i,j,
xdir) = w_qflx_sgs_momz(k,i,j,
xdir,1)
334 qflx_sgs_momz(k,i,j,
ydir) = w_qflx_sgs_momz(k,i,j,
ydir,1)
342 qflx_sgs_momx(k,i,j,
zdir) = w_qflx_sgs_momx(k,i,j,
zdir,1) * frac_sgs(i,j) &
343 + w_qflx_sgs_momx(k,i,j,
zdir,2) * frac_pbl(i,j)
344 qflx_sgs_momx(k,i,j,
xdir) = w_qflx_sgs_momx(k,i,j,
xdir,1)
345 qflx_sgs_momx(k,i,j,
ydir) = w_qflx_sgs_momx(k,i,j,
ydir,1)
353 qflx_sgs_momy(k,i,j,
zdir) = w_qflx_sgs_momy(k,i,j,
zdir,1) * frac_sgs(i,j) &
354 + w_qflx_sgs_momy(k,i,j,
zdir,2) * frac_pbl(i,j)
355 qflx_sgs_momy(k,i,j,
xdir) = w_qflx_sgs_momy(k,i,j,
xdir,1)
356 qflx_sgs_momy(k,i,j,
ydir) = w_qflx_sgs_momy(k,i,j,
ydir,1)
364 qflx_sgs_rhot(k,i,j,
zdir) = w_qflx_sgs_rhot(k,i,j,
zdir,1) * frac_sgs(i,j) &
365 + w_qflx_sgs_rhot(k,i,j,
zdir,2) * frac_pbl(i,j)
366 qflx_sgs_rhot(k,i,j,
xdir) = w_qflx_sgs_rhot(k,i,j,
xdir,1)
367 qflx_sgs_rhot(k,i,j,
ydir) = w_qflx_sgs_rhot(k,i,j,
ydir,1)
376 qflx_sgs_rhoq(k,i,j,
zdir,iq) = w_qflx_sgs_rhoq(k,i,j,
zdir,iq,1) * frac_sgs(i,j) &
377 + w_qflx_sgs_rhoq(k,i,j,
zdir,iq,2) * frac_pbl(i,j)
378 qflx_sgs_rhoq(k,i,j,
xdir,iq) = w_qflx_sgs_rhoq(k,i,j,
xdir,iq,1)
379 qflx_sgs_rhoq(k,i,j,
ydir,iq) = w_qflx_sgs_rhoq(k,i,j,
ydir,iq,1)
388 tke(k,i,j) = w_tke(k,i,j,1) * frac_sgs_tke(i,j) &
389 + w_tke(k,i,j,2) * frac_pbl_tke(i,j)
397 tke_t(k,i,j) = w_tke_t(k,i,j,1) * frac_sgs_tke(i,j) &
398 + w_tke_t(k,i,j,2) * frac_pbl_tke(i,j)
406 nu(k,i,j) = w_nu(k,i,j,1) * frac_sgs(i,j) &
407 + w_nu(k,i,j,2) * frac_pbl(i,j)
415 ri(k,i,j) = w_ri(k,i,j,1) * frac_sgs(i,j) &
416 + w_ri(k,i,j,2) * frac_pbl(i,j)
424 pr(k,i,j) = w_pr(k,i,j,1) * frac_sgs(i,j) &
425 + w_pr(k,i,j,2) * frac_pbl(i,j)
433 n2(k,i,j) = w_n2(k,i,j,1) * frac_sgs(i,j) &
434 + w_n2(k,i,j,2) * frac_pbl(i,j)
module ATMOSPHERE / Physics Turbulence
subroutine, public prc_mpistop
Abort MPI.
logical, public io_l
output log or not? (this process)
integer, parameter, public zdir
subroutine, public atmos_phy_tb_mynn(qflx_sgs_momz, qflx_sgs_momx, qflx_sgs_momy, qflx_sgs_rhot, qflx_sgs_rhoq, tke, tke_t, Nu, Ri, Pr, N2, MOMZ, MOMX, MOMY, RHOT, DENS, QTRC, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_QV, GSQRT, J13G, J23G, J33G, MAPF, dt)
integer, parameter, public ydir
integer, public ke
end point of inner domain: z, local
integer, parameter, public xdir
subroutine, public check(current_line, v)
Undefined value checker.
real(rp), public const_undef
subroutine, public atmos_phy_tb_mynn_setup(TYPE_TB, CDZ, CDX, CDY, CZ)
module ATMOSPHERE / Physics Turbulence
integer, public ia
of x whole cells (local, with HALO)
procedure(tb), pointer sgs_tb
integer, public ka
of z whole cells (local, with HALO)
subroutine, public atmos_phy_tb_smg(qflx_sgs_momz, qflx_sgs_momx, qflx_sgs_momy, qflx_sgs_rhot, qflx_sgs_rhoq, tke, tke_t, nu, Ri, Pr, N2, MOMZ, MOMX, MOMY, RHOT, DENS, QTRC, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_QV, GSQRT, J13G, J23G, J33G, MAPF, dt)
real(rp), public const_grav
standard acceleration of gravity [m/s2]
integer, parameter, public const_undef2
undefined value (INT2)
subroutine, public atmos_phy_tb_smg_setup(TYPE_TB, CDZ, CDX, CDY, CZ)
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_phy_tb_hybrid_setup(TB_TYPE, CDZ, CDX, CDY, CZ)
logical, public io_lnml
output log or not? (for namelist, this process)
integer, public io_fid_conf
Config file ID.
integer, public io_fid_log
Log file ID.
subroutine, public atmos_phy_tb_hybrid(qflx_sgs_momz, qflx_sgs_momx, qflx_sgs_momy, qflx_sgs_rhot, qflx_sgs_rhoq, tke, tke_t, Nu, Ri, Pr, N2, MOMZ, MOMX, MOMY, RHOT, DENS, QTRC, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_QV, GSQRT, J13G, J23G, J33G, MAPF, dt)
module ATMOSPHERE / Physics Turbulence
integer, public ja
of y whole cells (local, with HALO)