SCALE-RM
mod_rm_prep.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
17 !-------------------------------------------------------------------------------
19  !-----------------------------------------------------------------------------
20  !
21  !++ used modules
22  !
23  use dc_log, only: &
24  loginit
25  use gtool_file, only: &
27  use scale_precision
28  use scale_stdio
29  use scale_prof
30  !-----------------------------------------------------------------------------
31  implicit none
32  private
33  !-----------------------------------------------------------------------------
34  !
35  !++ included parameters
36  !
37 #include "scale-rm.h"
38  !-----------------------------------------------------------------------------
39  !
40  !++ Public procedure
41  !
42  public :: scalerm_prep
43 
44  !-----------------------------------------------------------------------------
45  !
46  !++ Public parameters & variables
47  !
48  !-----------------------------------------------------------------------------
49  !
50  !++ Private procedure
51  !
52  !-----------------------------------------------------------------------------
53  !
54  !++ Private parameters & variables
55  !
56  character(len=H_MID), private, parameter :: modelname = "SCALE-RM ver. "//version
57 
58  !-----------------------------------------------------------------------------
59 contains
60  !-----------------------------------------------------------------------------
62  subroutine scalerm_prep( &
63  comm_world, &
64  intercomm_parent, &
65  intercomm_child, &
66  cnf_fname )
67  use scale_process, only: &
69  use scale_rm_process, only: &
70  prc_setup
71  use scale_const, only: &
73  use scale_calendar, only: &
75  use scale_random, only: &
77  use scale_grid_index, only: &
79  use scale_grid, only: &
81  use scale_grid_nest, only: &
83  use scale_land_grid_index, only: &
85  use scale_land_grid, only: &
87  use scale_urban_grid_index, only: &
89  use scale_urban_grid, only: &
91  use scale_tracer, only: &
93  use scale_fileio, only: &
95  use scale_comm, only: &
97  use scale_topography, only: &
99  use scale_landuse, only: &
101  use scale_grid_real, only: &
102  real_setup, &
104  use scale_gridtrans, only: &
106  use scale_interpolation, only: &
108  use scale_rm_statistics, only: &
109  stat_setup
110  use scale_history, only: &
111  hist_setup
112  use scale_atmos_hydrostatic, only: &
114  use scale_atmos_thermodyn, only: &
116  use scale_atmos_saturation, only: &
118 
119  use mod_admin_restart, only: &
121  use mod_admin_time, only: &
123  use mod_atmos_admin, only: &
125  use mod_atmos_vars, only: &
127  use mod_ocean_admin, only: &
129  use mod_ocean_vars, only: &
131  use mod_land_admin, only: &
133  use mod_land_vars, only: &
135  use mod_urban_admin, only: &
137  use mod_urban_vars, only: &
139  use mod_cpl_admin, only: &
141  use mod_cpl_vars, only: &
143  use mod_convert, only: &
144  convert_setup, &
145  convert
146  use mod_mktopo, only: &
147  mktopo_setup, &
148  mktopo
149  use mod_mkinit, only: &
150  mkinit_setup, &
151  mkinit
152  implicit none
153 
154  integer, intent(in) :: comm_world
155  integer, intent(in) :: intercomm_parent
156  integer, intent(in) :: intercomm_child
157  character(len=H_LONG), intent(in) :: cnf_fname
158 
159  integer :: myrank
160  logical :: ismaster
161  !---------------------------------------------------------------------------
162 
163  !########## Initial setup ##########
164 
165  ! setup standard I/O
166  call io_setup( modelname, .true., cnf_fname )
167 
168  ! setup MPI
169  call prc_local_setup( comm_world, & ! [IN]
170  myrank, & ! [OUT]
171  ismaster ) ! [OUT]
172 
173  ! setup Log
174  call io_log_setup( myrank, ismaster )
176 
177  ! setup process
178  call prc_setup
179 
180  ! setup PROF
181  call prof_setup
182 
183  ! setup constants
184  call const_setup
185 
186  ! setup calendar
187  call calendar_setup
188 
189  ! setup random number
190  call random_setup
191 
192  ! setup time
193  call admin_time_setup( setup_timeintegration = .false. )
194 
195  call prof_rapstart('Initialize')
196 
197  ! setup horizontal/vertical grid coordinates (cartesian,idealized)
198  call grid_index_setup
199  call grid_setup
200 
202  call land_grid_setup
203 
205  call urban_grid_setup
206 
207  ! setup tracer index
208  call tracer_setup
209 
210  ! setup file I/O
211  call fileio_setup
212 
213  ! setup mpi communication
214  call comm_setup
215 
216  ! setup topography
217  call topo_setup
218  ! setup land use category index/fraction
219  call landuse_setup
220  ! setup grid coordinates (real world)
221  call real_setup
222 
223  ! setup grid transfer metrics (uses in ATMOS_dynamics)
224  call gtrans_setup
225  ! setup Z-ZS interpolation factor (uses in History)
226  call interp_setup
227 
228  ! setup restart
230  ! setup statistics
231  call stat_setup
232  ! setup history I/O
233  call hist_setup
234 
235  ! setup nesting grid
236  call nest_setup ( intercomm_parent, intercomm_child )
237 
238 
239  ! setup common tools
243 
244  ! setup submodel administrator
245  call atmos_admin_setup
246  call ocean_admin_setup
247  call land_admin_setup
248  call urban_admin_setup
249  call cpl_admin_setup
250 
251  ! setup variable container
252  call atmos_vars_setup
253  call ocean_vars_setup
254  call land_vars_setup
255  call urban_vars_setup
256  call cpl_vars_setup
257 
258  ! setup preprocess converter
259  call convert_setup
260 
261  ! setup mktopo
262  call mktopo_setup
263 
264  ! setup mkinit
265  call mkinit_setup
266 
267  call prof_rapend('Initialize')
268 
269  !########## main ##########
270 
271  call prof_rapstart('Main_prep')
272 
273  ! execute preprocess
274  call prof_rapstart('Convert')
275  call convert
276  call prof_rapend ('Convert')
277 
278  ! execute mktopo
279  call prof_rapstart('MkTopo')
280  call mktopo
281  call prof_rapend ('MkTopo')
282 
283  ! re-setup
284  call real_update_z
285 
286  ! execute mkinit
287  call prof_rapstart('MkInit')
288  call mkinit
289  call prof_rapend ('MkInit')
290 
291  call prof_rapend('Main_prep')
292 
293  !########## Finalize ##########
294 
295  call prof_rapreport
296 
297  call filecloseall
298 
299  return
300  end subroutine scalerm_prep
301 
302 end module mod_rm_prep
module ATMOS admin
subroutine, public mktopo
Driver.
Definition: mod_mktopo.f90:114
module Land admin
subroutine, public nest_setup(inter_parent, inter_child)
Setup.
module GTOOL_FILE
Definition: gtool_file.f90:17
subroutine, public interp_setup
Setup.
subroutine, public prof_setup
Definition: scale_prof.F90:79
module ATMOSPHERE / Saturation adjustment
subroutine, public atmos_saturation_setup
Setup.
module DC_Log
Definition: dc_log.f90:14
subroutine, public urban_grid_index_setup
Setup.
module GRID (nesting system)
subroutine, public mktopo_setup
Setup.
Definition: mod_mktopo.f90:70
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
subroutine, public landuse_setup
Setup.
subroutine, public random_setup
Setup.
subroutine, public prc_setup
Setup Processor topology.
subroutine, public land_vars_setup
Setup.
module ATMOSPHERIC Variables
subroutine, public fileio_setup
Setup.
subroutine, public convert
Driver.
Definition: mod_convert.f90:97
module STDIO
Definition: scale_stdio.F90:12
module CONVERT driver
Definition: mod_convert.f90:10
subroutine, public mkinit
Driver.
Definition: mod_mkinit.f90:347
subroutine, public grid_index_setup
Setup.
module GRID (cartesian) for land
subroutine, public filecloseall
module URBAN Variables
subroutine, public io_log_setup(myrank, is_master)
Setup LOG.
subroutine, public loginit(fid_conf, fid_log, master)
Definition: dc_log.f90:66
module FILE I/O (netcdf)
subroutine, public land_admin_setup
Setup.
subroutine, public convert_setup
Setup.
Definition: mod_convert.f90:51
module Statistics
module grid index
module TRACER
subroutine, public admin_time_setup(setup_TimeIntegration)
Setup.
subroutine, public admin_restart_setup
Setup.
subroutine, public real_setup
Setup.
subroutine, public topo_setup
Setup.
subroutine, public urban_grid_setup
Setup.
module GRIDTRANS
module GRID (cartesian) for urban
subroutine, public calendar_setup
Setup.
module GRID (real space)
module LANDUSE
subroutine, public tracer_setup
Setup.
subroutine, public cpl_vars_setup
Setup.
module COUPLER Variables
subroutine, public atmos_vars_setup
Setup.
subroutine, public const_setup
Setup.
subroutine, public io_setup(MODELNAME, call_from_launcher, fname_in)
Setup.
Definition: scale_stdio.F90:84
module COMMUNICATION
Definition: scale_comm.F90:23
module ATMOSPHERE / Hydrostatic barance
subroutine, public stat_setup
Setup.
module PROCESS
module Ocean admin
subroutine, public land_grid_setup
Setup.
subroutine, public scalerm_prep(comm_world, intercomm_parent, intercomm_child, cnf_fname)
Setup.
Definition: mod_rm_prep.f90:67
subroutine, public atmos_thermodyn_setup
Setup.
module LAND Variables
module administrator for restart
subroutine, public urban_vars_setup
Setup.
module CONSTANT
Definition: scale_const.F90:14
subroutine, public gtrans_setup
Setup.
subroutine, public ocean_admin_setup
Setup.
module GRID (cartesian)
subroutine, public real_update_z
Re-setup with updated topography.
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
Definition: scale_prof.F90:132
module MKTOPO
Definition: mod_mktopo.f90:14
module RM PROCESS
subroutine, public hist_setup
Setup.
subroutine, public land_grid_index_setup
Setup.
module profiler
Definition: scale_prof.F90:10
module ATMOSPHERE / Thermodynamics
subroutine, public cpl_admin_setup
Setup.
module PRECISION
subroutine, public atmos_admin_setup
Setup.
subroutine, public ocean_vars_setup
Setup.
module SCALE-RM prep
Definition: mod_rm_prep.f90:18
module HISTORY
module TOPOGRAPHY
module ADMIN TIME
module CALENDAR
module land grid index
subroutine, public prc_local_setup(comm, myrank, ismaster)
Setup MPI.
integer, public io_fid_conf
Config file ID.
Definition: scale_stdio.F90:55
subroutine, public comm_setup
Setup.
Definition: scale_comm.F90:165
module INITIAL
Definition: mod_mkinit.f90:31
subroutine, public urban_admin_setup
Setup.
module RANDOM
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
module Coupler admin
subroutine, public prof_rapend(rapname_base, level)
Save raptime.
Definition: scale_prof.F90:178
module Urban admin
subroutine, public mkinit_setup
Setup.
Definition: mod_mkinit.f90:221
module OCEAN Variables
subroutine, public atmos_hydrostatic_setup
Setup.
module INTERPOLATION
subroutine, public grid_setup
Setup.
subroutine, public prof_rapreport
Report raptime.
Definition: scale_prof.F90:220
module urban grid index