13 #include "inc_openmp.h" 77 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[DRIVER] / Categ[ATMOS PHY_TB] / Origin[SCALE-RM]' 94 momz_t_tb(
ks-1,i,j) = 0.0_rp
95 momz_t_tb(
ke ,i,j) = 0.0_rp
102 tke_t_tb(k,i,j) = 0.0_rp
113 if(
io_l )
write(
io_fid_log,*)
'*** this component is never called.' 193 logical,
intent(in) :: update_flag
196 real(RP) :: QFLX_MOMZ(
ka,
ia,
ja,3)
197 real(RP) :: QFLX_MOMX(
ka,
ia,
ja,3)
198 real(RP) :: QFLX_MOMY(
ka,
ia,
ja,3)
199 real(RP) :: QFLX_RHOT(
ka,
ia,
ja,3)
200 real(RP) :: QFLX_RHOQ(
ka,
ia,
ja,3,
qa)
211 integer :: k, i, j, iq
214 if ( update_flag )
then 219 tke(k,i,j) = max( tke(k,i,j) + tke_t_tb(k,i,j) * dt_tb, 0.0_rp )
226 tke(1:
ks-1,i,j) = tke(
ks,i,j)
227 tke(
ke+1:
ka,i,j) = tke(
ke,i,j)
231 call comm_vars8( tke(:,:,:), 1 )
232 call comm_wait ( tke(:,:,:), 1 )
267 call calc_tend_momz( momz_t_tb, &
269 gsqrt, j13g, j23g, j33g, mapf, &
278 call calc_tend_momx( momx_t_tb, &
280 gsqrt, j13g, j23g, j33g, mapf, &
289 call calc_tend_momy( momy_t_tb, &
291 gsqrt, j13g, j23g, j33g, mapf, &
300 call calc_tend_phi ( rhot_t_tb, &
302 gsqrt, j13g, j23g, j33g, mapf, &
312 call calc_tend_phi ( rhoq_t_tb(:,:,:,iq), &
313 qflx_rhoq(:,:,:,:,iq), &
314 gsqrt, j13g, j23g, j33g, mapf, &
320 call hist_in( tke(:,:,:),
'TKE',
'turburent kinetic energy',
'm2/s2', nohalo=.true. )
321 call hist_in( nu(:,:,:),
'NU',
'eddy viscosity',
'm2/s' , nohalo=.true. )
322 call hist_in( ri(:,:,:),
'Ri',
'Richardson number',
'NIL' , nohalo=.true. )
323 call hist_in( pr(:,:,:),
'Pr',
'Prantle number',
'NIL' , nohalo=.true. )
324 call hist_in( n2(:,:,:),
'N2',
'squared Brunt-Vaisala frequency',
'1/s2', nohalo=.true. )
326 call hist_in( momz_t_tb(:,:,:),
'MOMZ_t_TB',
'MOMZ tendency (TB)',
'kg/m2/s2', nohalo=.true. )
327 call hist_in( momx_t_tb(:,:,:),
'MOMX_t_TB',
'MOMX tendency (TB)',
'kg/m2/s2', nohalo=.true. )
328 call hist_in( momy_t_tb(:,:,:),
'MOMY_t_TB',
'MOMY tendency (TB)',
'kg/m2/s2', nohalo=.true. )
329 call hist_in( rhot_t_tb(:,:,:),
'RHOT_t_TB',
'RHOT tendency (TB)',
'K.kg/m3/s', nohalo=.true. )
332 call hist_in( rhoq_t_tb(:,:,:,iq), trim(
aq_name(iq))//
'_t_TB', &
333 'RHO*'//trim(
aq_name(iq))//
' tendency (TB)',
'kg/m3/s', nohalo=.true. )
336 call hist_in( qflx_momz(:,:,:,
zdir),
'SGS_ZFLX_MOMZ',
'SGS Z FLUX of MOMZ',
'kg/m/s2', &
338 call hist_in( qflx_momz(:,:,:,
xdir),
'SGS_XFLX_MOMZ',
'SGS X FLUX of MOMZ',
'kg/m/s2', &
339 xdim=
'half', zdim=
'half', nohalo=.true.)
340 call hist_in( qflx_momz(:,:,:,
ydir),
'SGS_YFLX_MOMZ',
'SGS Y FLUX of MOMZ',
'kg/m/s2', &
341 ydim=
'half', zdim=
'half', nohalo=.true.)
343 call hist_in( qflx_momx(:,:,:,
zdir),
'SGS_ZFLX_MOMX',
'SGS Z FLUX of MOMX',
'kg/m/s2', &
344 xdim=
'half', zdim=
'half', nohalo=.true.)
345 call hist_in( qflx_momx(:,:,:,
xdir),
'SGS_XFLX_MOMX',
'SGS X FLUX of MOMX',
'kg/m/s2', &
347 call hist_in( qflx_momx(:,:,:,
ydir),
'SGS_YFLX_MOMX',
'SGS Y FLUX of MOMX',
'kg/m/s2', &
348 xdim=
'half', ydim=
'half', nohalo=.true.)
350 call hist_in( qflx_momy(:,:,:,
zdir),
'SGS_ZFLX_MOMY',
'SGS Z FLUX of MOMY',
'kg/m/s2', &
351 ydim=
'half', zdim=
'half', nohalo=.true.)
352 call hist_in( qflx_momy(:,:,:,
xdir),
'SGS_XFLX_MOMY',
'SGS X FLUX of MOMY',
'kg/m/s2', &
353 xdim=
'half', ydim=
'half', nohalo=.true.)
354 call hist_in( qflx_momy(:,:,:,
ydir),
'SGS_YFLX_MOMY',
'SGS Y FLUX of MOMY',
'kg/m/s2', &
357 call hist_in( qflx_rhot(:,:,:,
zdir),
'SGS_ZFLX_RHOT',
'SGS Z FLUX of RHOT',
'K*kg/m2/s', &
358 zdim=
'half', nohalo=.true.)
359 call hist_in( qflx_rhot(:,:,:,
xdir),
'SGS_XFLX_RHOT',
'SGS X FLUX of RHOT',
'K*kg/m2/s', &
360 xdim=
'half', nohalo=.true.)
361 call hist_in( qflx_rhot(:,:,:,
ydir),
'SGS_YFLX_RHOT',
'SGS Y FLUX of RHOT',
'K*kg/m2/s', &
362 ydim=
'half', nohalo=.true.)
365 call hist_in( qflx_rhoq(:,:,:,
zdir,
i_qv),
'SGS_ZFLX_QV',
'SGS Z FLUX of QV',
'kg/m2/s', &
366 zdim=
'half', nohalo=.true.)
367 call hist_in( qflx_rhoq(:,:,:,
xdir,
i_qv),
'SGS_XFLX_QV',
'SGS X FLUX of QV',
'kg/m2/s', &
368 xdim=
'half', nohalo=.true.)
369 call hist_in( qflx_rhoq(:,:,:,
ydir,
i_qv),
'SGS_YFLX_QV',
'SGS Y FLUX of QV',
'kg/m2/s', &
370 ydim=
'half', nohalo=.true.)
375 call hist_in( qflx_rhoq(:,:,:,
zdir,
i_qc),
'SGS_ZFLX_QC',
'SGS Z FLUX of QC',
'kg/m2/s', &
376 zdim=
'half', nohalo=.true.)
377 call hist_in( qflx_rhoq(:,:,:,
xdir,
i_qc),
'SGS_XFLX_QC',
'SGS X FLUX of QC',
'kg/m2/s', &
378 xdim=
'half', nohalo=.true.)
379 call hist_in( qflx_rhoq(:,:,:,
ydir,
i_qc),
'SGS_YFLX_QC',
'SGS Y FLUX of QC',
'kg/m2/s', &
380 ydim=
'half', nohalo=.true.)
384 call hist_in( qflx_rhoq(:,:,:,
zdir,
i_qr),
'SGS_ZFLX_QR',
'SGS Z FLUX of QR',
'kg/m2/s', &
385 zdim=
'half', nohalo=.true.)
386 call hist_in( qflx_rhoq(:,:,:,
xdir,
i_qr),
'SGS_XFLX_QR',
'SGS X FLUX of QR',
'kg/m2/s', &
387 xdim=
'half', nohalo=.true.)
388 call hist_in( qflx_rhoq(:,:,:,
ydir,
i_qr),
'SGS_YFLX_QR',
'SGS Y FLUX of QR',
'kg/m2/s', &
389 ydim=
'half', nohalo=.true.)
393 call hist_in( qflx_rhoq(:,:,:,
zdir,
i_qi),
'SGS_ZFLX_QI',
'SGS Z FLUX of QI',
'kg/m2/s', &
394 zdim=
'half', nohalo=.true.)
395 call hist_in( qflx_rhoq(:,:,:,
xdir,
i_qi),
'SGS_XFLX_QI',
'SGS X FLUX of QI',
'kg/m2/s', &
396 xdim=
'half', nohalo=.true.)
397 call hist_in( qflx_rhoq(:,:,:,
ydir,
i_qi),
'SGS_YFLX_QI',
'SGS Y FLUX of QI',
'kg/m2/s', &
398 ydim=
'half', nohalo=.true.)
402 call hist_in( qflx_rhoq(:,:,:,
zdir,
i_qs),
'SGS_ZFLX_QS',
'SGS Z FLUX of QS',
'kg/m2/s', &
403 zdim=
'half', nohalo=.true.)
404 call hist_in( qflx_rhoq(:,:,:,
xdir,
i_qs),
'SGS_XFLX_QS',
'SGS X FLUX of QS',
'kg/m2/s', &
405 xdim=
'half', nohalo=.true.)
406 call hist_in( qflx_rhoq(:,:,:,
ydir,
i_qs),
'SGS_YFLX_QS',
'SGS Y FLUX of QS',
'kg/m2/s', &
407 ydim=
'half', nohalo=.true.)
411 call hist_in( qflx_rhoq(:,:,:,
zdir,
i_qg),
'SGS_ZFLX_QG',
'SGS Z FLUX of QG',
'kg/m2/s', &
412 zdim=
'half', nohalo=.true.)
413 call hist_in( qflx_rhoq(:,:,:,
xdir,
i_qg),
'SGS_XFLX_QG',
'SGS X FLUX of QG',
'kg/m2/s', &
414 xdim=
'half', nohalo=.true.)
415 call hist_in( qflx_rhoq(:,:,:,
ydir,
i_qg),
'SGS_YFLX_QG',
'SGS Y FLUX of QG',
'kg/m2/s', &
416 ydim=
'half', nohalo=.true.)
421 call stat_total( total, momz_t_tb(:,:,:),
'MOMZ_t_TB' )
422 call stat_total( total, momx_t_tb(:,:,:),
'MOMX_t_TB' )
423 call stat_total( total, momy_t_tb(:,:,:),
'MOMY_t_TB' )
424 call stat_total( total, rhot_t_tb(:,:,:),
'RHOT_t_TB' )
425 call stat_total( total, tke(:,:,:),
'TKE' )
426 call stat_total( total, nu(:,:,:),
'Nu' )
427 call stat_total( total, ri(:,:,:),
'Ri' )
428 call stat_total( total, pr(:,:,:),
'Pr' )
431 call stat_total( total, rhoq_t_tb(:,:,:,iq), trim(
aq_name(iq))//
'_t_TB' )
441 momz_t(k,i,j) = momz_t(k,i,j) + momz_t_tb(k,i,j)
442 momx_t(k,i,j) = momx_t(k,i,j) + momx_t_tb(k,i,j)
443 momy_t(k,i,j) = momy_t(k,i,j) + momy_t_tb(k,i,j)
444 rhot_t(k,i,j) = rhot_t(k,i,j) + rhot_t_tb(k,i,j)
454 rhoq_t(k,i,j,iq) = rhoq_t(k,i,j,iq) + rhoq_t_tb(k,i,j,iq)
integer, public is
start point of inner domain: x, local
logical, public statistics_checktotal
calc&report variable totals to logfile?
real(rp), dimension(:,:,:), allocatable, target, public momz
subroutine, public atmos_phy_tb_calc_tend_momz(MOMZ_t_TB, QFLX_MOMZ, GSQRT, J13G, J23G, J33G, MAPF, IIS, IIE, JJS, JJE)
integer, public je
end point of inner domain: y, local
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_momx_t
real(rp), dimension(:,:,:), allocatable, public atmos_phy_sf_sflx_qtrc
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_rhot_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mw
real(rp), dimension(:,:,:), allocatable, target, public rhot
real(rp), dimension(:,:,:,:), allocatable, public gtrans_j23g
(2,3) element of Jacobian matrix * {G}^1/2
real(rp), dimension(:,:,:), allocatable, public momy_tp
module ATMOSPHERE / Physics Turbulence
integer, public iblock
block size for cache blocking: x
subroutine, public atmos_phy_tb_calc_tend_momy(MOMY_t_TB, QFLX_MOMY, GSQRT, J13G, J23G, J33G, MAPF, IIS, IIE, JJS, JJE)
logical, public io_l
output log or not? (this process)
integer, parameter, public zdir
procedure(tb), pointer, public atmos_phy_tb
module ATMOSPHERIC Variables
real(rp), dimension(:,:,:,:), pointer, public qtrc_av
real(rp), dimension(:,:,:), allocatable, target, public momx
integer, parameter, public ydir
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_tke
integer, parameter, public xdir
real(rp), public gtrans_j33g
(3,3) element of Jacobian matrix * {G}^1/2
real(rp), dimension(:,:,:), allocatable, public rhot_tp
real(rp), dimension(:,:,:), allocatable, public real_cz
geopotential height [m] (cell center)
real(rp), dimension(:,:,:), allocatable, target, public dens
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mv
subroutine, public atmos_phy_tb_calc_tend_phi(phi_t_TB, QFLX_phi, GSQRT, J13G, J23G, J33G, MAPF, IIS, IIE, JJS, JJE)
module ATMOSPHERIC Surface Variables
real(rp), dimension(:,:,:), pointer, public momx_av
logical, public atmos_sw_phy_tb
real(rp), dimension(:,:,:,:), allocatable, public gtrans_mapf
map factor
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_nu
integer, public ia
of x whole cells (local, with HALO)
subroutine, public atmos_phy_tb_calc_tend_momx(MOMX_t_TB, QFLX_MOMX, GSQRT, J13G, J23G, J33G, MAPF, IIS, IIE, JJS, JJE)
integer, public ka
of z whole cells (local, with HALO)
integer, public jblock
block size for cache blocking: y
real(rp), dimension(:,:,:,:), allocatable, public rhoq_tp
character(len=h_short), dimension(:), allocatable, public aq_name
integer, public js
start point of inner domain: y, local
real(dp), public time_dtsec_atmos_phy_tb
time interval of physics(turbulence ) [sec]
module Atmosphere / Physics Turbulence
real(rp), dimension(:,:,:), pointer, public dens_av
subroutine, public atmos_phy_tb_setup(TB_TYPE, CDZ, CDX, CDY, CZ)
real(rp), dimension(:,:,:,:), allocatable, public gtrans_j13g
(1,3) element of Jacobian matrix * {G}^1/2
character(len=h_short), public atmos_phy_tb_type
module ATMOSPHERE / Physics Turbulence
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_phy_tb_driver_setup
Setup.
module ATMOSPHERE / Physics Turbulence
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_momy_t
real(rp), dimension(:,:,:), allocatable, public momx_tp
real(rp), dimension(:,:,:), allocatable, target, public momy
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
real(rp), dimension(:,:,:), allocatable, public momz_tp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
integer, public ie
end point of inner domain: x, local
real(rp), dimension(:,:,:,:), allocatable, public gtrans_gsqrt
transformation metrics from Z to Xi, {G}^1/2
real(rp), dimension(:), allocatable, public grid_cdz
z-length of control volume [m]
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_tb_rhoq_t
real(rp), dimension(:), allocatable, public grid_cdy
y-length of control volume [m]
real(rp), dimension(:,:,:), pointer, public momz_av
real(rp), dimension(:,:,:), pointer, public rhot_av
subroutine, public atmos_phy_tb_driver(update_flag)
Driver.
integer, public io_fid_log
Log file ID.
real(rp), dimension(:,:,:), pointer, public momy_av
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mu
subroutine, public prof_rapend(rapname_base, level)
Save raptime.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_tke_t
subroutine, public atmos_phy_tb_driver_resume
Resume.
real(rp), dimension(:), allocatable, public grid_cdx
x-length of control volume [m]
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_momz_t
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc
integer, public ja
of y whole cells (local, with HALO)