FE-Project
All Classes Namespaces Files Functions Variables Pages
Functions/Subroutines | Variables
mod_mkinit Module Reference

module INITIAL More...

Functions/Subroutines

subroutine, public mkinit_setup
 Setup.
 
subroutine, public mkinit (output, model_mesh, atm_prgvars_manager, atm_auxvars_manager, atm_trcvars_manager)
 Driver.
 

Variables

integer, public mkinit_type = -1
 
integer, public i_ignore = 0
 

Detailed Description

module INITIAL

Description
subroutines for preparing initial data
Author
Yuta Kawai, Team SCALE
NAMELIST
  • PARAM_MKINIT
    nametypedefault valuecomment
    INITNAME character(len=H_SHORT) 'NONE'

History Output
No history output

Function/Subroutine Documentation

◆ mkinit_setup()

subroutine, public mod_mkinit::mkinit_setup

Setup.

Definition at line 72 of file mod_mkinit.F90.

73 implicit none
74
75 character(len=H_SHORT) :: initname = 'NONE'
76
77 namelist / param_mkinit / &
78 initname
79
80 integer :: ierr
81 !---------------------------------------------------------------------------
82
83 log_newline
84 log_info("MKINIT_setup",*) 'Setup'
85
86 !--- read namelist
87 rewind(io_fid_conf)
88 read(io_fid_conf,nml=param_mkinit,iostat=ierr)
89 if( ierr < 0 ) then !--- missing
90 log_info("MKINIT_setup",*) 'Not found namelist. Default used.'
91 elseif( ierr > 0 ) then !--- fatal error
92 log_error("MKINIT_setup",*) 'Not appropriate names in namelist PARAM_MKINIT. Check!'
93 call prc_abort
94 endif
95 log_nml(param_mkinit)
96
97 select case(trim(initname))
98 case('NONE')
99 mkinit_type = i_ignore
100 end select
101
102 return

References i_ignore, and mkinit_type.

Referenced by mod_dg_prep::dg_prep().

◆ mkinit()

subroutine, public mod_mkinit::mkinit ( logical, intent(out) output,
class(atmosmesh), intent(in), target model_mesh,
class(modelvarmanager), intent(inout) atm_prgvars_manager,
class(modelvarmanager), intent(inout) atm_auxvars_manager,
class(modelvarmanager), intent(inout) atm_trcvars_manager )

Driver.

Definition at line 107 of file mod_mkinit.F90.

110
112 use mod_atmos_mesh, only: atmosmesh
113 use mod_atmos_vars, only: &
115
116 implicit none
117
118 logical, intent(out) :: output
119 class(AtmosMesh), target, intent(in) :: model_mesh
120 class(ModelVarManager), intent(inout) :: atm_prgvars_manager
121 class(ModelVarManager), intent(inout) :: atm_auxvars_manager
122 class(ModelVarManager), intent(inout) :: atm_trcvars_manager
123
124 class(LocalMeshFieldBase), pointer :: DDENS, MOMX, MOMY, MOMZ, DRHOT
125 class(LocalMeshFieldBase), pointer :: DENS_hyd, PRES_hyd
126 class(LocalMeshFieldBase), pointer :: Rtot, CPtot, CVtot
127
128 integer :: n
129 integer :: ke
130 class(LocalMesh3D), pointer :: lcmesh3D
131 class(MeshBase3D), pointer :: mesh
132 !---------------------------------------------------------------------------
133
134 mesh => model_mesh%ptr_mesh
135
136 if ( mkinit_type == i_ignore ) then
137 log_newline
138 log_progress(*) 'skip making initial data'
139 output = .false.
140 else
141 log_newline
142 log_progress(*) 'start making initial data'
143
144 ! call PROF_rapstart('_MkInit_main',3)
145
146 do n=1, mesh%LOCAL_MESH_NUM
148 mesh, atm_prgvars_manager, atm_auxvars_manager, &
149 ddens, momx, momy, momz, drhot, &
150 dens_hyd, pres_hyd, rtot, cvtot, cptot, &
151 lcmesh3d )
152
153 !$omp parallel do
154 do ke=lcmesh3d%NeS, lcmesh3d%NeE
155 momx %val(:,ke) = 0.0_rp
156 momy %val(:,ke) = 0.0_rp
157 momz %val(:,ke) = 0.0_rp
158 ddens%val(:,ke) = 0.0_rp
159 drhot%val(:,ke) = 0.0_rp
160
161 cptot%val(:,ke) = cpdry
162 cvtot%val(:,ke) = cvdry
163 rtot%val(:,ke) = rdry
164 end do
165 end do
166 ! call PROF_rapend ('_MkInit_main',3)
167
168 ! LOG_PROGRESS(*) 'end making initial data'
169 output = .true.
170 end if
171
172 return
module Atmosphere / Mesh
module ATMOSPHERE / Variables
subroutine, public atmosvars_getlocalmeshprgvars(domid, mesh, prgvars_list, auxvars_list, ddens, momx, momy, momz, therm, dens_hyd, pres_hyd, rtot, cvtot, cptot, lcmesh3d)
FElib / model framework / variable manager.

References mod_atmos_vars::atmosvars_getlocalmeshprgvars(), i_ignore, and mkinit_type.

Referenced by mod_dg_prep::dg_prep().

Variable Documentation

◆ mkinit_type

integer, public mod_mkinit::mkinit_type = -1

Definition at line 60 of file mod_mkinit.F90.

60 integer, public :: MKINIT_TYPE = -1

Referenced by mkinit(), and mkinit_setup().

◆ i_ignore

integer, public mod_mkinit::i_ignore = 0

Definition at line 61 of file mod_mkinit.F90.

61 integer, public :: I_IGNORE = 0

Referenced by mkinit(), and mkinit_setup().