SCALE-RM
Functions/Subroutines
mod_rm_prep Module Reference

module SCALE-RM prep More...

Functions/Subroutines

subroutine, public rm_prep (comm_world, intercomm_parent, intercomm_child, cnf_fname)
 Setup. More...
 

Detailed Description

module SCALE-RM prep

Description
This program is driver of preprocess tools 1) boundary data (e.g. topography, land use index) 2) initial data for ideal/real test cases
Author
Team SCALE

Function/Subroutine Documentation

◆ rm_prep()

subroutine, public mod_rm_prep::rm_prep ( integer, intent(in)  comm_world,
integer, intent(in)  intercomm_parent,
integer, intent(in)  intercomm_child,
character(len=*), intent(in)  cnf_fname 
)

Setup.

Definition at line 59 of file mod_rm_prep.F90.

References mod_admin_restart::admin_restart_setup(), mod_admin_restart::admin_restart_write(), mod_admin_time::admin_time_setup(), mod_admin_versioncheck::admin_versioncheck(), mod_atmos_admin::atmos_admin_setup(), mod_atmos_admin::atmos_do, mod_atmos_driver::atmos_driver_tracer_setup(), scale_atmos_grid_cartesc_index::atmos_grid_cartesc_index_setup(), scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_setup(), scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_setup(), scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_update_z(), scale_atmos_grid_cartesc::atmos_grid_cartesc_setup(), scale_atmos_hydrometeor::atmos_hydrometeor_setup(), scale_atmos_hydrostatic::atmos_hydrostatic_setup(), mod_atmos_admin::atmos_phy_mp_type, scale_atmos_saturation::atmos_saturation_setup(), mod_atmos_driver::atmos_surface_get(), scale_atmos_thermodyn::atmos_thermodyn_setup(), mod_atmos_vars::atmos_vars_setup(), scale_calendar::calendar_setup(), scale_comm_cartesc_nest::comm_cartesc_nest_setup(), scale_comm_cartesc::comm_setup(), scale_const::const_setup(), mod_convert::convert(), mod_convert::convert_setup(), mod_cpl_admin::cpl_admin_setup(), mod_cpl_admin::cpl_sw, mod_cpl_vars::cpl_vars_setup(), scale_file_cartesc::file_cartesc_cleanup(), scale_file_cartesc::file_cartesc_setup(), scale_file::file_close_all(), scale_io::io_log_setup(), scale_io::io_setup(), mod_lake_admin::lake_admin_setup(), mod_lake_admin::lake_do, mod_land_admin::land_admin_setup(), mod_land_admin::land_do, scale_land_grid_cartesc_index::land_grid_cartesc_index_setup(), scale_land_grid_cartesc_real::land_grid_cartesc_real_setup(), scale_land_grid_cartesc::land_grid_cartesc_setup(), mod_land_driver::land_surface_set(), mod_land_vars::land_vars_setup(), scale_landuse::landuse_setup(), mod_mkinit::mkinit(), mod_mkinit::mkinit_setup(), mod_mktopo::mktopo(), mod_mktopo::mktopo_setup(), mod_ocean_admin::ocean_admin_setup(), mod_ocean_admin::ocean_do, scale_ocean_grid_cartesc_index::ocean_grid_cartesc_index_setup(), scale_ocean_grid_cartesc_real::ocean_grid_cartesc_real_setup(), scale_ocean_grid_cartesc::ocean_grid_cartesc_setup(), mod_ocean_driver::ocean_surface_set(), mod_ocean_vars::ocean_vars_setup(), scale_prc_cartesc::prc_cartesc_setup(), scale_prc::prc_local_setup(), scale_prof::prof_rapend(), scale_prof::prof_rapreport(), scale_prof::prof_rapstart(), scale_prof::prof_setprefx(), scale_prof::prof_setup(), mod_atmos_phy_mp_vars::qa_mp, scale_random::random_setup(), scale_statistics::statistics_setup(), mod_admin_time::time_doatmos_restart, mod_admin_time::time_doland_restart, mod_admin_time::time_doocean_restart, mod_admin_time::time_dourban_restart, scale_topography::topo_setup(), mod_urban_admin::urban_admin_setup(), mod_urban_admin::urban_do, scale_urban_grid_cartesc_index::urban_grid_cartesc_index_setup(), scale_urban_grid_cartesc_real::urban_grid_cartesc_real_setup(), scale_urban_grid_cartesc::urban_grid_cartesc_setup(), mod_urban_admin::urban_land, mod_urban_driver::urban_surface_set(), mod_urban_vars::urban_vars_setup(), mod_user::user_mkinit(), and mod_user::user_tracer_setup().

Referenced by scalerm(), scalerm_init(), and scalerm_pp().

59  use scale_file, only: &
61  use scale_prc, only: &
63  use scale_prc_cartesc, only: &
65  use scale_const, only: &
67  use scale_calendar, only: &
69  use scale_random, only: &
73  use scale_atmos_grid_cartesc, only: &
75  use scale_comm_cartesc_nest, only: &
79  use scale_ocean_grid_cartesc, only: &
85  use scale_land_grid_cartesc, only: &
87  use scale_land_grid_cartesc_real, only: &
91  use scale_urban_grid_cartesc, only: &
95  use scale_file_cartesc, only: &
98  use scale_comm_cartesc, only: &
100  use scale_topography, only: &
101  topo_setup
102  use scale_landuse, only: &
104  use scale_atmos_grid_cartesc_real, only: &
109  use scale_statistics, only: &
111  use scale_atmos_hydrostatic, only: &
113  use scale_atmos_thermodyn, only: &
115  use scale_atmos_hydrometeor, only: &
117  use scale_atmos_saturation, only: &
119  use mod_atmos_driver, only: &
121  use mod_admin_restart, only: &
123  use mod_admin_versioncheck, only: &
125  use mod_admin_time, only: &
127  use mod_atmos_admin, only: &
130  atmos_do
131  use mod_atmos_vars, only: &
133  use mod_atmos_phy_mp_vars, only: &
134  qa_mp
135  use mod_ocean_admin, only: &
137  ocean_do
138  use mod_ocean_vars, only: &
140  use mod_land_admin, only: &
142  land_do
143  use mod_land_vars, only: &
145  use mod_urban_admin, only: &
147  urban_do, &
148  urban_land
149  use mod_urban_vars, only: &
151  use mod_lake_admin, only: &
153  lake_do
154  use mod_cpl_admin, only: &
155  cpl_admin_setup, &
156  cpl_sw
157  use mod_cpl_vars, only: &
159  use mod_convert, only: &
160  convert_setup, &
161  convert
162  use mod_mktopo, only: &
163  mktopo_setup, &
164  mktopo
165  use mod_mkinit, only: &
166  mkinit_setup, &
167  mkinit
168  use mod_user, only: &
171  use mod_atmos_driver, only: &
173  use mod_ocean_driver, only: &
175  use mod_land_driver, only: &
177  use mod_urban_driver, only: &
179  use mod_admin_restart, only: &
181  use mod_admin_time, only: &
186  implicit none
187 
188  integer, intent(in) :: comm_world
189  integer, intent(in) :: intercomm_parent
190  integer, intent(in) :: intercomm_child
191  character(len=*), intent(in) :: cnf_fname
192 
193  integer :: myrank
194  logical :: ismaster
195 
196  logical :: output
197  !---------------------------------------------------------------------------
198 
199  !########## Initial setup ##########
200 
201  ! setup standard I/O
202  call io_setup( modelname, cnf_fname )
203 
204  ! setup MPI
205  call prc_local_setup( comm_world, & ! [IN]
206  myrank, & ! [OUT]
207  ismaster ) ! [OUT]
208 
209  ! setup Log
210  call io_log_setup( myrank, ismaster )
211 
212  ! namelist compatibility check
213  call admin_versioncheck
214 
215  ! setup process
216  call prc_cartesc_setup
217 
218  ! setup PROF
219  call prof_setup
220 
221 
222  ! profiler start
223  call prof_setprefx('INIT')
224  call prof_rapstart('Initialize', 0)
225 
226 
227  ! setup constants
228  call const_setup
229 
230  ! setup calendar
231  call calendar_setup
232 
233  ! setup random number
234  call random_setup
235 
236  ! setup submodel administrator
237  call atmos_admin_setup
238  call ocean_admin_setup
239  call land_admin_setup
240  call urban_admin_setup
241  call lake_admin_setup
242  call cpl_admin_setup
243 
244  ! setup horizontal/vertical grid coordinates (cartesian,idealized)
245  if ( atmos_do ) then
248  end if
249 
250  if ( ocean_do ) then
253  end if
254 
255  if ( land_do ) then
258  end if
259 
260  if ( urban_do ) then
263  end if
264 
265  ! setup tracer index
267  call atmos_driver_tracer_setup
268  call user_tracer_setup
269 
270  ! setup file I/O
271  call file_cartesc_setup
272 
273  ! setup mpi communication
274  call comm_setup
275 
276  ! setup topography
277  call topo_setup
278  ! setup land use category index/fraction
279  call landuse_setup( ocean_do, (.not. urban_land), lake_do )
280 
281  ! setup grid coordinates (real world)
282  if ( atmos_do ) then
284  ! setup grid transfer metrics (uses in ATMOS_dynamics)
286  end if
290 
291  ! setup restart
292  call admin_restart_setup
293  ! setup time
294  call admin_time_setup( setup_timeintegration = .false. )
295  ! setup statistics
296  call statistics_setup
297 
298  ! setup nesting grid
299  call comm_cartesc_nest_setup ( qa_mp, atmos_phy_mp_type, intercomm_parent, intercomm_child )
300 
301 
302  ! setup common tools
306 
307  ! setup variable container
308  if ( atmos_do ) call atmos_vars_setup
309  if ( ocean_do ) call ocean_vars_setup
310  if ( land_do ) call land_vars_setup
311  if ( urban_do ) call urban_vars_setup
312  if ( cpl_sw ) call cpl_vars_setup
313 
314  ! setup preprocess converter
315  call convert_setup
316 
317  ! setup mktopo
318  call mktopo_setup
319 
320  ! setup mkinit
321  call mkinit_setup
322 
323  call prof_rapend('Initialize',0)
324 
325  !########## main ##########
326 
327  call prof_setprefx('MAIN')
328  call prof_rapstart('Main_prep',0)
329 
330  ! execute preprocess
331  call prof_rapstart('Convert',1)
332  call convert
333  call prof_rapend ('Convert',1)
334 
335  ! execute mktopo
336  call prof_rapstart('MkTopo',1)
337  call mktopo
338  call prof_rapend ('MkTopo',1)
339 
340  ! re-setup
342 
343  ! execute mkinit
344  call prof_rapstart('MkInit',1)
345  call mkinit( output )
346  call user_mkinit
347  call prof_rapend ('MkInit',1)
348 
349  if ( output ) then
350  call prof_rapstart('MkInit_restart',1)
351 
352  ! setup surface condition
353  call ocean_surface_set( countup = .false. )
354  call land_surface_set ( countup = .false. )
355  call urban_surface_set( countup = .false. )
356  call atmos_surface_get
357 
358  ! output restart file
359  time_doocean_restart = .true.
360  time_doland_restart = .true.
361  time_dourban_restart = .true.
362  time_doatmos_restart = .true.
364 
365  call prof_rapend ('MkInit_restart',1)
366 
367  end if
368 
369  call prof_rapend('Main_prep',0)
370 
371  !########## Finalize ##########
372 
373  ! setup file I/O
375 
376  call file_close_all
377 
378  call prof_rapreport
379 
380  return
module ATMOS admin
subroutine, public mktopo
Driver.
Definition: mod_mktopo.F90:112
module Land admin
subroutine, public file_close_all(skip_abort)
subroutine, public file_cartesc_setup
Setup.
subroutine, public urban_grid_cartesc_setup
Setup.
module atmosphere / saturation
subroutine, public atmos_saturation_setup
Setup.
subroutine, public landuse_setup(OCEAN_do, URBAN_do, LAKE_do)
Setup.
subroutine, public ocean_grid_cartesc_index_setup
Setup.
subroutine, public land_grid_cartesc_real_setup
Setup real grid.
subroutine, public mktopo_setup
Setup.
Definition: mod_mktopo.F90:68
subroutine, public ocean_grid_cartesc_real_setup
Setup area and volume.
module Atmosphere / Physics Cloud Microphysics
module URBAN driver
module land / grid / cartesianC / real
module USER
Definition: mod_user.F90:12
module land / grid / cartesianC / index
subroutine, public random_setup
Setup.
subroutine, public file_cartesc_cleanup
deallocate buffers
module Atmosphere Grid CartesianC metirc
subroutine, public atmos_grid_cartesc_metric_setup
Setup.
logical, public ocean_do
subroutine, public land_vars_setup
Setup.
module ATMOSPHERIC Variables
subroutine, public convert
Driver.
module CONVERT driver
Definition: mod_convert.F90:11
logical, public lake_do
logical, public time_doatmos_restart
execute atmosphere restart output in this step?
logical, public time_doocean_restart
execute ocean restart output in this step?
subroutine, public prc_cartesc_setup
Setup Processor topology.
module process / cartesC
logical, public urban_land
subroutine, public land_grid_cartesc_setup
Setup.
subroutine, public user_tracer_setup
Config before setup of tracers.
Definition: mod_user.F90:54
module URBAN Variables
subroutine, public land_grid_cartesc_index_setup
Setup.
subroutine, public atmos_grid_cartesc_real_setup
Setup.
module urban / grid / icosahedralA / index
subroutine, public land_admin_setup
Setup.
subroutine, public convert_setup
Setup.
Definition: mod_convert.F90:52
module COMMUNICATION
module Lake admin
subroutine, public urban_surface_set(countup)
Set surface boundary to other model.
subroutine, public atmos_grid_cartesc_index_setup(KMAX, IMAXG, JMAXG, IMAX, JMAX, KHALO, IHALO, JHALO, IBLOCK, JBLOCK)
setup index
module file
Definition: scale_file.F90:15
subroutine, public atmos_surface_get
Get surface boundary condition.
subroutine, public admin_time_setup(setup_TimeIntegration)
Setup.
subroutine, public admin_restart_setup
Setup.
subroutine, public user_mkinit
Make initial state.
Definition: mod_user.F90:116
subroutine, public comm_cartesc_nest_setup(QA_MP, MP_TYPE_in, inter_parent, inter_child)
Setup.
subroutine, public topo_setup
Setup.
module atmosphere / hydrometeor
module ADMIN VERSIONCHECK
subroutine, public calendar_setup
Setup.
module LANDUSE
module atmosphere / grid / cartesC index
module ocean / grid / cartesianC / real
subroutine, public atmos_driver_tracer_setup
Tracer setup.
module OCEAN driver
subroutine, public cpl_vars_setup
Setup.
subroutine, public ocean_surface_set(countup)
Put surface boundary to other model.
module COUPLER Variables
module PROCESS
Definition: scale_prc.F90:11
subroutine, public atmos_vars_setup
Setup.
module ATMOSPHERE driver
subroutine, public const_setup
Setup.
logical, public atmos_do
subroutine, public statistics_setup
Setup.
subroutine, public atmos_grid_cartesc_setup(basename, aggregate)
Setup.
module atmosphere / hydrostatic barance
subroutine, public atmos_grid_cartesc_real_update_z
Re-setup with updated topography.
module atmosphere / grid / cartesC
subroutine, public lake_admin_setup
Setup.
module urban / grid / cartesianC
module Ocean admin
subroutine, public atmos_thermodyn_setup
Setup.
logical, public cpl_sw
module LAND Variables
module administrator for restart
subroutine, public urban_vars_setup
Setup.
subroutine, public prc_local_setup(comm, myrank, ismaster)
Setup MPI in local communicator.
Definition: scale_prc.F90:219
module CONSTANT
Definition: scale_const.F90:11
module Communication CartesianC nesting
subroutine, public urban_grid_cartesc_real_setup
Setup real grid.
subroutine, public io_setup(APPNAME, conf_name, allow_noconf)
Setup.
Definition: scale_io.F90:87
character(len=h_short), public atmos_phy_mp_type
subroutine, public ocean_admin_setup
Setup.
logical, public time_dourban_restart
execute urban restart output in this step?
module land / grid / cartesianC
module MKTOPO
Definition: mod_mktopo.F90:12
subroutine, public mkinit(output)
Driver.
Definition: mod_mkinit.F90:343
subroutine, public admin_restart_write
Write data to restart files.
module ocean / grid / cartesianC / index
subroutine, public urban_grid_cartesc_index_setup
Setup.
subroutine, public atmos_hydrometeor_setup
Setup.
module atmosphere / thermodyn
module Atmosphere GRID CartesC Real(real space)
subroutine, public cpl_admin_setup
Setup.
module file / cartesianC
subroutine, public io_log_setup(myrank, is_master)
Setup LOG.
Definition: scale_io.F90:142
subroutine, public atmos_admin_setup
Setup.
subroutine, public ocean_vars_setup
Setup.
logical, public time_doland_restart
execute land restart output in this step?
module TOPOGRAPHY
module urban / grid / cartesianC / real
module ADMIN TIME
module CALENDAR
module Statistics
subroutine, public comm_setup
Setup.
subroutine, public admin_versioncheck
Setup.
module INITIAL
Definition: mod_mkinit.F90:12
subroutine, public urban_admin_setup
Setup.
module RANDOM
module Coupler admin
module Urban admin
logical, public urban_do
module LAND driver
subroutine, public mkinit_setup
Setup.
Definition: mod_mkinit.F90:210
subroutine, public ocean_grid_cartesc_setup
Setup.
subroutine, public land_surface_set(countup)
Put surface boundary to other model.
module OCEAN Variables
logical, public land_do
subroutine, public atmos_hydrostatic_setup
Setup.
module ocean / grid / cartesianC
Here is the caller graph for this function: