11#include "scaleFElib.h"
20 use scale_tracer,
only: qa
69 integer :: auxvars_commid
74 integer :: tends_num_tot
77 procedure :: final => atmosphytbvars_final
78 procedure :: history => atmosphytbvars_history
93 use scale_tracer,
only: &
94 tracer_name, tracer_desc, tracer_unit
100 class(modelmeshbase),
target,
intent(in) :: model_mesh
104 logical :: reg_file_hist
111 log_info(
'AtmosPhyTbVars_Init',*)
118 select type(model_mesh)
120 atm_mesh => model_mesh
122 mesh3d => atm_mesh%ptr_mesh
124 call mesh3d%GetMesh2D( mesh2d )
131 call this%tends_manager%Init()
132 call this%auxvars_manager%Init()
133 call this%diagvars_manager%Init()
136 allocate( this%tends(this%TENDS_NUM_TOT) )
140 this%tends, this%auxvars, this%diagvars, &
141 this%tends_manager, this%auxvars_manager, this%diagvars_manager, &
142 this%TENDS_NUM_TOT, mesh3d )
146 call atm_mesh%Create_communicator( &
149 this%auxvars_manager, &
151 this%auxvars_commid )
157 subroutine atmosphytbvars_final( this )
162 log_info(
'AtmosPhyTbVars_Final',*)
164 call this%tends_manager%Final()
165 deallocate( this%tends )
167 call this%auxvars_manager%Final()
168 deallocate( this%auxvars )
170 call this%diagvars_manager%Final()
171 deallocate( this%diagvars )
174 end subroutine atmosphytbvars_final
178 tb_MOMX_t, tb_MOMY_t, tb_MOMZ_t, tb_RHOT_t, tb_RHOQ_t, &
186 integer,
intent(in) :: domid
194 class(
localmesh3d),
pointer,
intent(out),
optional :: lcmesh3d
203 call tb_tends_list%Get(tb_momx_t_vid, field)
204 call field%GetLocalMeshField(domid, tb_momx_t)
206 call tb_tends_list%Get(tb_momy_t_vid, field)
207 call field%GetLocalMeshField(domid, tb_momy_t)
209 call tb_tends_list%Get(tb_momz_t_vid, field)
210 call field%GetLocalMeshField(domid, tb_momz_t)
212 call tb_tends_list%Get(tb_rhot_t_vid, field)
213 call field%GetLocalMeshField(domid, tb_rhot_t)
216 if (
present(tb_rhoq_t) )
then
217 do iq = 1,
size(tb_rhoq_t)
218 call tb_tends_list%Get(atmos_phy_tb_tends_num1 + iq, field)
219 call field%GetLocalMeshField(domid, tb_rhoq_t(iq)%ptr)
223 if (
present(lcmesh3d))
then
224 call mesh%GetLocalMesh( domid, lcmesh )
229 if (
present(lcmesh3d)) lcmesh3d => lcmesh
237 subroutine atmosphytbvars_history( this )
244 type(meshfield3d) :: tmp_field
248 mesh3d => this%auxvars(1)%mesh
250 do v = 1, this%TENDS_NUM_TOT
251 hst_id = this%tends(v)%hist_id
255 do v = 1, atmos_phy_tb_aux_num
256 hst_id = this%auxvars(v)%hist_id
260 do v = 1, atmos_phy_tb_diag_num
261 hst_id = this%diagvars(v)%hist_id
266 end subroutine atmosphytbvars_history
module ATMOSPHERE physics / sub-grid scale turbulence
subroutine atmosphytbvars_init(this, model_mesh)
subroutine, public atmosphytbvars_getlocalmeshfields_tend(domid, mesh, tb_tends_list, tb_momx_t, tb_momy_t, tb_momz_t, tb_rhot_t, tb_rhoq_t, lcmesh3d)
module FElib / Fluid dyn solver / Atmosphere / Physics turbulence / Common
integer, parameter, public atmos_phy_tb_aux_scalar_num
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)
integer, parameter, public atmos_phy_tb_tends_num1
integer, parameter, public atmos_phy_tb_momy_t_id
integer, parameter, public atmos_phy_tb_aux_htensor_num
integer, parameter, public atmos_phy_tb_aux_num
integer, parameter, public atmos_phy_tb_momz_t_id
integer, parameter, public atmos_phy_tb_rhot_t_id
integer, parameter, public atmos_phy_tb_momx_t_id
module FElib / Element / Base
module FElib / File / History
module FElib / File / Restart
module FElib / Mesh / Local 3D
module FElib / Mesh / Local, Base
module FElib / Data / base
module FElib / Mesh / Base 2D
module FElib / Mesh / Base 3D
integer, public meshbase3d_dimtypeid_xyz
module FElib / Mesh / Base
module FElib / Data / base
module FElib / Data / Communication base
FElib / model framework / mesh manager.
FElib / model framework / variable manager.