Go to the documentation of this file.
90 integer,
private,
parameter :: vmax = 0
92 character(len=H_SHORT),
private :: var_name(vmax)
93 character(len=H_MID),
private :: var_desc(vmax)
94 character(len=H_SHORT),
private :: var_unit(vmax)
95 integer,
private :: var_id(vmax)
96 integer,
private :: restart_fid = -1
104 real(
rp),
private,
allocatable :: atmos_phy_mp_cldfrac(:,:,:)
105 real(
rp),
private,
allocatable :: atmos_phy_mp_re (:,:,:,:)
106 real(
rp),
private,
allocatable :: atmos_phy_mp_qe (:,:,:,:)
107 real(
rp),
private,
allocatable :: atmos_phy_mp_ne (:,:,:,:)
108 logical,
private :: diag_cldfrac
109 logical,
private :: diag_re
110 logical,
private :: diag_qe
111 logical,
private :: diag_ne
114 integer,
private :: hist_cldfrac_id
115 logical,
private :: hist_re
116 logical,
private :: hist_qe
117 logical,
private :: hist_ne
118 integer,
private,
allocatable :: hist_re_id(:)
119 integer,
private,
allocatable :: hist_qe_id(:)
120 integer,
private,
allocatable :: hist_ne_id(:)
141 namelist / param_atmos_phy_mp_vars / &
157 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'Setup'
189 read(
io_fid_conf,nml=param_atmos_phy_mp_vars,iostat=ierr)
191 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'Not found namelist. Default used.'
192 elseif( ierr > 0 )
then
193 log_error(
"ATMOS_PHY_MP_vars_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_MP_VARS. Check!'
196 log_nml(param_atmos_phy_mp_vars)
199 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'[ATMOS_PHY_MP] prognostic/diagnostic variables'
200 log_info_cont(
'(1x,A,A24,A,A48,A,A12,A)') &
201 ' |',
'VARNAME ',
'|', &
202 'DESCRIPTION ',
'[',
'UNIT ',
']'
204 log_info_cont(
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
205 'NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']'
213 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'Restart input? : NO'
220 log_info(
"ATMOS_PHY_MP_vars_setup",*)
'Restart output? : NO'
226 allocate( atmos_phy_mp_cldfrac(
ka,
ia,
ja) )
231 atmos_phy_mp_cldfrac(:,:,:) = undef
233 atmos_phy_mp_re(:,:,:,:) = undef
235 atmos_phy_mp_qe(:,:,:,:) = undef
236 atmos_phy_mp_ne(:,:,:,:) = undef
237 diag_cldfrac = .false.
244 allocate( hist_re_id(
n_hyd) )
245 allocate( hist_qe_id(
n_hyd) )
246 allocate( hist_ne_id(
n_hyd) )
248 call file_history_reg(
'CLDFRAC',
'cloud fraction',
'1', hist_cldfrac_id, fill_halo=.true., dim_type=
'ZXY' )
253 if( hist_re_id(ih) > 0 ) hist_re = .true.
259 if( hist_qe_id(ih) > 0 ) hist_qe = .true.
264 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' )
265 if( hist_ne_id(ih) > 0 ) hist_ne = .true.
278 log_info(
"ATMOS_PHY_MP_vars_finalize",*)
'Finalize'
297 deallocate( atmos_phy_mp_cldfrac )
298 deallocate( atmos_phy_mp_re )
299 deallocate( atmos_phy_mp_qe )
300 deallocate( atmos_phy_mp_ne )
304 deallocate( hist_re_id )
305 deallocate( hist_qe_id )
306 deallocate( hist_ne_id )
339 character(len=19) :: timelabel
340 character(len=H_LONG) :: basename
409 character(len=19) :: timelabel
410 character(len=H_LONG) :: basename
497 file_cartesc_write_var
521 file_history_query, &
527 real(
rp),
intent(in) :: dens(
ka,
ia,
ja)
528 real(
rp),
intent(in) :: temp(
ka,
ia,
ja)
538 if ( hist_cldfrac_id > 0 )
then
539 call file_history_query( hist_cldfrac_id, do_put )
543 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
544 cldfrac=work(:,:,:,1) )
545 call file_history_put( hist_cldfrac_id, work(:,:,:,1) )
551 if ( hist_re_id(ih) > 0 )
then
552 call file_history_query( hist_re_id(ih), do_put )
555 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
563 if ( hist_re_id(ih) > 0 )
then
564 call file_history_query( hist_re_id(ih), do_put )
566 call file_history_put( hist_re_id(ih), work(:,:,:,ih) )
575 if ( hist_qe_id(ih) > 0 )
then
576 call file_history_query( hist_qe_id(ih), do_put )
579 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
587 if ( hist_qe_id(ih) > 0 )
then
588 call file_history_query( hist_qe_id(ih), do_put )
590 call file_history_put( hist_qe_id(ih), work(:,:,:,ih) )
599 if ( hist_ne_id(ih) > 0 )
then
600 call file_history_query( hist_ne_id(ih), do_put )
603 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
611 if ( hist_ne_id(ih) > 0 )
then
612 call file_history_query( hist_ne_id(ih), do_put )
614 call file_history_put( hist_ne_id(ih), work(:,:,:,ih) )
628 CLDFRAC, Re, Qe, Ne )
659 real(
rp),
intent(in) :: dens(
ka,
ia,
ja)
660 real(
rp),
intent(in) :: temp(
ka,
ia,
ja)
662 real(
rp),
intent(out),
optional :: cldfrac(
ka,
ia,
ja)
667 integer ::
k, i, j, ih
669 if (
present(cldfrac) )
then
671 if ( .not. diag_cldfrac )
then
678 atmos_phy_mp_cldfrac(:,:,:) )
684 atmos_phy_mp_cldfrac(:,:,:) )
690 atmos_phy_mp_cldfrac(:,:,:) )
697 atmos_phy_mp_cldfrac(:,:,:) )
702 atmos_phy_mp_cldfrac(:,:,:) = 0.0_rp
705 diag_cldfrac = .true.
712 cldfrac(
k,i,j) = atmos_phy_mp_cldfrac(
k,i,j)
721 if (
present(re) )
then
723 if ( .not. diag_re )
then
729 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,
qs_mp+1:
qe_mp), &
730 atmos_phy_mp_re(:,:,:,:) )
735 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,
qs_mp+1:
qe_mp), &
736 atmos_phy_mp_re(:,:,:,:) )
741 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,
qs_mp+1:
qe_mp), &
742 atmos_phy_mp_re(:,:,:,:) )
748 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,
qs_mp+1:
qe_mp), &
749 atmos_phy_mp_re(:,:,:,:) )
754 atmos_phy_mp_re(:,:,:,:) = 0.0_rp
765 re(
k,i,j,ih) = atmos_phy_mp_re(
k,i,j,ih)
775 if (
present(qe) )
then
777 if ( .not. diag_qe )
then
784 atmos_phy_mp_qe(:,:,:,:) )
790 atmos_phy_mp_qe(:,:,:,:) )
796 atmos_phy_mp_qe(:,:,:,:) )
803 atmos_phy_mp_qe(:,:,:,:) )
808 atmos_phy_mp_qe(:,:,:,:) = 0.0_rp
819 qe(
k,i,j,ih) = atmos_phy_mp_qe(
k,i,j,ih)
829 if (
present(ne) )
then
831 if ( .not. diag_ne )
then
833 case (
'KESSLER',
'TOMITA08' )
840 atmos_phy_mp_ne(:,:,:,:) )
847 atmos_phy_mp_ne(:,:,:,:) )
858 ne(
k,i,j,ih) = atmos_phy_mp_ne(
k,i,j,ih)
872 diag_cldfrac = .false.
880 subroutine atmos_phy_mp_vars_check
901 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.
subroutine, public atmos_phy_mp_vars_finalize
Finalize.
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_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)
subroutine, public file_cartesc_open(basename, fid, single, aggregate)
open a netCDF file for read
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