54 integer,
private,
parameter :: num_vars_3d = 8
56 character(len=H_SHORT) :: vars_3d(num_vars_3d)
58 data vars_3d /
'OUTQLD01',
'OUTQLD02',
'OUTQLD03',
'OUTQLD04',
'OUTQLD05',
'OUTQLD06',
'OUTQLD07',
'UNCCN' /
60 real(RP),
private :: const_value(num_vars_3d)
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_offset = 0.0_rp
84 real(rp) :: atmos_phy_ae_offline_defval
85 logical :: atmos_phy_ae_offline_check_coordinates = .true.
86 integer :: atmos_phy_ae_offline_step_limit = 0
88 real(rp) :: atmos_phy_ae_offline_const_outqld01
89 real(rp) :: atmos_phy_ae_offline_const_outqld02
90 real(rp) :: atmos_phy_ae_offline_const_outqld03
91 real(rp) :: atmos_phy_ae_offline_const_outqld04
92 real(rp) :: atmos_phy_ae_offline_const_outqld05
93 real(rp) :: atmos_phy_ae_offline_const_outqld06
94 real(rp) :: atmos_phy_ae_offline_const_outqld07
95 real(rp) :: atmos_phy_ae_offline_const_unccn
97 namelist / param_atmos_phy_ae_offline / &
98 atmos_phy_ae_offline_basename, &
99 atmos_phy_ae_offline_basename_add_num, &
100 atmos_phy_ae_offline_number_of_files, &
101 atmos_phy_ae_offline_axistype, &
102 atmos_phy_ae_offline_enable_periodic_year, &
103 atmos_phy_ae_offline_enable_periodic_month, &
104 atmos_phy_ae_offline_enable_periodic_day, &
105 atmos_phy_ae_offline_step_fixed, &
106 atmos_phy_ae_offline_offset, &
107 atmos_phy_ae_offline_defval, &
108 atmos_phy_ae_offline_check_coordinates, &
109 atmos_phy_ae_offline_step_limit, &
110 atmos_phy_ae_offline_const_outqld01, &
111 atmos_phy_ae_offline_const_outqld02, &
112 atmos_phy_ae_offline_const_outqld03, &
113 atmos_phy_ae_offline_const_outqld04, &
114 atmos_phy_ae_offline_const_outqld05, &
115 atmos_phy_ae_offline_const_outqld06, &
116 atmos_phy_ae_offline_const_outqld07, &
117 atmos_phy_ae_offline_const_unccn
123 log_info(
"ATMOS_PHY_AE_offline_setup",*)
'Setup'
124 log_info(
"ATMOS_PHY_AE_offline_setup",*)
'Kajino(2013) scheme'
126 atmos_phy_ae_offline_defval = undef
128 atmos_phy_ae_offline_const_outqld01 = undef
129 atmos_phy_ae_offline_const_outqld02 = undef
130 atmos_phy_ae_offline_const_outqld03 = undef
131 atmos_phy_ae_offline_const_outqld04 = undef
132 atmos_phy_ae_offline_const_outqld05 = undef
133 atmos_phy_ae_offline_const_outqld06 = undef
134 atmos_phy_ae_offline_const_outqld07 = undef
135 atmos_phy_ae_offline_const_unccn = undef
139 read(
io_fid_conf,nml=param_atmos_phy_ae_offline,iostat=ierr)
141 log_info(
"ATMOS_PHY_AE_offline_setup",*)
'Not found namelist. Default used.'
142 elseif( ierr > 0 )
then
143 log_error(
"ATMOS_PHY_AE_offline_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_AE_offline. Check!'
146 log_nml(param_atmos_phy_ae_offline)
148 const_value(1) = atmos_phy_ae_offline_const_outqld01
149 const_value(2) = atmos_phy_ae_offline_const_outqld02
150 const_value(3) = atmos_phy_ae_offline_const_outqld03
151 const_value(4) = atmos_phy_ae_offline_const_outqld04
152 const_value(5) = atmos_phy_ae_offline_const_outqld05
153 const_value(6) = atmos_phy_ae_offline_const_outqld06
154 const_value(7) = atmos_phy_ae_offline_const_outqld07
155 const_value(8) = atmos_phy_ae_offline_const_unccn
157 do n = 1, num_vars_3d
159 if ( const_value(n) < undef*0.1 )
then
161 if ( atmos_phy_ae_offline_basename /=
'' )
then
163 atmos_phy_ae_offline_basename_add_num, &
164 atmos_phy_ae_offline_number_of_files, &
166 atmos_phy_ae_offline_axistype, &
167 atmos_phy_ae_offline_enable_periodic_year, &
168 atmos_phy_ae_offline_enable_periodic_month, &
169 atmos_phy_ae_offline_enable_periodic_day, &
170 atmos_phy_ae_offline_step_fixed, &
171 atmos_phy_ae_offline_offset, &
172 atmos_phy_ae_offline_defval, &
173 check_coordinates = atmos_phy_ae_offline_check_coordinates, &
174 step_limit = atmos_phy_ae_offline_step_limit )
179 log_info(
"ATMOS_PHY_AE_offline_setup",*) &
180 'Constant value is set for ', trim(vars_3d(n)),
', value = ', const_value(n)
200 file_external_input_update
205 integer,
intent(in) ::
ka,
ks,
ke
206 integer,
intent(in) ::
ia,
is,
ie
207 integer,
intent(in) ::
ja,
js,
je
208 real(
dp),
intent(in) :: time_now
209 real(rp),
intent(out) :: ccn(
ka,
ia,
ja)
215 log_progress(*)
'atmosphere / physics / aerosol / offline'
219 if ( const_value(n) < undef*0.1 )
then
221 call file_external_input_update( vars_3d(n), time_now, ccn(:,:,:), error )
223 log_error(
"ATMOS_PHY_AE_offline_flux",*)
'Requested data is not found! ', trim(vars_3d(n))
229 ccn(:,:,:) = const_value(n)
244 integer,
intent(in) ::
ka,
ia,
ja
245 real(rp),
intent(in) :: rh(
ka,
ia,
ja)
248 real(rp),
parameter :: ae_re(
n_ae) = &
262 if ( ae_re(iaero) < 0.0_rp )
then
264 re(:,:,:,iaero) = rh(:,:,:) * 1.e-2_rp
268 re(:,:,:,iaero) = ae_re(iaero) * 100.0_rp
286 file_external_input_update
291 integer,
intent(in) ::
ka,
ia,
ja
292 real(
dp),
intent(in) :: time_now
295 logical :: error, error_sum
301 do n = 1, num_vars_3d-1
304 if ( const_value(n) < undef*0.1 )
then
306 call file_external_input_update( vars_3d(n), time_now, qe(:,:,:,iaero), error )
307 error_sum = ( error .OR. error_sum )
311 qe(:,:,:,iaero) = const_value(n)
317 if ( error_sum )
then
318 log_error(
"ATMOS_PHY_AE_offline_flux",*)
'Requested data is not found!'
336 integer,
intent(in) ::
ka,
ks,
ke
337 integer,
intent(in) ::
ia,
is,
ie
338 integer,
intent(in) ::
ja,
js,
je
339 real(rp),
intent(in) :: ccn_init
340 real(rp),
intent(out) :: ccn(
ka,
ia,
ja)
349 if ( const_value(n) < undef*0.1 )
then
351 ccn(:,:,:) = ccn_init
355 ccn(:,:,:) = const_value(n)