SCALE-RM
scale_atmos_phy_ae.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
13 !-------------------------------------------------------------------------------
15  !-----------------------------------------------------------------------------
16  !
17  !++ used modules
18  !
19  use scale_precision
20  use scale_stdio
21  use scale_prof
23  use scale_tracer
24  !-----------------------------------------------------------------------------
25  implicit none
26  private
27  !-----------------------------------------------------------------------------
28  !
29  !++ Public procedure
30  !
31  public :: atmos_phy_ae_setup
32 
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  abstract interface
38  subroutine ae( &
39  DENS, &
40  MOMZ, &
41  MOMX, &
42  MOMY, &
43  RHOT, &
44  EMIT, &
45  NREG, &
46  QTRC, &
47  CN, &
48  CCN, &
49  RHOQ_t_AE )
50  use scale_precision
52  use scale_tracer
53  real(RP), intent(inout) :: dens(ka,ia,ja)
54  real(RP), intent(inout) :: momz(ka,ia,ja)
55  real(RP), intent(inout) :: momx(ka,ia,ja)
56  real(RP), intent(inout) :: momy(ka,ia,ja)
57  real(RP), intent(inout) :: rhot(ka,ia,ja)
58  real(RP), intent(inout) :: emit(ka,ia,ja,qa_ae)
59  real(RP), intent(in) :: nreg(ka,ia,ja)
60  real(RP), intent(inout) :: qtrc(ka,ia,ja,qa)
61  real(RP), intent(out) :: cn(ka,ia,ja)
62  real(RP), intent(out) :: ccn(ka,ia,ja)
63  real(RP), intent(inout) :: rhoq_t_ae(ka,ia,ja,qa)
64  end subroutine ae
65 
66  subroutine er( RE, QTRC, RH )
67  use scale_precision
69  use scale_tracer
70  real(RP), intent(out) :: re (ka,ia,ja,ae_qa) ! effective radius
71  real(RP), intent(in) :: qtrc(ka,ia,ja,qa) ! tracer mass concentration [kg/kg]
72  real(RP), intent(in) :: rh (ka,ia,ja) ! relative humidity [0-1]
73  end subroutine er
74  end interface
75 
76  procedure(ae), pointer :: atmos_phy_ae => null()
77  procedure(er), pointer :: atmos_phy_ae_effectiveradius => null()
78  public :: atmos_phy_ae
80 
81  real(RP), public, pointer :: ae_dens(:) ! aerosol density [kg/m3]=[g/L]
82  !-----------------------------------------------------------------------------
83  !
84  !++ Private procedure
85  !
86  !-----------------------------------------------------------------------------
87  !
88  !++ Private parameters & variables
89  !
90  !-----------------------------------------------------------------------------
91 contains
92  !-----------------------------------------------------------------------------
94  subroutine atmos_phy_ae_setup( AE_TYPE )
95  use scale_process, only: &
97 #define EXTM(pre, name, post) pre ## name ## post
98 #define NAME(pre, name, post) EXTM(pre, name, post)
99 #ifdef AE
100  use name(scale_atmos_phy_ae_, ae,), only: &
101  name(atmos_phy_ae_, ae, _setup), &
102  name(atmos_phy_ae_, ae,)
103  name(atmos_phy_ae_, ae, _effectiveradius)
104 #else
105  use scale_atmos_phy_ae_dummy, only: &
109  use scale_atmos_phy_ae_kajino13, only: &
113 #endif
114  implicit none
115 
116  character(len=*), intent(in) :: AE_TYPE
117  !---------------------------------------------------------------------------
118 
119  select case( ae_type )
120  case ( 'DUMMY', 'NONE' )
121  call atmos_phy_ae_dummy_setup( ae_type )
124  case ( 'KAJINO13' )
125  call atmos_phy_ae_kajino13_setup( ae_type )
128  write(*,*) '### aerosol type(', ae_type, '). is not recommended in current version!'
129  case default
130  write(*,*) 'xxx invalid aerosol type(', ae_type, '). CHECK!'
131  call prc_mpistop
132  end select
133 
134  return
135  end subroutine atmos_phy_ae_setup
136 
137 end module scale_atmos_phy_ae
subroutine, public atmos_phy_ae_dummy_effectiveradius(Re, QTRC, RH)
Calculate Effective Radius.
integer, public qa_ae
subroutine, public prc_mpistop
Abort MPI.
module ATMOSPHERE / Physics Aerosol Microphysics
subroutine, public atmos_phy_ae_kajino13(DENS, MOMZ, MOMX, MOMY, RHOT, EMIT, NREG, QTRC, CN, CCN, RHOQ_t_AE)
Aerosol Microphysics.
procedure(ae), pointer, public atmos_phy_ae
subroutine, public atmos_phy_ae_kajino13_setup(AE_TYPE)
Setup.
module STDIO
Definition: scale_stdio.F90:12
integer, public qa
module grid index
module TRACER
integer, public ia
of x whole cells (local, with HALO)
integer, public ka
of z whole cells (local, with HALO)
module ATMOSPHERE / Physics Aerosol Microphysics
integer, public ae_qa
module PROCESS
subroutine, public atmos_phy_ae_setup(AE_TYPE)
Setup.
subroutine, public atmos_phy_ae_dummy_setup(AE_TYPE)
Setup.
subroutine, public atmos_phy_ae_kajino13_effectiveradius(Re, QTRC, RH)
Calculate Effective Radius.
module profiler
Definition: scale_prof.F90:10
real(rp), dimension(:), pointer, public ae_dens
subroutine, public atmos_phy_ae_dummy(DENS, MOMZ, MOMX, MOMY, RHOT, EMIT, NREG, QTRC, CN, CCN, RHOQ_t_AE)
Aerosol Microphysics.
module PRECISION
module ATMOSPHERE / Physics Aerosol Microphysics
procedure(er), pointer, public atmos_phy_ae_effectiveradius
integer, public ja
of y whole cells (local, with HALO)