11#include "scaleFElib.h"
66 integer :: tends_num_tot
67 integer,
allocatable :: vterm_hist_id(:)
70 procedure :: init => atmosphympvars_init
71 procedure :: final => atmosphympvars_final
72 procedure :: setup => atmosphympvars_setup
73 procedure :: history => atmosphympvars_history
96 'kg/m3/s', 3,
'XYZ',
'' ), &
98 'kg/m2/s2', 3,
'XYZ',
'' ), &
100 'kg/m2/s2', 3,
'XYZ',
'' ), &
102 'kg/m2/s2', 3,
'XYZ',
'' ), &
104 'kg/m3.K/s', 3,
'XYZ',
'' ), &
106 'J/kg/s', 3,
'XYZ',
'' ), &
108 'm-3' , 3,
'XYZ',
'' ) /
119 'kg/m2/s', 2,
'XY',
'' ), &
121 'kg/m2/s', 2,
'XY',
'' ), &
123 'J/m2/s', 2,
'XY',
'' ) /
136 subroutine atmosphympvars_init( this, model_mesh, &
137 QS_MP, QE_MP, QA_MP )
140 class(modelmeshbase),
target,
intent(in) :: model_mesh
141 integer,
intent(in) :: qs_mp
142 integer,
intent(in) :: qe_mp
143 integer,
intent(in) :: qa_mp
146 log_info(
'AtmosPhyMpVars_Init',*)
153 end subroutine atmosphympvars_init
156 subroutine atmosphympvars_setup( this, model_mesh )
157 use scale_tracer,
only: &
158 tracer_name, tracer_desc, tracer_unit
159 use scale_file_history,
only: &
163 class(modelmeshbase),
target,
intent(in) :: model_mesh
168 logical :: reg_file_hist
174 type(variableinfo) :: qtrc_tp_vinfo_tmp
175 type(variableinfo) :: qtrc_vterm_vinfo_tmp
181 select type(model_mesh)
183 atm_mesh => model_mesh
185 mesh3d => atm_mesh%ptr_mesh
187 call mesh3d%GetMesh2D( mesh2d )
191 call this%tends_manager%Init()
192 allocate( this%tends(this%TENDS_NUM_TOT) )
194 reg_file_hist = .true.
196 call this%tends_manager%Regist( &
198 this%tends(iv), reg_file_hist )
200 do n = 1, mesh3d%LOCAL_MESH_NUM
201 this%tends(iv)%local(n)%val(:,:) = 0.0_rp
205 qtrc_tp_vinfo_tmp%ndims = 3
206 qtrc_tp_vinfo_tmp%dim_type =
'XYZ'
207 qtrc_tp_vinfo_tmp%STDNAME =
''
211 qtrc_tp_vinfo_tmp%keyID = iv
212 qtrc_tp_vinfo_tmp%NAME =
'MP_'//trim(tracer_name(this%QS+iq-1))//
'_t'
213 qtrc_tp_vinfo_tmp%DESC =
'tendency of rho*'//trim(tracer_name(this%QS+iq-1))//
' in MP process'
214 qtrc_tp_vinfo_tmp%UNIT =
'kg/m3/s'
216 reg_file_hist = .true.
217 call this%tends_manager%Regist( &
218 qtrc_tp_vinfo_tmp, mesh3d, &
219 this%tends(iv), reg_file_hist )
221 do n = 1, mesh3d%LOCAL_MESH_NUM
222 this%tends(iv)%local(n)%val(:,:) = 0.0_rp
228 allocate( this%vterm_hist_id(this%QS+1:this%QE) )
229 allocate( this%vterm_hist (this%QS+1:this%QE) )
231 qtrc_vterm_vinfo_tmp%ndims = 3
232 qtrc_vterm_vinfo_tmp%dim_type =
'XYZ'
233 qtrc_vterm_vinfo_tmp%STDNAME =
''
235 do iq = this%QS+1, this%QE
236 qtrc_vterm_vinfo_tmp%NAME =
'Vterm_'//trim(tracer_name(this%QS+iq-1))
237 qtrc_vterm_vinfo_tmp%DESC =
'terminal velocity of '//trim(tracer_name(this%QS+iq-1))
238 qtrc_vterm_vinfo_tmp%UNIT =
'm/s'
239 call file_history_reg( qtrc_vterm_vinfo_tmp%NAME, qtrc_vterm_vinfo_tmp%DESC, qtrc_vterm_vinfo_tmp%UNIT, &
240 this%vterm_hist_id(iq), dim_type=
'XYZ' )
241 if ( this%vterm_hist_id(iq) > 0 )
call this%vterm_hist(iq)%Init( qtrc_vterm_vinfo_tmp%NAME, qtrc_vterm_vinfo_tmp%UNIT, mesh3d )
246 call this%auxvars2D_manager%Init()
249 reg_file_hist = .true.
251 call this%auxvars2D_manager%Regist( &
253 this%auxvars2D(iv), reg_file_hist )
255 do n = 1, mesh3d%LOCAL_MESH_NUM
256 this%auxvars2D(iv)%local(n)%val(:,:) = 0.0_rp
261 end subroutine atmosphympvars_setup
265 subroutine atmosphympvars_final( this )
272 log_info(
'AtmosPhyMpVars_Final',*)
274 call this%tends_manager%Final()
275 deallocate( this%tends )
277 call this%auxvars2D_manager%Final()
278 deallocate( this%auxvars2D )
280 do iq = this%QS+1, this%QE
281 if ( this%vterm_hist_id(iq) > 0 )
call this%vterm_hist(iq)%Final()
283 deallocate( this%vterm_hist_id )
286 end subroutine atmosphympvars_final
290 mp_DENS_t, mp_MOMX_t, mp_MOMY_t, mp_MOMZ_t, mp_RHOT_t, mp_RHOH, mp_EVAP, &
299 integer,
intent(in) :: domid
310 class(
localmesh3d),
pointer,
intent(out),
optional :: lcmesh3d
320 call field%GetLocalMeshField(domid, mp_dens_t)
323 call field%GetLocalMeshField(domid, mp_momx_t)
326 call field%GetLocalMeshField(domid, mp_momy_t)
329 call field%GetLocalMeshField(domid, mp_momz_t)
332 call field%GetLocalMeshField(domid, mp_rhot_t)
335 call field%GetLocalMeshField(domid, mp_rhoh)
338 call field%GetLocalMeshField(domid, mp_evap)
341 do iq = 1,
size(mp_rhoq_t)
343 call field%GetLocalMeshField(domid, mp_rhoq_t(iq)%ptr)
347 if (
present(lcmesh3d))
then
348 call mesh%GetLocalMesh( domid, lcmesh )
353 if (
present(lcmesh3d)) lcmesh3d => lcmesh
362 SFLX_rain, SFLX_snow, SFLX_engi )
368 integer,
intent(in) :: domid
379 call field%GetLocalMeshField(domid, sflx_rain)
382 call field%GetLocalMeshField(domid, sflx_snow)
385 call field%GetLocalMeshField(domid, sflx_engi)
391 subroutine atmosphympvars_history( this )
399 type(meshfield3d) :: tmp_field
403 mesh3d => this%tends(1)%mesh
405 do v = 1, this%TENDS_NUM_TOT
406 hst_id = this%tends(v)%hist_id
411 hst_id = this%auxvars2D(v)%hist_id
415 do iq = this%QS+1, this%QE
416 hst_id = this%vterm_hist_id(iq)
421 end subroutine atmosphympvars_history
module Atmosphere / Physics / Cloud Microphysics
integer, parameter, public atmos_phy_mp_tends_num1
integer, parameter, public atmos_phy_mp_momx_t_id
integer, parameter, public atmos_phy_mp_momz_t_id
integer, parameter, public atmos_phy_mp_evaporate_id
subroutine, public atmosphympvars_getlocalmeshfields_tend(domid, mesh, mp_tends_list, mp_dens_t, mp_momx_t, mp_momy_t, mp_momz_t, mp_rhot_t, mp_rhoh, mp_evap, mp_rhoq_t, lcmesh3d)
integer, parameter, public atmos_phy_mp_aux2d_sflx_snow_id
integer, parameter, public atmos_phy_mp_aux2d_sflx_engi_id
subroutine, public atmosphympvars_getlocalmeshfields_sfcflx(domid, mesh, sfcflx_list, sflx_rain, sflx_snow, sflx_engi)
type(variableinfo), dimension(atmos_phy_mp_aux2d_num), public atmos_phy_mp_aux2d_vinfo
integer, parameter, public atmos_phy_mp_aux2d_num
integer, parameter, public atmos_phy_mp_momy_t_id
integer, parameter, public atmos_phy_mp_aux2d_sflx_rain_id
type(variableinfo), dimension(atmos_phy_mp_tends_num1), public atmos_phy_mp_tend_vinfo
integer, parameter, public atmos_phy_mp_dens_t_id
integer, parameter, public atmos_phy_mp_rhot_t_id
integer, parameter, public atmos_phy_mp_rhoh_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 cloud microphysics 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.