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