11#include "scaleFElib.h"
21 use scale_const,
only: &
22 undef8 => const_undef8
64 integer :: atm_var_container_typeid
70 procedure :: setup => atmosphycp_setup
71 procedure :: calc_tendency => atmosphycp_calc_tendency
72 procedure :: update => atmosphycp_update
73 procedure :: finalize => atmosphycp_finalize
96 subroutine atmosphycp_setup( this, model_mesh, tm_parent_comp )
97 use scale_atmos_hydrometeor,
only: &
107 class(modelmeshbase),
target,
intent(in) :: model_mesh
110 real(dp) :: time_dt = undef8
111 character(len=H_SHORT) :: time_dt_unit =
'SEC'
113 character(len=H_MID) :: cp_type =
'NONE'
114 integer :: atm_var_container_typeid
116 namelist /param_atmos_phy_cp/ &
120 atm_var_container_typeid
123 class(
meshbase),
pointer :: ptr_mesh
130 if (.not. this%IsActivated())
return
133 log_info(
"ATMOS_PHY_CP_setup",*)
'Setup'
139 read(io_fid_conf,nml=param_atmos_phy_cp,iostat=ierr)
141 log_info(
"ATMOS_PHY_CP_setup",*)
'Not found namelist. Default used.'
142 elseif( ierr > 0 )
then
143 log_error(
"ATMOS_PHY_CP_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_CP. Check!'
146 log_nml(param_atmos_phy_cp)
148 this%atm_var_container_typeid = atm_var_container_typeid
152 call model_mesh%GetModelMesh( ptr_mesh )
153 select type(model_mesh)
155 atm_mesh => model_mesh
160 call tm_parent_comp%Regist_process(
'ATMOS_PHY_CP', time_dt, time_dt_unit, &
163 this%dtsec = tm_parent_comp%process_list(this%tm_process_id)%dtsec
167 select case( cp_type )
168 case(
'MOIST_CONV_ADJUSTMENT' )
172 log_error(
"ATMOS_PHY_CP_setup",*)
'Not appropriate cumulus parameterization type. Check!'
177 call this%vars%Init( model_mesh )
180 call this%v_elem1D%Init( atm_mesh%ptr_mesh%refElem3D%PolyOrder_v, .false. )
183 end subroutine atmosphycp_setup
195 subroutine atmosphycp_calc_tendency( &
196 this, model_mesh, prgvars_list, trcvars_list, &
197 auxvars_list, forcing_list, is_update )
198 use scale_tracer,
only: &
215 class(modelmeshbase),
intent(in) :: model_mesh
220 logical,
intent(in) :: is_update
234 class(
localmeshfieldbase),
pointer :: dens_tp, momx_tp, momy_tp, momz_tp, rhot_tp, rhoh_p
239 if (.not. this%IsActivated())
return
241 log_progress(*)
'atmosphere / physics / cumulus parameterization'
243 call model_mesh%GetModelMesh( mesh )
250 if ( is_update )
then
251 call prof_rapstart(
'ATM_CP_tendency', 2)
252 do n=1, mesh3d%LOCAL_MESH_NUM
254 mesh, prgvars_list, auxvars_list, &
255 ddens, momx, momy, momz, drhot, &
256 dens_hyd, pres_hyd, rtot, cvtot, cptot, &
260 mesh, auxvars_list, &
264 mesh, trcvars_list, forcing_list, &
268 mesh, this%vars%tends_manager, &
269 cp_dens_t, cp_rhot_t, cp_rhoqv_t )
271 select case( this%CP_TYPEID )
274 cp_dens_t%val, cp_rhot_t%val, cp_rhoqv_t%val, &
275 this%vars%auxvars2D(sflx_rain_id)%local(n)%val, &
276 this%vars%auxvars2D(sflx_engi_id)%local(n)%val, &
277 ddens%val, drhot%val, qv%val, pt%val, pres%val, &
278 dens_hyd%val, rtot%val, cptot%val, this%dtsec, &
279 lcmesh, lcmesh%refElem3D, this%v_elem1D )
283 call prof_rapend(
'ATM_CP_tendency', 2)
286 call prof_rapstart(
'ATM_PHY_CP_add_tend', 2)
287 do n=1, mesh%LOCAL_MESH_NUM
289 mesh, forcing_list, &
290 dens_tp, momx_tp, momy_tp, momz_tp, rhot_tp, &
294 mesh, trcvars_list, forcing_list, &
298 mesh, this%vars%tends_manager, &
299 cp_dens_t, cp_rhot_t, cp_rhoqv_t, &
304 do ke=lcmesh%NeS, lcmesh%NeE
305 dens_tp%val(:,ke) = dens_tp%val(:,ke) + cp_dens_t%val(:,ke)
306 rhot_tp%val(:,ke) = rhot_tp%val(:,ke) + cp_rhot_t%val(:,ke)
307 rhoq_tp%val(:,ke) = rhoq_tp%val(:,ke) + cp_rhoqv_t%val(:,ke)
311 call prof_rapend(
'ATM_PHY_CP_add_tend', 2)
314 end subroutine atmosphycp_calc_tendency
325 subroutine atmosphycp_update( this, model_mesh, &
326 prgvars_list, trcvars_list, &
327 auxvars_list, forcing_list, is_update )
331 class(modelmeshbase),
intent(in) :: model_mesh
336 logical,
intent(in) :: is_update
339 end subroutine atmosphycp_update
344 subroutine atmosphycp_finalize( this )
351 if (.not. this%IsActivated())
return
353 select case ( this%CP_TYPEID )
358 call this%vars%Final()
359 call this%v_elem1D%Final()
361 end subroutine atmosphycp_finalize
module Atmosphere / Physics / Cumulus Parameterization
integer, parameter, public atmos_phy_cp_aux2d_sflx_engi_id
subroutine, public atmosphycpvars_getlocalmeshfields_tend(domid, mesh, bl_tends_list, cp_dens_t, cp_rhot_t, cp_rhoqv_t, lcmesh3d)
integer, parameter, public atmos_phy_cp_aux2d_sflx_rain_id
module Atmosphere / Physics / Cumulus Parameterization
integer, parameter cp_typeid_mconv_adjustment
Type ID of a moist convective adjustment scheme.
module Atmosphere / Variables
subroutine, public atmosvars_getlocalmeshphytends(domid, mesh, phytends_list, dens_tp, momx_tp, momy_tp, momz_tp, rhot_tp, rhoh_p, rhoq_tp, lcmesh3d)
subroutine, public atmosvars_getlocalmeshqtrc_qv(domid, mesh, trcvars_list, forcing_list, var, var_tp, lcmesh3d)
integer, parameter, public atm_vars_container_primary_id
subroutine, public atmosvars_getlocalmeshphyauxvars(domid, mesh, phyauxvars_list, pres, pt, lcmesh3d)
subroutine, public atmosvars_getlocalmeshprgvars(domid, mesh, prgvars_list, auxvars_list, ddens, momx, momy, momz, therm, dens_hyd, pres_hyd, rtot, cvtot, cptot, lcmesh3d)
subroutine, public atmosvars_getlocalmeshqtrcvarlist(domid, mesh, trcvars_list, varid_s, var_list, lcmesh3d)
module Atmosphere / Variables
module FElib / Atmosphere / Physics cumulus parameterization
subroutine, public atm_phy_cp_dgm_mconv_adjustment_calc_tendency(dens_t, rhot_t, rhoqv_t, sflx_rain, sflx_engi, ddens, drhot, qv, pt, pres, dens_hyd, rtot, cptot, dtsec, lmesh, elem, elem1d)
Calculate tendencies with moist convective adjustment scheme.
subroutine, public atm_phy_cp_dgm_mconv_adjustment_setup()
Setup a module for moist convective adjustment scheme.
subroutine, public atm_phy_cp_dgm_mconv_adjustment_finalize()
Finalize a module for moist convective adjustment scheme.
module FElib / Element / Base
module FElib / Element / line
module FElib / Mesh / Local 2D
module FElib / Mesh / Local 3D
module FElib / Mesh / Local, Base
module FElib / Data / base
module FElib / Mesh / Base 2D
module FElib / Mesh / Base 3D
module FElib / Mesh / Base
module FElib / Data / base
FElib / model framework / physics process.
FElib / model framework / mesh manager.
FElib / model framework / variable manager.
Derived type to manage a computational mesh (base class)
Derived type to manage a component of cumulus parameterization in atmospheric model.
Derived type to manage variables with cumulus parameterization component in atmospheric model.
Derived type to manage a set of variables (prognostic variables, tracer variables,...
Derived type representing a 1D reference element.
Derived type representing a 2D reference element.
Derived type representing a 3D reference element.
Derived type representing an arbitrary finite element.
Derived type representing a line element.
Derived type representing a local mesh for 2D domain.
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 3D mesh.
Derived type representing a field (base type)