13 #include "inc_openmp.h" 80 integer,
private,
parameter :: vmax = 8
81 integer,
private,
parameter :: i_mflx_cloudbase = 1
82 integer,
private,
parameter :: i_sflx_convrain = 2
83 integer,
private,
parameter :: i_cloudtop = 3
84 integer,
private,
parameter :: i_cloudbase = 4
85 integer,
private,
parameter :: i_cldfrac_dp = 5
86 integer,
private,
parameter :: i_cldfrac_sh = 6
87 integer,
private,
parameter :: i_kf_nca = 7
88 integer,
private,
parameter :: i_kf_w0avg = 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 integer,
private :: var_id (vmax)
94 integer,
private :: restart_fid = -1
96 data var_name /
'MFLX_cloudbase', &
104 data var_desc /
'cloud base mass flux', &
106 'cloud top height', &
107 'cloud base height', &
108 'cloud fraction (deep convection)', &
109 'cloud fraction (shallow convection)', &
110 'advection/cumulus convection timescale/dt for KF', &
111 'running mean vertical wind velocity for KF' /
112 data var_unit /
'kg/m2/s', &
122 integer,
private :: vmax_t
123 integer,
private :: i_cp_dens_t = 1
124 integer,
private :: i_cp_rhot_t = 2
126 character(len=H_SHORT),
private,
allocatable :: var_t_name(:)
127 character(len=H_MID),
private,
allocatable :: var_t_desc(:)
128 character(len=H_SHORT),
private,
allocatable :: var_t_unit(:)
129 integer,
private,
allocatable :: var_t_id (:)
147 namelist / param_atmos_phy_cp_vars / &
162 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[VARS] / Categ[ATMOS PHY_CP] / Origin[SCALE-RM]' 196 allocate( var_t_name(vmax_t) )
197 allocate( var_t_desc(vmax_t) )
198 allocate( var_t_unit(vmax_t) )
199 allocate( var_t_id(vmax_t) )
201 var_t_name(i_cp_dens_t) =
'DENS_t_CP' 202 var_t_desc(i_cp_dens_t) =
'tendency DENS in CP' 203 var_t_unit(i_cp_dens_t) =
'kg/m3/s' 204 var_t_name(i_cp_rhot_t) =
'RHOT_t_CP' 205 var_t_desc(i_cp_rhot_t) =
'tendency RHOT in CP' 206 var_t_unit(i_cp_rhot_t) =
'K*kg/m3/s' 209 var_t_name(2+iq) = trim(aq_name(iq))//
'_t_CP' 210 var_t_desc(2+iq) =
'tendency rho*'//trim(aq_name(iq))//
' in CP' 211 var_t_unit(2+iq) =
'kg/m3/s' 216 read(
io_fid_conf,nml=param_atmos_phy_cp_vars,iostat=ierr)
218 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 219 elseif( ierr > 0 )
then 220 write(*,*)
'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_CP_VARS. Check!' 226 if(
io_l )
write(
io_fid_log,*)
'*** [ATMOS_PHY_CP] prognostic/diagnostic variables' 228 '*** |',
'VARNAME ',
'|', &
229 'DESCRIPTION ',
'[',
'UNIT ',
']' 231 if(
io_l )
write(
io_fid_log,
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
232 '*** NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 237 if(
io_l )
write(
io_fid_log,
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
238 '*** NO.',iv+vmax,
'|',var_t_name(iv),
'|',var_t_desc(iv),
'[',var_t_unit(iv),
']' 343 character(len=19) :: timelabel
344 character(len=H_LONG) :: basename
348 if(
io_l )
write(
io_fid_log,*)
'*** Open restart file (ATMOS_PHY_CP) ***' 363 if(
io_l )
write(
io_fid_log,*)
'*** restart file for ATMOS_PHY_CP is not specified.' 386 if ( restart_fid /= -1 )
then 388 if(
io_l )
write(
io_fid_log,*)
'*** Read from restart file (ATMOS_PHY_CP) ***' 391 restart_fid, var_name(1),
'XY', step=1 )
393 restart_fid, var_name(2),
'XY', step=1 )
395 restart_fid, var_name(3),
'XY', step=1 )
397 restart_fid, var_name(4),
'XY', step=1 )
399 restart_fid, var_name(5),
'ZXY', step=1 )
401 restart_fid, var_name(6),
'ZXY', step=1 )
403 restart_fid, var_name(7),
'XY', step=1 )
405 restart_fid, var_name(8),
'ZXY', step=1 )
408 restart_fid, var_t_name(1),
'ZXY', step=1 )
410 restart_fid, var_t_name(2),
'ZXY', step=1 )
413 restart_fid, var_t_name(2+iq),
'ZXY', step=1 )
464 if(
io_l )
write(
io_fid_log,*)
'*** invalid restart file ID for ATMOS_PHY_CP.' 479 character(len=19) :: timelabel
480 character(len=H_LONG) :: basename
486 if(
io_l )
write(
io_fid_log,*)
'*** Create restart file (ATMOS_PHY_AE) ***' 512 if ( restart_fid /= -1 )
then 527 if ( restart_fid /= -1 )
then 529 if(
io_l )
write(
io_fid_log,*)
'*** Close restart file (ATMOS_PHY_CP) ***' 551 if ( restart_fid /= -1 )
then 553 call fileio_def_var( restart_fid, var_id(1), var_name(1), var_desc(1), &
555 call fileio_def_var( restart_fid, var_id(2), var_name(2), var_desc(2), &
557 call fileio_def_var( restart_fid, var_id(3), var_name(3), var_desc(3), &
559 call fileio_def_var( restart_fid, var_id(4), var_name(4), var_desc(4), &
561 call fileio_def_var( restart_fid, var_id(5), var_name(5), var_desc(5), &
563 call fileio_def_var( restart_fid, var_id(6), var_name(6), var_desc(6), &
565 call fileio_def_var( restart_fid, var_id(7), var_name(7), var_desc(7), &
567 call fileio_def_var( restart_fid, var_id(8), var_name(8), var_desc(8), &
570 call fileio_def_var( restart_fid, var_t_id(1), var_t_name(1), var_t_desc(1), &
572 call fileio_def_var( restart_fid, var_t_id(2), var_t_name(2), var_t_desc(2), &
576 call fileio_def_var( restart_fid, var_t_id(2+iq), var_t_name(2+iq), var_t_desc(2+iq), &
592 fileio_write => fileio_write_var
601 if ( restart_fid /= -1 )
then 641 var_t_name(1),
'ZXY' )
643 var_t_name(2),
'ZXY' )
646 var_t_name(2+iq),
'ZXY' )
integer, public is
start point of inner domain: x, local
subroutine, public atmos_phy_cp_vars_restart_def_var
Write restart.
logical, public statistics_checktotal
calc&report variable totals to logfile?
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_momy_t
integer, public je
end point of inner domain: y, local
module Atmosphere / Physics Cumulus
character(len=h_mid), public atmos_phy_cp_restart_out_title
title of the output file
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_momx_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.
subroutine, public atmos_phy_cp_vars_restart_open
Open restart file for read.
logical, public io_l
output log or not? (this process)
subroutine, public atmos_phy_cp_vars_restart_write
Write restart.
logical, public atmos_phy_cp_restart_output
output restart file?
subroutine, public fileio_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
module ATMOSPHERE / Physics Cloud Microphysics
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.
integer, public ke
end point of inner domain: z, local
subroutine, public atmos_phy_cp_vars_restart_create
Create restart file.
logical, public atmos_phy_cp_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
character(len=h_short), dimension(:), pointer, public atmos_phy_mp_name
character(len=h_short), public atmos_phy_cp_restart_out_dtype
REAL4 or REAL8.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_dens_t
real(rp), public const_undef
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_cp_rhoq_t
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_kf_w0avg
logical, public io_nml
output log or not? (for namelist, this process)
subroutine, public atmos_phy_cp_vars_setup
Setup.
integer, public ia
of whole cells: x, local, with HALO
subroutine, public time_gettimelabel(timelabel)
generate time label
integer, public ka
of whole cells: z, local, with HALO
subroutine, public atmos_phy_cp_vars_fillhalo
HALO Communication.
subroutine, public fileio_create(fid, basename, title, datatype, date, subsec, append, nozcoord)
Create/open a netCDF file.
integer, public js
start point of inner domain: y, local
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_momz_t
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_rhot_t
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_cloudtop
integer, public ks
start point of inner domain: z, local
subroutine, public fileio_enddef(fid)
Exit netCDF file define mode.
integer, public ie
end point of inner domain: x, local
logical, public io_aggregate
do parallel I/O through PnetCDF
subroutine, public fileio_open(fid, basename)
open a netCDF file for read
subroutine, public fileio_def_var(fid, vid, varname, desc, unit, axistype, datatype, timeintv, nsteps)
Define a variable to file.
subroutine, public atmos_phy_cp_vars_restart_read
Read restart.
subroutine, public fileio_close(fid)
Close a netCDF file.
integer, public io_fid_conf
Config file ID.
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_mflx_cloudbase
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_cloudbase
integer, public io_fid_log
Log file ID.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_cp_cldfrac_sh
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_sflx_rain
integer, public io_fid_nml
Log file ID (only for output namelist)
real(rp), dimension(:,:), allocatable, public atmos_phy_cp_kf_nca
integer, public ja
of whole cells: y, local, with HALO