FE-Project
Loading...
Searching...
No Matches
Functions/Subroutines
mod_dg_prep Module Reference

module SCALE-DG prep More...

Functions/Subroutines

subroutine, public dg_prep (comm_world, cnf_fname, path, add_path)
 

Detailed Description

module SCALE-DG 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

◆ dg_prep()

subroutine, public mod_dg_prep::dg_prep ( integer, intent(in) comm_world,
character(len=*), intent(in) cnf_fname,
character(len=*), intent(in) path,
logical, intent(in) add_path )

Definition at line 71 of file mod_dg_prep.F90.

73
74 use scale_time_manager, only: &
76 time_nowdate, time_nowsubsec, time_nowstep, time_nstep, &
78
79 implicit none
80
81 integer, intent(in) :: comm_world
82 character(len=*), intent(in) :: cnf_fname
83 character(len=*), intent(in) :: path
84 logical, intent(in) :: add_path
85
86
87 integer :: myrank
88 logical :: ismaster
89
90 logical :: output
91 logical :: output_topo
92 !---------------------------------------------------------------------------
93
94 !########## Initial setup ##########
95
96#ifdef SCALE_DEVELOP
97 ! setup standard I/O
98 if ( add_path .and. path /= "" ) then
99 call io_setup( modelname, trim(path)//cnf_fname, prefix=path )
100 else
101#endif
102 call io_setup( modelname, trim(path)//cnf_fname )
103#ifdef SCALE_DEVELOP
104 end if
105#endif
106
107 ! setup MPI
108 call prc_local_setup( comm_world, & ! [IN]
109 myrank, & ! [OUT]
110 ismaster ) ! [OUT]
111
112 ! setup Log
113 call io_log_setup( myrank, ismaster )
114
115 call initialize()
116
117 !###########################################################################
118
119 !########## main ##########
120 call prof_setprefx('MAIN')
121 call prof_rapstart('Main_prep', 0)
122
123 !- Execute preprocess
124
125 !- Execute mktopo
126 call prof_rapstart('MkTopo',1)
127 call mktopo( output_topo, &
128 atmos%mesh, atmos%mesh%topography )
129 call prof_rapend ('MkTopo',1)
130
131 !- Re-setup
132 call atmos%mesh%Setup_vcoordinate()
133
134 !- Execute mkinit
135 call prof_rapstart('MkInit',1)
136 call mkinit( output, &
137 atmos%mesh, &
138 atmos%vars%PROGVARS_manager, &
139 atmos%vars%AUXVARS_manager, &
140 atmos%vars%QTRCVARS_manager )
141
142! call USER_mkinit( atmos )
143 call user_%mkinit( atmos )
144 if ( atmos%dyn_proc%dyncore_driver%ENTOT_CONSERVE_SCHEME_FLAG ) then
145 call set_total_energy( atmos%vars%PROGVARS_manager, &
146 atmos%vars%AUXVARS_manager, atmos%mesh )
147 end if
148
149 call prof_rapend ('MkInit',1)
150 call prof_rapend('Main_prep', 0)
151
152 !- Output
153
154 if ( output_topo ) call mktopo_write( atmos%mesh, atmos%mesh%topography )
155
156 if ( output ) then
157 call prof_rapstart('MkInit_restart',1)
158 call restart_write()
159 call prof_rapend ('MkInit_restart',1)
160 end if
161
162 !########## Finalize ##########
163 call user_%mkfinal()
164 call finalize()
165
166 return
module common / time
subroutine, public time_manager_advance()
subroutine, public time_manager_checkstate()
logical, public time_doresume

References scale_atm_dyn_dgm_nonhydro3d_common::atm_dyn_dgm_nonhydro3d_common_drhot2entot(), mod_atmos_vars::atmosvars_getlocalmeshprgvars(), scale_file_history_meshfield::file_history_meshfield_finalize(), scale_file_restart_meshfield::file_restart_meshfield_setup(), mod_mkinit::mkinit(), mod_mkinit::mkinit_setup(), mod_mktopo::mktopo(), mod_mktopo::mktopo_setup(), mod_mktopo::mktopo_write(), scale_time_manager::time_doend, scale_time_manager::time_doresume, scale_time_manager::time_manager_advance(), scale_time_manager::time_manager_checkstate(), scale_time_manager::time_manager_final(), and scale_time_manager::time_manager_init().

Referenced by mod_dg_launcher::launcher().