SCALE-RM
mod_atmos_admin.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
9 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
12  !-----------------------------------------------------------------------------
13  !
14  !++ used modules
15  !
16  use scale_precision
17  use scale_io
18  use scale_prof
19  !-----------------------------------------------------------------------------
20  implicit none
21  private
22  !-----------------------------------------------------------------------------
23  !
24  !++ Public procedure
25  !
26  public :: atmos_admin_setup
27  public :: atmos_admin_getscheme
28 
29  !-----------------------------------------------------------------------------
30  !
31  !++ Public parameters & variables
32  !
33  logical, public :: atmos_do = .true. ! main switch for the model
34 
35  character(len=H_SHORT), public :: atmos_dyn_type = 'NONE'
36  character(len=H_SHORT), public :: atmos_phy_mp_type = 'NONE'
37  character(len=H_SHORT), public :: atmos_phy_ae_type = 'NONE'
38  character(len=H_SHORT), public :: atmos_phy_ch_type = 'NONE'
39  character(len=H_SHORT), public :: atmos_phy_rd_type = 'NONE'
40  character(len=H_SHORT), public :: atmos_phy_sf_type = 'NONE'
41  character(len=H_SHORT), public :: atmos_phy_tb_type = 'NONE'
42  character(len=H_SHORT), public :: atmos_phy_bl_type = 'NONE'
43  character(len=H_SHORT), public :: atmos_phy_cp_type = 'NONE'
44  character(len=H_SHORT), public :: atmos_phy_lt_type = 'NONE'
45 
46  character(len=H_SHORT), public :: atmos_phy_precip_type = 'Upwind-Euler'
47 
48  logical, public :: atmos_use_qv = .false.
49  logical, public :: atmos_use_average = .false.
50 
51  logical, public :: atmos_sw_dyn
52  logical, public :: atmos_sw_phy_mp
53  logical, public :: atmos_sw_phy_ae
54  logical, public :: atmos_sw_phy_ch
55  logical, public :: atmos_sw_phy_rd
56  logical, public :: atmos_sw_phy_sf
57  logical, public :: atmos_sw_phy_tb
58  logical, public :: atmos_sw_phy_bl
59  logical, public :: atmos_sw_phy_cp
60  logical, public :: atmos_sw_phy_lt
61 
62  !-----------------------------------------------------------------------------
63  !
64  !++ Private procedure
65  !
66  !-----------------------------------------------------------------------------
67  !
68  !++ Private parameters & variables
69  !
70  !-----------------------------------------------------------------------------
71 contains
72  !-----------------------------------------------------------------------------
74  subroutine atmos_admin_setup
75  use scale_prc, only: &
76  prc_abort
77  implicit none
78 
79  namelist / param_atmos / &
80  atmos_do, &
91  atmos_use_qv, &
94 
95  integer :: ierr
96  !---------------------------------------------------------------------------
97 
98  log_newline
99  log_info("ATMOS_ADMIN_setup",*) 'Setup'
100 
101  !--- read namelist
102  rewind(io_fid_conf)
103  read(io_fid_conf,nml=param_atmos,iostat=ierr)
104  if( ierr < 0 ) then !--- missing
105  log_info("ATMOS_ADMIN_setup",*) 'Not found namelist. Default used.'
106  elseif( ierr > 0 ) then !--- fatal error
107  log_error("ATMOS_ADMIN_setup",*) 'Not appropriate names in namelist PARAM_ATMOS. Check!'
108  call prc_abort
109  endif
110  log_nml(param_atmos)
111 
112  !-----< module component check >-----
113 
114  log_newline
115  log_info("ATMOS_ADMIN_setup",*) 'Atmosphere model components '
116 
117  if ( atmos_do ) then
118  log_info_cont(*) 'Atmosphere model : ON'
119  else
120  log_info_cont(*) 'Atmosphere model : OFF'
121  endif
122 
123  log_info_cont(*) 'Dynamics...'
124 
125  if ( atmos_dyn_type == 'OFF' ) then
126  log_info_cont(*) '+ Dynamical core : OFF'
127  log_info_cont(*) '+ Advection : OFF'
128  atmos_sw_dyn = .false.
129  elseif( atmos_dyn_type == 'NONE' ) then
130  ! The advection is disbled
131  ! The tendencies calculated by physical processed are added
132  log_info_cont(*) '+ Dynamical core : ON, ', trim(atmos_dyn_type)
133  log_info_cont(*) '+ Advection : OFF'
134  atmos_sw_dyn = .true.
135  else ! default
136  log_info_cont(*) '+ Dynamical core : ON, ', trim(atmos_dyn_type)
137  log_info_cont(*) '+ Advection : ON'
138  atmos_sw_dyn = .true.
139  endif
140 
141  log_info_cont(*) 'Physics...'
142 
143  if ( atmos_phy_mp_type /= 'OFF' .AND. atmos_phy_mp_type /= 'NONE' ) then
144  log_info_cont(*) '+ Cloud Microphysics : ON, ', trim(atmos_phy_mp_type)
145  atmos_sw_phy_mp = .true.
146  else
147  log_info_cont(*) '+ Cloud Microphysics : OFF'
148  atmos_sw_phy_mp = .false.
149  endif
150 
151  if ( atmos_phy_ae_type /= 'OFF' .AND. atmos_phy_ae_type /= 'NONE' ) then
152  log_info_cont(*) '+ Aerosol Microphysics : ON, ', trim(atmos_phy_ae_type)
153  atmos_sw_phy_ae = .true.
154  else
155  log_info_cont(*) '+ Aerosol Microphysics : OFF'
156  atmos_sw_phy_ae = .false.
157  endif
158 
159  if ( atmos_phy_ch_type /= 'OFF' .AND. atmos_phy_ch_type /= 'NONE' ) then
160  log_info_cont(*) '+ Chemistry : ON, ', trim(atmos_phy_ch_type)
161  atmos_sw_phy_ch = .true.
162  else
163  log_info_cont(*) '+ Chemistry : OFF'
164  atmos_sw_phy_ch = .false.
165  endif
166 
167  if ( atmos_phy_rd_type /= 'OFF' .AND. atmos_phy_rd_type /= 'NONE' ) then
168  log_info_cont(*) '+ Radiative transfer : ON, ', trim(atmos_phy_rd_type)
169  atmos_sw_phy_rd = .true.
170  else
171  log_info_cont(*) '+ Radiative transfer : OFF'
172  atmos_sw_phy_rd = .false.
173  endif
174 
175  if ( atmos_phy_sf_type /= 'OFF' .AND. atmos_phy_sf_type /= 'NONE' ) then
176  log_info_cont(*) '+ Surface Flux : ON, ', trim(atmos_phy_sf_type)
177  atmos_sw_phy_sf = .true.
178  else
179  log_info_cont(*) '+ Surface Flux : OFF'
180  atmos_sw_phy_sf = .false.
181  endif
182 
183  if ( atmos_phy_tb_type /= 'OFF' .AND. atmos_phy_tb_type /= 'NONE' ) then
184  log_info_cont(*) '+ Sub-grid Turbulence : ON, ', trim(atmos_phy_tb_type)
185  atmos_sw_phy_tb = .true.
186  else
187  log_info_cont(*) '+ Sub-grid Turbulence : OFF'
188  atmos_sw_phy_tb = .false.
189  endif
190 
191  if ( atmos_phy_bl_type /= 'OFF' .AND. atmos_phy_bl_type /= 'NONE' ) then
192  log_info_cont(*) '+ PBL Turbulence : ON, ', trim(atmos_phy_bl_type)
193  atmos_sw_phy_bl = .true.
194  else
195  log_info_cont(*) '+ PBL Turbulence : OFF'
196  atmos_sw_phy_bl = .false.
197  endif
198 
199  if ( atmos_phy_cp_type /= 'OFF' .AND. atmos_phy_cp_type /= 'NONE' ) then
200  log_info_cont(*) '+ Convection Param. : ON, ', trim(atmos_phy_cp_type)
201  atmos_sw_phy_cp = .true.
202  else
203  log_info_cont(*) '+ Convection Param. : OFF'
204  atmos_sw_phy_cp = .false.
205  endif
206 
207  if ( atmos_phy_lt_type /= 'OFF' .AND. atmos_phy_lt_type /= 'NONE' ) then
208  log_info_cont(*) '+ Lightning : ON, ', trim(atmos_phy_lt_type)
209  atmos_sw_phy_lt = .true.
210  else
211  log_info_cont(*) '+ Lightning : OFF'
212  atmos_sw_phy_lt = .false.
213  endif
214 
215  if ( atmos_use_average ) then
216  log_info_cont(*) '+ Use time-averaging value for physics? : YES'
217  else
218  log_info_cont(*) '+ Use time-averaging value for physics? : NO'
219  endif
220 
221  return
222  end subroutine atmos_admin_setup
223 
224  !-----------------------------------------------------------------------------
226  subroutine atmos_admin_getscheme( &
227  component_name, &
228  scheme_name )
229  use scale_prc, only: &
230  prc_abort
231  implicit none
232 
233  character(len=*), intent(in) :: component_name
234  character(len=H_SHORT), intent(out) :: scheme_name
235  !---------------------------------------------------------------------------
236 
237  select case(component_name)
238  case("DYN")
239  scheme_name = atmos_dyn_type
240  case("PHY_MP")
241  scheme_name = atmos_phy_mp_type
242  case("PHY_AE")
243  scheme_name = atmos_phy_ae_type
244  case("PHY_CH")
245  scheme_name = atmos_phy_ch_type
246  case("PHY_RD")
247  scheme_name = atmos_phy_rd_type
248  case("PHY_SF")
249  scheme_name = atmos_phy_sf_type
250  case("PHY_TB")
251  scheme_name = atmos_phy_tb_type
252  case("PHY_BL")
253  scheme_name = atmos_phy_bl_type
254  case("PHY_CP")
255  scheme_name = atmos_phy_cp_type
256  case("PHY_LT")
257  scheme_name = atmos_phy_lt_type
258  case default
259  log_error("ATMOS_ADMIN_getscheme",*) 'Unsupported component_name. Check!', trim(component_name)
260  call prc_abort
261  end select
262 
263  return
264  end subroutine atmos_admin_getscheme
265 
266 end module mod_atmos_admin
mod_atmos_admin::atmos_phy_bl_type
character(len=h_short), public atmos_phy_bl_type
Definition: mod_atmos_admin.F90:42
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
mod_atmos_admin::atmos_sw_phy_tb
logical, public atmos_sw_phy_tb
Definition: mod_atmos_admin.F90:57
mod_atmos_admin::atmos_phy_precip_type
character(len=h_short), public atmos_phy_precip_type
Definition: mod_atmos_admin.F90:46
mod_atmos_admin::atmos_use_average
logical, public atmos_use_average
Definition: mod_atmos_admin.F90:49
mod_atmos_admin::atmos_phy_rd_type
character(len=h_short), public atmos_phy_rd_type
Definition: mod_atmos_admin.F90:39
scale_precision
module PRECISION
Definition: scale_precision.F90:14
mod_atmos_admin
module ATMOS admin
Definition: mod_atmos_admin.F90:11
mod_atmos_admin::atmos_do
logical, public atmos_do
Definition: mod_atmos_admin.F90:33
mod_atmos_admin::atmos_sw_dyn
logical, public atmos_sw_dyn
Definition: mod_atmos_admin.F90:51
mod_atmos_admin::atmos_sw_phy_mp
logical, public atmos_sw_phy_mp
Definition: mod_atmos_admin.F90:52
scale_prc
module PROCESS
Definition: scale_prc.F90:11
mod_atmos_admin::atmos_sw_phy_ae
logical, public atmos_sw_phy_ae
Definition: mod_atmos_admin.F90:53
mod_atmos_admin::atmos_phy_sf_type
character(len=h_short), public atmos_phy_sf_type
Definition: mod_atmos_admin.F90:40
scale_io
module STDIO
Definition: scale_io.F90:10
mod_atmos_admin::atmos_phy_ch_type
character(len=h_short), public atmos_phy_ch_type
Definition: mod_atmos_admin.F90:38
mod_atmos_admin::atmos_phy_lt_type
character(len=h_short), public atmos_phy_lt_type
Definition: mod_atmos_admin.F90:44
mod_atmos_admin::atmos_sw_phy_lt
logical, public atmos_sw_phy_lt
Definition: mod_atmos_admin.F90:60
scale_prof
module profiler
Definition: scale_prof.F90:11
mod_atmos_admin::atmos_sw_phy_cp
logical, public atmos_sw_phy_cp
Definition: mod_atmos_admin.F90:59
mod_atmos_admin::atmos_sw_phy_ch
logical, public atmos_sw_phy_ch
Definition: mod_atmos_admin.F90:54
mod_atmos_admin::atmos_admin_setup
subroutine, public atmos_admin_setup
Setup.
Definition: mod_atmos_admin.F90:75
mod_atmos_admin::atmos_use_qv
logical, public atmos_use_qv
Definition: mod_atmos_admin.F90:48
mod_atmos_admin::atmos_admin_getscheme
subroutine, public atmos_admin_getscheme(component_name, scheme_name)
Get name of scheme for each component.
Definition: mod_atmos_admin.F90:229
mod_atmos_admin::atmos_phy_ae_type
character(len=h_short), public atmos_phy_ae_type
Definition: mod_atmos_admin.F90:37
mod_atmos_admin::atmos_phy_cp_type
character(len=h_short), public atmos_phy_cp_type
Definition: mod_atmos_admin.F90:43
mod_atmos_admin::atmos_sw_phy_rd
logical, public atmos_sw_phy_rd
Definition: mod_atmos_admin.F90:55
mod_atmos_admin::atmos_dyn_type
character(len=h_short), public atmos_dyn_type
Definition: mod_atmos_admin.F90:35
mod_atmos_admin::atmos_sw_phy_bl
logical, public atmos_sw_phy_bl
Definition: mod_atmos_admin.F90:58
mod_atmos_admin::atmos_phy_mp_type
character(len=h_short), public atmos_phy_mp_type
Definition: mod_atmos_admin.F90:36
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56
mod_atmos_admin::atmos_phy_tb_type
character(len=h_short), public atmos_phy_tb_type
Definition: mod_atmos_admin.F90:41
mod_atmos_admin::atmos_sw_phy_sf
logical, public atmos_sw_phy_sf
Definition: mod_atmos_admin.F90:56