79 integer,
private,
parameter :: vmax = 8
80 integer,
private,
parameter :: i_mflx_cloudbase = 1
81 integer,
private,
parameter :: i_sflx_convrain = 2
82 integer,
private,
parameter :: i_cloudtop = 3
83 integer,
private,
parameter :: i_cloudbase = 4
84 integer,
private,
parameter :: i_cldfrac_dp = 5
85 integer,
private,
parameter :: i_cldfrac_sh = 6
86 integer,
private,
parameter :: i_w0mean = 7
87 integer,
private,
parameter :: i_kf_nca = 8
90 character(len=H_SHORT),
private :: var_name(vmax)
91 character(len=H_MID),
private :: var_desc(vmax)
92 character(len=H_SHORT),
private :: var_unit(vmax)
93 character(len=H_SHORT),
private :: var_dim (vmax)
94 integer,
private :: var_id (vmax)
95 integer,
private :: restart_fid = -1
97 data var_name /
'MFLX_cloudbase', &
105 data var_desc /
'cloud base mass flux', &
107 'cloud top height', &
108 'cloud base height', &
109 'cloud fraction (deep convection)', &
110 'cloud fraction (shallow convection)', &
111 'running mean vertical wind velocity', &
112 'advection/cumulus convection timescale/dt for KF' /
113 data var_unit /
'kg/m2/s', &
121 data var_dim /
'XY', &
131 integer,
private :: vmax_t
132 integer,
private :: i_cp_dens_t = 1
133 integer,
private :: i_cp_rhot_t = 2
134 integer,
private :: i_cp_qv_t = 3
136 character(len=H_SHORT),
private,
allocatable :: var_t_name(:)
137 character(len=H_MID),
private,
allocatable :: var_t_desc(:)
138 character(len=H_SHORT),
private,
allocatable :: var_t_unit(:)
139 integer,
private,
allocatable :: var_t_id (:)
155 namelist / param_atmos_phy_cp_vars / &
172 log_info(
"ATMOS_PHY_CP_vars_setup",*)
'Setup' 204 allocate( var_t_name(vmax_t) )
205 allocate( var_t_desc(vmax_t) )
206 allocate( var_t_unit(vmax_t) )
207 allocate( var_t_id(vmax_t) )
209 var_t_name(i_cp_dens_t) =
'DENS_t_CP' 210 var_t_desc(i_cp_dens_t) =
'tendency DENS in CP' 211 var_t_unit(i_cp_dens_t) =
'kg/m3/s' 212 var_t_name(i_cp_rhot_t) =
'RHOT_t_CP' 213 var_t_desc(i_cp_rhot_t) =
'tendency RHOT in CP' 214 var_t_unit(i_cp_rhot_t) =
'K*kg/m3/s' 216 var_t_name(i_cp_qv_t) =
'QV_t_CP' 217 var_t_desc(i_cp_qv_t) =
'tendency rho*QV in CP' 218 var_t_unit(i_cp_qv_t) =
'kg/m3/s' 220 var_t_name(3+iq) = trim(
hyd_name(iq))//
'_t_CP' 221 var_t_desc(3+iq) =
'tendency rho*'//trim(
hyd_name(iq))//
' in CP' 222 var_t_unit(3+iq) =
'kg/m3/s' 227 read(
io_fid_conf,nml=param_atmos_phy_cp_vars,iostat=ierr)
229 log_info(
"ATMOS_PHY_CP_vars_setup",*)
'Not found namelist. Default used.' 230 elseif( ierr > 0 )
then 231 log_error(
"ATMOS_PHY_CP_vars_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_CP_VARS. Check!' 234 log_nml(param_atmos_phy_cp_vars)
237 log_info(
"ATMOS_PHY_CP_vars_setup",*)
'[ATMOS_PHY_CP] prognostic/diagnostic variables' 238 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
239 ' |',
'VARNAME ',
'|', &
240 'DESCRIPTION ',
'[',
'UNIT ',
']' 242 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
243 'NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 248 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
249 'NO.',iv+vmax,
'|',var_t_name(iv),
'|',var_t_desc(iv),
'[',var_t_unit(iv),
']' 257 log_info(
"ATMOS_PHY_CP_vars_setup",*)
'Restart input? : NO' 264 log_info(
"ATMOS_PHY_CP_vars_setup",*)
'Restart output? : NO' 357 character(len=19) :: timelabel
358 character(len=H_LONG) :: basename
362 log_info(
"ATMOS_PHY_CP_vars_restart_open",*)
'Open restart file (ATMOS_PHY_CP) ' 373 log_info(
"ATMOS_PHY_CP_vars_restart_open",*)
'basename: ', trim(basename)
377 log_info(
"ATMOS_PHY_CP_vars_restart_open",*)
'restart file for ATMOS_PHY_CP is not specified.' 398 if ( restart_fid /= -1 )
then 400 log_info(
"ATMOS_PHY_CP_vars_restart_read",*)
'Read from restart file (ATMOS_PHY_CP) ' 402 call file_cartesc_read( restart_fid, var_name(1),
'XY', &
404 call file_cartesc_read( restart_fid, var_name(2),
'XY', &
406 call file_cartesc_read( restart_fid, var_name(3),
'XY', &
408 call file_cartesc_read( restart_fid, var_name(4),
'XY', &
410 call file_cartesc_read( restart_fid, var_name(5),
'ZXY', &
412 call file_cartesc_read( restart_fid, var_name(6),
'ZXY', &
414 call file_cartesc_read( restart_fid, var_name(7),
'ZXY', &
416 call file_cartesc_read( restart_fid, var_name(8),
'XY', &
419 call file_cartesc_read( restart_fid, var_t_name(1),
'ZXY', &
421 call file_cartesc_read( restart_fid, var_t_name(2),
'ZXY', &
423 call file_cartesc_read( restart_fid, var_t_name(3),
'ZXY', &
426 call file_cartesc_read( restart_fid, var_t_name(3+iq),
'ZXY', &
466 log_info(
"ATMOS_PHY_CP_vars_restart_read",*)
'invalid restart file ID for ATMOS_PHY_CP.' 481 character(len=19) :: timelabel
482 character(len=H_LONG) :: basename
488 log_info(
"ATMOS_PHY_CP_vars_restart_create",*)
'Create restart file (ATMOS_PHY_AE) ' 497 log_info(
"ATMOS_PHY_CP_vars_restart_create",*)
'basename: ', trim(basename)
516 if ( restart_fid /= -1 )
then 531 if ( restart_fid /= -1 )
then 533 log_info(
"ATMOS_PHY_CP_vars_restart_close",*)
'Close restart file (ATMOS_PHY_CP) ' 555 if ( restart_fid /= -1 )
then 559 var_name(i), var_desc(i), var_unit(i), &
566 var_t_name(i), var_t_desc(i), var_t_unit(i), &
573 var_t_name(3+iq), var_t_desc(3+iq), var_t_unit(3+iq), &
587 file_cartesc_write => file_cartesc_write_var
595 if ( restart_fid /= -1 )
then 620 var_t_name(1),
'ZXY' )
622 var_t_name(2),
'ZXY' )
624 var_t_name(3),
'ZXY' )
627 var_t_name(3+iq),
'ZXY' )
subroutine, public atmos_phy_cp_vars_restart_def_var
Write restart.
module Atmosphere / Physics Cumulus
character(len=h_short), dimension(n_hyd), parameter, public hyd_name
character(len=h_mid), public atmos_phy_cp_restart_out_title
title of the output file
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_dens_t
character(len=h_long), public atmos_phy_cp_restart_in_basename
Basename of the input file.
subroutine, public atmos_phy_cp_vars_restart_enddef
Exit netCDF define mode.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_rhoqv_t
integer, public ia
of whole cells: x, local, with HALO
subroutine, public atmos_phy_cp_vars_restart_open
Open restart file for read.
subroutine, public atmos_phy_cp_vars_restart_write
Write restart.
logical, public atmos_phy_cp_restart_output
output restart file?
logical, public atmos_phy_cp_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
character(len=h_long), public atmos_phy_cp_restart_out_basename
Basename of the output file.
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
subroutine atmos_phy_cp_vars_checktotal
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
subroutine, public atmos_phy_cp_vars_restart_create
Create restart file.
integer, public ja
of whole cells: y, local, with HALO
integer, public io_fid_conf
Config file ID.
logical, public atmos_phy_cp_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
logical, public statistics_checktotal
calc&report variable totals to logfile?
character(len=h_short), public atmos_phy_cp_restart_out_dtype
REAL4 or REAL8.
real(rp), public const_undef
subroutine, public atmos_phy_cp_vars_restart_close
Close restart file.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_cldfrac_dp
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_w0mean
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 atmos_phy_cp_vars_setup
Setup.
module atmosphere / hydrometeor
subroutine, public time_gettimelabel(timelabel)
generate time label
logical, public atmos_phy_cp_restart_in_aggregate
Switch to use aggregate file.
logical, public atmos_phy_cp_restart_out_aggregate
Switch to use aggregate file.
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_rhot_t
integer, public je
end point of inner domain: y, local
subroutine, public atmos_phy_cp_vars_fillhalo
HALO Communication.
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
integer, public ks
start point of inner domain: z, local
subroutine, public prc_abort
Abort Process.
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.
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_cloudtop
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_cp_rhohyd_t
logical function, public file_get_aggregate(fid)
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
integer, public ka
of whole cells: z, local, with HALO
subroutine, public atmos_phy_cp_vars_restart_read
Read restart.
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_mflx_cloudbase
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_cloudbase
subroutine, public file_cartesc_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
integer, parameter, public n_hyd
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_cldfrac_sh
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_sflx_rain
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_kf_nca
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_momz_t