77 integer,
private,
parameter :: vmax = 1
78 integer,
private,
parameter :: i_ccn = 1
80 character(len=H_SHORT),
private :: var_name(vmax)
81 character(len=H_MID),
private :: var_desc(vmax)
82 character(len=H_SHORT),
private :: var_unit(vmax)
83 integer,
private :: var_id(vmax)
84 integer,
private :: restart_fid = -1
86 data var_name /
'CCN' /
87 data var_desc /
'cloud condensation nuclei' /
88 data var_unit /
'num/m3' /
92 real(RP),
private,
allocatable :: atmos_phy_ae_re(:,:,:,:)
93 real(RP),
private,
allocatable :: atmos_phy_ae_qe(:,:,:,:)
94 logical,
private :: diag_re
95 logical,
private :: diag_qe
98 integer,
private,
allocatable :: hist_re_id(:)
99 logical,
private :: hist_re
118 namelist / param_atmos_phy_ae_vars / &
134 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'Setup' 150 read(
io_fid_conf,nml=param_atmos_phy_ae_vars,iostat=ierr)
152 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'Not found namelist. Default used.' 153 elseif( ierr > 0 )
then 154 log_error(
"ATMOS_PHY_AE_vars_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_AE_VARS. Check!' 157 log_nml(param_atmos_phy_ae_vars)
160 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'[ATMOS_PHY_AE] prognostic/diagnostic variables' 161 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
162 ' |',
'VARNAME ',
'|', &
163 'DESCRIPTION ',
'[',
'UNIT ',
']' 165 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
166 'NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 174 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'Restart input? : NO' 181 log_info(
"ATMOS_PHY_AE_vars_setup",*)
'Restart output? : NO' 189 atmos_phy_ae_re(:,:,:,:) = undef
191 atmos_phy_ae_qe(:,:,:,:) = undef
197 allocate( hist_re_id(
n_ae) )
199 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' )
200 if ( hist_re_id(iv) > 0 ) hist_re = .true.
239 character(len=19) :: timelabel
240 character(len=H_LONG) :: basename
244 log_info(
"ATMOS_PHY_AE_vars_restart_open",*)
'Open restart file (ATMOS_PHY_AE) ' 255 log_info(
"ATMOS_PHY_AE_vars_restart_open",*)
'basename: ', trim(basename)
259 log_info(
"ATMOS_PHY_AE_vars_restart_open",*)
'restart file for ATMOS_PHY_AE is not specified.' 284 if ( restart_fid /= -1 )
then 286 log_info(
"ATMOS_PHY_AE_vars_restart_read",*)
'Read from restart file (ATMOS_PHY_AE) ' 288 call file_cartesc_read( restart_fid, var_name(1),
'ZXY', &
312 log_info(
"ATMOS_PHY_AE_vars_restart_read",*)
'invlaid restart file ID for ATMOS_PHY_AE.' 327 character(len=19) :: timelabel
328 character(len=H_LONG) :: basename
334 log_info(
"ATMOS_PHY_AE_vars_restart_create",*)
'Create restart file (ATMOS_PHY_AE) ' 343 log_info(
"ATMOS_PHY_AE_vars_restart_create",*)
'basename: ', trim(basename)
362 if ( restart_fid /= -1 )
then 377 if ( restart_fid /= -1 )
then 379 log_info(
"ATMOS_PHY_AE_vars_restart_close",*)
'Close restart file (ATMOS_PHY_AE) ' 397 if ( restart_fid /= -1 )
then 415 file_cartesc_write_var
419 if ( restart_fid /= -1 )
then 430 call file_cartesc_write_var( restart_fid, var_id(1),
atmos_phy_ae_ccn(:,:,:), var_name(1),
'ZXY' )
445 real(RP),
intent(in) :: QTRC(
ka,
ia,
ja,
qa)
446 real(RP),
intent(in) :: RH(
ka,
ia,
ja)
453 qtrc(:,:,:,:), rh(:,:,:), &
456 if ( hist_re_id(iv) > 0 ) &
457 call file_history_put( hist_re_id(iv), work(:,:,:,iv) )
476 real(RP),
intent(in) :: QTRC(
ka,
ia,
ja,
qa)
477 real(RP),
intent(in) :: RH(
ka,
ia,
ja)
478 real(RP),
intent(out),
optional :: Re(
ka,
ia,
ja,
n_ae)
479 real(RP),
intent(out),
optional :: Qe(
ka,
ia,
ja,
n_ae)
481 if (
present(re) )
then 482 if ( .not. diag_re )
then 488 atmos_phy_ae_re(:,:,:,:) )
490 atmos_phy_ae_re(:,:,:,:) = 0.0_rp
495 re(:,:,:,:) = atmos_phy_ae_re(:,:,:,:)
498 if (
present(qe) )
then 499 if ( .not. diag_qe )
then 502 atmos_phy_ae_qe(:,:,:,:) = 0.0_rp
507 qe(:,:,:,:) = atmos_phy_ae_qe(:,:,:,:)
logical, public atmos_phy_ae_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
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.
subroutine, public atmos_phy_ae_vars_fillhalo
HALO Communication.
character(len=h_short), dimension(n_ae), parameter, public ae_name
subroutine, public atmos_phy_ae_vars_get_diagnostic(QTRC, RH, Re, Qe)
integer, parameter, public n_ae
integer, public ia
of whole cells: x, local, with HALO
logical, public atmos_phy_ae_restart_output
output restart file?
logical, public atmos_phy_ae_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
subroutine, public atmos_phy_ae_kajino13_effective_radius(KA, IA, JA, QA_AE, QTRC, RH, Re)
Calculate Effective Radius.
integer, public ja
of whole cells: y, local, with HALO
character(len=h_short), public atmos_phy_ae_type
integer, public io_fid_conf
Config file ID.
subroutine, public atmos_phy_ae_vars_reset_diagnostics
subroutine, public file_history_reg(name, desc, unit, itemid, standard_name, ndims, dim_type, cell_measures, fill_halo)
Register/Append variable to history file.
logical, public statistics_checktotal
calc&report variable totals to logfile?
module atmosphere / aerosol
subroutine, public atmos_phy_ae_vars_history(QTRC, RH)
real(rp), public const_undef
integer, public is
start point of inner domain: x, local
integer, public ie
end point of inner domain: x, local
subroutine, public file_cartesc_create(basename, title, datatype, fid, date, subsec, haszcoord, append, aggregate, single)
Create/open a netCDF file.
subroutine, public time_gettimelabel(timelabel)
generate time label
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_emit
integer, public je
end point of inner domain: y, local
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_rhoq_t
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn
character(len=h_mid), public atmos_phy_ae_restart_out_title
title of the output file
subroutine, public atmos_phy_ae_vars_restart_enddef
Exit netCDF define mode.
subroutine, public prc_abort
Abort Process.
character(len=h_short), public atmos_phy_ae_restart_out_dtype
REAL4 or REAL8.
logical, public atmos_phy_ae_restart_out_aggregate
Switch to use aggregate file.
integer, public js
start point of inner domain: y, local
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_setup
Setup.
subroutine, public atmos_phy_ae_vars_restart_read
Read restart.
logical function, public file_get_aggregate(fid)
character(len=h_mid), dimension(n_ae), parameter, public ae_desc
module Atmosphere GRID CartesC Real(real space)
module atmosphere / physics / aerosol / Kajino13
subroutine, public atmos_phy_ae_vars_restart_def_var
Write restart.
subroutine, public atmos_phy_ae_vars_restart_write
Write restart.
integer, public ka
of whole cells: z, local, with HALO
subroutine, public atmos_phy_ae_vars_restart_close
Close restart file.
subroutine, public file_cartesc_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
character(len=h_long), public atmos_phy_ae_restart_out_basename
Basename of the output file.
module ATMOSPHERE / Physics Aerosol Microphysics
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
logical, public atmos_phy_ae_restart_in_aggregate
Switch to use aggregate file.
subroutine, public atmos_phy_ae_vars_restart_open
Open restart file for read.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn_t