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