SCALE-RM
Functions/Subroutines
mod_atmos_phy_mp_driver Module Reference

module ATMOSPHERE / Physics Cloud Microphysics More...

Functions/Subroutines

subroutine, public atmos_phy_mp_driver_config
 Config. More...
 
subroutine, public atmos_phy_mp_driver_setup
 Setup. More...
 
subroutine, public atmos_phy_mp_driver_resume
 resume More...
 
subroutine, public atmos_phy_mp_driver (update_flag)
 Driver. More...
 

Detailed Description

module ATMOSPHERE / Physics Cloud Microphysics

Description
Cloud Microphysics driver
Author
Team SCALE
History
  • 2013-12-06 (S.Nishizawa) [new]
NAMELIST
  • No namelist group
History Output
namedescriptionunitvariable
DENS_t_MP tendency DENS in MP kg/m3/s DENS_t_MP
EVAPORATE evaporated cloud number num/m3/s EVAPORATE
MOMX_t_MP tendency MOMX in MP kg/m2/s2 MOMX_t_MP
MOMY_t_MP tendency MOMY in MP kg/m2/s2 MOMY_t_MP
MOMZ_t_MP tendency MOMZ in MP kg/m2/s2 MOMZ_t_MP
PREC_MP surface precipitation rate by MP kg/m2/s precip
RAIN_MP surface rain rate by MP kg/m2/s SFLX_rain
RHOT_t_MP tendency RHOT in MP K*kg/m3/s RHOT_t_MP
Re_QC effective radius cloud water cm Re
Re_QG effective radius graupel cm Re
Re_QH effective radius hail cm Re
Re_QI effective radius ice water cm Re
Re_QR effective radius rain cm Re
Re_QS effective radius snow cm Re
SNOW_MP surface snow rate by MP kg/m2/s SFLX_snow
TRACER_NAME_t_MP tendency rho*TRACER_NAMEin MP; TRACER_NAME depends on the physics schemes, e.g., QV, QC, QR. kg/m3/s RHOQ_t_MP

Function/Subroutine Documentation

◆ atmos_phy_mp_driver_config()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver_config ( )

Config.

Definition at line 53 of file mod_atmos_phy_mp_driver.f90.

References scale_atmos_phy_mp::atmos_phy_mp_config(), mod_atmos_admin::atmos_phy_mp_type, mod_atmos_admin::atmos_sw_phy_mp, scale_stdio::io_fid_log, and scale_stdio::io_l.

Referenced by mod_atmos_driver::atmos_driver_config().

53  use scale_atmos_phy_mp, only: &
55  use mod_atmos_admin, only: &
58  implicit none
59  !---------------------------------------------------------------------------
60 
61  if( io_l ) write(io_fid_log,*)
62  if( io_l ) write(io_fid_log,*) '++++++ Module[CONFIG] / Categ[ATMOS PHY_MP] / Origin[SCALE-RM]'
63 
64  if ( atmos_sw_phy_mp ) then
66  end if
67 
68  return
module ATMOS admin
module ATMOSPHERE / Physics Cloud Microphysics
subroutine, public atmos_phy_mp_config(MP_TYPE)
Setup Cloud Microphysics.
logical, public atmos_sw_phy_mp
character(len=h_short), public atmos_phy_mp_type
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_mp_driver_setup()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver_setup ( )

Setup.

Definition at line 74 of file mod_atmos_phy_mp_driver.f90.

References scale_atmos_phy_mp::atmos_phy_mp_setup, mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_rain, mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_snow, mod_atmos_admin::atmos_phy_mp_type, mod_atmos_admin::atmos_sw_phy_mp, scale_stdio::io_fid_log, and scale_stdio::io_l.

Referenced by mod_atmos_driver::atmos_driver_setup().

74  use scale_atmos_phy_mp, only: &
76  use mod_atmos_admin, only: &
79  use mod_atmos_phy_mp_vars, only: &
80  sflx_rain => atmos_phy_mp_sflx_rain, &
81  sflx_snow => atmos_phy_mp_sflx_snow
82  implicit none
83  !---------------------------------------------------------------------------
84 
85  if( io_l ) write(io_fid_log,*)
86  if( io_l ) write(io_fid_log,*) '++++++ Module[DRIVER] / Categ[ATMOS PHY_MP] / Origin[SCALE-RM]'
87 
88  if ( atmos_sw_phy_mp ) then
89 
90  ! setup library component
92 
93  else
94 
95  if( io_l ) write(io_fid_log,*) '*** this component is never called.'
96  if( io_l ) write(io_fid_log,*) '*** SFLX_rain and SFLX_snow is set to zero.'
97  sflx_rain(:,:) = 0.0_rp
98  sflx_snow(:,:) = 0.0_rp
99 
100  endif
101 
102  return
module ATMOS admin
module Atmosphere / Physics Cloud Microphysics
module ATMOSPHERE / Physics Cloud Microphysics
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_rain
procedure(su), pointer, public atmos_phy_mp_setup
logical, public atmos_sw_phy_mp
character(len=h_short), public atmos_phy_mp_type
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_snow
Here is the caller graph for this function:

◆ atmos_phy_mp_driver_resume()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver_resume ( )

resume

Definition at line 108 of file mod_atmos_phy_mp_driver.f90.

References atmos_phy_mp_driver(), mod_atmos_admin::atmos_sw_phy_mp, scale_prof::prof_rapend(), and scale_prof::prof_rapstart().

Referenced by mod_atmos_driver::atmos_driver_resume1().

108  use mod_atmos_admin, only: &
110  implicit none
111 
112  if ( atmos_sw_phy_mp ) then
113 
114  ! run once (only for the diagnostic value)
115  call prof_rapstart('ATM_Microphysics', 1)
116  call atmos_phy_mp_driver( update_flag = .true. )
117  call prof_rapend ('ATM_Microphysics', 1)
118 
119  end if
120 
121  return
module ATMOS admin
subroutine, public atmos_phy_mp_driver(update_flag)
Driver.
logical, public atmos_sw_phy_mp
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_mp_driver()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver ( logical, intent(in)  update_flag)

Driver.

Definition at line 127 of file mod_atmos_phy_mp_driver.f90.

References mod_atmos_phy_ae_vars::atmos_phy_ae_ccn_t, scale_atmos_phy_mp::atmos_phy_mp, mod_atmos_phy_mp_vars::atmos_phy_mp_dens_t, scale_atmos_phy_mp::atmos_phy_mp_effectiveradius, mod_atmos_phy_mp_vars::atmos_phy_mp_evaporate, mod_atmos_phy_mp_vars::atmos_phy_mp_momx_t, mod_atmos_phy_mp_vars::atmos_phy_mp_momy_t, mod_atmos_phy_mp_vars::atmos_phy_mp_momz_t, mod_atmos_phy_mp_vars::atmos_phy_mp_rhoq_t, mod_atmos_phy_mp_vars::atmos_phy_mp_rhot_t, mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_rain, mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_snow, mod_atmos_vars::dens, mod_atmos_vars::dens_av, mod_atmos_vars::dens_tp, scale_atmos_hydrometeor::i_hc, scale_atmos_hydrometeor::i_hg, scale_atmos_hydrometeor::i_hh, scale_atmos_hydrometeor::i_hi, scale_atmos_hydrometeor::i_hr, scale_atmos_hydrometeor::i_hs, scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::is, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::js, scale_grid_index::ka, scale_grid_index::ke, scale_grid_index::ks, mod_atmos_vars::momx, mod_atmos_vars::momx_av, mod_atmos_vars::momx_tp, mod_atmos_vars::momy, mod_atmos_vars::momy_av, mod_atmos_vars::momy_tp, mod_atmos_vars::momz, mod_atmos_vars::momz_av, mod_atmos_vars::momz_tp, scale_atmos_hydrometeor::n_hyd, scale_tracer::qa, scale_atmos_phy_mp::qe_mp, scale_atmos_phy_mp::qs_mp, mod_atmos_vars::qtrc, mod_atmos_vars::qtrc_av, mod_atmos_vars::rhoq_tp, mod_atmos_vars::rhot, mod_atmos_vars::rhot_av, mod_atmos_vars::rhot_tp, scale_rm_statistics::statistics_checktotal, mod_atmos_vars::temp, scale_time::time_dtsec_atmos_phy_mp, and scale_tracer::tracer_name.

Referenced by mod_atmos_driver::atmos_driver(), and atmos_phy_mp_driver_resume().

127  use scale_time, only: &
128  dt_mp => time_dtsec_atmos_phy_mp
129  use scale_rm_statistics, only: &
131  stat_total
132  use scale_history, only: &
133  hist_in
134  use scale_atmos_hydrometeor, only: &
135  n_hyd, &
136  i_hc, &
137  i_hr, &
138  i_hi, &
139  i_hs, &
140  i_hg, &
141  i_hh
142  use scale_atmos_phy_mp, only: &
143  atmos_phy_mp, &
145  qs_mp, &
146  qe_mp
147  use mod_atmos_vars, only: &
148  dens => dens_av, &
149  momz => momz_av, &
150  momx => momx_av, &
151  momy => momy_av, &
152  rhot => rhot_av, &
153  qtrc => qtrc_av, &
154  dens_t => dens_tp, &
155  momz_t => momz_tp, &
156  momx_t => momx_tp, &
157  momy_t => momy_tp, &
158  rhot_t => rhot_tp, &
159  rhoq_t => rhoq_tp, &
160  temp
161  use mod_atmos_phy_mp_vars, only: &
162  dens_t_mp => atmos_phy_mp_dens_t, &
163  momz_t_mp => atmos_phy_mp_momz_t, &
164  momx_t_mp => atmos_phy_mp_momx_t, &
165  momy_t_mp => atmos_phy_mp_momy_t, &
166  rhot_t_mp => atmos_phy_mp_rhot_t, &
167  rhoq_t_mp => atmos_phy_mp_rhoq_t, &
168  evaporate => atmos_phy_mp_evaporate, &
169  sflx_rain => atmos_phy_mp_sflx_rain, &
170  sflx_snow => atmos_phy_mp_sflx_snow
171  use mod_atmos_phy_ae_vars, only: &
172  ccn_t => atmos_phy_ae_ccn_t
173  implicit none
174 
175  logical, intent(in) :: update_flag
176 
177  real(RP) :: DENS0(KA,IA,JA)
178  real(RP) :: MOMZ0(KA,IA,JA)
179  real(RP) :: MOMX0(KA,IA,JA)
180  real(RP) :: MOMY0(KA,IA,JA)
181  real(RP) :: RHOT0(KA,IA,JA)
182  real(RP) :: QTRC0(KA,IA,JA,QA)
183  real(RP) :: CCN(KA,IA,JA)
184 
185  real(RP) :: Re (KA,IA,JA,N_HYD) ! effective radius
186  real(RP) :: precip(IA,JA)
187  real(RP) :: total ! dummy
188 
189  integer :: k, i, j, iq
190  !---------------------------------------------------------------------------
191 
192  if ( update_flag ) then
193 
194 !OCL XFILL
195  !$omp parallel do default(none) &
196  !$omp shared(JA,IA,KA,DENS0,MOMZ0,MOMX0,MOMY0,RHOT0,DENS,MOMZ,MOMX,MOMY,RHOT) &
197  !$omp private(i,j,k) OMP_SCHEDULE_ collapse(2)
198  do j = 1, ja
199  do i = 1, ia
200  do k = 1, ka
201  dens0(k,i,j) = dens(k,i,j) ! save
202  momz0(k,i,j) = momz(k,i,j) ! save
203  momx0(k,i,j) = momx(k,i,j) ! save
204  momy0(k,i,j) = momy(k,i,j) ! save
205  rhot0(k,i,j) = rhot(k,i,j) ! save
206  enddo
207  enddo
208  enddo
209 
210 !OCL XFILL
211  do iq = 1, qa
212  do j = 1, ja
213  do i = 1, ia
214  do k = 1, ka
215  qtrc0(k,i,j,iq) = qtrc(k,i,j,iq) ! save
216  enddo
217  enddo
218  enddo
219  enddo
220 
221  ccn(:,:,:) = ccn_t(:,:,:) * dt_mp
222 
223  call atmos_phy_mp( dens0(:,:,:), & ! [INOUT]
224  momz0(:,:,:), & ! [INOUT]
225  momx0(:,:,:), & ! [INOUT]
226  momy0(:,:,:), & ! [INOUT]
227  rhot0(:,:,:), & ! [INOUT]
228  qtrc0(:,:,:,:), & ! [INOUT]
229  ccn(:,:,:), & ! [IN]
230  evaporate(:,:,:), & ! [OUT]
231  sflx_rain(:,:), & ! [OUT]
232  sflx_snow(:,:) ) ! [OUT]
233 
234 !OCL XFILL
235  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
236  !$omp shared(JS,JE,IS,IE,KS,KE,DENS_t_MP,DENS0,DENS,MOMZ_t_MP,MOMZ0,MOMZ,MOMX_t_MP,MOMX0) &
237  !$omp shared(MOMX,MOMY_t_MP,MOMY0,MOMY,RHOT_t_MP,RHOT0,RHOT,dt_MP)
238  do j = js, je
239  do i = is, ie
240  do k = ks, ke
241  dens_t_mp(k,i,j) = ( dens0(k,i,j) - dens(k,i,j) ) / dt_mp
242  momz_t_mp(k,i,j) = ( momz0(k,i,j) - momz(k,i,j) ) / dt_mp
243  momx_t_mp(k,i,j) = ( momx0(k,i,j) - momx(k,i,j) ) / dt_mp
244  momy_t_mp(k,i,j) = ( momy0(k,i,j) - momy(k,i,j) ) / dt_mp
245  rhot_t_mp(k,i,j) = ( rhot0(k,i,j) - rhot(k,i,j) ) / dt_mp
246  enddo
247  enddo
248  enddo
249 
250 !OCL XFILL
251  do iq = qs_mp, qe_mp
252  !$omp parallel do default(none) &
253  !$omp shared(JS,JE,IS,IE,KS,KE,RHOQ_t_MP,iq,QTRC0,QTRC,DENS0,DENS,dt_MP) &
254  !$omp private(i,j,k) OMP_SCHEDULE_ collapse(2)
255  do j = js, je
256  do i = is, ie
257  do k = ks, ke
258  rhoq_t_mp(k,i,j,iq) = ( qtrc0(k,i,j,iq) * dens0(k,i,j) &
259  - qtrc(k,i,j,iq) * dens(k,i,j) ) / dt_mp
260  enddo
261  enddo
262  enddo
263  enddo
264 
265 !OCL XFILL
266  do j = js, je
267  do i = is, ie
268  precip(i,j) = sflx_rain(i,j) + sflx_snow(i,j)
269  end do
270  end do
271 
272  call hist_in( sflx_rain(:,:), 'RAIN_MP', 'surface rain rate by MP', 'kg/m2/s', nohalo=.true. )
273  call hist_in( sflx_snow(:,:), 'SNOW_MP', 'surface snow rate by MP', 'kg/m2/s', nohalo=.true. )
274  call hist_in( precip(:,:), 'PREC_MP', 'surface precipitation rate by MP', 'kg/m2/s', nohalo=.true. )
275  call hist_in( evaporate(:,:,:), 'EVAPORATE', 'evaporated cloud number', 'num/m3/s', nohalo=.true. )
276 
277  call hist_in( dens_t_mp(:,:,:), 'DENS_t_MP', 'tendency DENS in MP', 'kg/m3/s' , nohalo=.true. )
278  call hist_in( momz_t_mp(:,:,:), 'MOMZ_t_MP', 'tendency MOMZ in MP', 'kg/m2/s2' , nohalo=.true. )
279  call hist_in( momx_t_mp(:,:,:), 'MOMX_t_MP', 'tendency MOMX in MP', 'kg/m2/s2' , nohalo=.true. )
280  call hist_in( momy_t_mp(:,:,:), 'MOMY_t_MP', 'tendency MOMY in MP', 'kg/m2/s2' , nohalo=.true. )
281  call hist_in( rhot_t_mp(:,:,:), 'RHOT_t_MP', 'tendency RHOT in MP', 'K*kg/m3/s', nohalo=.true. )
282 
283  do iq = qs_mp, qe_mp
284  call hist_in( rhoq_t_mp(:,:,:,iq), trim(tracer_name(iq))//'_t_MP', &
285  'tendency rho*'//trim(tracer_name(iq))//'in MP', 'kg/m3/s', nohalo=.true. )
286  enddo
287 
288  call atmos_phy_mp_effectiveradius( re(:,:,:,:), & ! [OUT]
289  qtrc(:,:,:,:), & ! [IN]
290  dens(:,:,:), & ! [IN]
291  temp(:,:,:) ) ! [IN]
292 
293  call hist_in( re(:,:,:,i_hc), 'Re_QC', 'effective radius cloud water', 'cm', nohalo=.true. )
294  call hist_in( re(:,:,:,i_hr), 'Re_QR', 'effective radius rain', 'cm', nohalo=.true. )
295  call hist_in( re(:,:,:,i_hi), 'Re_QI', 'effective radius ice water', 'cm', nohalo=.true. )
296  call hist_in( re(:,:,:,i_hs), 'Re_QS', 'effective radius snow', 'cm', nohalo=.true. )
297  call hist_in( re(:,:,:,i_hg), 'Re_QG', 'effective radius graupel', 'cm', nohalo=.true. )
298  call hist_in( re(:,:,:,i_hh), 'Re_QH', 'effective radius hail', 'cm', nohalo=.true. )
299  endif
300 
301  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
302  !$omp shared(JS,JE,IS,IE,KS,KE,DENS_t,DENS_t_MP,MOMZ_t,MOMZ_t_MP,MOMX_t,MOMX_t_MP,MOMY_t) &
303  !$omp shared(MOMY_t_MP,RHOT_t,RHOT_t_MP)
304  do j = js, je
305  do i = is, ie
306  do k = ks, ke
307  dens_t(k,i,j) = dens_t(k,i,j) + dens_t_mp(k,i,j)
308  momz_t(k,i,j) = momz_t(k,i,j) + momz_t_mp(k,i,j)
309  momx_t(k,i,j) = momx_t(k,i,j) + momx_t_mp(k,i,j)
310  momy_t(k,i,j) = momy_t(k,i,j) + momy_t_mp(k,i,j)
311  rhot_t(k,i,j) = rhot_t(k,i,j) + rhot_t_mp(k,i,j)
312  enddo
313  enddo
314  enddo
315 
316  do iq = qs_mp, qe_mp
317  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ &
318  !$omp shared(JS,JE,IS,IE,KS,KE,RHOQ_t,iq,RHOQ_t_MP)
319  do j = js, je
320  do i = is, ie
321  do k = ks, ke
322  rhoq_t(k,i,j,iq) = rhoq_t(k,i,j,iq) + rhoq_t_mp(k,i,j,iq)
323  enddo
324  enddo
325  enddo
326  enddo
327 
328  if ( statistics_checktotal ) then
329  call stat_total( total, dens_t_mp(:,:,:), 'DENS_t_MP' )
330  call stat_total( total, momz_t_mp(:,:,:), 'MOMZ_t_MP' )
331  call stat_total( total, momx_t_mp(:,:,:), 'MOMX_t_MP' )
332  call stat_total( total, momy_t_mp(:,:,:), 'MOMY_t_MP' )
333  call stat_total( total, rhot_t_mp(:,:,:), 'RHOT_t_MP' )
334 
335  do iq = qs_mp, qe_mp
336  call stat_total( total, rhoq_t_mp(:,:,:,iq), trim(tracer_name(iq))//'_t_MP' )
337  enddo
338  endif
339 
340  return
real(rp), dimension(:,:,:), allocatable, public dens_tp
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_mp_rhoq_t
logical, public statistics_checktotal
calc&report variable totals to logfile?
real(rp), dimension(:,:,:), allocatable, target, public momz
procedure(mp), pointer, public atmos_phy_mp
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_momy_t
real(rp), dimension(:,:,:), allocatable, target, public rhot
real(rp), dimension(:,:,:), allocatable, public momy_tp
real(dp), public time_dtsec_atmos_phy_mp
time interval of physics(microphysics) [sec]
Definition: scale_time.F90:41
module Atmosphere / Physics Cloud Microphysics
integer, parameter, public i_hs
snow
module ATMOSPHERE / Physics Cloud Microphysics
module ATMOSPHERIC Variables
real(rp), dimension(:,:,:,:), pointer, public qtrc_av
integer, parameter, public i_hr
liquid water rain
real(rp), dimension(:,:,:), allocatable, target, public momx
integer, parameter, public i_hi
ice water cloud
real(rp), dimension(:,:,:), allocatable, public rhot_tp
real(rp), dimension(:,:,:), allocatable, target, public dens
integer, parameter, public i_hh
hail
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_momz_t
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_rain
module Statistics
real(rp), dimension(:,:,:), pointer, public momx_av
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_rhot_t
real(rp), dimension(:,:,:), allocatable, public temp
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_dens_t
real(rp), dimension(:,:,:,:), allocatable, public rhoq_tp
module TIME
Definition: scale_time.F90:15
procedure(er), pointer, public atmos_phy_mp_effectiveradius
real(rp), dimension(:,:,:), pointer, public dens_av
integer, parameter, public i_hc
liquid water cloud
real(rp), dimension(:,:,:), allocatable, public momx_tp
real(rp), dimension(:,:,:), allocatable, target, public momy
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_evaporate
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_snow
real(rp), dimension(:,:,:), allocatable, public momz_tp
module HISTORY
real(rp), dimension(:,:,:), pointer, public momz_av
real(rp), dimension(:,:,:), pointer, public rhot_av
integer, parameter, public n_hyd
real(rp), dimension(:,:,:), pointer, public momy_av
module ATMOSPHERE / Physics Aerosol Microphysics
integer, parameter, public i_hg
graupel
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_momx_t
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn_t
Here is the caller graph for this function: