FE-Project
Loading...
Searching...
No Matches
mod_atmos_component Module Reference

module Atmosphere component More...

Data Types

type  atmoscomponent
 Derived type to manage atmospheric component. More...

Functions/Subroutines

subroutine atmos_setup (this)
 Setup an object to mange atmospheric component.

Detailed Description

module Atmosphere component

Description
Atmosphere component module
Author
Yuta Kawai, Team SCALE
NAMELIST
  • PARAM_ATMOS
    nametypedefault valuecomment
    ACTIVATE_FLAGlogical.true.Flag whether atmospheric component is activated
    TIME_DTreal(DP)UNDEF8Timestep value of atmospheric component
    TIME_DT_UNITcharacter(len=H_SHORT)'SEC'Timestep unit of atmospheric component
    TIME_DT_RESTARTreal(DP)UNDEF8Timestep value when outputting restart file for atmospheric component
    TIME_DT_RESTART_UNITcharacter(len=H_SHORT)'SEC'Timestep unit when outputting restart file for atmospheric component
    ATMOS_MESH_TYPEcharacter(len=H_SHORT)'REGIONAL' !< Name of mesh type for atmospheric component ('REGIONAL' or 'GLOBAL')
    ATMOS_DYN_DOlogical.true.Flag whether dynamics process is considered
    ATMOS_PHY_SF_DOlogical.false.Flag whether surface process is considered
    ATMOS_PHY_TB_DOlogical.false.Flag whether SGS turbulent process is considered
    ATMOS_PHY_MP_DOlogical.false.Flag whether cloud microphysics process is considered
    ATMOS_USE_QVlogical.false.Flag whether QV is used although cloud microphysics is not considered

History Output
No history output

Function/Subroutine Documentation

◆ atmos_setup()

subroutine mod_atmos_component::atmos_setup ( class(atmoscomponent), intent(inout), target this)

Setup an object to mange atmospheric component.

Definition at line 91 of file mod_atmos_component.F90.

92 use scale_const, only: &
93 undef8 => const_undef8
94
95 use scale_atmos_hydrometeor, only: &
96 atmos_hydrometeor_dry, &
97 atmos_hydrometeor_regist
98 use scale_atmos_thermodyn, only: &
99 atmos_thermodyn_setup
100 use scale_atmos_saturation, only: &
101 atmos_saturation_setup
102
105 use scale_time_manager, only: &
107
108 implicit none
109
110 class(AtmosComponent), intent(inout), target :: this
111
112 logical :: ACTIVATE_FLAG = .true. !< Flag whether atmospheric component is activated
113
114 real(DP) :: TIME_DT = undef8 !< Timestep value of atmospheric component
115 character(len=H_SHORT) :: TIME_DT_UNIT = 'SEC' !< Timestep unit of atmospheric component
116 real(DP) :: TIME_DT_RESTART = undef8 !< Timestep value when outputting restart file for atmospheric component
117 character(len=H_SHORT) :: TIME_DT_RESTART_UNIT = 'SEC' !< Timestep unit when outputting restart file for atmospheric component
118
119 logical :: ATMOS_DYN_DO = .true. !< Flag whether dynamics process is considered
120 logical :: ATMOS_PHY_SF_DO = .false. !< Flag whether surface process is considered
121 logical :: ATMOS_PHY_TB_DO = .false. !< Flag whether SGS turbulent process is considered
122 logical :: ATMOS_PHY_MP_DO = .false. !< Flag whether cloud microphysics process is considered
123 character(len=H_SHORT) :: ATMOS_MESH_TYPE = 'REGIONAL' !< Name of mesh type for atmospheric component ('REGIONAL' or 'GLOBAL')
124
125 logical :: ATMOS_USE_QV = .false. !< Flag whether QV is used although cloud microphysics is not considered
126
127
128 namelist / param_atmos / &
129 activate_flag, &
130 time_dt, &
131 time_dt_unit, &
132 time_dt_restart, &
133 time_dt_restart_unit, &
134 atmos_mesh_type, &
135 atmos_dyn_do, &
136 atmos_phy_sf_do, &
137 atmos_phy_tb_do, &
138 atmos_phy_mp_do, &
139 atmos_use_qv
140
141 integer :: ierr
142 !--------------------------------------------------
143 call prof_rapstart( 'ATM_setup', 1)
144 log_info('AtmosComponent_setup',*) 'Atmosphere model components '
145
146 !--- read namelist
147 rewind(io_fid_conf)
148 read(io_fid_conf,nml=param_atmos,iostat=ierr)
149 if( ierr < 0 ) then !--- missing
150 log_info("ATMOS_setup",*) 'Not found namelist. Default used.'
151 elseif( ierr > 0 ) then !--- fatal error
152 log_error("ATM_setup",*) 'Not appropriate names in namelist PARAM_ATMOS. Check!'
153 call prc_abort
154 endif
155 log_nml(param_atmos)
156
157 !************************************************
158 call this%ModelComponent_Init('ATMOS', activate_flag )
159 if ( .not. activate_flag ) return
160
161 !- Setup time manager
162
163 call this%time_manager%Init( this%GetComponentName(), &
164 time_dt, time_dt_unit, &
165 time_dt_restart, time_dt_restart_unit )
166
167 call time_manager_regist_component( this%time_manager )
168
169 !- Setup mesh & file I/O for atmospheric component
170
171 this%mesh_type = atmos_mesh_type
172 select case( this%mesh_type )
173 case('REGIONAL')
174 call this%mesh_rm%Init()
175 call file_history_meshfield_setup( mesh3d_=this%mesh_rm%mesh )
176 this%mesh => this%mesh_rm
177 case('GLOBAL')
178 call this%mesh_gm%Init()
179 call file_history_meshfield_setup( meshcubedsphere3d_=this%mesh_gm%mesh )
180 this%mesh => this%mesh_gm
181 case default
182 log_error("ATM_setup",*) 'Unsupported type of mesh is specified. Check!', this%mesh_type
183 call prc_abort
184 end select
185
186 !- setup common tools for atmospheric model
187
188 call atmos_thermodyn_setup
189 call atmos_saturation_setup
190
191 !- Setup each processes in atmospheric model ------------------------------------
192
193 !- Setup the module for atmosphere / physics / surface
194 call this%phy_sfc_proc%ModelComponentProc_Init( 'AtmosPhysSfc', atmos_phy_sf_do )
195 call this%phy_sfc_proc%setup( this%mesh, this%time_manager )
196
197 !- Setup the module for atmosphere / physics / cloud microphysics
198 call this%phy_mp_proc%ModelComponentProc_Init( 'AtmosPhysMp', atmos_phy_mp_do )
199 call this%phy_mp_proc%setup( this%mesh, this%time_manager )
200
201 !-- Regist qv if needed
202 if ( atmos_hydrometeor_dry .and. atmos_use_qv ) then
203 log_info("ATMOS_setup",*) "Regist QV"
204 call atmos_hydrometeor_regist( 0, 0, & ! (in)
205 (/'QV'/), & ! (in)
206 (/'Ratio of Water Vapor mass to total mass (Specific humidity)'/), & ! (in)
207 (/'kg/kg'/), & ! (in)
208 this%phy_mp_proc%vars%QS ) ! (out)
209
210 this%phy_mp_proc%vars%QA = 1
211 this%phy_mp_proc%vars%QE = this%phy_mp_proc%vars%QS
212 end if
213
214 !- Setup the module for atmosphere / dynamics
215 call this%dyn_proc%ModelComponentProc_Init( 'AtmosDyn', atmos_dyn_do )
216 call this%dyn_proc%setup( this%mesh, this%time_manager )
217
218 !- Setup the module for atmosphere / physics / turbulence
219 call this%phy_tb_proc%ModelComponentProc_Init( 'AtmosPhysTb', atmos_phy_tb_do )
220 call this%phy_tb_proc%setup( this%mesh, this%time_manager )
221 call this%phy_tb_proc%SetDynBC( this%dyn_proc%dyncore_driver%boundary_cond )
222
223 log_newline
224 log_info('AtmosComponent_setup',*) 'Finish setup of each atmospheric components.'
225
226 call prof_rapend( 'ATM_setup', 1)
227
228 return
subroutine, public file_history_meshfield_setup(mesh1d_, mesh2d_, mesh3d_, meshcubedsphere2d_, meshcubedsphere3d_)
Module common / time.
subroutine, public time_manager_regist_component(tmanager_comp)

References mod_atmos_phy_mp_vars::atmosphympvars_getlocalmeshfields_sfcflx(), mod_atmos_vars::atmosvars_getlocalmeshphytends(), mod_atmos_vars::atmosvars_getlocalmeshsfcvar(), scale_file_history_meshfield::file_history_meshfield_setup(), scale_atm_dyn_dgm_nonhydro3d_common::phytend_dens_id, scale_atm_dyn_dgm_nonhydro3d_common::phytend_momx_id, scale_atm_dyn_dgm_nonhydro3d_common::phytend_momy_id, scale_atm_dyn_dgm_nonhydro3d_common::phytend_momz_id, scale_atm_dyn_dgm_nonhydro3d_common::phytend_num, scale_atm_dyn_dgm_nonhydro3d_common::phytend_rhoh_id, scale_atm_dyn_dgm_nonhydro3d_common::phytend_rhot_id, and scale_time_manager::time_manager_regist_component().