Setup a component of atmospheric dynamics.
114
115 implicit none
116
117 class(AtmosDyn), intent(inout) :: this
118 class(ModelMeshBase), target, intent(in) :: model_mesh
119 class(TIME_manager_component), intent(inout) :: tm_parent_comp
120
121 character(len=H_MID) :: EQS_TYPE = "NONHYDRO3D_HEVE"
122 character(len=H_SHORT) :: TINTEG_TYPE = 'ERK_SSP_3s3o'
123 character(len=H_SHORT) :: TINTEG_TYPE_TRACER = 'ERK_SSP_3s3o'
124 real(DP) :: TIME_DT = undef8
125 character(len=H_SHORT) :: TIME_DT_UNIT = 'SEC'
126
127 logical :: MODALFILTER_FLAG = .false.
128 logical :: NUMDIFF_FLAG = .false.
129 logical :: SPONGELAYER_FLAG = .false.
130 logical :: ONLY_TRACERADV_FLAG = .false.
131 logical :: TRACERADV_DISABLE_LIMITER = .false.
132 logical :: TRACERADV_MODALFILTER_FLAG = .false.
133 logical :: HIDE_MPI_COMM_FLAG = .false.
134
135 namelist / param_atmos_dyn / &
136 eqs_type, &
137 tinteg_type, &
138 tinteg_type_tracer, &
139 time_dt, &
140 time_dt_unit, &
141 modalfilter_flag, &
142 numdiff_flag, &
143 spongelayer_flag, &
144 only_traceradv_flag, &
145 traceradv_disable_limiter, &
146 traceradv_modalfilter_flag, &
147 hide_mpi_comm_flag
148
149 class(AtmosMesh), pointer :: atm_mesh
150 class(MeshBase), pointer :: ptr_mesh
151 class(LocalMeshBase), pointer :: ptr_lcmesh
152 class(ElementBase3D), pointer :: elem3D
153 integer :: n
154 real(DP) :: dtsec
155
156 class(MeshBase3D), pointer :: mesh3D
157
158 integer :: ierr
159
160
161 if (.not. this%IsActivated()) return
162 log_info('AtmosDyn_setup',*)
163
164
165 rewind(io_fid_conf)
166 read(io_fid_conf,nml=param_atmos_dyn,iostat=ierr)
167 if( ierr < 0 ) then
168 log_info("ATMOS_DYN_setup",*) 'Not found namelist. Default used.'
169 elseif( ierr > 0 ) then
170 log_error("ATMOS_DYN_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_DYN. Check!'
171 call prc_abort
172 endif
173 log_nml(param_atmos_dyn)
174
175
176
177 call model_mesh%GetModelMesh( ptr_mesh )
178 select type(model_mesh)
180 atm_mesh => model_mesh
181 end select
182 mesh3d => atm_mesh%ptr_mesh
183
184
185
186 call tm_parent_comp%Regist_process( 'ATMOS_DYN', time_dt, time_dt_unit, &
187 this%tm_process_id )
188
189 dtsec = tm_parent_comp%process_list(this%tm_process_id)%dtsec
190
191
192 call this%dyn_vars%Init( model_mesh )
193
194 call setup_coriolis_parameter( this%dyn_vars, atm_mesh )
195
196
197 call this%dyncore_driver%Init( eqs_type, &
198 tinteg_type, dtsec, &
199 spongelayer_flag, modalfilter_flag, &
200 hide_mpi_comm_flag, &
201 atm_mesh )
202
203
204 call this%trcadv_driver%Init( "TRCADV3D_HEVE", &
205 tinteg_type_tracer, dtsec, &
206 traceradv_modalfilter_flag, traceradv_disable_limiter, &
207 atm_mesh, this%dyncore_driver%boundary_cond, only_traceradv_flag )
208
209
210 this%CALC_NUMDIFF_FLAG = numdiff_flag
211 if (this%CALC_NUMDIFF_FLAG) call this%numdiff%Init( atm_mesh, dtsec )
212
213 return