FE-Project
Loading...
Searching...
No Matches
scale_atm_phy_tb_dgm_common.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2!> module FElib / Fluid dyn solver / Atmosphere / Physics turbulence / Common
3!!
4!! @par Description
5!! A common modules for atmospheric turbulent parameterization
6!!
7!! @author Yuta Kawai, Team SCALE
8!<
9!-------------------------------------------------------------------------------
10#include "scaleFElib.h"
12 !-----------------------------------------------------------------------------
13 !
14 !++ Used modules
15 !
16 use scale_precision
17 use scale_io
18 use scale_prc
19 use scale_prof
20 use scale_const, only: &
21 eps => const_eps
22
24 use scale_element_base, only: &
28
29 use scale_model_var_manager, only: &
30 modelvarmanager, variableinfo
31
32 !-----------------------------------------------------------------------------
33 implicit none
34 private
35 !-----------------------------------------------------------------------------
36 !
37 !++ Public procedures
38 !
41
45
46 !-----------------------------------------------------------------------------
47 !
48 !++ Public parameters & variables
49 !
50 integer, public, parameter :: atmos_phy_tb_aux_t13_id = 1
51 integer, public, parameter :: atmos_phy_tb_aux_t23_id = 2
52 integer, public, parameter :: atmos_phy_tb_aux_t33_id = 3
53 integer, public, parameter :: atmos_phy_tb_aux_diffflx3_id = 4
54 integer, public, parameter :: atmos_phy_tb_aux_t31_id = 5
55 integer, public, parameter :: atmos_phy_tb_aux_t32_id = 6
56 integer, public, parameter :: atmos_phy_tb_aux_diffflx1_id = 7
57 integer, public, parameter :: atmos_phy_tb_aux_diffflx2_id = 8
58 integer, public, parameter :: atmos_phy_tb_aux_t11_id = 9
59 integer, public, parameter :: atmos_phy_tb_aux_t12_id = 10
60 integer, public, parameter :: atmos_phy_tb_aux_t21_id = 11
61 integer, public, parameter :: atmos_phy_tb_aux_t22_id = 12
62 integer, public, parameter :: atmos_phy_tb_aux_scalar_num = 4
63 integer, public, parameter :: atmos_phy_tb_aux_hvec_num = 2
64 integer, public, parameter :: atmos_phy_tb_aux_htensor_num = 1
65 integer, public, parameter :: atmos_phy_tb_aux_num = 12
66
67 integer, public, parameter :: atmos_phy_tb_diag_tke_id = 1
68 integer, public, parameter :: atmos_phy_tb_diag_nu_id = 2
69 integer, public, parameter :: atmos_phy_tb_diag_kh_id = 3
70 integer, public, parameter :: atmos_phy_tb_diag_num = 3
71
72 integer, public, parameter :: atmos_phy_tb_momx_t_id = 1
73 integer, public, parameter :: atmos_phy_tb_momy_t_id = 2
74 integer, public, parameter :: atmos_phy_tb_momz_t_id = 3
75 integer, public, parameter :: atmos_phy_tb_rhot_t_id = 4
76 integer, public, parameter :: atmos_phy_tb_tends_num1 = 4
77 !-
78
79 !-----------------------------------------------------------------------------
80 !
81 !++ Private procedures & variables
82 !
83 !-------------------
84
85 private :: cal_bnd_flux
86 private :: cal_bnd_flux_grad_qtrc
87 private :: cal_bnd_flux_qtrc
88
89 private :: fact, p1, p2, p3
90
91contains
92!OCL SERIAL
94 tends, auxvars, diagvars, & ! (inout)
95 tends_manager, auxvar_manager, diagvar_manager, & ! (inout)
96 tends_num_tot, mesh3d ) ! (in)
97 use scale_tracer, only: &
98 qa, tracer_name, tracer_desc, tracer_unit
101 implicit none
102 integer, intent(in) :: tends_num_tot
103 type(meshfield3d), intent(inout) :: tends(tends_num_tot)
104 type(meshfield3d), intent(inout) :: auxvars(atmos_phy_tb_aux_num)
105 type(meshfield3d), intent(inout) :: diagvars(atmos_phy_tb_diag_num)
106 type(modelvarmanager), intent(inout) :: tends_manager
107 type(modelvarmanager), intent(inout) :: auxvar_manager
108 type(modelvarmanager), intent(inout) :: diagvar_manager
109 class(meshbase3d), intent(in) :: mesh3d
110
111 ! type(VariableInfo), intent(out) :: auxvar_info(ATMOS_PHY_TB_AUX_NUM)
112 ! type(VariableInfo), intent(out) :: diagvar_info(ATMOS_PHY_TB_DIAG_NUM)
113 ! type(VariableInfo), intent(out) :: tend_info(ATMOS_PHY_TB_TENDS_NUM1)
114
115 type(variableinfo) :: atmos_phy_tb_aux_vinfo(atmos_phy_tb_aux_num)
116 DATA atmos_phy_tb_aux_vinfo / &
117 variableinfo( atmos_phy_tb_aux_t13_id, 'TB_T13', 'stress tensor (T13)', & ! rho x nu x S : [kg/m3] x [m2/s] x [s-1]
118 'kg.m-3.m2.s-2', 3, 'XYZ', '' ), &
119 variableinfo( atmos_phy_tb_aux_t23_id, 'TB_T23', 'stress tensor (T23)', &
120 'kg.m-3.m2.s-2', 3, 'XYZ', '' ), &
121 variableinfo( atmos_phy_tb_aux_t33_id, 'TB_T33', 'stress tensor (T33)', &
122 'kg.m-3.m2.s-2', 3, 'XYZ', '' ), &
123 variableinfo( atmos_phy_tb_aux_diffflx3_id, 'DIFF_FLX3', 'diffusive heat flux (z) / density', &
124 'm2/s.K/m', 3, 'XYZ', '' ), &
125 variableinfo( atmos_phy_tb_aux_t31_id, 'TB_T31', 'stress tensor (T31)', &
126 'kg.m-3.m2.s-2', 3, 'XYZ', '' ), &
127 variableinfo( atmos_phy_tb_aux_t32_id, 'TB_T32', 'stress tensor (T32)', &
128 'kg.m-3.m2.s-2', 3, 'XYZ', '' ), &
129 variableinfo( atmos_phy_tb_aux_diffflx1_id, 'DIFF_FLX1', 'diffusive heat flux (x) / density', &
130 'm2/s.K/m', 3, 'XYZ', '' ), &
131 variableinfo( atmos_phy_tb_aux_diffflx2_id, 'DIFF_FLX2', 'diffusive heat flux (y) / density', &
132 'm2/s.K/m', 3, 'XYZ', '' ), &
133 variableinfo( atmos_phy_tb_aux_t11_id, 'TB_T11', 'stress tensor (T11)', &
134 'kg.m-3.m2.s-2', 3, 'XYZ', '' ), &
135 variableinfo( atmos_phy_tb_aux_t12_id, 'TB_T12', 'stress tensor (T12)', &
136 'kg.m-3.m2.s-2', 3, 'XYZ', '' ), &
137 variableinfo( atmos_phy_tb_aux_t21_id, 'TB_T21', 'stress tensor (T21)', &
138 'kg.m-3.m2.s-2', 3, 'XYZ', '' ), &
139 variableinfo( atmos_phy_tb_aux_t22_id, 'TB_T22', 'stress tensor (T22)', &
140 'kg.m-3.m2.s-2', 3, 'XYZ', '' ) /
141
142 type(variableinfo) :: atmos_phy_tb_diag_vinfo(atmos_phy_tb_diag_num)
143 DATA atmos_phy_tb_diag_vinfo / &
144 variableinfo( atmos_phy_tb_diag_tke_id, 'TKE', 'SGS turbluence kinetic energy', &
145 'm2/s2', 3, 'XYZ', '' ), &
146 variableinfo( atmos_phy_tb_diag_nu_id, 'NU', 'eddy viscosity', &
147 'm2/s', 3, 'XYZ', '' ), &
148 variableinfo( atmos_phy_tb_diag_kh_id, 'KH', 'eddy diffusion', &
149 'm2/s', 3, 'XYZ', '' ) /
150
151 type(variableinfo) :: atmos_phy_tb_tend_vinfo(atmos_phy_tb_tends_num1)
152 DATA atmos_phy_tb_tend_vinfo / &
153 variableinfo( atmos_phy_tb_momx_t_id, 'TB_MOMX_t', 'tendency of x-momentum in TB process', &
154 'kg/m2/s2', 3, 'XYZ', '' ), &
155 variableinfo( atmos_phy_tb_momy_t_id, 'TB_MOMY_t', 'tendency of y-momentum in TB process', &
156 'kg/m2/s2', 3, 'XYZ', '' ), &
157 variableinfo( atmos_phy_tb_momz_t_id, 'TB_MOMZ_t', 'tendency of z-momentum in TB process', &
158 'kg/m2/s2', 3, 'XYZ', '' ), &
159 variableinfo( atmos_phy_tb_rhot_t_id, 'TB_RHOT_t', 'tendency of rho*PT in TB process', &
160 'kg/m3.K/s', 3, 'XYZ', '' ) /
161
162 type(variableinfo) :: qtrc_vinfo_tmp
163
164 integer :: iv
165 integer :: iq
166 logical :: reg_file_hist
167 !----------------------------------------------------------
168
169 ! auxvar_info(:) = ATMOS_PHY_TB_AUX_VINFO
170 ! diagvar_info(:) = ATMOS_PHY_TB_DIAG_VINFO
171 ! tend_info(:) = ATMOS_PHY_TB_TEND_VINFO
172
173 !- Initialize an object to manage tendencies with turbulent model
174
175 reg_file_hist = .true.
176 do iv = 1, atmos_phy_tb_tends_num1
177 call tends_manager%Regist( &
178 atmos_phy_tb_tend_vinfo(iv), mesh3d, & ! (in)
179 tends(iv), reg_file_hist, & ! (out)
180 fill_zero=.true. )
181 end do
182
183 qtrc_vinfo_tmp%ndims = 3
184 qtrc_vinfo_tmp%dim_type = 'XYZ'
185 qtrc_vinfo_tmp%STDNAME = ''
186
187 do iq = 1, qa
188 iv = atmos_phy_tb_tends_num1 + iq
189 qtrc_vinfo_tmp%keyID = iv
190 qtrc_vinfo_tmp%NAME = 'TB_'//trim(tracer_name(iq))//'_t'
191 qtrc_vinfo_tmp%DESC = 'tendency of '//trim(tracer_desc(iq))//' in TB process'
192 qtrc_vinfo_tmp%UNIT = trim(tracer_unit(iq))//'/s'
193
194 call tends_manager%Regist( &
195 qtrc_vinfo_tmp, mesh3d, & ! (in)
196 tends(iv), reg_file_hist, & ! (out)
197 fill_zero=.true. )
198 end do
199
200 !- Initialize an object to manage auxiliary variables with turbulent model
201
202 reg_file_hist = .true.
203 do iv = 1, atmos_phy_tb_aux_num
204 call auxvar_manager%Regist( &
205 atmos_phy_tb_aux_vinfo(iv), mesh3d, & ! (in)
206 auxvars(iv), reg_file_hist, & ! (out)
207 fill_zero=.true. )
208 end do
209
210 !- Initialize an object to manage diagnostic variables with turbulent model
211
212 reg_file_hist = .true.
213 do iv = 1, atmos_phy_tb_diag_num
214 call diagvar_manager%Regist( &
215 atmos_phy_tb_diag_vinfo(iv), mesh3d, & ! (in)
216 diagvars(iv), reg_file_hist, & ! (out)
217 fill_zero=.true. )
218 end do
219
220 return
222
223!OCL SERIAL
224 subroutine atm_phy_tb_dgm_common_calc_lambda( lambda, & ! (out)
225 cs, filter_fac, lmesh, elem, lmesh2d, elem2d ) ! (in)
226
227 use scale_const, only: &
228 karman => const_karman
229 implicit none
230
231 class(localmesh3d), intent(in) :: lmesh
232 class(elementbase3d), intent(in) :: elem
233 class(localmesh2d), intent(in) :: lmesh2d
234 class(elementbase2d), intent(in) :: elem2d
235 real(rp), intent(out) :: lambda(elem%np,lmesh%ne)
236 real(rp), intent(in) :: cs
237 real(rp), intent(in) :: filter_fac
238
239 integer :: ke
240
241 real(rp) :: vol
242 real(rp) :: he
243 real(rp) :: lambda0
244 real(rp) :: zs(elem2d%np)
245 real(rp) :: z1(elem2d%np)
246 real(rp) :: dz(elem %np)
247 real(rp) :: fz
248 real(rp) :: elem_aspect_eff
249
250 real(rp), parameter :: oneoverthree = 1.0_rp / 3.0_rp
251 !--------------------------------------------------------------------
252
253 !$omp parallel do private( &
254 !$omp vol, lambda0, Zs, Z1, dz, he, FZ, elem_aspect_eff )
255 do ke=lmesh%NeS, lmesh%NeE
256 vol = sum( elem%IntWeight_lgl(:) * lmesh%J(:,ke) * lmesh%Gsqrt(:,ke) )
257 he = ( vol / ( dble(elem%PolyOrder_h+1)**2 * dble(elem%PolyOrder_v+1) ) )**oneoverthree
258
259 fz = lmesh%zlev(elem%Colmask(elem%Nnode_v,1),ke) - lmesh%zlev(elem%Colmask(1,1),ke)
260 elem_aspect_eff = fact( fz/dble(elem%PolyOrder_v+1), sqrt(vol/fz)/dble(elem%PolyOrder_h+1), sqrt(vol/fz)/dble(elem%PolyOrder_h+1) )
261 lambda0 = elem_aspect_eff * cs * filter_fac * he
262
263 zs(:) = lmesh%zlev(elem%Hslice(:,1),lmesh%EMap3Dto2D(ke))
264 z1(:) = lmesh%zlev(elem%Hslice(:,2),lmesh%EMap3Dto2D(ke))
265 dz(:) = max( lmesh%zlev(:,ke) - zs(elem%IndexH2Dto3D(:)), he )
266
267 !lambda(:,ke) = sqrt( 1.0_RP / (1.0_RP / lambda0**2 + 1.0_RP / ( KARMAN * max( dz(:), EPS ) )**2 ) )
268 lambda(:,ke) = sqrt( 1.0_rp / (1.0_rp / lambda0**2 + 1.0_rp / ( karman * ( dz(:) + 1.0e-4_rp ) )**2 ) )
269 end do
270
271 return
273
274
275!> Calculate parameterized diffusive mass flux of tracer with turbulent model
276!!
277!OCL SERIAL
279 DFQ1, DFQ2, DFQ3, & ! (out)
280 drdx, drdy, drdz, & ! (inout)
281 kh, qtrc, ddens, dens_hyd, & ! (in)
282 dx, dy, dz, sx, sy, sz, lift, lmesh, elem, lmesh2d, elem2d, & ! (in)
283 is_bound, cal_grad_dens ) ! (in)
284
285 implicit none
286
287 class(localmesh3d), intent(in) :: lmesh
288 class(elementbase3d), intent(in) :: elem
289 class(localmesh2d), intent(in) :: lmesh2d
290 class(elementbase2d), intent(in) :: elem2d
291 real(rp), intent(out) :: dfq1(elem%np,lmesh%nea) !< Diffusive mass flux in x1 direction / density (Kh dq/dx1)
292 real(rp), intent(out) :: dfq2(elem%np,lmesh%nea) !< Diffusive mass flux in x2 direction / density (Kh dq/dx2)
293 real(rp), intent(out) :: dfq3(elem%np,lmesh%nea) !< Diffusive mass flux in x3 direction / density (Kh dq/dx3)
294 real(rp), intent(inout) :: drdx(elem%np,lmesh%nea) !< Spatial gradient of density in x1 direction
295 real(rp), intent(inout) :: drdy(elem%np,lmesh%nea) !< Spatial gradient of density in x2 direction
296 real(rp), intent(inout) :: drdz(elem%np,lmesh%nea) !< Spatial gradient of density in x3 direction
297 real(rp), intent(in) :: kh(elem%np,lmesh%nea) !< Eddy diffusivity
298 real(rp), intent(in) :: qtrc(elem%np,lmesh%nea) !< Mass faction of tracer
299 real(rp), intent(in) :: ddens(elem%np,lmesh%nea) !< Density perturbation
300 real(rp), intent(in) :: dens_hyd(elem%np,lmesh%nea) !< Reference desity in hydrostatic state
301 type(sparsemat), intent(in) :: dx, dy, dz !< Differential matrix managed by sparse matrix type
302 type(sparsemat), intent(in) :: sx, sy, sz !< Stiffness matrix managed by sparse matrix type
303 type(sparsemat), intent(in) :: lift !< Lifting matrix managed by sparse matrix type
304 logical, intent(in) :: is_bound(elem%nfptot,lmesh%ne) !< Flag whether nodes are located at domain boundaries
305 logical, intent(in) :: cal_grad_dens !< Flag whether spatial gradients of density are calcuated
306
307 real(rp) :: fx(elem%np), fy(elem%np), fz(elem%np), liftdelflx(elem%np)
308 real(rp) :: bnd_flux(elem%nfptot,lmesh%ne,3)
309 real(rp) :: bnd_flux_rho (elem%nfptot,lmesh%ne,3)
310
311 real(rp) :: dens(elem%np), rdens(elem%np)
312 real(rp) :: rhoxqtrc(elem%np)
313
314 integer :: ke
315 integer :: p
316 !--------------------------------------------------------------------
317
318 call cal_bnd_flux_grad_qtrc( bnd_flux, bnd_flux_rho, & ! (out)
319 qtrc, ddens, dens_hyd, & ! (in)
320 lmesh%normal_fn(:,:,1), lmesh%normal_fn(:,:,2), lmesh%normal_fn(:,:,3), & ! (in)
321 lmesh%vmapM, lmesh%vmapP, & ! (in)
322 lmesh, elem, is_bound, cal_grad_dens ) ! (in)
323
324 !$omp parallel private( ke, Fx, Fy, Fz, LiftDelFlx, RHOxQTRC, DENS, RDENS )
325
326 ! Calculate gradient of density
327 if ( cal_grad_dens ) then
328 !$omp do
329 do ke=lmesh%NeS, lmesh%NeE
330 dens(:) = dens_hyd(:,ke) + ddens(:,ke)
331
332 call sparsemat_matmul( dx, dens, fx )
333 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux_rho(:,ke,1), liftdelflx )
334 drdx(:,ke) = lmesh%Escale(:,ke,1,1) * fx(:) + liftdelflx(:)
335
336 call sparsemat_matmul( dy, dens, fy )
337 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux_rho(:,ke,2), liftdelflx )
338 drdy(:,ke) = lmesh%Escale(:,ke,2,2) * fy(:) + liftdelflx(:)
339
340 call sparsemat_matmul( dz, dens, fz )
341 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux_rho(:,ke,3), liftdelflx )
342 drdz(:,ke) = lmesh%Escale(:,ke,3,3) * fz(:) + liftdelflx(:)
343 end do
344 end if
345
346 ! Calculate gradient of tracer
347 !$omp do
348 do ke=lmesh%NeS, lmesh%NeE
349 dens(:) = dens_hyd(:,ke) + ddens(:,ke)
350 rdens(:) = 1.0_rp / dens(:)
351 rhoxqtrc(:) = dens(:) * qtrc(:,ke)
352
353 !---
354 call sparsemat_matmul( dx, rhoxqtrc(:), fx )
355 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux(:,ke,1), liftdelflx )
356 dfq1(:,ke) = kh(:,ke) * ( lmesh%Escale(:,ke,1,1) * fx(:) + liftdelflx(:) - qtrc(:,ke) * drdx(:,ke) ) * rdens(:)
357
358 call sparsemat_matmul( dy, rhoxqtrc(:), fy )
359 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux(:,ke,2), liftdelflx )
360 dfq2(:,ke) = kh(:,ke) * ( lmesh%Escale(:,ke,2,2) * fy(:) + liftdelflx(:) - qtrc(:,ke) * drdy(:,ke) ) * rdens(:)
361
362 call sparsemat_matmul( dz, rhoxqtrc(:), fz )
363 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux(:,ke,3), liftdelflx )
364 dfq3(:,ke) = kh(:,ke) * ( lmesh%Escale(:,ke,3,3) * fz(:) + liftdelflx(:) - qtrc(:,ke) * drdz(:,ke) ) * rdens(:)
365 end do
366
367 !$omp end parallel
368
369 return
371
372!> Calculate tendecies with turbulent model
373!!
374!OCL SERIAL
376 MOMX_t, MOMY_t, MOMZ_t, RHOT_t, & ! (out)
377 t11, t12, t13, t21, t22, t23, t31, t32, t33, & ! (in)
378 df1, df2, df3, & ! (in)
379 nu, kh, & ! (in)
380 ddens_, momx_, momy_, momz_, drhot_, & ! (in)
381 dens_hyd, pres_hyd, pres_, pt_, & ! (in)
382 dx, dy, dz, sx, sy, sz, lift, lmesh, elem, lmesh2d, elem2d, & ! (in)
383 is_bound ) ! (in)
384
385 implicit none
386
387 class(localmesh3d), intent(in) :: lmesh
388 class(elementbase3d), intent(in) :: elem
389 class(localmesh2d), intent(in) :: lmesh2d
390 class(elementbase2d), intent(in) :: elem2d
391 real(rp), intent(out) :: momx_t(elem%np,lmesh%nea) !< Tendency of momentum in x1 direction with turbulent model
392 real(rp), intent(out) :: momy_t(elem%np,lmesh%nea) !< Tendency of momentum in x2 direction with turbulent model
393 real(rp), intent(out) :: momz_t(elem%np,lmesh%nea) !< Tendency of momentum in x3 direction with turbulent model
394 real(rp), intent(out) :: rhot_t(elem%np,lmesh%nea) !< Tendency of density x potential temperature with turbulent model
395 real(rp), intent(in) :: t11(elem%np,lmesh%nea) !< (1,1) component of stress tensor
396 real(rp), intent(in) :: t12(elem%np,lmesh%nea) !< (1,2) component of stress tensor
397 real(rp), intent(in) :: t13(elem%np,lmesh%nea) !< (1,3) component of stress tensor
398 real(rp), intent(in) :: t21(elem%np,lmesh%nea) !< (2,1) component of stress tensor
399 real(rp), intent(in) :: t22(elem%np,lmesh%nea) !< (2,2) component of stress tensor
400 real(rp), intent(in) :: t23(elem%np,lmesh%nea) !< (2,3) component of stress tensor
401 real(rp), intent(in) :: t31(elem%np,lmesh%nea) !< (3,1) component of stress tensor
402 real(rp), intent(in) :: t32(elem%np,lmesh%nea) !< (3,2) component of stress tensor
403 real(rp), intent(in) :: t33(elem%np,lmesh%nea) !< (3,3) component of stress tensor
404 real(rp), intent(in) :: df1(elem%np,lmesh%nea) !< Diffusive heat flux in x1 direction / density
405 real(rp), intent(in) :: df2(elem%np,lmesh%nea) !< Diffusive heat flux in x2 direction / density
406 real(rp), intent(in) :: df3(elem%np,lmesh%nea) !< Diffusive heat flux in x3 direction / density
407 real(rp), intent(in) :: nu (elem%np,lmesh%nea) !< Eddy viscosity
408 real(rp), intent(in) :: kh (elem%np,lmesh%nea) !< Eddy diffusivity
409 real(rp), intent(in) :: ddens_(elem%np,lmesh%nea) !< Density perturbation
410 real(rp), intent(in) :: momx_ (elem%np,lmesh%nea) !< Momentum in x1 direction
411 real(rp), intent(in) :: momy_ (elem%np,lmesh%nea) !< Momentum in x2 direction
412 real(rp), intent(in) :: momz_ (elem%np,lmesh%nea) !< Momentum in x3 direction
413 real(rp), intent(in) :: drhot_(elem%np,lmesh%nea) !< Density x potential temperature perturbation
414 real(rp), intent(in) :: dens_hyd(elem%np,lmesh%nea) !< Reference pressure in hydrostatic balance
415 real(rp), intent(in) :: pres_hyd(elem%np,lmesh%nea) !< Reference density in hydrostatic balance
416 real(rp), intent(in) :: pres_(elem%np,lmesh%nea) !< Pressure
417 real(rp), intent(in) :: pt_ (elem%np,lmesh%nea) !< Potential temperature
418 type(sparsemat), intent(in) :: dx, dy, dz !< Differential matrix managed by sparse matrix type
419 type(sparsemat), intent(in) :: sx, sy, sz !< Stiffness matrix managed by sparse matrix type
420 type(sparsemat), intent(in) :: lift !< Lifting matrix managed by sparse matrix type
421 logical, intent(in) :: is_bound(elem%nfptot,lmesh%ne) !< Flag whether nodes are located at domain boundaries
422
423 integer :: ke
424
425 real(rp) :: fx(elem%np), fy(elem%np), fz(elem%np), liftdelflx(elem%np)
426 real(rp) :: dens(elem%np)
427 real(rp) :: bnd_flux_mom(elem%nfptot,lmesh%ne,3)
428 real(rp) :: bnd_flux_rhot(elem%nfptot,lmesh%ne)
429 !--------------------------------------------------------------------
430
431 call cal_bnd_flux( bnd_flux_mom, bnd_flux_rhot, & ! (out)
432 t11, t12, t13, t21, t22, t23, t31, t32, t33, & ! (in)
433 df1, df2, df3, & ! (in)
434 nu, kh, & ! (in)
435 ddens_, momx_, momy_, momz_, drhot_, dens_hyd, pres_hyd, & ! (in)
436 lmesh%normal_fn(:,:,1), lmesh%normal_fn(:,:,2), lmesh%normal_fn(:,:,3), & ! (in)
437 lmesh%vmapM, lmesh%vmapP, lmesh, elem, is_bound ) ! (in)
438
439 !$omp parallel do private( &
440 !$omp Fx, Fy, Fz, LiftDelFlx, &
441 !$omp DENS )
442 do ke=lmesh%NeS, lmesh%NeE
443 dens(:) = dens_hyd(:,ke) + ddens_(:,ke)
444
445 ! MOMX
446 call sparsemat_matmul( dx, t11(:,ke), fx )
447 call sparsemat_matmul( dy, t12(:,ke), fy )
448 call sparsemat_matmul( dz, t13(:,ke), fz )
449 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux_mom(:,ke,1), liftdelflx )
450
451 momx_t(:,ke) = lmesh%Escale(:,ke,1,1) * fx(:) + lmesh%Escale(:,ke,2,2) * fy(:) &
452 + lmesh%Escale(:,ke,3,3) * fz(:) + liftdelflx(:)
453
454 ! MOMY
455 call sparsemat_matmul( dx, t21(:,ke), fx )
456 call sparsemat_matmul( dy, t22(:,ke), fy )
457 call sparsemat_matmul( dz, t23(:,ke), fz )
458 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux_mom(:,ke,2), liftdelflx )
459
460 momy_t(:,ke) = lmesh%Escale(:,ke,1,1) * fx(:) + lmesh%Escale(:,ke,2,2) * fy(:) &
461 + lmesh%Escale(:,ke,3,3) * fz(:) + liftdelflx(:)
462
463 ! MOMZ
464 call sparsemat_matmul( dx, t31(:,ke), fx )
465 call sparsemat_matmul( dy, t32(:,ke), fy )
466 call sparsemat_matmul( dz, t33(:,ke), fz )
467 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux_mom(:,ke,3), liftdelflx )
468
469 momz_t(:,ke) = lmesh%Escale(:,ke,1,1) * fx(:) + lmesh%Escale(:,ke,2,2) * fy(:) &
470 + lmesh%Escale(:,ke,3,3) * fz(:) + liftdelflx(:)
471
472 ! RHOT
473 call sparsemat_matmul( dx, dens(:) * df1(:,ke), fx )
474 call sparsemat_matmul( dy, dens(:) * df2(:,ke), fy )
475 call sparsemat_matmul( dz, dens(:) * df3(:,ke), fz )
476 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * bnd_flux_rhot(:,ke), liftdelflx )
477
478 rhot_t(:,ke) = ( lmesh%Escale(:,ke,1,1) * fx(:) &
479 + lmesh%Escale(:,ke,2,2) * fy(:) &
480 + lmesh%Escale(:,ke,3,3) * fz(:) &
481 + liftdelflx(:) ) / lmesh%Gsqrt(:,ke)
482
483 end do
484
485 return
486 end subroutine atm_phy_tb_dgm_common_cal_tend
487
488!> Calculate tendecies of tracer density with turbulent model
489!!
490!OCL SERIAL
492 RHOQ_t, & ! (out)
493 dfq1, dfq2, dfq3, & ! (in)
494 kh, ddens_,dens_hyd, & ! (in)
495 dx, dy, dz, sx, sy, sz, lift, lmesh, elem, lmesh2d, elem2d, & ! (in)
496 is_bound ) ! (in)
497
498 implicit none
499
500 class(localmesh3d), intent(in) :: lmesh
501 class(elementbase3d), intent(in) :: elem
502 class(localmesh2d), intent(in) :: lmesh2d
503 class(elementbase2d), intent(in) :: elem2d
504 real(rp), intent(out) :: rhoq_t(elem%np,lmesh%nea) !< Tendency of tracer mass fraction
505 real(rp), intent(in) :: dfq1(elem%np,lmesh%nea) !< Diffusive mass flux in x1 direction / density (Kh dq/dx1)
506 real(rp), intent(in) :: dfq2(elem%np,lmesh%nea) !< Diffusive mass flux in x2 direction / density (Kh dq/dx2)
507 real(rp), intent(in) :: dfq3(elem%np,lmesh%nea) !< Diffusive mass flux in x3 direction / density (Kh dq/dx3)
508 real(rp), intent(in) :: kh (elem%np,lmesh%nea) !< Eddy diffusivity
509 real(rp), intent(in) :: ddens_(elem%np,lmesh%nea) !< Density perturbation
510 real(rp), intent(in) :: dens_hyd(elem%np,lmesh%nea) !< Reference pressure in hydrostatic state
511 type(sparsemat), intent(in) :: dx, dy, dz !< Differential matrix managed by sparse matrix type
512 type(sparsemat), intent(in) :: sx, sy, sz !< Stiffness matrix managed by sparse matrix type
513 type(sparsemat), intent(in) :: lift !< Lifting matrix managed by sparse matrix type
514 logical, intent(in) :: is_bound(elem%nfptot,lmesh%ne) !< Flag whether nodes are located at domain boundaries
515
516 integer :: ke
517
518 real(rp) :: fx(elem%np), fy(elem%np), fz(elem%np), liftdelflx(elem%np)
519 real(rp) :: dens(elem%np), rhot(elem%np)
520 real(rp) :: del_flux(elem%nfptot,lmesh%ne)
521 !--------------------------------------------------------------------
522
523 call cal_bnd_flux_qtrc( del_flux, & ! (out)
524 dfq1, dfq2, dfq3, & ! (in)
525 kh, ddens_, dens_hyd, & ! (in)
526 lmesh%normal_fn(:,:,1), lmesh%normal_fn(:,:,2), lmesh%normal_fn(:,:,3), & ! (in)
527 lmesh%vmapM, lmesh%vmapP, & ! (in)
528 lmesh, elem, is_bound ) ! (in)
529
530 !$omp parallel do private( &
531 !$omp Fx, Fy, Fz, LiftDelFlx, &
532 !$omp DENS )
533 do ke=lmesh%NeS, lmesh%NeE
534 dens(:) = dens_hyd(:,ke) + ddens_(:,ke)
535
536 ! RHOQ
537 call sparsemat_matmul( dx, dens(:) * dfq1(:,ke), fx )
538 call sparsemat_matmul( dy, dens(:) * dfq2(:,ke), fy )
539 call sparsemat_matmul( dz, dens(:) * dfq3(:,ke), fz )
540 call sparsemat_matmul( lift, lmesh%Fscale(:,ke) * del_flux(:,ke), liftdelflx )
541
542 rhoq_t(:,ke) = lmesh%Escale(:,ke,1,1) * fx(:) + lmesh%Escale(:,ke,2,2) * fy(:) &
543 + lmesh%Escale(:,ke,3,3) * fz(:) + liftdelflx(:)
544 end do
545
546 return
548
549!-- private ---------------------------------------------
550
551
552!OCL SERIAL
553 subroutine cal_bnd_flux_grad_qtrc( bnd_flux, bnd_flux_rho, & ! (out)
554 qtrc_, ddens_, dens_hyd_, & ! (in)
555 nx, ny, nz, vmapm, vmapp, lmesh, elem, is_bound, & ! (in)
556 cal_grad_dens ) ! (in)
557
558 implicit none
559
560 class(localmesh3d), intent(in) :: lmesh
561 class(elementbase3d), intent(in) :: elem
562 real(rp), intent(out) :: bnd_flux(elem%nfptot*lmesh%ne,3)
563 real(rp), intent(out) :: bnd_flux_rho(elem%nfptot*lmesh%ne,3)
564 real(rp), intent(in) :: qtrc_(elem%np*lmesh%nea)
565 real(rp), intent(in) :: ddens_(elem%np*lmesh%nea)
566 real(rp), intent(in) :: dens_hyd_(elem%np*lmesh%nea)
567 real(rp), intent(in) :: nx(elem%nfptot*lmesh%ne)
568 real(rp), intent(in) :: ny(elem%nfptot*lmesh%ne)
569 real(rp), intent(in) :: nz(elem%nfptot*lmesh%ne)
570 integer, intent(in) :: vmapm(elem%nfptot*lmesh%ne)
571 integer, intent(in) :: vmapp(elem%nfptot*lmesh%ne)
572 logical, intent(in) :: is_bound(elem%nfptot*lmesh%ne)
573 logical, intent(in) :: cal_grad_dens
574
575 integer :: i, ip, im
576 real(rp) :: del
577 real(rp) :: facx, facy, facz
578 real(rp) :: densm, densp
579
580 !------------------------------------------------------------------------
581
582 !$omp parallel do private ( iM, iP, &
583 !$omp del, facx, facy, facz, densM, densP )
584 do i=1, elem%NfpTot * lmesh%Ne
585 im = vmapm(i); ip = vmapp(i)
586
587
588 if ( is_bound(i) ) then
589 facx = 1.0_rp
590 facy = 1.0_rp
591 facz = 1.0_rp
592 else
593 ! facx = 1.0_RP - sign(1.0_RP,nx(i))
594 ! facy = 1.0_RP - sign(1.0_RP,ny(i))
595 ! facz = 1.0_RP - sign(1.0_RP,nz(i))
596 facx = 1.0_rp
597 facy = 1.0_rp
598 facz = 1.0_rp
599 end if
600
601 densm = ddens_(im) + dens_hyd_(im)
602 densp = ddens_(ip) + dens_hyd_(ip)
603
604 if ( cal_grad_dens ) then
605 del = 0.5_rp * ( densp - densm )
606 ! del = 0.5_RP * ( sqrt_DENS_Kh_P - sqrt_DENS_Kh_M )
607 bnd_flux_rho(i,1) = facx * del * nx(i)
608 bnd_flux_rho(i,2) = facy * del * ny(i)
609 bnd_flux_rho(i,3) = facz * del * nz(i)
610 end if
611
612 del = 0.5_rp * ( densp * qtrc_(ip) - densm * qtrc_(im) )
613 bnd_flux(i,1) = facx * del * nx(i)
614 bnd_flux(i,2) = facy * del * ny(i)
615 bnd_flux(i,3) = facz * del * nz(i)
616 end do
617
618 return
619 end subroutine cal_bnd_flux_grad_qtrc
620
621!OCL SERIAL
622 subroutine cal_bnd_flux( bnd_flux_mom, bnd_flux_rhot, & ! (out)
623 t11, t12, t13, t21, t22, t23, t31, t32, t33, & ! (in)
624 df1, df2, df3, & ! (in)
625 nu, kh, & ! (in)
626 ddens_, momx_, momy_, momz_, drhot_, dens_hyd, pres_hyd, & ! (in)
627 nx, ny, nz, vmapm, vmapp, lmesh, elem, is_bound ) ! (in)
628
629 implicit none
630
631 class(localmesh3d), intent(in) :: lmesh
632 class(elementbase3d), intent(in) :: elem
633 real(rp), intent(out) :: bnd_flux_mom (elem%nfptot*lmesh%ne,3)
634 real(rp), intent(out) :: bnd_flux_rhot(elem%nfptot*lmesh%ne)
635 real(rp), intent(in) :: t11(elem%np*lmesh%nea), t12(elem%np*lmesh%nea), t13(elem%np*lmesh%nea)
636 real(rp), intent(in) :: t21(elem%np*lmesh%nea), t22(elem%np*lmesh%nea), t23(elem%np*lmesh%nea)
637 real(rp), intent(in) :: t31(elem%np*lmesh%nea), t32(elem%np*lmesh%nea), t33(elem%np*lmesh%nea)
638 real(rp), intent(in) :: df1(elem%np*lmesh%nea)
639 real(rp), intent(in) :: df2(elem%np*lmesh%nea)
640 real(rp), intent(in) :: df3(elem%np*lmesh%nea)
641 real(rp), intent(in) :: nu (elem%np*lmesh%nea) ! Eddy viscosity
642 real(rp), intent(in) :: kh (elem%np*lmesh%nea) ! Eddy diffusivity
643 real(rp), intent(in) :: ddens_(elem%np*lmesh%nea)
644 real(rp), intent(in) :: momx_(elem%np*lmesh%nea)
645 real(rp), intent(in) :: momy_(elem%np*lmesh%nea)
646 real(rp), intent(in) :: momz_(elem%np*lmesh%nea)
647 real(rp), intent(in) :: drhot_(elem%np*lmesh%nea)
648 real(rp), intent(in) :: dens_hyd(elem%np*lmesh%nea)
649 real(rp), intent(in) :: pres_hyd(elem%np*lmesh%nea)
650 real(rp), intent(in) :: nx(elem%nfptot*lmesh%ne)
651 real(rp), intent(in) :: ny(elem%nfptot*lmesh%ne)
652 real(rp), intent(in) :: nz(elem%nfptot*lmesh%ne)
653 integer, intent(in) :: vmapm(elem%nfptot*lmesh%ne)
654 integer, intent(in) :: vmapp(elem%nfptot*lmesh%ne)
655 logical, intent(in) :: is_bound(elem%nfptot*lmesh%ne)
656
657 integer :: i, ip, im
658 real(rp) :: densm, densp
659 real(rp) :: taum_x, taup_x
660 real(rp) :: taum_y, taup_y
661 real(rp) :: taum_z, taup_z
662 real(rp) :: nx_, ny_, nz_
663 !------------------------------------------------------------------------
664
665 !$omp parallel do private( iM, iP, &
666 !$omp densM, densP, TauM_x, TauP_x, TauM_y, TauP_y, TauM_z, TauP_z, nx_, ny_, nz_ )
667 do i=1, elem%NfpTot * lmesh%Ne
668 im = vmapm(i); ip = vmapp(i)
669
670 densm = ddens_(im) + dens_hyd(im)
671 densp = ddens_(ip) + dens_hyd(ip)
672
673 if ( ip > elem%Np * lmesh%Ne .and. abs(nz(i)) > eps ) then ! Tentative implementation for the treatmnet of lower/upper boundary.
674 nx_ = nx(i)
675 ny_ = ny(i)
676 nz_ = nz(i)
677 else
678 ! nx_ = ( 1.0_RP + sign(1.0_RP,nx(i)) ) * nx(i)
679 ! ny_ = ( 1.0_RP + sign(1.0_RP,ny(i)) ) * ny(i)
680 ! nz_ = ( 1.0_RP + sign(1.0_RP,nz(i)) ) * nz(i)
681 nx_ = nx(i)
682 ny_ = ny(i)
683 nz_ = nz(i)
684 end if
685
686 taum_x = t11(im) * nx_ + t12(im) * ny_ + t13(im) * nz_
687 taup_x = t11(ip) * nx_ + t12(ip) * ny_ + t13(ip) * nz_
688
689 taum_y = t21(im) * nx_ + t22(im) * ny_ + t23(im) * nz_
690 taup_y = t21(ip) * nx_ + t22(ip) * ny_ + t23(ip) * nz_
691
692 taum_z = t31(im) * nx_ + t32(im) * ny_ + t33(im) * nz_
693 taup_z = t31(ip) * nx_ + t32(ip) * ny_ + t33(ip) * nz_
694
695 bnd_flux_mom(i,1) = 0.5_rp * ( taup_x - taum_x )
696 bnd_flux_mom(i,2) = 0.5_rp * ( taup_y - taum_y )
697 bnd_flux_mom(i,3) = 0.5_rp * ( taup_z - taum_z )
698 bnd_flux_rhot(i) = 0.5_rp * ( densp * ( df1(ip) * nx_ + df2(ip) * ny_ + df3(ip) * nz_ ) &
699 - densm * ( df1(im) * nx_ + df2(im) * ny_ + df3(im) * nz_ ) )
700 end do
701
702 return
703 end subroutine cal_bnd_flux
704
705!OCL SERIAL
706 subroutine cal_bnd_flux_qtrc( bnd_flux, & ! (out)
707 dfq1, dfq2, dfq3, & ! (in)
708 kh, ddens_, dens_hyd, & ! (in)
709 nx, ny, nz, vmapm, vmapp, lmesh, elem, is_bound ) ! (in)
710
711 implicit none
712
713 class(localmesh3d), intent(in) :: lmesh
714 class(elementbase3d), intent(in) :: elem
715 real(rp), intent(out) :: bnd_flux(elem%nfptot*lmesh%ne)
716 real(rp), intent(in) :: dfq1(elem%np*lmesh%nea)
717 real(rp), intent(in) :: dfq2(elem%np*lmesh%nea)
718 real(rp), intent(in) :: dfq3(elem%np*lmesh%nea)
719 real(rp), intent(in) :: kh (elem%np*lmesh%nea) ! Eddy diffusivity
720 real(rp), intent(in) :: ddens_(elem%np*lmesh%nea)
721 real(rp), intent(in) :: dens_hyd(elem%np*lmesh%nea)
722 real(rp), intent(in) :: nx(elem%nfptot*lmesh%ne)
723 real(rp), intent(in) :: ny(elem%nfptot*lmesh%ne)
724 real(rp), intent(in) :: nz(elem%nfptot*lmesh%ne)
725 integer, intent(in) :: vmapm(elem%nfptot*lmesh%ne)
726 integer, intent(in) :: vmapp(elem%nfptot*lmesh%ne)
727 logical, intent(in) :: is_bound(elem%nfptot*lmesh%ne)
728
729 integer :: i, ip, im
730 real(rp) :: densm, densp
731 real(rp) :: nx_, ny_, nz_
732 !------------------------------------------------------------------------
733
734 !$omp parallel do private( iM, iP, &
735 !$omp densM, densP, nx_, ny_, nz_ )
736 do i=1, elem%NfpTot * lmesh%Ne
737 im = vmapm(i); ip = vmapp(i)
738
739 densm = ddens_(im) + dens_hyd(im)
740 densp = ddens_(ip) + dens_hyd(ip)
741
742 if ( ip > elem%Np * lmesh%Ne .and. abs(nz(i)) > eps ) then ! Tentative implementation for the treatmnet of lower/upper boundary.
743 nx_ = nx(i)
744 ny_ = ny(i)
745 nz_ = nz(i)
746 else
747 ! nx_ = ( 1.0_RP + sign(1.0_RP,nx(i)) ) * nx(i)
748 ! ny_ = ( 1.0_RP + sign(1.0_RP,ny(i)) ) * ny(i)
749 ! nz_ = ( 1.0_RP + sign(1.0_RP,nz(i)) ) * nz(i)
750 nx_ = nx(i)
751 ny_ = ny(i)
752 nz_ = nz(i)
753 end if
754
755 if ( is_bound(i) ) then
756 bnd_flux(i) = - densm * ( dfq1(im) * nx_ + dfq2(im) * ny_ + dfq3(im) * nz_ )
757 else
758 bnd_flux(i) = 0.5_rp * ( densp * ( dfq1(ip) * nx_ + dfq2(ip) * ny_ + dfq3(ip) * nz_ ) &
759 - densm * ( dfq1(im) * nx_ + dfq2(im) * ny_ + dfq3(im) * nz_ ) )
760 end if
761 end do
762
763 return
764 end subroutine cal_bnd_flux_qtrc
765
766!OCL SERIAL
767 elemental function fact(dz, dx, dy)
768 implicit none
769 real(rp), intent(in) :: dz
770 real(rp), intent(in) :: dx
771 real(rp), intent(in) :: dy
772 real(rp) :: fact ! (out)
773
774 real(rp), parameter :: oot = -1.0_rp/3.0_rp
775 real(rp), parameter :: fot = 5.0_rp/3.0_rp
776 real(rp), parameter :: eot = 11.0_rp/3.0_rp
777 real(rp), parameter :: tof = -3.0_rp/4.0_rp
778 real(rp) :: a1, a2, b1, b2, dmax
779 !--------------------------------------------------------------------
780
781 dmax = max(dz, dx, dy)
782 if ( dz == dmax ) then
783 a1 = dx / dmax
784 a2 = dy / dmax
785 else if ( dx == dmax ) then
786 a1 = dz / dmax
787 a2 = dy / dmax
788 else ! dy == dmax
789 a1 = dz / dmax
790 a2 = dx / dmax
791 end if
792 b1 = atan( a1/a2 )
793 b2 = atan( a2/a1 )
794
795 fact = 1.736_rp * (a1*a2)**oot &
796 * ( 4.0_rp*p1(b1)*a1**oot + 0.222_rp*p2(b1)*a1**fot + 0.077*p3(b1)*a1**eot - 3.0_rp*b1 &
797 + 4.0_rp*p1(b2)*a2**oot + 0.222_rp*p2(b2)*a2**fot + 0.077*p3(b2)*a2**eot - 3.0_rp*b2 &
798 )**tof
799 return
800 end function fact
801!OCL SERIAL
802 elemental function p1(z)
803 implicit none
804 real(rp), intent(in) :: z
805 real(rp) :: p1 ! (out)
806
807 real(rp), parameter :: twooverthree = 2.0_rp / 3.0_rp
808 !--------------------------------------------------------------------
809
810 p1 = 2.5_rp * p2(z) - 1.5_rp * sin(z) * cos(z)**twooverthree
811 return
812 end function p1
813!OCL SERIAL
814 elemental function p2(z)
815 implicit none
816 real(rp), intent(in) :: z
817 real(rp) :: p2 ! (out)
818 !--------------------------------------------------------------------
819
820 p2 = 0.986_rp * z + 0.073_rp * z**2 - 0.418_rp * z**3 + 0.120_rp * z**4
821 return
822 end function p2
823!OCL SERIAL
824 elemental function p3(z)
825 implicit none
826 real(rp), intent(in) :: z
827 real(rp) :: p3 ! (out)
828 !--------------------------------------------------------------------
829
830 p3 = 0.976_rp * z + 0.188_rp * z**2 - 1.169_rp * z**3 + 0.755_rp * z**4 - 0.151_rp * z**5
831 return
832 end function p3
833
module FElib / Fluid dyn solver / Atmosphere / Physics turbulence / Common
integer, parameter, public atmos_phy_tb_aux_t21_id
integer, parameter, public atmos_phy_tb_aux_scalar_num
integer, parameter, public atmos_phy_tb_aux_diffflx3_id
subroutine, public atm_phy_tb_dgm_common_cal_tend(momx_t, momy_t, momz_t, rhot_t, t11, t12, t13, t21, t22, t23, t31, t32, t33, df1, df2, df3, nu, kh, ddens_, momx_, momy_, momz_, drhot_, dens_hyd, pres_hyd, pres_, pt_, dx, dy, dz, sx, sy, sz, lift, lmesh, elem, lmesh2d, elem2d, is_bound)
Calculate tendecies with turbulent model.
integer, parameter, public atmos_phy_tb_aux_hvec_num
integer, parameter, public atmos_phy_tb_diag_num
subroutine, public atm_phy_tb_dgm_common_setup_variables(tends, auxvars, diagvars, tends_manager, auxvar_manager, diagvar_manager, tends_num_tot, mesh3d)
subroutine, public atm_phy_tb_dgm_common_calc_lambda(lambda, cs, filter_fac, lmesh, elem, lmesh2d, elem2d)
integer, parameter, public atmos_phy_tb_aux_t33_id
integer, parameter, public atmos_phy_tb_tends_num1
integer, parameter, public atmos_phy_tb_diag_kh_id
integer, parameter, public atmos_phy_tb_momy_t_id
subroutine, public atm_phy_tb_dgm_common_cal_grad_qtrc(dfq1, dfq2, dfq3, drdx, drdy, drdz, kh, qtrc, ddens, dens_hyd, dx, dy, dz, sx, sy, sz, lift, lmesh, elem, lmesh2d, elem2d, is_bound, cal_grad_dens)
Calculate parameterized diffusive mass flux of tracer with turbulent model.
integer, parameter, public atmos_phy_tb_aux_t12_id
integer, parameter, public atmos_phy_tb_aux_htensor_num
subroutine, public atm_phy_tb_dgm_common_cal_tend_qtrc(rhoq_t, dfq1, dfq2, dfq3, kh, ddens_, dens_hyd, dx, dy, dz, sx, sy, sz, lift, lmesh, elem, lmesh2d, elem2d, is_bound)
Calculate tendecies of tracer density with turbulent model.
integer, parameter, public atmos_phy_tb_diag_nu_id
integer, parameter, public atmos_phy_tb_aux_num
integer, parameter, public atmos_phy_tb_momz_t_id
integer, parameter, public atmos_phy_tb_aux_t23_id
integer, parameter, public atmos_phy_tb_diag_tke_id
integer, parameter, public atmos_phy_tb_aux_t31_id
integer, parameter, public atmos_phy_tb_aux_t11_id
integer, parameter, public atmos_phy_tb_aux_t22_id
integer, parameter, public atmos_phy_tb_aux_t13_id
integer, parameter, public atmos_phy_tb_rhot_t_id
integer, parameter, public atmos_phy_tb_momx_t_id
integer, parameter, public atmos_phy_tb_aux_t32_id
integer, parameter, public atmos_phy_tb_aux_diffflx1_id
integer, parameter, public atmos_phy_tb_aux_diffflx2_id
module FElib / Element / Base
module FElib / Mesh / Local 2D
module FElib / Mesh / Local 3D
module FElib / Mesh / Base 3D
module FElib / Data / base
FElib / model framework / variable manager.
Module common / sparsemat.
Derived type representing a 2D reference element.
Derived type representing a 3D reference element.
Derived type representing a local mesh for 2D domain.
Derived type to manage a local 3D computational domain.
Derived type to manage a computational mesh (base type for 3D domain)
Derived type representing a field with 3D mesh.
Derived type to manage a sparse matrix.