SCALE-RM
Functions/Subroutines | Variables
mod_atmos_phy_ae_vars Module Reference

module ATMOSPHERE / Physics Aerosol Microphysics More...

Functions/Subroutines

subroutine, public atmos_phy_ae_vars_setup
 Setup. More...
 
subroutine, public atmos_phy_ae_vars_fillhalo
 HALO Communication. More...
 
subroutine, public atmos_phy_ae_vars_restart_read
 Read restart. More...
 
subroutine, public atmos_phy_ae_vars_restart_write
 Write restart. More...
 

Variables

logical, public atmos_phy_ae_restart_output = .false.
 output restart file? More...
 
character(len=h_long), public atmos_phy_ae_restart_in_basename = ''
 basename of the restart file More...
 
character(len=h_long), public atmos_phy_ae_restart_out_basename = ''
 basename of the output file More...
 
character(len=h_mid), public atmos_phy_ae_restart_out_title = 'ATMOS_PHY_AE restart'
 title of the output file More...
 
character(len=h_mid), public atmos_phy_ae_restart_out_dtype = 'DEFAULT'
 REAL4 or REAL8. More...
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_rhoq_t
 
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn
 
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn_t
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_emit
 

Detailed Description

module ATMOSPHERE / Physics Aerosol Microphysics

Description
Container for mod_atmos_phy_ae
Author
Team SCALE
History
  • 2014-05-04 (H.Yashiro) [new]
NAMELIST
  • PARAM_ATMOS_PHY_AE_VARS
    nametypedefault valuecomment
    ATMOS_PHY_AE_RESTART_IN_BASENAME character(len=H_LONG) '' basename of the restart file
    ATMOS_PHY_AE_RESTART_OUTPUT logical .false. output restart file?
    ATMOS_PHY_AE_RESTART_OUT_BASENAME character(len=H_LONG) '' basename of the output file
    ATMOS_PHY_AE_RESTART_OUT_TITLE character(len=H_MID) 'ATMOS_PHY_AE restart' title of the output file
    ATMOS_PHY_AE_RESTART_OUT_DTYPE character(len=H_MID) 'DEFAULT' REAL4 or REAL8

History Output
No history output

Function/Subroutine Documentation

◆ atmos_phy_ae_vars_setup()

subroutine, public mod_atmos_phy_ae_vars::atmos_phy_ae_vars_setup ( )

Setup.

Definition at line 76 of file mod_atmos_phy_ae_vars.f90.

References atmos_phy_ae_ccn, atmos_phy_ae_ccn_t, atmos_phy_ae_emit, atmos_phy_ae_restart_in_basename, atmos_phy_ae_restart_out_basename, atmos_phy_ae_restart_out_dtype, atmos_phy_ae_restart_out_title, atmos_phy_ae_restart_output, atmos_phy_ae_rhoq_t, scale_const::const_undef, scale_grid_index::ia, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_l, scale_stdio::io_lnml, scale_grid_index::ja, scale_grid_index::ka, scale_process::prc_mpistop(), scale_tracer::qa, and scale_tracer::qa_ae.

Referenced by mod_atmos_vars::atmos_vars_setup().

76  use scale_process, only: &
78  use scale_const, only: &
79  undef => const_undef
80  implicit none
81 
82  namelist / param_atmos_phy_ae_vars / &
83  atmos_phy_ae_restart_in_basename, &
84  atmos_phy_ae_restart_output, &
85  atmos_phy_ae_restart_out_basename, &
86  atmos_phy_ae_restart_out_title, &
87  atmos_phy_ae_restart_out_dtype
88 
89  integer :: ierr
90  integer :: iv
91  !---------------------------------------------------------------------------
92 
93  if( io_l ) write(io_fid_log,*)
94  if( io_l ) write(io_fid_log,*) '++++++ Module[VARS] / Categ[ATMOS PHY_AE] / Origin[SCALE-RM]'
95 
96  allocate( atmos_phy_ae_rhoq_t(ka,ia,ja,qa) )
97  atmos_phy_ae_rhoq_t(:,:,:, :) = undef
98 
99  allocate( atmos_phy_ae_ccn(ka,ia,ja) )
100  atmos_phy_ae_ccn(:,:,:) = undef
101 
102  allocate( atmos_phy_ae_ccn_t(ka,ia,ja) )
103  atmos_phy_ae_ccn_t(:,:,:) = undef
104 
105  allocate( atmos_phy_ae_emit(ka,ia,ja,qa_ae) )
106  atmos_phy_ae_emit(:,:,:,:) = 0.0_rp
107 
108  !--- read namelist
109  rewind(io_fid_conf)
110  read(io_fid_conf,nml=param_atmos_phy_ae_vars,iostat=ierr)
111  if( ierr < 0 ) then !--- missing
112  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
113  elseif( ierr > 0 ) then !--- fatal error
114  write(*,*) 'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_AE_VARS. Check!'
115  call prc_mpistop
116  endif
117  if( io_lnml ) write(io_fid_log,nml=param_atmos_phy_ae_vars)
118 
119  if( io_l ) write(io_fid_log,*)
120  if( io_l ) write(io_fid_log,*) '*** [ATMOS_PHY_AE] prognostic/diagnostic variables'
121  if( io_l ) write(io_fid_log,'(1x,A,A15,A,A32,3(A))') &
122  '*** |','VARNAME ','|', 'DESCRIPTION ','[', 'UNIT ',']'
123  do iv = 1, vmax
124  if( io_l ) write(io_fid_log,'(1x,A,i3,A,A15,A,A32,3(A))') &
125  '*** NO.',iv,'|',var_name(iv),'|',var_desc(iv),'[',var_unit(iv),']'
126  enddo
127 
128  if( io_l ) write(io_fid_log,*)
129  if ( atmos_phy_ae_restart_in_basename /= '' ) then
130  if( io_l ) write(io_fid_log,*) '*** Restart input? : ', trim(atmos_phy_ae_restart_in_basename)
131  else
132  if( io_l ) write(io_fid_log,*) '*** Restart input? : NO'
133  endif
134  if ( atmos_phy_ae_restart_output &
135  .AND. atmos_phy_ae_restart_out_basename /= '' ) then
136  if( io_l ) write(io_fid_log,*) '*** Restart output? : ', trim(atmos_phy_ae_restart_out_basename)
137  else
138  if( io_l ) write(io_fid_log,*) '*** Restart output? : NO'
139  atmos_phy_ae_restart_output = .false.
140  endif
141 
142  return
integer, public qa_ae
subroutine, public prc_mpistop
Abort MPI.
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
integer, public qa
real(rp), public const_undef
Definition: scale_const.F90:43
integer, public ia
of x whole cells (local, with HALO)
integer, public ka
of z whole cells (local, with HALO)
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_emit
module PROCESS
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_rhoq_t
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn
module CONSTANT
Definition: scale_const.F90:14
logical, public io_lnml
output log or not? (for namelist, this process)
Definition: scale_stdio.F90:60
integer, public io_fid_conf
Config file ID.
Definition: scale_stdio.F90:55
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn_t
integer, public ja
of y whole cells (local, with HALO)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_ae_vars_fillhalo()

subroutine, public mod_atmos_phy_ae_vars::atmos_phy_ae_vars_fillhalo ( )

HALO Communication.

Definition at line 148 of file mod_atmos_phy_ae_vars.f90.

References atmos_phy_ae_ccn, scale_grid_index::ie, scale_grid_index::is, scale_grid_index::je, scale_grid_index::js, scale_grid_index::ka, scale_grid_index::ke, and scale_grid_index::ks.

Referenced by atmos_phy_ae_vars_restart_read().

148  use scale_comm, only: &
149  comm_vars8, &
150  comm_wait
151  implicit none
152 
153  integer :: i, j
154  !---------------------------------------------------------------------------
155 
156  do j = js, je
157  do i = is, ie
158  atmos_phy_ae_ccn( 1:ks-1,i,j) = atmos_phy_ae_ccn(ks,i,j)
159  atmos_phy_ae_ccn(ke+1:ka, i,j) = atmos_phy_ae_ccn(ke,i,j)
160  enddo
161  enddo
162 
163  call comm_vars8( atmos_phy_ae_ccn(:,:,:), 1 )
164  call comm_wait ( atmos_phy_ae_ccn(:,:,:), 1 )
165 
166  return
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
integer, public ke
end point of inner domain: z, local
integer, public ka
of z whole cells (local, with HALO)
module COMMUNICATION
Definition: scale_comm.F90:23
integer, public js
start point of inner domain: y, local
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn
integer, public ks
start point of inner domain: z, local
integer, public ie
end point of inner domain: x, local
Here is the caller graph for this function:

◆ atmos_phy_ae_vars_restart_read()

subroutine, public mod_atmos_phy_ae_vars::atmos_phy_ae_vars_restart_read ( )

Read restart.

Definition at line 172 of file mod_atmos_phy_ae_vars.f90.

References atmos_phy_ae_ccn, atmos_phy_ae_restart_in_basename, atmos_phy_ae_vars_fillhalo(), scale_stdio::io_fid_log, and scale_stdio::io_l.

Referenced by mod_atmos_vars::atmos_vars_restart_read().

172  use scale_fileio, only: &
173  fileio_read
174  use scale_rm_statistics, only: &
175  stat_total
176  implicit none
177 
178  real(RP) :: total
179  !---------------------------------------------------------------------------
180 
181  if( io_l ) write(io_fid_log,*)
182  if( io_l ) write(io_fid_log,*) '*** Input restart file (ATMOS_PHY_AE) ***'
183 
184  if ( atmos_phy_ae_restart_in_basename /= '' ) then
185  if( io_l ) write(io_fid_log,*) '*** basename: ', trim(atmos_phy_ae_restart_in_basename)
186 
187  call fileio_read( atmos_phy_ae_ccn(:,:,:), & ! [OUT]
188  atmos_phy_ae_restart_in_basename, var_name(1), 'ZXY', step=1 ) ! [IN]
189 
190  call atmos_phy_ae_vars_fillhalo
191 
192  call stat_total( total, atmos_phy_ae_ccn(:,:,:), var_name(1) )
193  else
194  if( io_l ) write(io_fid_log,*) '*** restart file for ATMOS_PHY_AE is not specified.'
195  endif
196 
197  return
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
module FILE I/O (netcdf)
module Statistics
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_ae_vars_restart_write()

subroutine, public mod_atmos_phy_ae_vars::atmos_phy_ae_vars_restart_write ( )

Write restart.

Definition at line 203 of file mod_atmos_phy_ae_vars.f90.

References atmos_phy_ae_ccn, atmos_phy_ae_restart_out_basename, atmos_phy_ae_restart_out_dtype, atmos_phy_ae_restart_out_title, scale_stdio::io_fid_log, scale_stdio::io_l, and scale_time::time_gettimelabel().

Referenced by mod_atmos_vars::atmos_vars_restart_write().

203  use scale_time, only: &
205  use scale_fileio, only: &
206  fileio_write
207  implicit none
208 
209  character(len=20) :: timelabel
210  character(len=H_LONG) :: basename
211  !---------------------------------------------------------------------------
212 
213  if ( atmos_phy_ae_restart_out_basename /= '' ) then
214 
215  call time_gettimelabel( timelabel )
216  write(basename,'(A,A,A)') trim(atmos_phy_ae_restart_out_basename), '_', trim(timelabel)
217 
218  if( io_l ) write(io_fid_log,*)
219  if( io_l ) write(io_fid_log,*) '*** Output restart file (ATMOS_PHY_AE) ***'
220  if( io_l ) write(io_fid_log,*) '*** basename: ', trim(basename)
221 
222  call fileio_write( atmos_phy_ae_ccn(:,:,:), basename, atmos_phy_ae_restart_out_title, & ! [IN]
223  var_name(1), var_desc(1), var_unit(1), 'ZXY', atmos_phy_ae_restart_out_dtype ) ! [IN]
224 
225  endif
226 
227  return
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
module FILE I/O (netcdf)
subroutine, public time_gettimelabel(timelabel)
generate time label
Definition: scale_time.F90:90
module TIME
Definition: scale_time.F90:15
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ atmos_phy_ae_restart_output

logical, public mod_atmos_phy_ae_vars::atmos_phy_ae_restart_output = .false.

output restart file?

Definition at line 40 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_admin_restart::admin_restart_setup(), and atmos_phy_ae_vars_setup().

40  logical, public :: atmos_phy_ae_restart_output = .false.

◆ atmos_phy_ae_restart_in_basename

character(len=h_long), public mod_atmos_phy_ae_vars::atmos_phy_ae_restart_in_basename = ''

basename of the restart file

Definition at line 42 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_ae_vars_restart_read(), and atmos_phy_ae_vars_setup().

42  character(len=H_LONG), public :: atmos_phy_ae_restart_in_basename = ''

◆ atmos_phy_ae_restart_out_basename

character(len=h_long), public mod_atmos_phy_ae_vars::atmos_phy_ae_restart_out_basename = ''

basename of the output file

Definition at line 43 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_ae_vars_restart_write(), and atmos_phy_ae_vars_setup().

43  character(len=H_LONG), public :: atmos_phy_ae_restart_out_basename = ''

◆ atmos_phy_ae_restart_out_title

character(len=h_mid), public mod_atmos_phy_ae_vars::atmos_phy_ae_restart_out_title = 'ATMOS_PHY_AE restart'

title of the output file

Definition at line 44 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_ae_vars_restart_write(), and atmos_phy_ae_vars_setup().

44  character(len=H_MID), public :: atmos_phy_ae_restart_out_title = 'ATMOS_PHY_AE restart'

◆ atmos_phy_ae_restart_out_dtype

character(len=h_mid), public mod_atmos_phy_ae_vars::atmos_phy_ae_restart_out_dtype = 'DEFAULT'

REAL4 or REAL8.

Definition at line 45 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_admin_restart::admin_restart_setup(), atmos_phy_ae_vars_restart_write(), and atmos_phy_ae_vars_setup().

45  character(len=H_MID), public :: atmos_phy_ae_restart_out_dtype = 'DEFAULT'

◆ atmos_phy_ae_rhoq_t

real(rp), dimension(:,:,:,:), allocatable, public mod_atmos_phy_ae_vars::atmos_phy_ae_rhoq_t

Definition at line 47 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_atmos_phy_ae_driver::atmos_phy_ae_driver(), and atmos_phy_ae_vars_setup().

47  real(RP), public, allocatable :: atmos_phy_ae_rhoq_t(:,:,:,:) ! tendency rho*QTRC [kg/kg/s]
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_rhoq_t

◆ atmos_phy_ae_ccn

real(rp), dimension(:,:,:), allocatable, public mod_atmos_phy_ae_vars::atmos_phy_ae_ccn

Definition at line 49 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_atmos_phy_ae_driver::atmos_phy_ae_driver(), atmos_phy_ae_vars_fillhalo(), atmos_phy_ae_vars_restart_read(), atmos_phy_ae_vars_restart_write(), and atmos_phy_ae_vars_setup().

49  real(RP), public, allocatable :: atmos_phy_ae_ccn(:,:,:) ! cloud condensation nuclei [/m3]
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn

◆ atmos_phy_ae_ccn_t

real(rp), dimension(:,:,:), allocatable, public mod_atmos_phy_ae_vars::atmos_phy_ae_ccn_t

Definition at line 50 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_atmos_phy_ae_driver::atmos_phy_ae_driver(), atmos_phy_ae_vars_setup(), and mod_atmos_phy_mp_driver::atmos_phy_mp_driver().

50  real(RP), public, allocatable :: atmos_phy_ae_ccn_t(:,:,:) ! tendency CCN [/m3/s]
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn_t

◆ atmos_phy_ae_emit

real(rp), dimension(:,:,:,:), allocatable, public mod_atmos_phy_ae_vars::atmos_phy_ae_emit

Definition at line 51 of file mod_atmos_phy_ae_vars.f90.

Referenced by mod_atmos_phy_ae_driver::atmos_phy_ae_driver(), and atmos_phy_ae_vars_setup().

51  real(RP), public, allocatable :: atmos_phy_ae_emit(:,:,:,:) ! emission of aerosol and gas
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ae_emit