Go to the documentation of this file.
79 integer,
private,
parameter :: vmax = 1
80 integer,
private,
parameter :: i_ccn = 1
82 character(len=H_SHORT),
private :: var_name(vmax)
83 character(len=H_MID),
private :: var_desc(vmax)
84 character(len=H_SHORT),
private :: var_unit(vmax)
85 integer,
private :: var_id(vmax)
86 integer,
private :: restart_fid = -1
88 data var_name /
'CCN' /
89 data var_desc /
'cloud condensation nuclei' /
90 data var_unit /
'num/m3' /
94 real(
rp),
private,
allocatable :: atmos_phy_ae_re(:,:,:,:)
95 real(
rp),
private,
allocatable :: atmos_phy_ae_qe(:,:,:,:)
96 logical,
private :: diag_re
97 logical,
private :: diag_qe
100 integer,
private,
allocatable :: hist_re_id(:)
101 integer,
private,
allocatable :: hist_qe_id(:)
102 logical,
private :: hist_re
103 logical,
private :: hist_qe
122 namelist / param_atmos_phy_ae_vars / &
138 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'Setup'
158 read(
io_fid_conf,nml=param_atmos_phy_ae_vars,iostat=ierr)
160 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'Not found namelist. Default used.'
161 elseif( ierr > 0 )
then
162 log_error(
"ATMOS_PHY_AE_vars_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_AE_VARS. Check!'
165 log_nml(param_atmos_phy_ae_vars)
168 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'[ATMOS_PHY_AE] prognostic/diagnostic variables'
169 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
170 ' |',
'VARNAME ',
'|', &
171 'DESCRIPTION ',
'[',
'UNIT ',
']'
173 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
174 'NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']'
182 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'Restart input? : NO'
189 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'Restart output? : NO'
197 atmos_phy_ae_re(:,:,:,:) = undef
199 atmos_phy_ae_qe(:,:,:,:) = undef
206 allocate( hist_re_id(
n_ae) )
208 call file_history_reg(
'Re_'//trim(
ae_name(iv)),
'effective radius of '//trim(
ae_desc(iv)),
'cm', hist_re_id(iv), fill_halo=.true., dim_type=
'ZXY' )
209 if ( hist_re_id(iv) > 0 ) hist_re = .true.
213 allocate( hist_qe_id(
n_ae) )
215 call file_history_reg(
'Qe_'//trim(
ae_name(iv)),
'mass mixing ratio of '//trim(
ae_desc(iv)),
'kg/kg', hist_qe_id(iv), fill_halo=.true., dim_type=
'ZXY' )
216 if ( hist_qe_id(iv) > 0 ) hist_qe = .true.
229 log_info(
"ATMOS_PHY_AE_vars_finalize",*)
'Finalize'
245 deallocate( atmos_phy_ae_re )
246 deallocate( atmos_phy_ae_qe )
249 deallocate( hist_re_id )
251 deallocate( hist_qe_id )
293 character(len=19) :: timelabel
294 character(len=H_LONG) :: basename
298 log_info(
"ATMOS_PHY_AE_vars_restart_open",*)
'Open restart file (ATMOS_PHY_AE) '
309 log_info(
"ATMOS_PHY_AE_vars_restart_open",*)
'basename: ', trim(basename)
313 log_info(
"ATMOS_PHY_AE_vars_restart_open",*)
'restart file for ATMOS_PHY_AE is not specified.'
332 if ( restart_fid /= -1 )
then
334 log_info(
"ATMOS_PHY_AE_vars_restart_read",*)
'Read from restart file (ATMOS_PHY_AE) '
336 call file_cartesc_read( restart_fid, var_name(1),
'ZXY', &
358 call atmos_phy_ae_vars_check
361 log_info(
"ATMOS_PHY_AE_vars_restart_read",*)
'invlaid restart file ID for ATMOS_PHY_AE.'
376 character(len=19) :: timelabel
377 character(len=H_LONG) :: basename
383 log_info(
"ATMOS_PHY_AE_vars_restart_create",*)
'Create restart file (ATMOS_PHY_AE) '
392 log_info(
"ATMOS_PHY_AE_vars_restart_create",*)
'basename: ', trim(basename)
411 if ( restart_fid /= -1 )
then
426 if ( restart_fid /= -1 )
then
428 log_info(
"ATMOS_PHY_AE_vars_restart_close",*)
'Close restart file (ATMOS_PHY_AE) '
446 if ( restart_fid /= -1 )
then
458 file_cartesc_write_var
462 if ( restart_fid /= -1 )
then
466 call atmos_phy_ae_vars_check
468 call file_cartesc_write_var( restart_fid, var_id(1),
atmos_phy_ae_ccn(:,:,:), var_name(1),
'ZXY' )
484 real(
rp),
intent(in) :: rh(
ka,
ia,
ja)
491 qtrc(:,:,:,:), rh(:,:,:), &
494 if ( hist_re_id(iv) > 0 ) &
495 call file_history_put( hist_re_id(iv), work(:,:,:,iv) )
501 qtrc(:,:,:,:), rh(:,:,:), &
504 if ( hist_qe_id(iv) > 0 ) &
505 call file_history_put( hist_qe_id(iv), work(:,:,:,iv) )
530 real(
rp),
intent(in) :: rh(
ka,
ia,
ja)
534 if (
present(re) )
then
536 if ( .not. diag_re )
then
544 atmos_phy_ae_re(:,:,:,:) )
551 atmos_phy_ae_re(:,:,:,:) )
555 atmos_phy_ae_re(:,:,:,:) = 0.0_rp
563 re(:,:,:,:) = atmos_phy_ae_re(:,:,:,:)
568 if (
present(qe) )
then
570 if ( .not. diag_qe )
then
577 atmos_phy_ae_qe(:,:,:,:) )
581 atmos_phy_ae_qe(:,:,:,:) = 0.0_rp
589 qe(:,:,:,:) = atmos_phy_ae_qe(:,:,:,:)
604 subroutine atmos_phy_ae_vars_check
615 0.0_rp, 1.0e12_rp, var_name(1), &
624 end subroutine atmos_phy_ae_vars_check
module atmosphere / physics / aerosol / Kajino13
subroutine, public atmos_phy_ae_vars_restart_close
Close restart file.
integer, public ke
end point of inner domain: z, local
real(dp), public time_nowdaysec
second of current time [sec]
subroutine, public prc_abort
Abort Process.
character(len=h_long), public atmos_phy_ae_restart_out_basename
Basename of the output file.
subroutine, public atmos_phy_ae_vars_fillhalo
HALO Communication.
logical, public atmos_phy_ae_restart_in_aggregate
Switch to use aggregate file.
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
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
logical, public atmos_phy_ae_restart_output
output restart file?
logical, public atmos_phy_ae_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
subroutine, public atmos_phy_ae_vars_get_diagnostic(QTRC, RH, Re, Qe)
integer, parameter, public n_ae
character(len=h_long), public atmos_phy_ae_restart_in_basename
Basename of the input file.
subroutine, public atmos_phy_ae_vars_restart_create
Create restart file.
character(len=h_mid), dimension(n_ae), parameter, public ae_desc
module Atmosphere GRID CartesC Real(real space)
subroutine, public atmos_phy_ae_kajino13_effective_radius(KA, IA, JA, QA_AE, QTRC, RH, Re)
Calculate Effective Radius.
subroutine, public atmos_phy_ae_vars_history(QTRC, RH)
integer, parameter, public rp
integer, public ie
end point of inner domain: x, local
logical, public atmos_phy_ae_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
module atmosphere / grid / cartesC index
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_emit
subroutine, public atmos_phy_ae_offline_effective_radius(KA, IA, JA, RH, Re)
Calculate Effective Radius.
logical, public atmos_phy_ae_restart_out_aggregate
Switch to use aggregate file.
subroutine, public atmos_phy_ae_vars_finalize
Finalize.
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
subroutine, public atmos_phy_ae_vars_restart_read
Read restart.
character(len=h_mid), public atmos_phy_ae_restart_out_title
title of the output file
integer, public is
start point of inner domain: x, local
module atmosphere / physics / aerosol / offline
character(len=h_short), public atmos_phy_ae_type
module atmosphere / aerosol
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn
subroutine, public atmos_phy_ae_vars_restart_write
Write restart.
subroutine, public atmos_phy_ae_vars_restart_def_var
Write restart.
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_phy_ae_offline_qtrc2qaero(KA, IA, JA, time_now, Qe)
Calculate Effective Radius.
subroutine, public file_cartesc_create(basename, title, datatype, fid, date, subsec, haszcoord, append, aggregate, single)
Create/open a netCDF file.
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
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_rhoq_t
integer, public js
start point of inner domain: y, local
subroutine, public atmos_phy_ae_vars_restart_enddef
Exit netCDF define mode.
character(len=h_short), dimension(n_ae), parameter, public ae_name
logical function, public file_get_aggregate(fid)
module ATMOSPHERE / Physics Aerosol Microphysics
subroutine, public file_cartesc_open(basename, fid, single, aggregate)
open a netCDF file for read
character(len=h_short), public atmos_phy_ae_restart_out_dtype
REAL4 or REAL8.
subroutine, public file_history_reg(name, desc, unit, itemid, standard_name, ndims, dim_type, cell_measures, fill_halo)
Register/Append variable to history file.
subroutine, public atmos_phy_ae_vars_restart_open
Open restart file for read.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn_t
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
real(rp), public const_undef
integer, public io_fid_conf
Config file ID.
integer, public je
end point of inner domain: y, local