SCALE-RM
Functions/Subroutines
scale_atmos_phy_ae_offline Module Reference

module atmosphere / physics / aerosol / offline More...

Functions/Subroutines

subroutine, public atmos_phy_ae_offline_setup
 Setup. More...
 
subroutine, public atmos_phy_ae_offline_tendency (KA, KS, KE, IA, IS, IE, JA, JS, JE, time_now, CCN)
 Aerosol Microphysics. More...
 
subroutine, public atmos_phy_ae_offline_effective_radius (KA, IA, JA, RH, Re)
 Calculate Effective Radius. More...
 
subroutine, public atmos_phy_ae_offline_qtrc2qaero (KA, IA, JA, time_now, Qe)
 Calculate Effective Radius. More...
 
subroutine, public atmos_phy_ae_offline_mkinit (KA, KS, KE, IA, IS, IE, JA, JS, JE, ccn_init, CCN)
 

Detailed Description

module atmosphere / physics / aerosol / offline

Description
offline aerosol microphysics scheme
Author
Team SCALE
NAMELIST
  • PARAM_ATMOS_PHY_AE_OFFLINE
    nametypedefault valuecomment
    ATMOS_PHY_AE_OFFLINE_BASENAME character(len=H_LONG) ''
    ATMOS_PHY_AE_OFFLINE_BASENAME_ADD_NUM logical .false.
    ATMOS_PHY_AE_OFFLINE_NUMBER_OF_FILES integer 1
    ATMOS_PHY_AE_OFFLINE_AXISTYPE character(len=H_SHORT) 'XYZ'
    ATMOS_PHY_AE_OFFLINE_ENABLE_PERIODIC_YEAR logical .false.
    ATMOS_PHY_AE_OFFLINE_ENABLE_PERIODIC_MONTH logical .false.
    ATMOS_PHY_AE_OFFLINE_ENABLE_PERIODIC_DAY logical .false.
    ATMOS_PHY_AE_OFFLINE_STEP_FIXED integer 0
    ATMOS_PHY_AE_OFFLINE_DEFVAL real(RP) = UNDEF
    ATMOS_PHY_AE_OFFLINE_CHECK_COORDINATES logical .true.
    ATMOS_PHY_AE_OFFLINE_STEP_LIMIT integer 0
    ATMOS_PHY_AE_OFFLINE_CONST_OUTQLD01 real(RP)
    ATMOS_PHY_AE_OFFLINE_CONST_OUTQLD02 real(RP)
    ATMOS_PHY_AE_OFFLINE_CONST_OUTQLD03 real(RP)
    ATMOS_PHY_AE_OFFLINE_CONST_OUTQLD04 real(RP)
    ATMOS_PHY_AE_OFFLINE_CONST_OUTQLD05 real(RP)
    ATMOS_PHY_AE_OFFLINE_CONST_OUTQLD06 real(RP)
    ATMOS_PHY_AE_OFFLINE_CONST_OUTQLD07 real(RP)
    ATMOS_PHY_AE_OFFLINE_CONST_UNCCN real(RP)

History Output
No history output

Function/Subroutine Documentation

◆ atmos_phy_ae_offline_setup()

subroutine, public scale_atmos_phy_ae_offline::atmos_phy_ae_offline_setup

Setup.

Definition at line 67 of file scale_atmos_phy_ae_offline.F90.

67  use scale_prc, only: &
68  prc_abort
69  use scale_file_external_input, only: &
70  file_external_input_regist
71  use scale_const, only: &
72  undef => const_undef
73  implicit none
74 
75  character(len=H_LONG) :: ATMOS_PHY_AE_offline_basename = ''
76  logical :: ATMOS_PHY_AE_offline_basename_add_num = .false.
77  integer :: ATMOS_PHY_AE_offline_number_of_files = 1
78  character(len=H_SHORT) :: ATMOS_PHY_AE_offline_axistype = 'XYZ'
79  logical :: ATMOS_PHY_AE_offline_enable_periodic_year = .false.
80  logical :: ATMOS_PHY_AE_offline_enable_periodic_month = .false.
81  logical :: ATMOS_PHY_AE_offline_enable_periodic_day = .false.
82  integer :: ATMOS_PHY_AE_offline_step_fixed = 0
83  real(RP) :: ATMOS_PHY_AE_offline_defval ! = UNDEF
84  logical :: ATMOS_PHY_AE_offline_check_coordinates = .true.
85  integer :: ATMOS_PHY_AE_offline_step_limit = 0
86 
87  real(RP) :: ATMOS_PHY_AE_offline_const_outqld01
88  real(RP) :: ATMOS_PHY_AE_offline_const_outqld02
89  real(RP) :: ATMOS_PHY_AE_offline_const_outqld03
90  real(RP) :: ATMOS_PHY_AE_offline_const_outqld04
91  real(RP) :: ATMOS_PHY_AE_offline_const_outqld05
92  real(RP) :: ATMOS_PHY_AE_offline_const_outqld06
93  real(RP) :: ATMOS_PHY_AE_offline_const_outqld07
94  real(RP) :: ATMOS_PHY_AE_offline_const_unccn
95 
96  namelist / param_atmos_phy_ae_offline / &
97  atmos_phy_ae_offline_basename, &
98  atmos_phy_ae_offline_basename_add_num, &
99  atmos_phy_ae_offline_number_of_files, &
100  atmos_phy_ae_offline_axistype, &
101  atmos_phy_ae_offline_enable_periodic_year, &
102  atmos_phy_ae_offline_enable_periodic_month, &
103  atmos_phy_ae_offline_enable_periodic_day, &
104  atmos_phy_ae_offline_step_fixed, &
105  atmos_phy_ae_offline_defval, &
106  atmos_phy_ae_offline_check_coordinates, &
107  atmos_phy_ae_offline_step_limit, &
108  atmos_phy_ae_offline_const_outqld01, &
109  atmos_phy_ae_offline_const_outqld02, &
110  atmos_phy_ae_offline_const_outqld03, &
111  atmos_phy_ae_offline_const_outqld04, &
112  atmos_phy_ae_offline_const_outqld05, &
113  atmos_phy_ae_offline_const_outqld06, &
114  atmos_phy_ae_offline_const_outqld07, &
115  atmos_phy_ae_offline_const_unccn
116 
117  integer :: n, ierr
118  !---------------------------------------------------------------------------
119 
120  log_newline
121  log_info("ATMOS_PHY_AE_offline_setup",*) 'Setup'
122  log_info("ATMOS_PHY_AE_offline_setup",*) 'Kajino(2013) scheme'
123 
124  atmos_phy_ae_offline_defval = undef
125 
126  atmos_phy_ae_offline_const_outqld01 = undef
127  atmos_phy_ae_offline_const_outqld02 = undef
128  atmos_phy_ae_offline_const_outqld03 = undef
129  atmos_phy_ae_offline_const_outqld04 = undef
130  atmos_phy_ae_offline_const_outqld05 = undef
131  atmos_phy_ae_offline_const_outqld06 = undef
132  atmos_phy_ae_offline_const_outqld07 = undef
133  atmos_phy_ae_offline_const_unccn = undef
134 
135  !--- read namelist
136  rewind(io_fid_conf)
137  read(io_fid_conf,nml=param_atmos_phy_ae_offline,iostat=ierr)
138  if( ierr < 0 ) then !--- missing
139  log_info("ATMOS_PHY_AE_offline_setup",*) 'Not found namelist. Default used.'
140  elseif( ierr > 0 ) then !--- fatal error
141  log_error("ATMOS_PHY_AE_offline_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_AE_offline. Check!'
142  call prc_abort
143  endif
144  log_nml(param_atmos_phy_ae_offline)
145 
146  const_value(1) = atmos_phy_ae_offline_const_outqld01
147  const_value(2) = atmos_phy_ae_offline_const_outqld02
148  const_value(3) = atmos_phy_ae_offline_const_outqld03
149  const_value(4) = atmos_phy_ae_offline_const_outqld04
150  const_value(5) = atmos_phy_ae_offline_const_outqld05
151  const_value(6) = atmos_phy_ae_offline_const_outqld06
152  const_value(7) = atmos_phy_ae_offline_const_outqld07
153  const_value(8) = atmos_phy_ae_offline_const_unccn
154 
155  do n = 1, num_vars_3d
156 
157  if ( const_value(n) < undef*0.1 ) then ! read from external file
158 
159  if ( atmos_phy_ae_offline_basename /= '' ) then
160  call file_external_input_regist( atmos_phy_ae_offline_basename, & ! [IN]
161  atmos_phy_ae_offline_basename_add_num, & ! [IN]
162  atmos_phy_ae_offline_number_of_files, & ! [IN]
163  vars_3d(n), & ! [IN]
164  atmos_phy_ae_offline_axistype, & ! [IN]
165  atmos_phy_ae_offline_enable_periodic_year, & ! [IN]
166  atmos_phy_ae_offline_enable_periodic_month, & ! [IN]
167  atmos_phy_ae_offline_enable_periodic_day, & ! [IN]
168  atmos_phy_ae_offline_step_fixed, & ! [IN]
169  atmos_phy_ae_offline_defval, & ! [IN]
170  check_coordinates = atmos_phy_ae_offline_check_coordinates, & ! [IN]
171  step_limit = atmos_phy_ae_offline_step_limit ) ! [IN]
172  endif
173 
174  else ! set constant value
175 
176  log_info("ATMOS_PHY_AE_offline_setup",*) &
177  'Constant value is set for ', trim(vars_3d(n)), ', value = ', const_value(n)
178 
179  endif
180 
181  enddo
182 
183  return

References scale_const::const_undef, scale_io::io_fid_conf, and scale_prc::prc_abort().

Referenced by mod_atmos_phy_ae_driver::atmos_phy_ae_driver_setup(), and atmos_phy_ae_offline_mkinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_ae_offline_tendency()

subroutine, public scale_atmos_phy_ae_offline::atmos_phy_ae_offline_tendency ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(dp), intent(in)  time_now,
real(rp), dimension(ka,ia,ja), intent(out)  CCN 
)

Aerosol Microphysics.

Definition at line 194 of file scale_atmos_phy_ae_offline.F90.

194  use scale_prc, only: &
195  prc_abort
196  use scale_file_external_input, only: &
197  file_external_input_update
198  use scale_const, only: &
199  undef => const_undef
200  implicit none
201 
202  integer, intent(in) :: KA, KS, KE
203  integer, intent(in) :: IA, IS, IE
204  integer, intent(in) :: JA, JS, JE
205  real(DP), intent(in) :: time_now
206  real(RP), intent(out) :: CCN(KA,IA,JA)
207 
208  logical :: error
209  integer :: n
210  !---------------------------------------------------------------------------
211 
212  log_progress(*) 'atmosphere / physics / aerosol / offline'
213 
214  n = 8 ! UNCCN
215 
216  if ( const_value(n) < undef*0.1 ) then ! read from external file
217 
218  call file_external_input_update( vars_3d(n), time_now, ccn(:,:,:), error )
219  if ( error ) then
220  log_error("ATMOS_PHY_AE_offline_flux",*) 'Requested data is not found! ', trim(vars_3d(n))
221  call prc_abort
222  endif
223 
224  else ! set constant value
225 
226  ccn(:,:,:) = const_value(n)
227 
228  endif
229 
230  return

References scale_const::const_undef, and scale_prc::prc_abort().

Referenced by mod_atmos_phy_ae_driver::atmos_phy_ae_driver_calc_tendency().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_ae_offline_effective_radius()

subroutine, public scale_atmos_phy_ae_offline::atmos_phy_ae_offline_effective_radius ( integer, intent(in)  KA,
integer, intent(in)  IA,
integer, intent(in)  JA,
real(rp), dimension(ka,ia,ja), intent(in)  RH,
real(rp), dimension(ka,ia,ja,n_ae), intent(out)  Re 
)

Calculate Effective Radius.

Definition at line 239 of file scale_atmos_phy_ae_offline.F90.

239  implicit none
240 
241  integer, intent(in) :: KA, IA, JA
242  real(RP), intent(in) :: RH(KA,IA,JA) ! relative humidity [%]
243  real(RP), intent(out) :: Re(KA,IA,JA,N_AE) ! effective radius
244 
245  real(RP), parameter :: AE_Re(N_AE) = & ! aerosol radius [m]
246  (/ 1.6e-6_rp, & ! Soil dust
247  -1.0_rp, & ! Carbonacerous (BC/OC=0.3)
248  -1.0_rp, & ! Carbonacerous (BC/OC=0.15)
249  -1.0_rp, & ! Carbonacerous (BC/OC=0.)
250  4.e-8_rp, & ! Black carbon
251  -1.0_rp, & ! Sulfate
252  -1.0_rp /) ! Sea salt
253 
254  integer :: iaero
255  !---------------------------------------------------------------------------
256 
257  do iaero = 1, n_ae
258 
259  if ( ae_re(iaero) < 0.0_rp ) then ! hygroscopic particle : look-up table is based on the RH
260 
261  re(:,:,:,iaero) = rh(:,:,:) * 1.e-2_rp
262 
263  else ! non-hygroscopic particle : look-up table is the effective radius
264 
265  re(:,:,:,iaero) = ae_re(iaero) * 100.0_rp ! [m=>cm]
266 
267  endif
268 
269  enddo
270 
271  return

References scale_atmos_aerosol::n_ae.

Referenced by mod_atmos_phy_ae_vars::atmos_phy_ae_vars_get_diagnostic().

Here is the caller graph for this function:

◆ atmos_phy_ae_offline_qtrc2qaero()

subroutine, public scale_atmos_phy_ae_offline::atmos_phy_ae_offline_qtrc2qaero ( integer, intent(in)  KA,
integer, intent(in)  IA,
integer, intent(in)  JA,
real(dp), intent(in)  time_now,
real(rp), dimension(ka,ia,ja,n_ae), intent(out)  Qe 
)

Calculate Effective Radius.

Definition at line 280 of file scale_atmos_phy_ae_offline.F90.

280  use scale_prc, only: &
281  prc_abort
282  use scale_file_external_input, only: &
283  file_external_input_update
284  use scale_const, only: &
285  undef => const_undef
286  implicit none
287 
288  integer, intent(in) :: KA, IA, JA
289  real(DP), intent(in) :: time_now
290  real(RP), intent(out) :: Qe(KA,IA,JA,N_AE) ! aerosol mixing ratio [kg/kg]
291 
292  logical :: error, error_sum
293  integer :: n, iaero
294  !---------------------------------------------------------------------------
295 
296  error_sum = .false.
297 
298  do n = 1, num_vars_3d-1
299  iaero = n
300 
301  if ( const_value(n) < undef*0.1 ) then ! read from external file
302 
303  call file_external_input_update( vars_3d(n), time_now, qe(:,:,:,iaero), error )
304  error_sum = ( error .OR. error_sum )
305 
306  else ! set constant value
307 
308  qe(:,:,:,iaero) = const_value(n)
309 
310  endif
311 
312  enddo
313 
314  if ( error_sum ) then
315  log_error("ATMOS_PHY_AE_offline_flux",*) 'Requested data is not found!'
316  call prc_abort
317  endif
318 
319  return

References scale_const::const_undef, and scale_prc::prc_abort().

Referenced by mod_atmos_phy_ae_vars::atmos_phy_ae_vars_get_diagnostic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_ae_offline_mkinit()

subroutine, public scale_atmos_phy_ae_offline::atmos_phy_ae_offline_mkinit ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), intent(in)  ccn_init,
real(rp), dimension(ka,ia,ja), intent(out)  CCN 
)

Definition at line 329 of file scale_atmos_phy_ae_offline.F90.

329  use scale_const, only: &
330  undef => const_undef
331  implicit none
332 
333  integer, intent(in) :: KA, KS, KE
334  integer, intent(in) :: IA, IS, IE
335  integer, intent(in) :: JA, JS, JE
336  real(RP), intent(in) :: ccn_init
337  real(RP), intent(out) :: CCN(KA,IA,JA)
338 
339  integer :: n
340  !---------------------------------------------------------------------------
341 
342  call atmos_phy_ae_offline_setup
343 
344  n = 8 ! UNCCN
345 
346  if ( const_value(n) < undef*0.1 ) then ! read from external file
347 
348  ccn(:,:,:) = ccn_init
349 
350  else ! set constant value
351 
352  ccn(:,:,:) = const_value(n)
353 
354  endif
355 
356  return

References atmos_phy_ae_offline_setup(), and scale_const::const_undef.

Referenced by mod_mkinit::rect_setup().

Here is the call graph for this function:
Here is the caller graph for this function:
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_file_external_input
module file / external_input
Definition: scale_file_external_input.F90:12
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:43