SCALE-RM
scale_atmos_phy_mp_sdm.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
14 !-------------------------------------------------------------------------------
16  !-----------------------------------------------------------------------------
17  !
18  !++ used modules
19  !
20  use scale_precision
21  use scale_stdio
22  use scale_prof
24  use scale_atmos_hydrometeor, only: &
25  n_hyd
26  !-----------------------------------------------------------------------------
27  implicit none
28  private
29  !-----------------------------------------------------------------------------
30  !
31  !++ Public procedure
32  !
33  public :: atmos_phy_mp_sdm_config
34  public :: atmos_phy_mp_sdm_setup
35  public :: atmos_phy_mp_sdm
36 
40 
41  !-----------------------------------------------------------------------------
42  !
43  !++ Public parameters & variables
44  !
45  integer, parameter :: QA_MP = 3
46 
47  character(len=H_SHORT), public, target :: atmos_phy_mp_sdm_name(qa_mp)
48  character(len=H_MID), public, target :: atmos_phy_mp_sdm_desc(qa_mp)
49  character(len=H_SHORT), public, target :: atmos_phy_mp_sdm_unit(qa_mp)
50 
51  real(RP), public, target :: atmos_phy_mp_sdm_dens(n_hyd) ! hydrometeor density [kg/m3]=[g/L]
52 
53  data atmos_phy_mp_sdm_name / 'QV', 'QC', 'QR' /
54 
55  data atmos_phy_mp_sdm_desc / &
56  'Ratio of Water Vapor mass to total mass (Specific humidity)', &
57  'cloud water mixing ratio', &
58  'rain water mixing ratio' /
59 
60  data atmos_phy_mp_sdm_unit / 'kg/kg', 'kg/kg', 'kg/kg' /
61 
62  !-----------------------------------------------------------------------------
63  !
64  !++ Private procedure
65  !
66  !-----------------------------------------------------------------------------
67  !
68  !++ Private parameters & variables
69  !
70  integer, private, parameter :: i_mp_qc = 1
71  integer, private, parameter :: i_mp_qr = 2
72  !-----------------------------------------------------------------------------
73 contains
74  !-----------------------------------------------------------------------------
76  !-----------------------------------------------------------------------------
77  subroutine atmos_phy_mp_sdm_config( &
78  MP_TYPE, &
79  QA, QS )
80  use scale_process, only: &
82  implicit none
83 
84  character(len=*), intent(in) :: mp_type
85  integer, intent(out) :: qa
86  integer, intent(out) :: qs
87  !---------------------------------------------------------------------------
88 
89  write(*,*) '*** SDM not supported.'
90  write(*,*) '*** Please contact SCALE developers'
91  call prc_mpistop
92 
93  qa = 0
94  qs = 0
95 
96  return
97  end subroutine atmos_phy_mp_sdm_config
98 
99  !-----------------------------------------------------------------------------
101  !-----------------------------------------------------------------------------
102  subroutine atmos_phy_mp_sdm_setup
103  use scale_process, only: &
105  use scale_const, only: &
106  undef => const_undef
107  implicit none
108  !---------------------------------------------------------------------------
109 
110  write(*,*) '*** SDM not supported.'
111  write(*,*) '*** Please contact SCALE developers'
112  call prc_mpistop
113 
114  atmos_phy_mp_sdm_dens(:) = undef
115 
116  return
117  end subroutine atmos_phy_mp_sdm_setup
118 
119  !-----------------------------------------------------------------------------
121  !-----------------------------------------------------------------------------
122  subroutine atmos_phy_mp_sdm( &
123  DENS, &
124  MOMZ, &
125  MOMX, &
126  MOMY, &
127  RHOT, &
128  QTRC, &
129  CCN, &
130  EVAPORATE, &
131  SFLX_rain, &
132  SFLX_snow )
134  use scale_const, only: &
135  undef => const_undef
136  use scale_tracer, only: &
137  qa
138  use scale_process, only: &
140  implicit none
141 
142  real(RP), intent(inout) :: dens(ka,ia,ja)
143  real(RP), intent(inout) :: momz(ka,ia,ja)
144  real(RP), intent(inout) :: momx(ka,ia,ja)
145  real(RP), intent(inout) :: momy(ka,ia,ja)
146  real(RP), intent(inout) :: rhot(ka,ia,ja)
147  real(RP), intent(inout) :: qtrc(ka,ia,ja,qa)
148  real(RP), intent(in) :: ccn (ka,ia,ja)
149  real(RP), intent(out) :: evaporate(ka,ia,ja) !---- evaporated cloud number concentration [/m3]
150  real(RP), intent(out) :: sflx_rain(ia,ja)
151  real(RP), intent(out) :: sflx_snow(ia,ja)
152  !---------------------------------------------------------------------------
153 
154  write(*,*) '*** SDM not supported.'
155  write(*,*) '*** Please contact SCALE developers'
156  call prc_mpistop
157 
158  evaporate = undef
159  sflx_rain = undef
160  sflx_snow = undef
161 
162  return
163  end subroutine atmos_phy_mp_sdm
164 
165  !-----------------------------------------------------------------------------
167  subroutine atmos_phy_mp_sdm_cloudfraction( &
168  cldfrac, &
169  QTRC, &
170  mask_criterion )
172  use scale_tracer, only: &
173  qa
174  implicit none
175 
176  real(RP), intent(out) :: cldfrac(ka,ia,ja)
177  real(RP), intent(in) :: qtrc (ka,ia,ja,qa)
178  real(RP), intent(in) :: mask_criterion ! not used
179  !---------------------------------------------------------------------------
180 
181  cldfrac(:,:,:) = 0.0_rp ! dummy
182 
183  return
184  end subroutine atmos_phy_mp_sdm_cloudfraction
185 
186  !-----------------------------------------------------------------------------
189  Re, &
190  QTRC0, &
191  DENS0, &
192  TEMP0 )
194  use scale_tracer, only: &
195  qa
196  use scale_atmos_hydrometeor, only: &
197  n_hyd
198  implicit none
199 
200  real(RP), intent(out) :: re (ka,ia,ja,n_hyd) ! effective radius
201  real(RP), intent(in) :: qtrc0(ka,ia,ja,qa) ! tracer mass concentration [kg/kg]
202  real(RP), intent(in) :: dens0(ka,ia,ja) ! Density [kg/m3]
203  real(RP), intent(in) :: temp0(ka,ia,ja) ! Temperatuer [K]
204  !---------------------------------------------------------------------------
205 
206  re(:,:,:,:) = 8.e-6_rp ! dummy
207 
208  return
209  end subroutine atmos_phy_mp_sdm_effectiveradius
210  !-----------------------------------------------------------------------------
212  subroutine atmos_phy_mp_sdm_mixingratio( &
213  Qe, &
214  QTRC0 )
215  use scale_const, only: &
216  eps => const_eps
217  use scale_grid_index
218  use scale_tracer, only: &
219  qa
220  use scale_atmos_hydrometeor, only: &
221  n_hyd
222  implicit none
223 
224  real(RP), intent(out) :: qe (ka,ia,ja,n_hyd) ! mixing ratio of each cateory [kg/kg]
225  real(RP), intent(in) :: qtrc0(ka,ia,ja,qa) ! tracer mass concentration [kg/kg]
226 
227  integer :: ihydro
228  !---------------------------------------------------------------------------
229 
230  qe(:,:,:,:) = 8.e-6_rp ! dummy
231 
232  return
233  end subroutine atmos_phy_mp_sdm_mixingratio
234 
235 end module scale_atmos_phy_mp_sdm
subroutine, public atmos_phy_mp_sdm_mixingratio(Qe, QTRC0)
Calculate mixing ratio of each category.
subroutine, public atmos_phy_mp_sdm_cloudfraction(cldfrac, QTRC, mask_criterion)
Calculate Cloud Fraction.
subroutine, public prc_mpistop
Abort MPI.
module STDIO
Definition: scale_stdio.F90:12
integer, public qa
real(rp), public const_undef
Definition: scale_const.F90:43
module grid index
module TRACER
integer, public ia
of whole cells: x, local, with HALO
integer, public ka
of whole cells: z, local, with HALO
module PROCESS
module CONSTANT
Definition: scale_const.F90:14
subroutine, public atmos_phy_mp_sdm_setup
Setup Cloud Microphysics.
subroutine, public atmos_phy_mp_sdm(DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, CCN, EVAPORATE, SFLX_rain, SFLX_snow)
Cloud Microphysics.
subroutine, public atmos_phy_mp_sdm_config(MP_TYPE, QA, QS)
Confif.
module profiler
Definition: scale_prof.F90:10
character(len=h_short), dimension(qa_mp), target, public atmos_phy_mp_sdm_unit
character(len=h_short), dimension(qa_mp), target, public atmos_phy_mp_sdm_name
real(rp), public const_eps
small number
Definition: scale_const.F90:36
module ATMOSPHERE / Physics Cloud Microphysics
module PRECISION
character(len=h_mid), dimension(qa_mp), target, public atmos_phy_mp_sdm_desc
real(rp), dimension(n_hyd), target, public atmos_phy_mp_sdm_dens
integer, parameter, public n_hyd
subroutine, public atmos_phy_mp_sdm_effectiveradius(Re, QTRC0, DENS0, TEMP0)
Calculate Effective Radius.
integer, public ja
of whole cells: y, local, with HALO