Go to the documentation of this file.
40 public :: atmos_vars_get_diagnostic
49 interface atmos_vars_get_diagnostic
50 procedure ATMOS_vars_get_diagnostic_3D
51 procedure ATMOS_vars_get_diagnostic_2D
52 procedure ATMOS_vars_get_diagnostic_1D
53 end interface atmos_vars_get_diagnostic
75 real(
rp),
public,
target,
allocatable ::
dens(:,:,:)
76 real(
rp),
public,
target,
allocatable ::
momz(:,:,:)
77 real(
rp),
public,
target,
allocatable ::
momx(:,:,:)
78 real(
rp),
public,
target,
allocatable ::
momy(:,:,:)
79 real(
rp),
public,
target,
allocatable ::
rhot(:,:,:)
80 real(
rp),
public,
target,
allocatable ::
qtrc(:,:,:,:)
87 real(
rp),
public,
target,
allocatable ::
qtrc_avw(:,:,:,:)
96 real(
rp),
public,
pointer ::
qv(:,:,:)
97 real(
rp),
public,
pointer ::
qc(:,:,:)
98 real(
rp),
public,
pointer ::
qr(:,:,:)
99 real(
rp),
public,
pointer ::
qi(:,:,:)
100 real(
rp),
public,
pointer ::
qs(:,:,:)
101 real(
rp),
public,
pointer ::
qg(:,:,:)
102 real(
rp),
public,
pointer ::
qh(:,:,:)
104 real(
rp),
public,
target,
allocatable ::
qe(:,:,:,:)
128 real(
rp),
public,
allocatable,
target ::
w (:,:,:)
129 real(
rp),
public,
allocatable,
target ::
u (:,:,:)
130 real(
rp),
public,
allocatable,
target ::
v (:,:,:)
132 real(
rp),
public,
allocatable,
target ::
pott (:,:,:)
133 real(
rp),
public,
allocatable,
target ::
temp (:,:,:)
134 real(
rp),
public,
allocatable,
target ::
pres (:,:,:)
135 real(
rp),
public,
allocatable,
target ::
exner(:,:,:)
136 real(
rp),
public,
allocatable,
target ::
phyd (:,:,:)
137 real(
rp),
public,
allocatable,
target ::
phydh(:,:,:)
139 real(
rp),
public,
allocatable,
target ::
qdry (:,:,:)
140 real(
rp),
public,
allocatable,
target ::
rtot (:,:,:)
141 real(
rp),
public,
allocatable,
target ::
cvtot(:,:,:)
142 real(
rp),
public,
allocatable,
target ::
cptot(:,:,:)
144 real(
rp),
public,
allocatable,
target ::
prec (:,:)
154 logical,
private :: atmos_vars_checkrange = .false.
155 real(
rp),
private :: atmos_vars_checkcfl_soft = 1.0_rp
156 real(
rp),
private :: atmos_vars_checkcfl_hard = 2.0_rp
159 character(len=H_SHORT) ::
name
160 character(len=H_MID) :: desc
161 character(len=H_SHORT) ::
unit
163 character(len=H_SHORT) :: dim_type
164 character(len=H_MID) :: stdname
168 integer,
private,
parameter :: pv_nmax = 5
169 type(vinfo),
private :: pv_info(pv_nmax)
170 integer,
private,
allocatable :: pv_id(:)
173 vinfo(
'DENS',
'density',
'kg/m3', 3,
'ZXY',
'air_density' ), &
174 vinfo(
'MOMZ',
'momentum z',
'kg/m2/s', 3,
'ZHXY',
'upward_mass_flux_of_air' ), &
175 vinfo(
'MOMX',
'momentum x',
'kg/m2/s', 3,
'ZXHY',
'eastward_mass_flux_of_air' ), &
176 vinfo(
'MOMY',
'momentum y',
'kg/m2/s', 3,
'ZXYH',
'northward_mass_flux_of_air' ), &
177 vinfo(
'RHOT',
'rho * theta',
'kg/m3*K', 3,
'ZXY',
'' ) /
181 real(
rp),
allocatable,
target :: lhv (:,:,:)
182 real(
rp),
allocatable,
target :: lhs (:,:,:)
183 real(
rp),
allocatable,
target :: lhf (:,:,:)
185 real(
rp),
allocatable,
target :: potv (:,:,:)
186 real(
rp),
allocatable,
target :: teml (:,:,:)
187 real(
rp),
allocatable,
target :: potl (:,:,:)
188 real(
rp),
allocatable,
target :: pote (:,:,:)
190 real(
rp),
allocatable,
target :: qtot (:,:,:)
191 real(
rp),
allocatable,
target :: qhyd (:,:,:)
192 real(
rp),
allocatable,
target :: qliq (:,:,:)
193 real(
rp),
allocatable,
target :: qice (:,:,:)
195 real(
rp),
allocatable,
target :: lwp (:,:)
196 real(
rp),
allocatable,
target :: iwp (:,:)
197 real(
rp),
allocatable,
target :: pw (:,:)
199 real(
rp),
allocatable,
target :: rain (:,:)
200 real(
rp),
allocatable,
target :: snow (:,:)
202 real(
rp),
allocatable,
target :: qsat (:,:,:)
203 real(
rp),
allocatable,
target :: rha (:,:,:)
204 real(
rp),
allocatable,
target :: rhl (:,:,:)
205 real(
rp),
allocatable,
target :: rhi (:,:,:)
207 real(
rp),
allocatable,
target :: vor (:,:,:)
208 real(
rp),
allocatable,
target :: div (:,:,:)
209 real(
rp),
allocatable,
target :: hdiv (:,:,:)
210 real(
rp),
allocatable,
target :: uabs (:,:,:)
212 real(
rp),
allocatable,
target :: n2 (:,:,:)
213 real(
rp),
allocatable,
target :: pblh (:,:)
215 real(
rp),
allocatable,
target :: mse (:,:,:)
216 real(
rp),
allocatable,
target :: tdew (:,:,:)
218 real(
rp),
allocatable,
target :: cape (:,:)
219 real(
rp),
allocatable,
target :: cin (:,:)
220 real(
rp),
allocatable,
target :: lcl (:,:)
221 real(
rp),
allocatable,
target :: lfc (:,:)
222 real(
rp),
allocatable,
target :: lnb (:,:)
224 real(
rp),
allocatable,
target :: engt (:,:,:)
225 real(
rp),
allocatable,
target :: engp (:,:,:)
226 real(
rp),
allocatable,
target :: engk (:,:,:)
227 real(
rp),
allocatable,
target :: engi (:,:,:)
229 real(
rp),
allocatable,
target :: dens_mean(:)
230 real(
rp),
allocatable,
target :: w_mean (:)
231 real(
rp),
allocatable,
target :: u_mean (:)
232 real(
rp),
allocatable,
target :: v_mean (:)
233 real(
rp),
allocatable,
target :: pt_mean (:)
234 real(
rp),
allocatable,
target :: t_mean (:)
235 real(
rp),
allocatable,
target :: qv_mean (:)
236 real(
rp),
allocatable,
target :: qhyd_mean(:)
237 real(
rp),
allocatable,
target :: qliq_mean(:)
238 real(
rp),
allocatable,
target :: qice_mean(:)
240 real(
rp),
allocatable,
target :: dens_prim(:,:,:)
241 real(
rp),
allocatable,
target :: w_prim (:,:,:)
242 real(
rp),
allocatable,
target :: u_prim (:,:,:)
243 real(
rp),
allocatable,
target :: v_prim (:,:,:)
244 real(
rp),
allocatable,
target :: pt_prim (:,:,:)
245 real(
rp),
allocatable,
target :: w_prim2 (:,:,:)
246 real(
rp),
allocatable,
target :: pt_w_prim(:,:,:)
247 real(
rp),
allocatable,
target :: w_prim3 (:,:,:)
248 real(
rp),
allocatable,
target :: tke_rs (:,:,:)
250 real(
rp),
allocatable,
target :: velz (:,:,:)
251 real(
rp),
allocatable,
target :: velx (:,:,:)
252 real(
rp),
allocatable,
target :: vely (:,:,:)
253 real(
rp),
allocatable,
target :: umet (:,:,:)
254 real(
rp),
allocatable,
target :: vmet (:,:,:)
258 integer,
private,
parameter :: i_w = 1
259 integer,
private,
parameter :: i_u = 2
260 integer,
private,
parameter :: i_v = 3
261 integer,
private,
parameter :: i_pott = 4
262 integer,
private,
parameter :: i_temp = 5
263 integer,
private,
parameter :: i_pres = 6
264 integer,
private,
parameter :: i_exner = 7
265 integer,
private,
parameter :: i_phyd = 8
266 integer,
private,
parameter :: i_qdry = 9
267 integer,
private,
parameter :: i_rtot = 10
268 integer,
private,
parameter :: i_cvtot = 11
269 integer,
private,
parameter :: i_cptot = 12
271 integer,
private,
parameter :: i_lhv = 13
272 integer,
private,
parameter :: i_lhs = 14
273 integer,
private,
parameter :: i_lhf = 15
274 integer,
private,
parameter :: i_potv = 16
275 integer,
private,
parameter :: i_teml = 17
276 integer,
private,
parameter :: i_potl = 18
277 integer,
private,
parameter :: i_pote = 19
278 integer,
private,
parameter :: i_qtot = 20
279 integer,
private,
parameter :: i_qhyd = 21
280 integer,
private,
parameter :: i_qliq = 22
281 integer,
private,
parameter :: i_qice = 23
282 integer,
private,
parameter :: i_lwp = 24
283 integer,
private,
parameter :: i_iwp = 25
284 integer,
private,
parameter :: i_pw = 26
285 integer,
private,
parameter :: i_prec = 27
286 integer,
private,
parameter :: i_rain = 28
287 integer,
private,
parameter :: i_snow = 29
288 integer,
private,
parameter :: i_qsat = 30
289 integer,
private,
parameter :: i_rha = 31
290 integer,
private,
parameter :: i_rhl = 32
291 integer,
private,
parameter :: i_rhi = 33
292 integer,
private,
parameter :: i_vor = 34
293 integer,
private,
parameter :: i_div = 35
294 integer,
private,
parameter :: i_hdiv = 36
295 integer,
private,
parameter :: i_uabs = 37
296 integer,
private,
parameter :: i_n2 = 38
297 integer,
private,
parameter :: i_pblh = 39
298 integer,
private,
parameter :: i_mse = 40
299 integer,
private,
parameter :: i_tdew = 41
300 integer,
private,
parameter :: i_cape = 42
301 integer,
private,
parameter :: i_cin = 43
302 integer,
private,
parameter :: i_lcl = 44
303 integer,
private,
parameter :: i_lfc = 45
304 integer,
private,
parameter :: i_lnb = 46
305 integer,
private,
parameter :: i_engt = 47
306 integer,
private,
parameter :: i_engp = 48
307 integer,
private,
parameter :: i_engk = 49
308 integer,
private,
parameter :: i_engi = 50
309 integer,
private,
parameter :: i_dens_mean = 51
310 integer,
private,
parameter :: i_w_mean = 52
311 integer,
private,
parameter :: i_u_mean = 53
312 integer,
private,
parameter :: i_v_mean = 54
313 integer,
private,
parameter :: i_pt_mean = 55
314 integer,
private,
parameter :: i_t_mean = 56
315 integer,
private,
parameter :: i_qv_mean = 57
316 integer,
private,
parameter :: i_qhyd_mean = 58
317 integer,
private,
parameter :: i_qliq_mean = 59
318 integer,
private,
parameter :: i_qice_mean = 60
319 integer,
private,
parameter :: i_dens_prim = 61
320 integer,
private,
parameter :: i_w_prim = 62
321 integer,
private,
parameter :: i_u_prim = 63
322 integer,
private,
parameter :: i_v_prim = 64
323 integer,
private,
parameter :: i_pt_prim = 65
324 integer,
private,
parameter :: i_w_prim2 = 66
325 integer,
private,
parameter :: i_pt_w_prim = 67
326 integer,
private,
parameter :: i_w_prim3 = 68
327 integer,
private,
parameter :: i_tke_rs = 69
328 integer,
private,
parameter :: i_velz = 70
329 integer,
private,
parameter :: i_velx = 71
330 integer,
private,
parameter :: i_vely = 72
331 integer,
private,
parameter :: i_umet = 73
332 integer,
private,
parameter :: i_vmet = 74
334 integer,
private,
parameter :: dv_nmax = 74
335 type(vinfo),
private :: dv_info(dv_nmax)
336 logical,
private :: dv_calculated(dv_nmax)
339 vinfo(
'W',
'velocity w',
'm/s', 3,
'ZXY',
'upward_air_velocity' ), &
340 vinfo(
'U',
'velocity u',
'm/s', 3,
'ZXY',
'x_wind' ), &
341 vinfo(
'V',
'velocity v',
'm/s', 3,
'ZXY',
'y_wind' ), &
342 vinfo(
'PT',
'potential temp.',
'K', 3,
'ZXY',
'air_potential_temperature' ), &
343 vinfo(
'T',
'temperature',
'K', 3,
'ZXY',
'air_temperature' ), &
344 vinfo(
'PRES',
'pressure',
'Pa', 3,
'ZXY',
'air_pressure' ), &
345 vinfo(
'EXNER',
'Exner function',
'1', 3,
'ZXY',
'dimensionless_exner_function' ), &
346 vinfo(
'PHYD',
'hydrostatic pressure',
'Pa', 3,
'ZXY',
'' ), &
347 vinfo(
'QDRY',
'dry air',
'kg/kg', 3,
'ZXY',
'' ), &
348 vinfo(
'RTOT',
'Total gas constant',
'J/kg/K', 3,
'ZXY',
'' ), &
349 vinfo(
'CVTOT',
'Total heat capacity',
'J/kg/K', 3,
'ZXY',
'' ), &
350 vinfo(
'CPTOT',
'Total heat capacity',
'J/kg/K', 3,
'ZXY',
'' ), &
351 vinfo(
'LHV',
'latent heat for vaporization',
'J/kg', 3,
'ZXY',
'' ), &
352 vinfo(
'LHS',
'latent heat for sublimation',
'J/kg', 3,
'ZXY',
'' ), &
353 vinfo(
'LHF',
'latent heat for fusion',
'J/kg', 3,
'ZXY',
'' ), &
354 vinfo(
'POTV',
'virtual potential temp.',
'K', 3,
'ZXY',
'' ), &
355 vinfo(
'TEML',
'liquid water temperature',
'K', 3,
'ZXY',
'' ), &
356 vinfo(
'POTL',
'liquid water potential temp.',
'K', 3,
'ZXY',
'' ), &
357 vinfo(
'POTE',
'equivalent potential temp.',
'K', 3,
'ZXY',
'pseudo_equivalent_potential_temperature' ), &
358 vinfo(
'QTOT',
'total water',
'kg/kg', 3,
'ZXY',
'mass_fraction_of_water_in_air' ), &
359 vinfo(
'QHYD',
'total hydrometeors',
'kg/kg', 3,
'ZXY',
'mass_fraction_of_cloud_condensed_water_in_air' ), &
360 vinfo(
'QLIQ',
'total liquid water',
'kg/kg', 3,
'ZXY',
'' ), &
361 vinfo(
'QICE',
'total ice water',
'kg/kg', 3,
'ZXY',
'' ), &
362 vinfo(
'LWP',
'liquid water path',
'g/m2', 2,
'XY',
'atmosphere_mass_content_of_cloud_liquid_water' ), &
363 vinfo(
'IWP',
'ice water path',
'g/m2', 2,
'XY',
'' ), &
364 vinfo(
'PW',
'precipitable water',
'g/m2', 2,
'XY',
'atmosphere_mass_content_of_vapor' ), &
365 vinfo(
'PREC',
'surface precipitation flux',
'kg/m2/s', 2,
'XY',
'precipitation_flux' ), &
366 vinfo(
'RAIN',
'surface rain flux',
'kg/m2/s', 2,
'XY',
'rainfall_flux' ), &
367 vinfo(
'SNOW',
'surface snow flux',
'kg/m2/s', 2,
'XY',
'snowfall_flux' ), &
368 vinfo(
'QSAT',
'saturation specific humidity',
'kg/kg', 3,
'ZXY',
'' ), &
369 vinfo(
'RHA',
'relative humidity(liq+ice)',
'%', 3,
'ZXY',
'' ), &
370 vinfo(
'RH',
'relative humidity(liq)',
'%', 3,
'ZXY',
'relative_humidity' ), &
371 vinfo(
'RHI',
'relative humidity(ice)',
'%', 3,
'ZXY',
'' ), &
372 vinfo(
'VOR',
'vertical vorticity',
'1/s', 3,
'ZXY',
'atmosphere_relative_vorticity' ), &
373 vinfo(
'DIV',
'divergence',
'1/s', 3,
'ZXY',
'divergence_of_wind' ), &
374 vinfo(
'HDIV',
'horizontal divergence',
'1/s', 3,
'ZXY',
'' ), &
375 vinfo(
'Uabs',
'absolute velocity',
'm/s', 3,
'ZXY',
'wind_speed' ), &
376 vinfo(
'N2',
'squared Brunt-Vaisala frequency',
'1/s2', 3,
'ZXY',
'square_of_brunt_vaisala_frequency_in_air' ), &
377 vinfo(
'PBLH',
'PBL height',
'm', 2,
'XY',
'atmosphere_boundary_layer_thickness' ), &
378 vinfo(
'MSE',
'moist static energy',
'm2/s2', 3,
'ZXY',
'' ), &
379 vinfo(
'TDEW',
'dew point',
'K', 3,
'ZXY',
'dew_point_temperature' ), &
380 vinfo(
'CAPE',
'convective avail. pot. energy',
'm2/s2', 2,
'XY',
'atmosphere_specific_convective_available_potential_energy' ), &
381 vinfo(
'CIN',
'convection inhibition',
'm2/s2', 2,
'XY',
'' ), &
382 vinfo(
'LCL',
'lifted condensation level',
'm', 2,
'XY',
'atmosphere_lifting_condensation_level' ), &
383 vinfo(
'LFC',
'level of free convection',
'm', 2,
'XY',
'atmosphere_level_of_free_convection' ), &
384 vinfo(
'LNB',
'level of neutral buoyancy',
'm', 2,
'XY',
'' ), &
385 vinfo(
'ENGT',
'total energy',
'J/m3', 3,
'ZXY',
'' ), &
386 vinfo(
'ENGP',
'potential energy',
'J/m3', 3,
'ZXY',
'' ), &
387 vinfo(
'ENGK',
'kinetic energy',
'J/m3', 3,
'ZXY',
'' ), &
388 vinfo(
'ENGI',
'internal energy',
'J/m3', 3,
'ZXY',
'' ), &
389 vinfo(
'DENS_MEAN',
'horiz. mean of density',
'kg/m3', 1,
'Z',
'' ), &
390 vinfo(
'W_MEAN',
'horiz. mean of w',
'm/s', 1,
'Z',
'' ), &
391 vinfo(
'U_MEAN',
'horiz. mean of u',
'm/s', 1,
'Z',
'' ), &
392 vinfo(
'V_MEAN',
'horiz. mean of v',
'm/s', 1,
'Z',
'' ), &
393 vinfo(
'PT_MEAN',
'horiz. mean of pot.',
'K', 1,
'Z',
'' ), &
394 vinfo(
'T_MEAN',
'horiz. mean of t',
'K', 1,
'Z',
'' ), &
395 vinfo(
'QV_MEAN',
'horiz. mean of QV',
'1', 1,
'Z',
'' ), &
396 vinfo(
'QHYD_MEAN',
'horiz. mean of QHYD',
'1', 1,
'Z',
'' ), &
397 vinfo(
'QLIQ_MEAN',
'horiz. mean of QLIQ',
'1', 1,
'Z',
'' ), &
398 vinfo(
'QICE_MEAN',
'horiz. mean of QICE',
'1', 1,
'Z',
'' ), &
399 vinfo(
'DENS_PRIM',
'horiz. deviation of density',
'kg/m3', 3,
'ZXY',
'' ), &
400 vinfo(
'W_PRIM',
'horiz. deviation of w',
'm/s', 3,
'ZXY',
'' ), &
401 vinfo(
'U_PRIM',
'horiz. deviation of u',
'm/s', 3,
'ZXY',
'' ), &
402 vinfo(
'V_PRIM',
'horiz. deviation of v',
'm/s', 3,
'ZXY',
'' ), &
403 vinfo(
'PT_PRIM',
'horiz. deviation of pot. temp.',
'K', 3,
'ZXY',
'' ), &
404 vinfo(
'W_PRIM2',
'variance of w',
'm2/s2', 3,
'ZXY',
'' ), &
405 vinfo(
'PT_W_PRIM',
'resolved scale heat flux',
'W/s', 3,
'ZXY',
'' ), &
406 vinfo(
'W_PRIM3',
'skewness of w',
'm3/s3', 3,
'ZXY',
'' ), &
407 vinfo(
'TKE_RS',
'resolved scale TKE',
'm2/s2', 3,
'ZXY',
'' ), &
408 vinfo(
'VELZ',
'velocity w at the half level',
'm/s', 3,
'ZHXY',
'' ), &
409 vinfo(
'VELX',
'velocity u at the half level',
'm/s', 3,
'ZXHY',
'' ), &
410 vinfo(
'VELY',
'velocity v at the half level',
'm/s', 3,
'ZXYH',
'' ), &
411 vinfo(
'Umet',
'eastward velocity',
'm/s', 3,
'ZXY',
'eastward_wind' ), &
412 vinfo(
'Vmet',
'northward velocity',
'm/s', 3,
'ZXY',
'northward_wind' ) /
415 integer,
private :: pv_hist_id (pv_nmax)
416 integer,
private :: pv_monit_id(pv_nmax)
417 integer,
private,
allocatable :: qp_hist_id (:)
418 integer,
private,
allocatable :: qp_monit_id(:)
419 integer,
private :: dv_hist_id (dv_nmax)
420 integer,
private :: hist_id_gph
422 integer,
private,
parameter :: im_qdry = 1
423 integer,
private,
parameter :: im_qtot = 2
424 integer,
private,
parameter :: im_evap = 3
425 integer,
private,
parameter :: im_prec = 4
426 integer,
private,
parameter :: im_engt = 5
427 integer,
private,
parameter :: im_engp = 6
428 integer,
private,
parameter :: im_engk = 7
429 integer,
private,
parameter :: im_engi = 8
430 integer,
private,
parameter :: im_engflxt = 9
431 integer,
private,
parameter :: im_engsfc_sh = 10
432 integer,
private,
parameter :: im_engsfc_lh = 11
433 integer,
private,
parameter :: im_engsfc_evap = 12
434 integer,
private,
parameter :: im_engsfc_prec = 13
435 integer,
private,
parameter :: im_engsfc_rd = 14
436 integer,
private,
parameter :: im_engtom_rd = 15
437 integer,
private,
parameter :: im_engsfc_lw_up = 16
438 integer,
private,
parameter :: im_engsfc_lw_dn = 17
439 integer,
private,
parameter :: im_engsfc_sw_up = 18
440 integer,
private,
parameter :: im_engsfc_sw_dn = 19
441 integer,
private,
parameter :: im_engtom_lw_up = 20
442 integer,
private,
parameter :: im_engtom_lw_dn = 21
443 integer,
private,
parameter :: im_engtom_sw_up = 22
444 integer,
private,
parameter :: im_engtom_sw_dn = 23
445 integer,
private,
parameter :: dvm_nmax = 23
446 integer,
private :: dv_monit_id(dvm_nmax)
449 logical,
private :: moist
450 real(
rp),
private,
target,
allocatable :: zero(:,:,:)
454 integer,
private :: restart_fid = -1
455 logical,
private :: atmos_restart_in_check_coordinates = .true.
458 real(
rp),
private,
allocatable :: work3d(:,:,:)
459 real(
rp),
private,
allocatable :: work2d(:,:)
460 real(
rp),
private,
allocatable :: work1d(:)
509 namelist / param_atmos_vars / &
513 atmos_restart_in_check_coordinates, &
523 atmos_vars_checkrange, &
524 atmos_vars_checkcfl_soft, &
525 atmos_vars_checkcfl_hard
532 log_info(
"ATMOS_vars_setup",*)
'Setup'
614 allocate( work3d(
ka,
ia,
ja) )
615 allocate( work2d(
ia,
ja) )
616 allocate( work1d(
ka ) )
623 log_info(
"ATMOS_vars_setup",*)
'Not found namelist. Default used.'
624 elseif( ierr > 0 )
then
625 log_error(
"ATMOS_vars_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_VARS. Check!'
628 log_nml(param_atmos_vars)
631 log_info(
"ATMOS_vars_setup",*)
'List of prognostic variables (ATMOS) '
632 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
633 ' |',
'VARNAME ',
'|', &
634 'DESCRIPTION ',
'[',
'UNIT ',
']'
636 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
637 'NO.',iv,
'|',pv_info(iv)%NAME,
'|', pv_info(iv)%DESC,
'[', pv_info(iv)%UNIT,
']'
640 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
649 log_info(
"ATMOS_vars_setup",*)
'Restart input? : NO'
656 log_info(
"ATMOS_vars_setup",*)
'Restart output? : NO'
664 if ( atmos_vars_checkcfl_hard > 0.0_rp )
then
665 atmos_vars_checkcfl_soft = min( atmos_vars_checkcfl_soft, atmos_vars_checkcfl_hard )
670 log_info(
"ATMOS_vars_setup",*)
'Check value range of variables? : ', atmos_vars_checkrange
671 if ( atmos_vars_checkcfl_soft > 0.0_rp )
then
672 log_info(
"ATMOS_vars_setup",*)
'Threshold of Courant number to warn : ', atmos_vars_checkcfl_soft
674 log_info(
"ATMOS_vars_setup",*)
'Threshold of Courant number to warn : disabled'
676 if ( atmos_vars_checkcfl_hard > 0.0_rp )
then
677 log_info(
"ATMOS_vars_setup",*)
'Threshold of Courant number to stop : ', atmos_vars_checkcfl_hard
679 log_info(
"ATMOS_vars_setup",*)
'Threshold of Courant number to stop : disabled'
696 allocate( zero(
ka,
ia,
ja) )
726 dv_calculated(dv_nmax) = .false.
729 allocate( qp_hist_id( max(
qa,1) ) )
730 allocate( qp_monit_id( max(
qa,1) ) )
740 call file_history_reg( pv_info(iv)%NAME, pv_info(iv)%DESC, pv_info(iv)%UNIT, pv_hist_id(iv), dim_type=pv_info(iv)%dim_type, standard_name=pv_info(iv)%STDNAME )
748 call file_history_reg( dv_info(iv)%NAME, dv_info(iv)%DESC, dv_info(iv)%UNIT, dv_hist_id(iv), dim_type=dv_info(iv)%dim_type, standard_name=dv_info(iv)%STDNAME )
751 call file_history_reg(
"GPH",
"geopotential height",
"m", hist_id_gph, dim_type=
'ZXY', standard_name=
"geopotential_height" )
756 call monitor_reg( pv_info(iv)%NAME, pv_info(iv)%DESC, trim(pv_info(iv)%UNIT)//
"*m3", &
758 dim_type=pv_info(iv)%dim_type, is_tendency=.false. )
763 dim_type=
'ZXY', is_tendency=.false. )
767 dv_monit_id(im_qdry), &
768 dim_type=
'ZXY', is_tendency=.false. )
770 dv_monit_id(im_qtot), &
771 dim_type=
'ZXY', is_tendency=.false. )
772 call monitor_reg(
'EVAP',
'evaporation at the surface',
'kg', &
773 dv_monit_id(im_evap), &
774 dim_type=
'XY', is_tendency=.true. )
776 dv_monit_id(im_prec), &
777 dim_type=
'XY', is_tendency=.true. )
780 dv_monit_id(im_engt), &
781 dim_type=
'ZXY', is_tendency=.false. )
782 call monitor_reg(
'ENGP',
'potential energy',
'J', &
783 dv_monit_id(im_engp), &
784 dim_type=
'ZXY', is_tendency=.false. )
786 dv_monit_id(im_engk), &
787 dim_type=
'ZXY', is_tendency=.false. )
788 call monitor_reg(
'ENGI',
'internal energy',
'J', &
789 dv_monit_id(im_engi), &
790 dim_type=
'ZXY', is_tendency=.false. )
792 call monitor_reg(
'ENGFLXT',
'total energy flux convergence',
'J', &
793 dv_monit_id(im_engflxt), &
794 dim_type=
'XY', is_tendency=.true. )
795 call monitor_reg(
'ENGSFC_SH',
'SFC sensible heat flux',
'J', &
796 dv_monit_id(im_engsfc_sh), &
797 dim_type=
'XY', is_tendency=.true. )
798 call monitor_reg(
'ENGSFC_LH',
'SFC latent heat flux',
'J', &
799 dv_monit_id(im_engsfc_lh), &
800 dim_type=
'XY', is_tendency=.true. )
801 call monitor_reg(
'ENGSFC_EVAP',
'SFC internal energy flux of the evapolation',
'J', &
802 dv_monit_id(im_engsfc_evap), &
803 dim_type=
'XY', is_tendency=.true. )
804 call monitor_reg(
'ENGSFC_PREC',
'SFC internal energy flux of the precipitation',
'J', &
805 dv_monit_id(im_engsfc_prec), &
806 dim_type=
'XY', is_tendency=.true. )
807 call monitor_reg(
'ENGSFC_RD',
'SFC net radiation flux',
'J', &
808 dv_monit_id(im_engsfc_rd), &
809 dim_type=
'XY', is_tendency=.true. )
810 call monitor_reg(
'ENGTOM_RD',
'TOM net radiation flux',
'J', &
811 dv_monit_id(im_engtom_rd), &
812 dim_type=
'XY', is_tendency=.true. )
814 call monitor_reg(
'ENGSFC_LW_up',
'SFC LW upward flux',
'J', &
815 dv_monit_id(im_engsfc_lw_up), &
816 dim_type=
'XY', is_tendency=.true. )
817 call monitor_reg(
'ENGSFC_LW_dn',
'SFC LW downward flux',
'J', &
818 dv_monit_id(im_engsfc_lw_dn), &
819 dim_type=
'XY', is_tendency=.true. )
820 call monitor_reg(
'ENGSFC_SW_up',
'SFC SW upward flux',
'J', &
821 dv_monit_id(im_engsfc_sw_up), &
822 dim_type=
'XY', is_tendency=.true. )
823 call monitor_reg(
'ENGSFC_SW_dn',
'SFC SW downward flux',
'J', &
824 dv_monit_id(im_engsfc_sw_dn), &
825 dim_type=
'XY', is_tendency=.true. )
827 call monitor_reg(
'ENGTOM_LW_up',
'TOM LW upward flux',
'J', &
828 dv_monit_id(im_engtom_lw_up), &
829 dim_type=
'XY', is_tendency=.true. )
830 call monitor_reg(
'ENGTOM_LW_dn',
'TOM LW downward flux',
'J', &
831 dv_monit_id(im_engtom_lw_dn), &
832 dim_type=
'XY', is_tendency=.true. )
833 call monitor_reg(
'ENGTOM_SW_up',
'TOM SW upward flux',
'J', &
834 dv_monit_id(im_engtom_sw_up), &
835 dim_type=
'XY', is_tendency=.true. )
836 call monitor_reg(
'ENGTOM_SW_dn',
'TOM SW downward flux',
'J', &
837 dv_monit_id(im_engtom_sw_dn), &
838 dim_type=
'XY', is_tendency=.true. )
852 logical,
intent(in),
optional :: fill_bnd
859 if (
present(fill_bnd) ) fill_bnd_ = fill_bnd
887 call comm_vars8(
dens(:,:,:), 1 )
888 call comm_vars8(
momz(:,:,:), 2 )
889 call comm_vars8(
momx(:,:,:), 3 )
890 call comm_vars8(
momy(:,:,:), 4 )
891 call comm_vars8(
rhot(:,:,:), 5 )
892 call comm_wait (
dens(:,:,:), 1, fill_bnd_ )
893 call comm_wait (
momz(:,:,:), 2, fill_bnd_ )
894 call comm_wait (
momx(:,:,:), 3, fill_bnd_ )
895 call comm_wait (
momy(:,:,:), 4, fill_bnd_ )
896 call comm_wait (
rhot(:,:,:), 5, fill_bnd_ )
899 call comm_vars8(
qtrc(:,:,:,iq), iq )
902 call comm_wait (
qtrc(:,:,:,iq), iq, fill_bnd_ )
919 file_cartesc_check_coordinates
956 character(len=19) :: timelabel
957 character(len=H_LONG) :: basename
961 log_info(
"ATMOS_vars_restart_open",*)
'Open restart file (ATMOS) '
972 log_info(
"ATMOS_vars_restart_open",*)
'basename: ', trim(basename)
976 if ( atmos_restart_in_check_coordinates )
then
977 call file_cartesc_check_coordinates( restart_fid, atmos=.true. )
981 log_error(
"ATMOS_vars_restart_open",*)
'restart file for atmosphere is not specified. STOP!'
1016 file_cartesc_read, &
1057 if ( restart_fid /= -1 )
then
1059 log_info(
"ATMOS_vars_restart_read",*)
'Read from restart file (ATMOS) '
1061 call file_cartesc_read( restart_fid, pv_info(
i_dens)%NAME,
'ZXY', &
1063 call file_cartesc_read( restart_fid, pv_info(
i_momz)%NAME,
'ZHXY', &
1065 call file_cartesc_read( restart_fid, pv_info(
i_momx)%NAME,
'ZXHY', &
1067 call file_cartesc_read( restart_fid, pv_info(
i_momy)%NAME,
'ZXYH', &
1069 call file_cartesc_read( restart_fid, pv_info(
i_rhot)%NAME,
'ZXY', &
1073 call file_cartesc_read( restart_fid,
tracer_name(iq),
'ZXY', &
1105 log_error(
"ATMOS_vars_restart_read",*)
'invalid restart file ID for atmosphere. STOP!'
1145 real(
rp) :: sfc_dens(
ia,
ja)
1146 real(
rp) :: sfc_pres(
ia,
ja)
1153 sfc_dens(:,:), sfc_pres(:,:) )
1171 file_cartesc_read, &
1183 character(len=H_LONG) :: basename
1185 logical :: datacheck
1186 integer ::
k, i,
j, iq
1200 call file_cartesc_read( fid,
'DENS',
'ZXY' , dens_check(:,:,:) )
1201 call file_cartesc_read( fid,
'MOMZ',
'ZHXY', momz_check(:,:,:) )
1202 call file_cartesc_read( fid,
'MOMX',
'ZXHY', momx_check(:,:,:) )
1203 call file_cartesc_read( fid,
'MOMY',
'ZXYH', momy_check(:,:,:) )
1204 call file_cartesc_read( fid,
'RHOT',
'ZXY' , rhot_check(:,:,:) )
1206 call file_cartesc_read( fid,
tracer_name(iq),
'ZXY', qtrc_check(:,:,:,iq) )
1216 log_error(
"ATMOS_vars_restart_check",*)
'there is the difference : ',
dens(
k,i,
j)-dens_check(
k,i,
j)
1217 log_error_cont(*)
'at (PE-id,k,i,j,varname) : ',
prc_myrank,
k, i,
j,
'DENS'
1228 log_error(
"ATMOS_vars_restart_check",*)
'there is the difference : ',
momz(
k,i,
j)-momz_check(
k,i,
j)
1229 log_error_cont(*)
'at (PE-id,k,i,j,varname) : ',
prc_myrank,
k, i,
j,
'MOMZ'
1240 log_error(
"ATMOS_vars_restart_check",*)
'there is the difference : ',
momx(
k,i,
j)-momx_check(
k,i,
j)
1241 log_error_cont(*)
'at (PE-id,k,i,j,varname) : ',
prc_myrank,
k, i,
j,
'MOMX'
1252 log_error(
"ATMOS_vars_restart_check",*)
'there is the difference : ',
momy(
k,i,
j)-momy_check(
k,i,
j)
1253 log_error_cont(*)
'at (PE-id,k,i,j,varname) : ',
prc_myrank,
k, i,
j,
'MOMY'
1264 log_error(
"ATMOS_vars_restart_check",*)
'there is the difference : ',
rhot(
k,i,
j)-rhot_check(
k,i,
j)
1265 log_error_cont(*)
'at (PE-id,k,i,j,varname) : ',
prc_myrank,
k, i,
j,
'RHOT'
1277 log_error(
"ATMOS_vars_restart_check",*)
'there is the difference : ',
qtrc(
k,i,
j,iq)-qtrc_check(
k,i,
j,iq)
1287 log_info(
"ATMOS_vars_restart_check",*)
'Data Check Clear.'
1289 log_info(
"ATMOS_vars_restart_check",*)
'Data Check Failed. See std. output.'
1290 log_error(
"ATMOS_vars_restart_check",*)
'Data Check Failed.'
1302 file_history_query, &
1319 call file_history_put ( pv_hist_id(
i_dens),
dens(:,:,:) )
1320 call file_history_put ( pv_hist_id(
i_momz),
momz(:,:,:) )
1321 call file_history_put ( pv_hist_id(
i_momx),
momx(:,:,:) )
1322 call file_history_put ( pv_hist_id(
i_momy),
momy(:,:,:) )
1323 call file_history_put ( pv_hist_id(
i_rhot),
rhot(:,:,:) )
1325 call file_history_put ( qp_hist_id(iq),
qtrc(:,:,:,iq) )
1330 call file_history_put ( dv_hist_id(i_w ),
w(:,:,:) )
1331 call file_history_put ( dv_hist_id(i_u ),
u(:,:,:) )
1332 call file_history_put ( dv_hist_id(i_v ),
v(:,:,:) )
1333 call file_history_put ( dv_hist_id(i_pott ),
pott(:,:,:) )
1334 call file_history_put ( dv_hist_id(i_temp ),
temp(:,:,:) )
1335 call file_history_put ( dv_hist_id(i_pres ),
pres(:,:,:) )
1337 call file_history_put ( dv_hist_id(i_exner),
exner(:,:,:) )
1338 call file_history_put ( dv_hist_id(i_phyd ),
phyd(:,:,:) )
1340 call file_history_put ( dv_hist_id(i_qdry ),
qdry(:,:,:) )
1341 call file_history_put ( dv_hist_id(i_rtot ),
rtot(:,:,:) )
1342 call file_history_put ( dv_hist_id(i_cvtot),
cvtot(:,:,:) )
1343 call file_history_put ( dv_hist_id(i_cptot),
cptot(:,:,:) )
1345 do iv = i_cptot+1, dv_nmax
1346 if ( dv_hist_id(iv) > 0 )
then
1347 call file_history_query( dv_hist_id(iv), do_put )
1350 select case( dv_info(iv)%ndims )
1352 call atmos_vars_get_diagnostic( dv_info(iv)%NAME, work3d(:,:,:) )
1353 call file_history_put( dv_hist_id(iv), work3d(:,:,:) )
1355 call atmos_vars_get_diagnostic( dv_info(iv)%NAME, work2d(:,:) )
1356 call file_history_put( dv_hist_id(iv), work2d(:,:) )
1358 call atmos_vars_get_diagnostic( dv_info(iv)%NAME, work1d(:) )
1359 call file_history_put( dv_hist_id(iv), work1d(:) )
1365 call file_history_put( hist_id_gph, real_cz(:,:,:) )
1416 logical,
intent(in),
optional :: force
1421 character(len=H_SHORT) :: wname(3)
1424 integer ::
k, i,
j, iq
1428 if (
present(force) )
then
1431 check = atmos_vars_checkrange
1437 dens(:,:,:), 0.0_rp, 2.0_rp, pv_info(
i_dens)%NAME, __file__, __line__ )
1439 momz(:,:,:), -200.0_rp, 200.0_rp, pv_info(
i_momz)%NAME, __file__, __line__ )
1441 momx(:,:,:), -200.0_rp, 200.0_rp, pv_info(
i_momx)%NAME, __file__, __line__ )
1443 momy(:,:,:), -200.0_rp, 200.0_rp, pv_info(
i_momy)%NAME, __file__, __line__ )
1445 rhot(:,:,:), 0.0_rp, 1000.0_rp, pv_info(
i_rhot)%NAME, __file__, __line__ )
1449 work(:,:,:,1) =
w(:,:,:)
1451 work(:,:,:,2) =
u(:,:,:)
1453 work(:,:,:,3) =
v(:,:,:)
1460 call statistics_detail(
ka,
ks,
ke,
ia,
is,
ie,
ja,
js,
je, 3, &
1461 wname(:), work(:,:,:,:) )
1464 if (
present(force) )
then
1474 atmos_grid_cartesc_real_vol(:,:,:), &
1475 atmos_grid_cartesc_real_totvol )
1478 atmos_grid_cartesc_real_volwxy(:,:,:), &
1479 atmos_grid_cartesc_real_totvolwxy )
1482 atmos_grid_cartesc_real_volzuy(:,:,:), &
1483 atmos_grid_cartesc_real_totvolzuy )
1486 atmos_grid_cartesc_real_volzxv(:,:,:), &
1487 atmos_grid_cartesc_real_totvolzxv )
1490 atmos_grid_cartesc_real_vol(:,:,:), &
1491 atmos_grid_cartesc_real_totvol )
1498 atmos_grid_cartesc_real_vol(:,:,:), &
1499 atmos_grid_cartesc_real_totvol )
1507 rhoq(:,:,:),
'QDRY', &
1508 atmos_grid_cartesc_real_vol(:,:,:), &
1509 atmos_grid_cartesc_real_totvol )
1513 rhoq(:,:,:),
'QTOT', &
1514 atmos_grid_cartesc_real_vol(:,:,:), &
1515 atmos_grid_cartesc_real_totvol )
1518 call atmos_vars_get_diagnostic(
'ENGT', work3d(:,:,:) )
1520 work3d(:,:,:),
'ENGT', &
1521 atmos_grid_cartesc_real_vol(:,:,:), &
1522 atmos_grid_cartesc_real_totvol )
1523 call atmos_vars_get_diagnostic(
'ENGP', work3d(:,:,:) )
1525 work3d(:,:,:),
'ENGP', &
1526 atmos_grid_cartesc_real_vol(:,:,:), &
1527 atmos_grid_cartesc_real_totvol )
1528 call atmos_vars_get_diagnostic(
'ENGK', work3d(:,:,:) )
1530 work3d(:,:,:),
'ENGK', &
1531 atmos_grid_cartesc_real_vol(:,:,:), &
1532 atmos_grid_cartesc_real_totvol )
1533 call atmos_vars_get_diagnostic(
'ENGI', work3d(:,:,:) )
1535 work3d(:,:,:),
'ENGI', &
1536 atmos_grid_cartesc_real_vol(:,:,:), &
1537 atmos_grid_cartesc_real_totvol )
1544 .AND. ( atmos_vars_checkcfl_soft > 0.0_rp .OR. atmos_vars_checkcfl_hard > 0.0_rp ) )
then
1547 work(:,:,:,:) = 0.0_rp
1565 work(
k,
is,
j,2) = 0.0_rp
1580 cflmax = maxval( work(:,:,:,:) )
1582 if ( atmos_vars_checkcfl_hard > 0.0_rp .AND. cflmax > atmos_vars_checkcfl_hard )
then
1583 log_info(
"ATMOS_vars_check",*)
"Courant number =", cflmax,
" exceeded the hard limit =", atmos_vars_checkcfl_hard
1584 log_error(
"ATMOS_vars_check",*)
"Courant number =", cflmax,
" exceeded the hard limit =", atmos_vars_checkcfl_hard
1586 log_error_cont(*)
"Please set ATMOS_VARS_CHECKCFL_HARD in the namelist PARAM_ATMOS_VARS when you want to change the limit."
1588 wname(1) =
"Courant num. Z"
1589 wname(2) =
"Courant num. X"
1590 wname(3) =
"Courant num. Y"
1591 call statistics_detail(
ka,
ks,
ke,
ia,
is,
ie,
ja,
js,
je, 3, &
1592 wname(:), work(:,:,:,:), &
1598 if ( atmos_vars_checkcfl_soft > 0.0_rp .AND. cflmax > atmos_vars_checkcfl_soft )
then
1599 log_info(
"ATMOS_vars_check",*)
"Courant number =", cflmax,
" exceeded the soft limit =", atmos_vars_checkcfl_soft
1600 log_error(
"ATMOS_vars_check",*)
"Courant number =", cflmax,
" exceeded the soft limit =", atmos_vars_checkcfl_soft
1603 wname(1) =
"Courant num. Z"
1604 wname(2) =
"Courant num. X"
1605 wname(3) =
"Courant num. Y"
1606 call statistics_detail(
ka,
ks,
ke,
ia,
is,
ie,
ja,
js,
je, 3, &
1607 wname(:), work(:,:,:,:), &
1624 atmos_thermodyn_specific_heat
1644 call atmos_thermodyn_specific_heat( &
1645 ka,
ks,
ke,
ia, 1,
ia,
ja, 1,
ja,
qa, &
1648 qdry(:,:,:),
rtot(:,:,:),
cvtot(:,:,:),
cptot(:,:,:) )
1652 dens_av(:,:,:),
momz_av(:,:,:),
momx_av(:,:,:),
momy_av(:,:,:), &
1653 w(:,:,:),
u(:,:,:),
v(:,:,:) )
1659 pott(:,:,:),
temp(:,:,:),
pres(:,:,:),
exner(:,:,:) )
1664 real_cz(:,:,:), real_fz(:,:,:), &
1672 dens_av(:,:,:),
temp(:,:,:),
qtrc_av(:,:,:,:), &
1675 call comm_vars8(
qe(:,:,:,iq), iq)
1678 call comm_wait (
qe(:,:,:,iq), iq)
1683 dv_calculated(:) = .false.
1717 atmos_hydrometeor_lhv, &
1718 atmos_hydrometeor_lhf, &
1719 atmos_hydrometeor_lhs
1721 atmos_saturation_dens2qsat_all, &
1722 atmos_saturation_psat_all, &
1723 atmos_saturation_psat_liq, &
1724 atmos_saturation_psat_ice, &
1725 atmos_saturation_tdew_liq, &
1726 atmos_saturation_pote
1732 character(len=*),
intent(in) :: vname
1733 real(
rp),
intent(out) :: var(:,:,:)
1740 integer ::
k, i,
j, iq
1742 select case ( vname )
1744 var(:,:,:) =
w(:,:,:)
1747 var(:,:,:) =
u(:,:,:)
1750 var(:,:,:) =
v(:,:,:)
1753 var(:,:,:) =
pott(:,:,:)
1756 var(:,:,:) =
temp(:,:,:)
1759 var(:,:,:) =
exner(:,:,:)
1762 var(:,:,:) =
phyd(:,:,:)
1765 var(:,:,:) =
qdry(:,:,:)
1768 var(:,:,:) =
rtot(:,:,:)
1771 var(:,:,:) =
cvtot(:,:,:)
1774 var(:,:,:) =
cptot(:,:,:)
1777 if ( .not. dv_calculated(i_lhv) )
then
1779 call atmos_hydrometeor_lhv( &
1783 dv_calculated(i_lhv) = .true.
1788 if ( .not. dv_calculated(i_lhs) )
then
1790 call atmos_hydrometeor_lhs( &
1794 dv_calculated(i_lhs) = .true.
1799 if ( .not. dv_calculated(i_lhf) )
then
1801 call atmos_hydrometeor_lhf( &
1805 dv_calculated(i_lhf) = .true.
1810 if ( .not. dv_calculated(i_potv) )
then
1816 dv_calculated(i_potv) = .true.
1821 if ( .not. dv_calculated(i_teml) )
then
1823 call atmos_vars_get_diagnostic(
'LHV', work3d(:,:,:) )
1824 call atmos_vars_get_diagnostic(
'LHS', work3d(:,:,:) )
1825 call atmos_vars_get_diagnostic(
'QLIQ', work3d(:,:,:) )
1826 call atmos_vars_get_diagnostic(
'QICE', work3d(:,:,:) )
1829 temp(:,:,:),
lhv(:,:,:), lhs(:,:,:), &
1832 dv_calculated(i_teml) = .true.
1837 if ( .not. dv_calculated(i_potl) )
then
1839 call atmos_vars_get_diagnostic(
'TEML', work3d(:,:,:) )
1852 dv_calculated(i_potl) = .true.
1857 if ( .not. dv_calculated(i_pote) )
then
1859 call atmos_saturation_pote( &
1861 dens(:,:,:),
pott(:,:,:),
temp(:,:,:),
qv(:,:,:), &
1866 if ( .not. dv_calculated(i_qtot) )
then
1869 call atmos_vars_get_diagnostic(
'QHYD', work3d(:,:,:) )
1878 qtot(
k,i,
j) =
qv(
k,i,
j) + qhyd(
k,i,
j)
1891 qtot(
k,i,
j) = 0.0_rp
1896 dv_calculated(i_qtot) = .true.
1901 if ( .not. dv_calculated(i_qhyd) )
then
1904 call atmos_vars_get_diagnostic(
'QLIQ', work3d(:,:,:) )
1905 call atmos_vars_get_diagnostic(
'QICE', work3d(:,:,:) )
1914 qhyd(
k,i,
j) = qliq(
k,i,
j) + qice(
k,i,
j)
1927 qhyd(
k,i,
j) = 0.0_rp
1932 dv_calculated(i_qhyd) = .true.
1937 if ( .not. dv_calculated(i_qliq) )
then
1951 dv_calculated(i_qliq) = .true.
1956 if ( .not. dv_calculated(i_qice) )
then
1966 qice(
k,i,
j) =
qi(
k,i,
j) +
qs(
k,i,
j) +
qg(
k,i,
j) +
qh(
k,i,
j)
1970 dv_calculated(i_qice) = .true.
1975 if ( .not. dv_calculated(i_qsat) )
then
1977 call atmos_saturation_dens2qsat_all( &
1981 dv_calculated(i_qsat) = .true.
1986 if ( .not. dv_calculated(i_rha) )
then
1989 call atmos_saturation_psat_all( &
2002 / work(
k,i,
j) * rvap *
temp(
k,i,
j) &
2021 dv_calculated(i_rha) = .true.
2025 case (
'RHL',
'RH' )
2026 if ( .not. dv_calculated(i_rhl) )
then
2029 call atmos_saturation_psat_liq( &
2042 / work(
k,i,
j) * rvap *
temp(
k,i,
j) &
2061 dv_calculated(i_rhl) = .true.
2066 if ( .not. dv_calculated(i_rhi) )
then
2069 call atmos_saturation_psat_ice( &
2082 / work(
k,i,
j) * rvap *
temp(
k,i,
j) &
2101 dv_calculated(i_rhi) = .true.
2106 if ( .not. dv_calculated(i_vor) )
then
2129 vor(
k,
is,1 ) = vor(
k,
is,2 )
2160 vor(
k,i,
j) = ( vh(
k,i,
j ) - vh(
k,i-1,
j ) ) * rcdx(i) &
2161 - ( uh(
k,i ,
j) - uh(
k,i ,
j-1) ) * rcdy(
j)
2168 vor(
k,1 ,
j) = vor(
k,2 ,
j)
2175 vor(
k,i,1 ) = vor(
k,i,2 )
2176 vor(
k,i,
ja) = vor(
k,i,
ja-1)
2180 dv_calculated(i_vor) = .true.
2182 call comm_vars8( vor(:,:,:), 1 )
2183 call comm_wait ( vor(:,:,:), 1, .false. )
2187 if ( .not. dv_calculated(i_div) )
then
2189 call atmos_vars_get_diagnostic(
'HDIV', work3d(:,:,:) )
2196 div(
k,i,
j) = (
momz_av(
k,i,
j) -
momz_av(
k-1,i ,
j ) ) / ( real_fz(
k,i,
j)-real_fz(
k-1,i,
j) ) &
2201 dv_calculated(i_div) = .true.
2206 if ( .not. dv_calculated(i_hdiv) )
then
2219 hdiv(
k,
is,1) = hdiv(
k,
is,2)
2235 hdiv(
k,i,1) = hdiv(
k,i,2)
2241 hdiv(
k,1,
j) = hdiv(
k,2,
j)
2245 call comm_vars8( hdiv(:,:,:), 1 )
2246 call comm_wait ( hdiv(:,:,:), 1, .false. )
2247 dv_calculated(i_hdiv) = .true.
2252 if ( .not. dv_calculated(i_uabs) )
then
2259 uabs(
k,i,
j) = sqrt(
w(
k,i,
j)**2 +
u(
k,i,
j)**2 +
v(
k,i,
j)**2 )
2263 dv_calculated(i_uabs) = .true.
2268 if ( .not. dv_calculated(i_n2) )
then
2273 real_cz(:,:,:), real_fz(:,:,:), &
2276 dv_calculated(i_n2) = .true.
2281 if ( .not. dv_calculated(i_mse) )
then
2283 call atmos_vars_get_diagnostic(
'LHV', work3d(:,:,:) )
2290 + grav * ( real_cz(
k,i,
j) - real_fz(
ks-1,i,
j) ) &
2295 dv_calculated(i_mse) = .true.
2300 if ( .not. dv_calculated(i_tdew) )
then
2302 call atmos_saturation_tdew_liq(
ka,
ks,
ke,
ia, 1,
ia,
ja, 1,
ja, &
2305 dv_calculated(i_tdew) = .true.
2310 if ( .not. dv_calculated(i_engp) )
then
2320 dv_calculated(i_engp) = .true.
2325 if ( .not. dv_calculated(i_engk) )
then
2332 * (
w(
k,i,
j)**2 +
u(
k,i,
j)**2 +
v(
k,i,
j)**2 )
2336 dv_calculated(i_engk) = .true.
2341 if ( .not. dv_calculated(i_engi) )
then
2349 engi(
k,i,
j) = engi(
k,i,
j) &
2355 dv_calculated(i_engi) = .true.
2360 if ( .not. dv_calculated(i_engt) )
then
2362 call atmos_vars_get_diagnostic(
'ENGP', work3d(:,:,:) )
2363 call atmos_vars_get_diagnostic(
'ENGK', work3d(:,:,:) )
2364 call atmos_vars_get_diagnostic(
'ENGI', work3d(:,:,:) )
2369 engt(
k,i,
j) = engp(
k,i,
j) + engk(
k,i,
j) + engi(
k,i,
j)
2373 dv_calculated(i_engt) = .true.
2377 case (
'DENS_PRIM' )
2378 if ( .not. dv_calculated(i_dens_prim) )
then
2380 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
2390 dv_calculated(i_dens_prim) = .true.
2392 var(
ks:
ke,:,:) = dens_prim(
ks:
ke,:,:)
2395 if ( .not. dv_calculated(i_w_prim) )
then
2397 call atmos_vars_get_diagnostic(
'W_MEAN', work1d(:) )
2403 w_prim(
k,i,
j) =
w(
k,i,
j) - w_mean(
k)
2407 dv_calculated(i_w_prim) = .true.
2412 if ( .not. dv_calculated(i_u_prim) )
then
2414 call atmos_vars_get_diagnostic(
'U_MEAN', work1d(:) )
2420 u_prim(
k,i,
j) =
u(
k,i,
j) - u_mean(
k)
2424 dv_calculated(i_u_prim) = .true.
2429 if ( .not. dv_calculated(i_v_prim) )
then
2431 call atmos_vars_get_diagnostic(
'V_MEAN', work1d(:) )
2437 v_prim(
k,i,
j) =
v(
k,i,
j) - v_mean(
k)
2441 dv_calculated(i_v_prim) = .true.
2446 if ( .not. dv_calculated(i_pt_prim) )
then
2448 call atmos_vars_get_diagnostic(
'PT_MEAN', work1d(:) )
2454 pt_prim(
k,i,
j) =
pott(
k,i,
j) - pt_mean(
k)
2458 dv_calculated(i_pt_prim) = .true.
2460 var(
ks:
ke,:,:) = pt_prim(
ks:
ke,:,:)
2463 if ( .not. dv_calculated(i_w_prim2) )
then
2465 call atmos_vars_get_diagnostic(
'W_PRIM', work3d(:,:,:) )
2471 w_prim2(
k,i,
j) = w_prim(
k,i,
j)**2
2475 dv_calculated(i_w_prim2) = .true.
2477 var(
ks:
ke,:,:) = w_prim2(
ks:
ke,:,:)
2479 case (
'PT_W_PRIM' )
2480 if ( .not. dv_calculated(i_pt_w_prim) )
then
2482 call atmos_vars_get_diagnostic(
'W_PRIM', work3d(:,:,:) )
2483 call atmos_vars_get_diagnostic(
'PT_PRIM', work3d(:,:,:) )
2488 pt_w_prim(
k,i,
j) = w_prim(
k,i,
j) * pt_prim(
k,i,
j) *
dens_av(
k,i,
j) * cpdry
2492 dv_calculated(i_pt_w_prim) = .true.
2494 var(
ks:
ke,:,:) = pt_w_prim(
ks:
ke,:,:)
2497 if ( .not. dv_calculated(i_w_prim3) )
then
2499 call atmos_vars_get_diagnostic(
'W_PRIM', work3d(:,:,:) )
2505 w_prim3(
k,i,
j) = w_prim(
k,i,
j)**3
2509 dv_calculated(i_w_prim3) = .true.
2511 var(
ks:
ke,:,:) = w_prim3(
ks:
ke,:,:)
2514 if ( .not. dv_calculated(i_tke_rs) )
then
2516 call atmos_vars_get_diagnostic(
'W_PRIM', work3d(:,:,:) )
2517 call atmos_vars_get_diagnostic(
'U_PRIM', work3d(:,:,:) )
2518 call atmos_vars_get_diagnostic(
'V_PRIM', work3d(:,:,:) )
2524 tke_rs(
k,i,
j) = 0.5_rp * ( w_prim(
k,i,
j)**2 + u_prim(
k,i,
j)**2 + v_prim(
k,i,
j)**2 )
2528 dv_calculated(i_tke_rs) = .true.
2533 if ( .not. dv_calculated(i_velz) )
then
2539 velz(
ks-1,i,
j) = 0.0_rp
2543 velz(
ke,i,
j) = 0.0_rp
2546 dv_calculated(i_velz) = .true.
2548 var(
ks-1:
ke,:,:) = velz(
ks-1:
ke,:,:)
2551 if ( .not. dv_calculated(i_velx) )
then
2578 call comm_vars8( velx(:,:,:), 1 )
2579 call comm_wait ( velx(:,:,:), 1, .false. )
2581 dv_calculated(i_velx) = .true.
2586 if ( .not. dv_calculated(i_vely) )
then
2604 call comm_vars8( vely(:,:,:), 1 )
2605 call comm_wait ( vely(:,:,:), 1, .false. )
2606 dv_calculated(i_vely) = .true.
2611 if ( .not. dv_calculated(i_umet) )
then
2618 umet(
k,i,
j) =
u(
k,i,
j) * rotc(i,
j,1) -
v(
k,i,
j) * rotc(i,
j,2)
2622 dv_calculated(i_umet) = .true.
2627 if ( .not. dv_calculated(i_vmet) )
then
2634 vmet(
k,i,
j) =
u(
k,i,
j) * rotc(i,
j,2) +
v(
k,i,
j) * rotc(i,
j,1)
2638 dv_calculated(i_vmet) = .true.
2643 log_error(
"ATMOS_vars_calc_diagnostics",*)
'name is invalid for ATMOS_vars_get_diagnostic_3D: ', trim(vname)
2671 character(len=*),
intent(in) :: vname
2672 real(
rp),
intent(out) :: var(:,:)
2678 select case ( vname )
2680 if ( .not. dv_calculated(i_lwp) )
then
2682 call atmos_vars_get_diagnostic(
'QLIQ', work3d(:,:,:) )
2691 lwp(i,
j) = lwp(i,
j) &
2692 + qliq(
k,i,
j) *
dens_av(
k,i,
j) * ( real_fz(
k,i,
j)-real_fz(
k-1,i,
j) ) * 1.e3_rp
2696 dv_calculated(i_lwp) = .true.
2701 if ( .not. dv_calculated(i_iwp) )
then
2703 call atmos_vars_get_diagnostic(
'QICE', work3d(:,:,:) )
2712 iwp(i,
j) = iwp(i,
j) &
2713 + qice(
k,i,
j) *
dens_av(
k,i,
j) * ( real_fz(
k,i,
j)-real_fz(
k-1,i,
j) ) * 1.e3_rp
2717 dv_calculated(i_iwp) = .true.
2722 if ( .not. dv_calculated(i_pw) )
then
2737 dv_calculated(i_pw) = .true.
2742 if ( .not. dv_calculated(i_pblh) )
then
2744 call atmos_vars_get_diagnostic(
'POTV', work3d(:,:,:) )
2752 pblh(i,
j) = real_cz(
ks,i,
j) - real_fz(
ks-1,i,
j)
2754 if ( potv(
k,i,
j) > potv(
ks,i,
j) )
then
2755 fact = ( potv(
ks,i,
j) - potv(
k-1,i,
j) ) &
2756 / ( potv(
k,i,
j) - potv(
k-1,i,
j) )
2757 pblh(i,
j) = real_cz(
k-1,i,
j) - real_fz(
ks-1,i,
j) &
2758 + fact * ( real_cz(
k,i,
j) - real_cz(
k-1,i,
j) )
2765 dv_calculated(i_pblh) = .true.
2767 var(:,:) = pblh(:,:)
2769 case (
'CAPE',
'CIN',
'LCL',
'LFC',
'LNB' )
2770 if ( .not. dv_calculated(i_cape) )
then
2776 call atmos_adiabat_cape( &
2780 qv(:,:,:),
qc(:,:,:),
qdry(:,:,:), &
2782 real_cz(:,:,:), real_fz(:,:,:), &
2783 cape(:,:), cin(:,:), lcl(:,:), lfc(:,:), lnb(:,:) )
2784 dv_calculated(i_cape) = .true.
2786 select case ( vname )
2791 var(i,
j) = cape(i,
j)
2832 case (
'RAIN',
'SNOW' )
2833 if ( .not. dv_calculated(i_rain) )
then
2839 rain(i,
j) = sflx_rain_mp(i,
j) + sflx_rain_cp(i,
j)
2840 snow(i,
j) = sflx_snow_mp(i,
j) + sflx_snow_cp(i,
j)
2843 dv_calculated(i_rain) = .true.
2850 var(i,
j) = rain(i,
j)
2857 var(i,
j) = snow(i,
j)
2863 log_error(
"ATMOS_vars_calc_diagnostics",*)
'name is invalid for ATMOS_vars_get_diagnostic_2D: ', trim(vname)
2881 statistics_horizontal_mean
2886 character(len=*),
intent(in) :: vname
2887 real(
rp),
intent(out) :: var(:)
2893 select case ( vname )
2894 case (
'DENS_MEAN' )
2895 if ( .not. dv_calculated(i_dens_mean) )
then
2898 dens(:,:,:), area(:,:), dens_mean(:) )
2899 dv_calculated(i_dens_mean) = .true.
2901 var(:) = dens_mean(:)
2904 if ( .not. dv_calculated(i_w_mean) )
then
2906 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
2917 work(:,:,:), area(:,:), w_mean(:) )
2919 w_mean(
k) = w_mean(
k) / dens_mean(
k)
2921 dv_calculated(i_w_mean) = .true.
2926 if ( .not. dv_calculated(i_u_mean) )
then
2928 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
2939 work(:,:,:), area(:,:), u_mean(:) )
2941 u_mean(
k) = u_mean(
k) / dens_mean(
k)
2943 dv_calculated(i_u_mean) = .true.
2948 if ( .not. dv_calculated(i_v_mean) )
then
2950 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
2961 work(:,:,:), area(:,:), v_mean(:) )
2963 v_mean(
k) = v_mean(
k) / dens_mean(
k)
2965 dv_calculated(i_v_mean) = .true.
2970 if ( .not. dv_calculated(i_pt_mean) )
then
2972 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
2974 rhot(:,:,:), area(:,:), pt_mean(:) )
2976 pt_mean(
k) = pt_mean(
k) / dens_mean(
k)
2978 dv_calculated(i_pt_mean) = .true.
2983 if ( .not. dv_calculated(i_t_mean) )
then
2985 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
2996 work(:,:,:), area(:,:), t_mean(:) )
2998 t_mean(
k) = t_mean(
k) / dens_mean(
k)
3000 dv_calculated(i_t_mean) = .true.
3005 if ( .not. dv_calculated(i_qv_mean) )
then
3008 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
3019 work(:,:,:), area(:,:), qv_mean(:) )
3021 qv_mean(
k) = qv_mean(
k) / dens_mean(
k)
3029 dv_calculated(i_qv_mean) = .true.
3033 case (
'QHYD_MEAN' )
3034 if ( .not. dv_calculated(i_qhyd_mean) )
then
3036 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
3037 call atmos_vars_get_diagnostic(
'QHYD', work3d(:,:,:) )
3048 work(:,:,:), area(:,:), qhyd_mean(:) )
3050 qhyd_mean(
k) = qhyd_mean(
k) / dens_mean(
k)
3052 dv_calculated(i_qhyd_mean) = .true.
3054 var(:) = qhyd_mean(:)
3056 case (
'QLIQ_MEAN' )
3057 if ( .not. dv_calculated(i_qliq_mean) )
then
3059 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
3060 call atmos_vars_get_diagnostic(
'QLIQ', work3d(:,:,:) )
3071 work(:,:,:), area(:,:), qliq_mean(:) )
3073 qliq_mean(
k) = qliq_mean(
k) / dens_mean(
k)
3075 dv_calculated(i_qliq_mean) = .true.
3077 var(:) = qliq_mean(:)
3079 case (
'QICE_MEAN' )
3080 if ( .not. dv_calculated(i_qice_mean) )
then
3082 call atmos_vars_get_diagnostic(
'DENS_MEAN', work1d(:) )
3083 call atmos_vars_get_diagnostic(
'QICE', work3d(:,:,:) )
3094 work(:,:,:), area(:,:), qice_mean(:) )
3096 qice_mean(
k) = qice_mean(
k) / dens_mean(
k)
3098 dv_calculated(i_qice_mean) = .true.
3100 var(:) = qice_mean(:)
3103 log_error(
"ATMOS_vars_calc_diagnostics",*)
'name is invalid for ATMOS_vars_get_diagnostic_1D: ', trim(vname)
3136 real(
rp) :: engflxt (
ia,
ja)
3137 real(
rp) :: sflx_rd_net(
ia,
ja)
3138 real(
rp) :: tflx_rd_net(
ia,
ja)
3140 integer ::
k, i,
j, iq
3143 call monitor_put( pv_monit_id(
i_dens),
dens(:,:,:) )
3144 call monitor_put( pv_monit_id(
i_momz),
momz(:,:,:) )
3145 call monitor_put( pv_monit_id(
i_momx),
momx(:,:,:) )
3146 call monitor_put( pv_monit_id(
i_momy),
momy(:,:,:) )
3147 call monitor_put( pv_monit_id(
i_rhot),
rhot(:,:,:) )
3162 call monitor_put( qp_monit_id(iq), rhoq(:,:,:) )
3166 if ( dv_monit_id(im_qdry) > 0 )
then
3176 call monitor_put( dv_monit_id(im_qdry), rhoq(:,:,:) )
3180 if ( dv_monit_id(im_qtot) > 0 )
then
3181 call atmos_vars_get_diagnostic(
'QTOT', work3d(:,:,:) )
3191 call monitor_put( dv_monit_id(im_qtot), rhoq(:,:,:) )
3195 if ( moist )
call monitor_put( dv_monit_id(im_evap), sflx_qtrc(:,:,
i_qv) )
3198 if ( dv_monit_id(im_prec) > 0 )
then
3199 call monitor_put( dv_monit_id(im_prec),
prec(:,:) )
3205 if ( dv_monit_id(im_engt) > 0 )
then
3206 call atmos_vars_get_diagnostic(
'ENGT', work3d(:,:,:) )
3207 call monitor_put( dv_monit_id(im_engt), work3d(:,:,:) )
3209 if ( dv_monit_id(im_engp) > 0 )
then
3210 call atmos_vars_get_diagnostic(
'ENGP', work3d(:,:,:) )
3211 call monitor_put( dv_monit_id(im_engp), work3d(:,:,:) )
3213 if ( dv_monit_id(im_engk) > 0 )
then
3214 call atmos_vars_get_diagnostic(
'ENGK', work3d(:,:,:) )
3215 call monitor_put( dv_monit_id(im_engk), work3d(:,:,:) )
3217 if ( dv_monit_id(im_engi) > 0 )
then
3218 call atmos_vars_get_diagnostic(
'ENGI', work3d(:,:,:) )
3219 call monitor_put( dv_monit_id(im_engi), work3d(:,:,:) )
3227 sflx_rd_net(i,
j) = ( sflx_lw_up(i,
j) - sflx_lw_dn(i,
j) ) &
3228 + ( sflx_sw_up(i,
j) - sflx_sw_dn(i,
j) )
3230 tflx_rd_net(i,
j) = ( tomflx_lw_up(i,
j) - tomflx_lw_dn(i,
j) ) &
3231 + ( tomflx_sw_up(i,
j) - tomflx_sw_dn(i,
j) )
3233 engflxt(i,
j) = sflx_sh(i,
j) &
3235 + sflx_rd_net(i,
j) - tflx_rd_net(i,
j)
3239 call monitor_put( dv_monit_id(im_engflxt), engflxt(:,:) )
3241 call monitor_put( dv_monit_id(im_engsfc_sh), sflx_sh(:,:) )
3242 call monitor_put( dv_monit_id(im_engsfc_lh), sflx_lh(:,:) )
3243 call monitor_put( dv_monit_id(im_engsfc_evap), sflx_engi(:,:) )
3244 call monitor_put( dv_monit_id(im_engsfc_prec),
prec_engi(:,:) )
3245 call monitor_put( dv_monit_id(im_engsfc_rd), sflx_rd_net(:,:) )
3246 call monitor_put( dv_monit_id(im_engtom_rd), tflx_rd_net(:,:) )
3248 call monitor_put( dv_monit_id(im_engsfc_lw_up), sflx_lw_up(:,:) )
3249 call monitor_put( dv_monit_id(im_engsfc_lw_dn), sflx_lw_dn(:,:) )
3250 call monitor_put( dv_monit_id(im_engsfc_sw_up), sflx_sw_up(:,:) )
3251 call monitor_put( dv_monit_id(im_engsfc_sw_dn), sflx_sw_dn(:,:) )
3253 call monitor_put( dv_monit_id(im_engtom_lw_up), tomflx_lw_up(:,:) )
3254 call monitor_put( dv_monit_id(im_engtom_lw_dn), tomflx_lw_dn(:,:) )
3255 call monitor_put( dv_monit_id(im_engtom_sw_up), tomflx_sw_up(:,:) )
3256 call monitor_put( dv_monit_id(im_engtom_sw_dn), tomflx_sw_dn(:,:) )
3302 use scale_atmos_phy_mp_sdm,
only: &
3304 atmos_phy_mp_sdm_restart_create
3310 character(len=19) :: timelabel
3311 character(len=H_LONG) :: basename
3315 if( sd_rest_flg_out )
then
3316 log_info(
"ATMOS_vars_restart_create",*)
'Output random number for SDM '
3317 call atmos_phy_mp_sdm_restart_create(nowdaysec)
3324 log_info(
"ATMOS_vars_restart_create",*)
'Create restart file (ATMOS) '
3327 call time_gettimelabel( timelabel )
3333 log_info(
"ATMOS_vars_restart_create",*)
'basename: ', trim(basename)
3340 allocate( pv_id(pv_nmax+
qa) )
3396 use scale_atmos_phy_mp_sdm,
only: &
3398 atmos_phy_mp_sdm_restart_enddef
3405 if( sd_rest_flg_out )
then
3406 call atmos_phy_mp_sdm_restart_enddef
3410 if ( restart_fid /= -1 )
then
3467 use scale_atmos_phy_mp_sdm,
only: &
3469 atmos_phy_mp_sdm_restart_close
3475 if( sd_rest_flg_out )
then
3476 call atmos_phy_mp_sdm_restart_close
3480 if ( restart_fid /= -1 )
then
3482 log_info(
"ATMOS_vars_restart_close",*)
'Close restart file (ATMOS) '
3488 if (
allocated(pv_id) )
deallocate( pv_id )
3544 use scale_atmos_phy_mp_sdm,
only: &
3546 atmos_phy_mp_sdm_restart_def_var
3554 if( sd_rest_flg_out )
then
3555 call atmos_phy_mp_sdm_restart_def_var
3559 if ( restart_fid /= -1 )
then
3563 standard_name=pv_info(
i_dens)%STDNAME )
3566 standard_name=pv_info(
i_momz)%STDNAME )
3569 standard_name=pv_info(
i_momx)%STDNAME )
3572 standard_name=pv_info(
i_momy)%STDNAME )
3575 standard_name=pv_info(
i_rhot)%STDNAME )
3601 file_cartesc_write_var
3636 use scale_atmos_phy_mp_sdm,
only: &
3638 atmos_phy_mp_sdm_restart_write
3646 if( sd_rest_flg_out )
then
3647 call atmos_phy_mp_sdm_restart_write
3651 if ( restart_fid /= -1 )
then
3657 call file_cartesc_write_var( restart_fid, pv_id(
i_dens),
dens(:,:,:), pv_info(
i_dens)%NAME,
'ZXY' )
3658 call file_cartesc_write_var( restart_fid, pv_id(
i_momz),
momz(:,:,:), pv_info(
i_momz)%NAME,
'ZHXY' )
3659 call file_cartesc_write_var( restart_fid, pv_id(
i_momx),
momx(:,:,:), pv_info(
i_momx)%NAME,
'ZXHY' )
3660 call file_cartesc_write_var( restart_fid, pv_id(
i_momy),
momy(:,:,:), pv_info(
i_momy)%NAME,
'ZXYH' )
3661 call file_cartesc_write_var( restart_fid, pv_id(
i_rhot),
rhot(:,:,:), pv_info(
i_rhot)%NAME,
'ZXY' )
3664 call file_cartesc_write_var( restart_fid, pv_id(pv_nmax+iq),
qtrc(:,:,:,iq),
tracer_name(iq),
'ZXY' )
3688 real(RP),
intent(inout),
allocatable :: ary(:,:,:)
3690 if ( .not.
allocated(ary) )
then
3691 allocate( ary(
ka,
ia,
ja) )
3701 real(RP),
intent(inout),
allocatable :: ary(:,:)
3703 if ( .not.
allocated(ary) )
then
3704 allocate( ary(
ia,
ja) )
3714 real(RP),
intent(inout),
allocatable :: ary(:)
3716 if ( .not.
allocated(ary) )
then
real(rp), public const_grav
standard acceleration of gravity [m/s2]
subroutine, public atmos_phy_cp_vars_restart_write
Write restart.
real(rp), dimension(:,:,:), pointer, public momz_av
subroutine, public atmos_phy_tb_vars_restart_close
Close restart file.
subroutine, public atmos_phy_ch_vars_restart_create
Create restart file.
module Atmosphere / Physics Cloud Microphysics
subroutine, public atmos_vars_restart_write
Write restart of atmospheric variables.
subroutine, public atmos_phy_rd_vars_restart_create
Create restart file.
subroutine, public atmos_phy_ae_vars_restart_close
Close restart file.
real(rp), dimension(:,:,:,:), allocatable, target, public qe
subroutine, public atmos_phy_ch_vars_restart_close
Close restart file.
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, target, public rhot_avw
subroutine, public atmos_diagnostic_get_teml(KA, KS, KE, IA, IS, IE, JA, JS, JE, TEMP, LHV, LHS, QC, QI, CPtot, TEML)
ATMOS_DIAGNOSTIC_get_teml liqued water temperature.
real(dp), public time_nowdaysec
second of current time [sec]
subroutine, public atmos_phy_ch_vars_restart_open
Open restart file for read.
subroutine, public atmos_phy_lt_vars_restart_write
Write restart.
subroutine, public prc_abort
Abort Process.
module Atmosphere / Dynamics
integer, parameter, public i_hr
liquid water rain
integer, parameter, public i_momz
logical, public atmos_sw_phy_tb
subroutine, public atmos_phy_sf_vars_restart_open
Open restart file for read.
subroutine, public atmos_phy_ch_vars_restart_enddef
Exit netCDF define mode.
subroutine, public atmos_phy_mp_vars_get_diagnostic(DENS, TEMP, QTRC, CLDFRAC, Re, Qe, Ne)
real(rp), dimension(:,:,:), pointer, public qr
real(rp), dimension(:,:,:), pointer, public momx_av
integer, parameter, public i_momx
real(rp), public atmos_grid_cartesc_real_totvolzxv
total volume (zxv, local) [m3]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
real(rp), dimension(:,:,:,:), allocatable, public rhoq_tp
subroutine, public atmos_phy_lt_vars_restart_enddef
Exit netCDF define mode.
character(len=h_mid), dimension(qa_max), public tracer_desc
character(len=h_short), dimension(qa_max), public tracer_unit
real(rp), dimension(:,:,:), allocatable, target, public pott
subroutine, public atmos_phy_rd_vars_restart_close
Close restart file.
subroutine, public atmos_phy_tb_vars_restart_enddef
Exit netCDF define mode.
integer, parameter, public i_hs
snow
real(rp), dimension(qa_max), public tracer_mass
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_rfdx
reciprocal of face-dx
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volwxy
control volume (wxy) [m3]
subroutine, public atmos_vars_fillhalo(FILL_BND)
HALO Communication.
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
logical, public atmos_use_average
subroutine, public file_cartesc_def_var(fid, varname, desc, unit, dim_type, datatype, vid, standard_name, timeintv, nsteps, cell_measures)
Define a variable to file.
subroutine, public atmos_phy_ae_vars_reset_diagnostics
real(rp), dimension(:,:,:,:), pointer, public qtrc_av
subroutine, public atmos_diagnostic_get_potv(KA, KS, KE, IA, IS, IE, JA, JS, JE, POTT, Rtot, POTV)
ATMOS_DIAGNOSTIC_get_potv virtual potential temperature.
subroutine allocate_1d(ary)
subroutine, public atmos_phy_bl_vars_restart_def_var
Write restart.
real(rp), dimension(:,:,:), allocatable, public rhov_tp
subroutine, public atmos_phy_sf_vars_restart_def_var
Write restart.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_lw_dn
subroutine, public atmos_vars_restart_def_var
Define atmospheric variables in restart file.
subroutine, public file_history_cartesc_set_pres(PRES, PRESH, SFC_PRES)
set hydrostatic pressure for pressure coordinate
subroutine, public atmos_phy_ch_vars_restart_def_var
Write restart.
real(rp), dimension(:,:,:), allocatable, target, public qdry
module Atmosphere / Physics Chemistry
real(rp), dimension(:,:,:), allocatable, target, public momx_avw
subroutine, public atmos_phy_ae_vars_restart_create
Create restart file.
real(rp), parameter, public const_rvap
specific gas constant (water vapor) [J/kg/K]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_rcdx
reciprocal of center-dx
real(rp), dimension(:,:,:), allocatable, target, public cptot
logical, public atmos_sw_dyn
subroutine, public atmos_phy_cp_vars_restart_open
Open restart file for read.
subroutine, public atmos_phy_cp_vars_restart_create
Create restart file.
subroutine, public atmos_phy_tb_vars_restart_read
Read restart.
real(rp), public atmos_grid_cartesc_real_totvolwxy
total volume (wxy, local) [m3]
subroutine, public prof_rapstart(rapname_base, level, disable_barrier)
Start raptime.
module Atmosphere Grid CartesianC metirc
logical, public atmos_sw_phy_mp
subroutine, public atmos_phy_rd_vars_restart_open
Open restart file for read.
subroutine, public atmos_phy_lt_vars_setup
Setup.
real(rp), dimension(:,:,:), pointer, public rhot_av
module atmosphere / hydrometeor
subroutine, public atmos_phy_ch_vars_setup
Setup.
real(rp), dimension(:,:,:), pointer, public qh
module atmosphere / diagnostic
real(rp), dimension(:,:,:), allocatable, target, public phyd
module Atmosphere / Physics Radiation
integer, public prc_myrank
process num in local communicator
subroutine, public atmos_diagnostic_get_phyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, PRES, CZ, FZ, PHYD, PHYDH)
ATMOS_DIAGNOSTIC_get_phyd hydrostatic pressure.
subroutine, public atmos_vars_restart_enddef
Exit netCDF define mode.
subroutine, public atmos_dyn_vars_restart_read
Read restart.
module ATMOSPHERIC Surface Variables
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_rain
subroutine, public atmos_phy_cp_vars_restart_enddef
Exit netCDF define mode.
integer, parameter, public i_hh
hail
subroutine, public atmos_phy_lt_vars_restart_create
Create restart file.
real(rp), dimension(:,:), allocatable, public prec_engi
integer, parameter, public i_dens
logical, public atmos_hydrometeor_dry
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_sw_up
subroutine, public atmos_phy_mp_vars_restart_def_var
Define variables in restart file.
real(rp), dimension(:,:,:), allocatable, target, public rhot
real(rp), public atmos_restart_check_criterion
subroutine, public atmos_vars_check(force)
Check variables for atmosphere.
subroutine, public atmos_phy_tb_vars_restart_create
Create restart file.
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc
real(rp), dimension(qa_max), public tracer_engi0
subroutine, public atmos_phy_tb_vars_restart_write
Write restart.
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzuy
control volume (zuy) [m3]
real(rp), dimension(:,:,:), allocatable, public qv_ref
subroutine, public atmos_phy_mp_vars_restart_create
Create restart file.
character(len=h_short), public unit
logical, public atmos_restart_check
Check value consistency?
integer, parameter, public i_momy
real(rp), allocatable, target, public j
recursive subroutine atmos_vars_get_diagnostic_1d(vname, var)
get diagnostic variable 1D
character(len=h_long), public atmos_restart_out_basename
Basename of the output file.
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_sflx_snow
logical, public atmos_sw_phy_ae
subroutine, public atmos_dyn_vars_restart_open
Open restart file for read.
subroutine, public atmos_vars_monitor
monitor output
subroutine, public atmos_phy_ae_vars_history(QTRC, RH)
real(rp), dimension(:,:,:), allocatable, public rhou_tp
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_mapf
map factor
recursive subroutine atmos_vars_get_diagnostic_2d(vname, var)
get diagnostic variable 2D
integer, parameter, public rp
subroutine, public atmos_diagnostic_cartesc_get_vel(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, MOMZ, MOMX, MOMY, W, U, V)
ATMOS_DIAGNOSTIC_CARTESC_get_vel W, U, V.
integer, parameter, public i_hi
ice water cloud
integer, public ie
end point of inner domain: x, local
real(rp), dimension(:,:), allocatable, target, public prec
subroutine, public atmos_phy_tb_vars_setup
Setup.
character(len=h_mid), public atmos_restart_out_title
Title of the output file.
subroutine, public atmos_vars_restart_read
Read restart of atmospheric variables.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_rcdy
reciprocal of center-dy
logical, public atmos_restart_out_aggregate
Switch to use aggregate file.
module atmosphere / physics / PBL
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
real(rp), dimension(:,:,:), allocatable, target, public dens
subroutine, public atmos_dyn_vars_restart_create
Create restart file.
subroutine, public atmos_phy_mp_vars_reset_diagnostics
subroutine, public atmos_phy_sf_vars_restart_write
Write variables to restart file.
subroutine, public atmos_phy_sf_vars_restart_close
Close restart file.
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzxv
control volume (zxv) [m3]
subroutine allocate_2d(ary)
module atmosphere / grid / cartesC index
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
subroutine, public atmos_phy_sf_vars_restart_enddef
Exit netCDF define mode.
subroutine, public atmos_vars_setup
Setup.
subroutine, public atmos_vars_history_setpres
Set pressure for history output.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_up
subroutine, public atmos_vars_restart_check
Check and compare between last data and sample data.
subroutine, public check(current_line, v)
Undefined value checker.
subroutine, public atmos_phy_lt_vars_restart_read
Read restart.
real(rp), dimension(:,:,:), allocatable, public temp_ref
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
real(rp), dimension(:,:,:), allocatable, target, public momz
subroutine, public atmos_phy_sf_vars_setup
Setup.
real(rp), public lhv
latent heat of vaporization for use [J/kg]
subroutine, public atmos_phy_rd_vars_restart_def_var
Define variables in restart file.
logical, public atmos_sw_phy_lt
module atmosphere / adiabat
module Atmosphere / Physics Turbulence
real(rp), dimension(:,:,:), allocatable, public pres_ref
real(rp), public const_cvdry
specific heat (dry air,constant volume) [J/kg/K]
character(len=h_short), public atmos_restart_out_dtype
REAL4 or REAL8.
subroutine, public atmos_phy_cp_vars_restart_close
Close restart file.
real(rp), dimension(:,:,:), pointer, public momy_av
real(rp), dimension(qa_max), public tracer_cv
subroutine, public atmos_phy_rd_vars_restart_write
Write variables to restart file.
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
subroutine, public atmos_phy_ae_vars_restart_read
Read restart.
subroutine, public atmos_phy_lt_vars_restart_def_var
Write restart.
real(rp), dimension(:,:,:), allocatable, target, public v
subroutine, public atmos_phy_bl_vars_restart_create
Create restart file.
subroutine, public atmos_phy_cp_vars_setup
Setup.
character(len=h_short), dimension(qa_max), public tracer_name
real(rp), dimension(:,:,:), allocatable, target, public w
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc_avw
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
module Atmosphere / Physics Chemistry
real(rp), dimension(:,:,:), allocatable, target, public momy_avw
real(rp), dimension(:,:,:), allocatable, public momz_tp
integer, parameter, public i_rhot
real(rp), dimension(:,:,:), allocatable, target, public momx
real(rp), dimension(:,:,:), allocatable, target, public exner
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_sw_dn
integer, public is
start point of inner domain: x, local
subroutine, public atmos_phy_sf_vars_restart_create
Create restart file.
logical, public atmos_sw_phy_cp
logical, public atmos_sw_phy_ch
subroutine, public monitor_reg(name, desc, unit, itemid, ndims, dim_type, is_tendency)
Search existing item, or matching check between requested and registered item.
real(rp), dimension(:,:,:), allocatable, target, public temp
real(dp), public time_dtsec_atmos_dyn
time interval of dynamics [sec]
real(rp), dimension(:,:,:), allocatable, public dens_tp
real(rp), public atmos_grid_cartesc_real_totvolzuy
total volume (zuy, local) [m3]
subroutine, public atmos_phy_mp_vars_restart_write
Write restart.
real(rp), dimension(:,:,:), allocatable, target, public momy
real(rp), dimension(:,:,:), allocatable, pointer, target, public qv
subroutine, public atmos_dyn_vars_restart_write
Write variables to restart file.
real(rp), dimension(:,:,:), allocatable, target, public atmos_phy_sf_sflx_qtrc
integer, parameter, public i_hc
liquid water cloud
subroutine, public atmos_phy_bl_vars_restart_open
Open restart file for read.
real(rp), dimension(:,:,:), allocatable, target, public phydh
subroutine, public atmos_phy_tb_vars_restart_def_var
Write restart.
subroutine, public atmos_vars_restart_open
Open restart file for reading atmospheric variables.
subroutine, public atmos_phy_rd_vars_setup
Setup.
module atmosphere / diagnostic / CartesianC
subroutine, public atmos_diagnostic_get_therm_rhot(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, RHOT, Rtot, CVtot, CPtot, POTT, TEMP, PRES, EXNER)
ATMOS_DIAGNOSTIC_get_therm_rhot potential temperature, temperature, pressure.
subroutine, public atmos_phy_ae_vars_restart_write
Write restart.
real(rp), dimension(:,:,:), allocatable, target, public pres
subroutine, public atmos_phy_ae_vars_restart_def_var
Write restart.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_engi
logical, public atmos_sw_phy_rd
real(rp), dimension(:,:,:), pointer, public dens_av
subroutine, public atmos_dyn_vars_restart_enddef
Exit netCDF define mode.
real(rp), dimension(:,:,:), allocatable, target, public rtot
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_lw_up
subroutine, public atmos_phy_rd_vars_restart_read
Read restart.
real(rp), dimension(:,:,:), allocatable, target, public u
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_real_f2h
coefficient for interpolation from full to half levels
subroutine, public atmos_phy_ch_vars_restart_write
Write restart.
logical, public atmos_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
subroutine, public atmos_phy_mp_vars_setup
Setup.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_lh
real(rp), dimension(qa_max), public tracer_cp
subroutine, public atmos_phy_mp_vars_restart_read
Read restart.
subroutine, public atmos_dyn_vars_restart_close
Close restart file.
module file / history_cartesC
subroutine, public atmos_vars_restart_close
Close restart file.
logical, public atmos_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
subroutine, public file_cartesc_create(basename, title, datatype, fid, date, subsec, haszcoord, append, aggregate, single)
Create/open a netCDF file.
real(rp), dimension(:,:,:), allocatable, public rhoh_p
subroutine, public atmos_dyn_vars_restart_def_var
Define variables in restart file.
character(len=h_short), public atmos_dyn_type
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
logical, public statistics_checktotal
calc&report variable totals to logfile?
subroutine, public file_cartesc_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
subroutine, public atmos_phy_ae_vars_setup
Setup.
subroutine, public time_gettimelabel(timelabel)
generate time label
module ATMOSPHERIC Variables
subroutine, public atmos_phy_bl_vars_restart_read
Read restart.
module atmosphere / bottom boundary extrapolation
real(rp), dimension(:,:,:), pointer, public qi
subroutine, public atmos_vars_history
History output set for atmospheric variables.
real(rp), dimension(qa_max), public tracer_r
real(rp), dimension(:,:,:), allocatable, public rhot_tp
integer, public js
start point of inner domain: y, local
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_sflx_rain
subroutine, public atmos_vars_restart_create
Create atmospheric restart file.
subroutine, public atmos_phy_ae_vars_restart_enddef
Exit netCDF define mode.
logical, public atmos_restart_in_aggregate
Switch to use aggregate file.
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_snow
logical, public atmos_restart_output
Output restart file?
real(rp), dimension(:,:,:), allocatable, public momy_tp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
logical, public atmos_sw_phy_bl
subroutine, public atmos_phy_tb_vars_restart_open
Open restart file for read.
subroutine, public atmos_diagnostic_get_n2(KA, KS, KE, IA, IS, IE, JA, JS, JE, POTT, Rtot, CZ, FZ, F2H, N2)
ATMOS_DIAGNOSTIC_get_n2 N^2.
real(rp), public lhf
latent heat of fusion for use [J/kg]
logical function, public file_get_aggregate(fid)
module ATMOSPHERE / Physics Aerosol Microphysics
real(rp), dimension(:,:,:), allocatable, public momx_tp
module atmosphere / thermodyn
subroutine, public atmos_vars_calc_diagnostics
Calc diagnostic variables.
subroutine, public file_history_reg(name, desc, unit, itemid, standard_name, ndims, dim_type, cell_measures, fill_halo)
Register/Append variable to history file.
recursive subroutine atmos_vars_get_diagnostic_3d(vname, var)
get diagnostic variable 3D
subroutine, public atmos_phy_ae_vars_restart_open
Open restart file for read.
subroutine, public prof_rapend(rapname_base, level, disable_barrier)
Save raptime.
subroutine allocate_3d(ary)
real(rp), dimension(:,:,:), pointer, public qc
subroutine, public atmos_phy_bl_vars_restart_write
Write restart.
character(len=h_long), public atmos_restart_check_basename
subroutine, public atmos_phy_rd_vars_restart_enddef
Exit netCDF define mode.
subroutine, public atmos_phy_bl_vars_restart_close
Close restart file.
subroutine, public atmos_phy_mp_vars_restart_open
Open restart file for read.
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
subroutine, public atmos_phy_bl_vars_setup
Setup.
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
module atmosphere / grid / cartesC
real(rp), dimension(:,:,:), allocatable, public pott_ref
subroutine, public atmos_phy_lt_vars_restart_open
Open restart file for read.
real(rp), dimension(:,:,:), allocatable, target, public dens_avw
real(rp), dimension(:,:,:), allocatable, target, public momz_avw
real(rp), public const_undef
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_rfdy
reciprocal of face-dy
subroutine, public atmos_phy_sf_vars_restart_read
Read restart.
subroutine, public atmos_phy_mp_vars_restart_close
Close restart file.
module atmosphere / saturation
subroutine, public atmos_phy_lt_vars_restart_close
Close restart file.
subroutine, public atmos_phy_mp_vars_history(DENS, TEMP, QTRC)
module Atmosphere / Physics Cumulus
integer, public io_fid_conf
Config file ID.
integer, public je
end point of inner domain: y, local
logical, public prc_twod
2D experiment
character(len=h_short), public name
integer, parameter, public n_hyd
character(len=h_long), public atmos_restart_in_basename
Basename of the input file.
real(rp), dimension(:,:,:), allocatable, public dens_ref
real(rp), dimension(:,:,:), allocatable, target, public cvtot
subroutine, public atmos_bottom_estimate(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, PRES, QV, SFC_TEMP, FZ, SFC_DENS, SFC_PRES)
Calc bottom boundary of atmosphere (just above surface)
real(rp), dimension(:,:,:), pointer, public qg
subroutine, public atmos_phy_ch_vars_restart_read
Read restart.
subroutine, public atmos_phy_bl_vars_restart_enddef
Exit netCDF define mode.
subroutine, public atmos_phy_mp_vars_restart_enddef
Exit netCDF define mode.
subroutine, public atmos_phy_cp_vars_restart_def_var
Write restart.
subroutine, public atmos_dyn_vars_setup
Setup.
real(rp), dimension(:,:,:), pointer, public qs
integer, parameter, public i_hg
graupel
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_metric_rotc
rotation coefficient
subroutine, public atmos_phy_cp_vars_restart_read
Read restart.
logical, public atmos_sw_phy_sf