Go to the documentation of this file.
89 integer,
private,
parameter :: vmax = 0
91 character(len=H_SHORT),
private :: var_name(vmax)
92 character(len=H_MID),
private :: var_desc(vmax)
93 character(len=H_SHORT),
private :: var_unit(vmax)
94 integer,
private :: var_id(vmax)
95 integer,
private :: restart_fid = -1
103 real(
rp),
private,
allocatable :: atmos_phy_mp_cldfrac(:,:,:)
104 real(
rp),
private,
allocatable :: atmos_phy_mp_re (:,:,:,:)
105 real(
rp),
private,
allocatable :: atmos_phy_mp_qe (:,:,:,:)
106 real(
rp),
private,
allocatable :: atmos_phy_mp_ne (:,:,:,:)
107 logical,
private :: diag_cldfrac
108 logical,
private :: diag_re
109 logical,
private :: diag_qe
110 logical,
private :: diag_ne
113 integer,
private :: hist_cldfrac_id
114 logical,
private :: hist_re
115 logical,
private :: hist_qe
116 logical,
private :: hist_ne
117 integer,
private,
allocatable :: hist_re_id(:)
118 integer,
private,
allocatable :: hist_qe_id(:)
119 integer,
private,
allocatable :: hist_ne_id(:)
140 namelist / param_atmos_phy_mp_vars / &
156 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'Setup'
185 read(
io_fid_conf,nml=param_atmos_phy_mp_vars,iostat=ierr)
187 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'Not found namelist. Default used.'
188 elseif( ierr > 0 )
then
189 log_error(
"ATMOS_PHY_MP_vars_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_MP_VARS. Check!'
192 log_nml(param_atmos_phy_mp_vars)
195 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'[ATMOS_PHY_MP] prognostic/diagnostic variables'
196 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
197 ' |',
'VARNAME ',
'|', &
198 'DESCRIPTION ',
'[',
'UNIT ',
']'
200 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
201 'NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']'
209 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'Restart input? : NO'
216 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'Restart output? : NO'
222 allocate( atmos_phy_mp_cldfrac(
ka,
ia,
ja) )
227 atmos_phy_mp_cldfrac(:,:,:) = undef
229 atmos_phy_mp_re(:,:,:,:) = undef
231 atmos_phy_mp_qe(:,:,:,:) = undef
232 atmos_phy_mp_ne(:,:,:,:) = undef
233 diag_cldfrac = .false.
239 allocate( hist_re_id(
n_hyd) )
240 allocate( hist_qe_id(
n_hyd) )
241 allocate( hist_ne_id(
n_hyd) )
243 call file_history_reg(
'CLDFRAC',
'cloud fraction',
'1', hist_cldfrac_id, fill_halo=.true., dim_type=
'ZXY' )
248 if( hist_re_id(ih) > 0 ) hist_re = .true.
254 if( hist_qe_id(ih) > 0 ) hist_qe = .true.
259 call file_history_reg( trim(
num_name(ih))//
'_hyd',
'number concentration of '//trim(
hyd_desc(ih)),
'1/m3', hist_ne_id(ih), fill_halo=.true., dim_type=
'ZXY' )
260 if( hist_ne_id(ih) > 0 ) hist_ne = .true.
294 character(len=19) :: timelabel
295 character(len=H_LONG) :: basename
363 character(len=19) :: timelabel
364 character(len=H_LONG) :: basename
451 file_cartesc_write_var
475 file_history_query, &
481 real(
rp),
intent(in) :: dens(
ka,
ia,
ja)
482 real(
rp),
intent(in) :: temp(
ka,
ia,
ja)
490 if ( hist_cldfrac_id > 0 )
then
491 call file_history_query( hist_cldfrac_id, do_put )
495 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
496 cldfrac=work(:,:,:,1) )
497 call file_history_put( hist_cldfrac_id, work(:,:,:,1) )
503 if ( hist_re_id(ih) > 0 )
then
504 call file_history_query( hist_re_id(ih), do_put )
507 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
515 if ( hist_re_id(ih) > 0 )
then
516 call file_history_query( hist_re_id(ih), do_put )
517 if ( do_put )
call file_history_put( hist_re_id(ih), work(:,:,:,ih) )
525 if ( hist_qe_id(ih) > 0 )
then
526 call file_history_query( hist_qe_id(ih), do_put )
529 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
537 if ( hist_qe_id(ih) > 0 )
then
538 call file_history_query( hist_qe_id(ih), do_put )
539 if( do_put )
call file_history_put( hist_qe_id(ih), work(:,:,:,ih) )
547 if ( hist_ne_id(ih) > 0 )
then
548 call file_history_query( hist_ne_id(ih), do_put )
551 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
559 if ( hist_ne_id(ih) > 0 )
then
560 call file_history_query( hist_ne_id(ih), do_put )
561 if( do_put )
call file_history_put( hist_ne_id(ih), work(:,:,:,ih) )
572 CLDFRAC, Re, Qe, Ne )
603 real(
rp),
intent(in) :: dens(
ka,
ia,
ja)
604 real(
rp),
intent(in) :: temp(
ka,
ia,
ja)
606 real(
rp),
intent(out),
optional :: cldfrac(
ka,
ia,
ja)
611 integer ::
k, i, j, ih
613 if (
present(cldfrac) )
then
614 if ( .not. diag_cldfrac )
then
620 atmos_phy_mp_cldfrac(:,:,:) )
625 atmos_phy_mp_cldfrac(:,:,:) )
630 atmos_phy_mp_cldfrac(:,:,:) )
635 atmos_phy_mp_cldfrac(:,:,:) )
638 atmos_phy_mp_cldfrac(:,:,:) = 0.0_rp
640 diag_cldfrac = .true.
646 cldfrac(
k,i,j) = atmos_phy_mp_cldfrac(
k,i,j)
652 if (
present(re) )
then
653 if ( .not. diag_re )
then
658 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,
qs_mp+1:
qe_mp), &
659 atmos_phy_mp_re(:,:,:,:) )
663 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,
qs_mp+1:
qe_mp), &
664 atmos_phy_mp_re(:,:,:,:) )
668 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,
qs_mp+1:
qe_mp), &
669 atmos_phy_mp_re(:,:,:,:) )
673 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,
qs_mp+1:
qe_mp), &
674 atmos_phy_mp_re(:,:,:,:) )
677 atmos_phy_mp_re(:,:,:,:) = 0.0_rp
686 re(
k,i,j,ih) = atmos_phy_mp_re(
k,i,j,ih)
693 if (
present(qe) )
then
694 if ( .not. diag_qe )
then
700 atmos_phy_mp_qe(:,:,:,:) )
705 atmos_phy_mp_qe(:,:,:,:) )
710 atmos_phy_mp_qe(:,:,:,:) )
715 atmos_phy_mp_qe(:,:,:,:) )
718 atmos_phy_mp_qe(:,:,:,:) = 0.0_rp
727 qe(
k,i,j,ih) = atmos_phy_mp_qe(
k,i,j,ih)
734 if (
present(ne) )
then
735 if ( .not. diag_ne )
then
737 case (
'KESSLER',
'TOMITA08' )
743 atmos_phy_mp_ne(:,:,:,:) )
748 atmos_phy_mp_ne(:,:,:,:) )
757 ne(
k,i,j,ih) = atmos_phy_mp_ne(
k,i,j,ih)
768 diag_cldfrac = .false.
776 subroutine atmos_phy_mp_vars_check
797 end subroutine atmos_phy_mp_vars_check
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_engi
subroutine, public atmos_phy_mp_kessler_cloud_fraction(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC, mask_criterion, cldfrac)
Calculate Cloud Fraction.
character(len=h_short), dimension(n_hyd), parameter, public num_name
module Atmosphere / Physics Cloud Microphysics
integer, public ke
end point of inner domain: z, local
character(len=h_mid), dimension(n_hyd), parameter, public hyd_desc
subroutine, public prc_abort
Abort Process.
integer, parameter, public i_hr
liquid water rain
subroutine, public atmos_phy_mp_vars_get_diagnostic(DENS, TEMP, QTRC, CLDFRAC, Re, Qe, Ne)
logical, public atmos_phy_mp_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
integer, parameter, public i_hs
snow
character(len=h_short), dimension(n_hyd), parameter, public hyd_name
module atmosphere / physics / microphysics / Tomita08
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.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_momz_t
subroutine, public atmos_phy_mp_suzuki10_qtrc2qhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC0, Qe)
Calculate mass ratio of each category.
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]
module atmosphere / hydrometeor
character(len=h_mid), public atmos_phy_mp_restart_out_title
title of the output file
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_rain
logical, public atmos_phy_mp_restart_in_aggregate
Switch to use aggregate file.
integer, parameter, public i_hh
hail
subroutine, public atmos_phy_mp_vars_restart_def_var
Define variables in restart file.
module Atmosphere GRID CartesC Real(real space)
character(len=h_long), public atmos_phy_mp_restart_in_basename
Basename of the input file.
module ATMOSPHERE / Physics Cloud Microphysics
subroutine, public atmos_phy_mp_vars_restart_create
Create restart file.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_dens_t
integer, parameter, public rp
integer, parameter, public i_hi
ice water cloud
integer, public ie
end point of inner domain: x, local
character(len=h_long), public atmos_phy_mp_restart_out_basename
Basename of the output file.
subroutine, public atmos_phy_mp_tomita08_qtrc2qhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC, Qe)
Calculate mass ratio of each category.
subroutine, public atmos_phy_mp_vars_reset_diagnostics
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_mp_rhoc_t
subroutine, public atmos_phy_mp_sn14_qtrc2nhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC0, Ne)
Calculate number concentration of each category.
subroutine, public atmos_phy_mp_kessler_effective_radius(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS0, TEMP0, QTRC0, Re)
Calculate Effective Radius.
logical, public atmos_phy_mp_restart_out_aggregate
Switch to use aggregate file.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_rhot_t
subroutine, public atmos_phy_mp_vars_fillhalo
HALO Communication.
subroutine, public atmos_phy_mp_suzuki10_qtrc2nhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, QTRC0, Ne)
Calculate number concentration of each category.
character(len=h_short), public atmos_phy_mp_restart_out_dtype
REAL4 or REAL8.
subroutine, public atmos_phy_mp_tomita08_effective_radius(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS0, TEMP0, QTRC0, Re)
Calculate Effective Radius.
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
subroutine, public atmos_phy_mp_kessler_qtrc2qhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC, Qe)
Calculate mass ratio of each category.
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
integer, public is
start point of inner domain: x, local
subroutine, public atmos_phy_mp_suzuki10_effective_radius(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS0, TEMP0, QTRC0, Re)
Calculate Effective Radius.
module Spectran Bin Microphysics
subroutine, public atmos_phy_mp_suzuki10_cloud_fraction(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC0, mask_criterion, cldfrac)
Calculate Cloud Fraction.
subroutine, public atmos_phy_mp_vars_restart_write
Write restart.
module atmosphere / physics / microphysics / Kessler
integer, parameter, public i_hc
liquid water cloud
subroutine, public atmos_phy_mp_sn14_effective_radius(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS0, TEMP0, QTRC0, Re)
ATMOS_PHY_MP_sn14_effective_radius Calculate Effective Radius.
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_rhoh
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_evaporate
subroutine, public atmos_phy_mp_sn14_qtrc2qhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC0, Qe)
ATMOS_PHY_MP_sn14_qtrc2qhyd Calculate mass ratio of each category.
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_phy_mp_vars_setup
Setup.
subroutine, public atmos_phy_mp_vars_restart_read
Read restart.
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 atmos_phy_mp_rhov_t
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
subroutine, public file_cartesc_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
subroutine, public time_gettimelabel(timelabel)
generate time label
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_rhou_t
integer, public js
start point of inner domain: y, local
logical, public atmos_phy_mp_restart_output
output restart file?
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_snow
logical function, public file_get_aggregate(fid)
logical, public atmos_phy_mp_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
character(len=h_short), public atmos_phy_mp_type
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_mp_vars_restart_open
Open restart file for read.
real(rp), public atmos_phy_mp_cldfrac_thleshold
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
subroutine, public atmos_phy_mp_sn14_cloud_fraction(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC, mask_criterion, cldfrac)
ATMOS_PHY_MP_sn14_cloud_fraction Calculate Cloud Fraction.
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_mp_rhoq_t
real(rp), public const_undef
subroutine, public atmos_phy_mp_tomita08_cloud_fraction(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC, mask_criterion, cldfrac)
Calculate Cloud Fraction.
subroutine, public atmos_phy_mp_vars_restart_close
Close restart file.
subroutine, public atmos_phy_mp_vars_history(DENS, TEMP, QTRC)
integer, public io_fid_conf
Config file ID.
integer, public je
end point of inner domain: y, local
integer, parameter, public n_hyd
subroutine, public atmos_phy_mp_vars_restart_enddef
Exit netCDF define mode.
integer, parameter, public i_hg
graupel