11#include "scaleFElib.h"
20 use scale_tracer,
only: qa
71 integer :: auxvars_commid
76 integer :: tends_num_tot
79 procedure :: final => atmosphytbvars_final
80 procedure :: setup => atmosphytbvars_setup
81 procedure :: history => atmosphytbvars_history
100 class(modelmeshbase),
target,
intent(in) :: model_mesh
103 log_info(
'AtmosPhyTbVars_Init',*)
109 subroutine atmosphytbvars_setup( this, model_mesh )
114 class(modelmeshbase),
intent(in),
target :: model_mesh
118 logical :: reg_file_hist
130 select type(model_mesh)
132 atm_mesh => model_mesh
134 mesh3d => atm_mesh%ptr_mesh
136 call mesh3d%GetMesh2D( mesh2d )
143 call this%tends_manager%Init()
144 call this%auxvars_manager%Init()
145 call this%diagvars_manager%Init()
148 allocate( this%tends(this%TENDS_NUM_TOT) )
152 this%tends, this%auxvars, this%diagvars, &
153 this%tends_manager, this%auxvars_manager, this%diagvars_manager, &
154 this%TENDS_NUM_TOT, mesh3d )
158 call atm_mesh%Create_communicator( &
161 this%auxvars_manager, &
163 this%auxvars_commid )
166 end subroutine atmosphytbvars_setup
170 subroutine atmosphytbvars_final( this )
175 log_info(
'AtmosPhyTbVars_Final',*)
177 call this%tends_manager%Final()
178 deallocate( this%tends )
180 call this%auxvars_manager%Final()
181 deallocate( this%auxvars )
183 call this%diagvars_manager%Final()
184 deallocate( this%diagvars )
187 end subroutine atmosphytbvars_final
191 tb_MOMX_t, tb_MOMY_t, tb_MOMZ_t, tb_RHOT_t, tb_RHOQ_t, &
199 integer,
intent(in) :: domid
207 class(
localmesh3d),
pointer,
intent(out),
optional :: lcmesh3d
216 call tb_tends_list%Get(tb_momx_t_vid, field)
217 call field%GetLocalMeshField(domid, tb_momx_t)
219 call tb_tends_list%Get(tb_momy_t_vid, field)
220 call field%GetLocalMeshField(domid, tb_momy_t)
222 call tb_tends_list%Get(tb_momz_t_vid, field)
223 call field%GetLocalMeshField(domid, tb_momz_t)
225 call tb_tends_list%Get(tb_rhot_t_vid, field)
226 call field%GetLocalMeshField(domid, tb_rhot_t)
229 if (
present(tb_rhoq_t) )
then
230 do iq = 1,
size(tb_rhoq_t)
231 call tb_tends_list%Get(atmos_phy_tb_tends_num1 + iq, field)
232 call field%GetLocalMeshField(domid, tb_rhoq_t(iq)%ptr)
236 if (
present(lcmesh3d))
then
237 call mesh%GetLocalMesh( domid, lcmesh )
242 if (
present(lcmesh3d)) lcmesh3d => lcmesh
250 subroutine atmosphytbvars_history( this )
257 type(meshfield3d) :: tmp_field
261 mesh3d => this%auxvars(1)%mesh
263 do v = 1, this%TENDS_NUM_TOT
264 hst_id = this%tends(v)%hist_id
268 do v = 1, atmos_phy_tb_aux_num
269 hst_id = this%auxvars(v)%hist_id
273 do v = 1, atmos_phy_tb_diag_num
274 hst_id = this%diagvars(v)%hist_id
279 end subroutine atmosphytbvars_history
module Atmosphere / Physics / sub-grid scale turbulence
subroutine atmosphytbvars_init(this, model_mesh)
Setup an object to manage variables with atmospheric SGS turbulent component.
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.
Derived type to manage a computational mesh (base class)
Derived type to manage variables with atmospheric SGS turbulent component.
Derived type representing a 3D reference element.
Derived type to manage restart file with each component.
Derived type to manage a local 3D computational domain.
Derived type to manage a local computational domain (base type)
Derived type representing a field with local mesh (base type)
Derived type to manage a computational mesh (base type for 2D domain)
Derived type to manage a computational mesh (base type for 3D domain)
Base type to manage a computational mesh.
Derived type representing a field with 2D mesh.
Derived type representing a field with 3D mesh.
Derived type representing a field (base type)
Container to save a pointer of MeshField(1D, 2D, 3D) object.