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)
70 file_external_input_regist
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
84 logical :: atmos_phy_ae_offline_check_coordinates = .true.
85 integer :: atmos_phy_ae_offline_step_limit = 0
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
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
121 log_info(
"ATMOS_PHY_AE_offline_setup",*)
'Setup'
122 log_info(
"ATMOS_PHY_AE_offline_setup",*)
'Kajino(2013) scheme'
124 atmos_phy_ae_offline_defval = undef
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
137 read(
io_fid_conf,nml=param_atmos_phy_ae_offline,iostat=ierr)
139 log_info(
"ATMOS_PHY_AE_offline_setup",*)
'Not found namelist. Default used.'
140 elseif( ierr > 0 )
then
141 log_error(
"ATMOS_PHY_AE_offline_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_AE_offline. Check!'
144 log_nml(param_atmos_phy_ae_offline)
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
155 do n = 1, num_vars_3d
157 if ( const_value(n) < undef*0.1 )
then
159 if ( atmos_phy_ae_offline_basename /=
'' )
then
160 call file_external_input_regist( atmos_phy_ae_offline_basename, &
161 atmos_phy_ae_offline_basename_add_num, &
162 atmos_phy_ae_offline_number_of_files, &
164 atmos_phy_ae_offline_axistype, &
165 atmos_phy_ae_offline_enable_periodic_year, &
166 atmos_phy_ae_offline_enable_periodic_month, &
167 atmos_phy_ae_offline_enable_periodic_day, &
168 atmos_phy_ae_offline_step_fixed, &
169 atmos_phy_ae_offline_defval, &
170 check_coordinates = atmos_phy_ae_offline_check_coordinates, &
171 step_limit = atmos_phy_ae_offline_step_limit )
176 log_info(
"ATMOS_PHY_AE_offline_setup",*) &
177 'Constant value is set for ', trim(vars_3d(n)),
', value = ', const_value(n)
197 file_external_input_update
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)
212 log_progress(*)
'atmosphere / physics / aerosol / offline'
216 if ( const_value(n) < undef*0.1 )
then
218 call file_external_input_update( vars_3d(n), time_now, ccn(:,:,:), error )
220 log_error(
"ATMOS_PHY_AE_offline_flux",*)
'Requested data is not found! ', trim(vars_3d(n))
226 ccn(:,:,:) = const_value(n)
241 integer,
intent(in) ::
ka,
ia,
ja
242 real(rp),
intent(in) :: rh(
ka,
ia,
ja)
245 real(rp),
parameter :: ae_re(
n_ae) = &
259 if ( ae_re(iaero) < 0.0_rp )
then
261 re(:,:,:,iaero) = rh(:,:,:) * 1.e-2_rp
265 re(:,:,:,iaero) = ae_re(iaero) * 100.0_rp
283 file_external_input_update
288 integer,
intent(in) ::
ka,
ia,
ja
289 real(
dp),
intent(in) :: time_now
292 logical :: error, error_sum
298 do n = 1, num_vars_3d-1
301 if ( const_value(n) < undef*0.1 )
then
303 call file_external_input_update( vars_3d(n), time_now, qe(:,:,:,iaero), error )
304 error_sum = ( error .OR. error_sum )
308 qe(:,:,:,iaero) = const_value(n)
314 if ( error_sum )
then
315 log_error(
"ATMOS_PHY_AE_offline_flux",*)
'Requested data is not found!'
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)
346 if ( const_value(n) < undef*0.1 )
then
348 ccn(:,:,:) = ccn_init
352 ccn(:,:,:) = const_value(n)