SCALE-RM
Data Types | Functions/Subroutines | Variables
mod_atmos_phy_mp_driver Module Reference

module atmosphere / physics / cloud microphysics More...

Functions/Subroutines

subroutine, public atmos_phy_mp_driver_tracer_setup
 Config. More...
 
subroutine, public atmos_phy_mp_driver_setup
 Setup. More...
 
subroutine, public atmos_phy_mp_driver_finalize
 finalize More...
 
subroutine, public atmos_phy_mp_driver_adjustment
 adjustment More...
 
subroutine, public atmos_phy_mp_driver_calc_tendency (update_flag)
 calculate tendency More...
 
subroutine, public atmos_phy_mp_driver_qhyd2qtrc (KA, KS, KE, IA, IS, IE, JA, JS, JE, QV, QHYD, QTRC, QNUM)
 
subroutine, public atmos_phy_mp_driver_qhyd2qtrc_onlyqv (KA, KS, KE, IA, IS, IE, JA, JS, JE, QV, QHYD, QTRC, QNUM)
 

Variables

procedure(qhyd2qtrc), pointer, public atmos_phy_mp_user_qhyd2qtrc => NULL()
 

Detailed Description

module atmosphere / physics / cloud microphysics

Description
Cloud Microphysics driver
Author
Team SCALE
NAMELIST
  • PARAM_ATMOS_PHY_MP
    nametypedefault valuecomment
    MP_DO_PRECIPITATION logical > apply sedimentation (precipitation)?
    MP_DO_NEGATIVE_FIXER logical > apply negative fixer?
    MP_LIMIT_NEGATIVE real(RP) > Abort if abs(fixed negative vaue) > abs(MP_limit_negative)
    MP_NTMAX_SEDIMENTATION integer > number of time step for sedimentation
    MP_MAX_TERM_VEL real(RP) > terminal velocity for calculate dt of sedimentation
    MP_CLDFRAC_THLESHOLD real(RP) > thleshold for cloud fraction

History Output
namedescriptionunitvariable
"DENS_t_MP_NF" "vapor supply by the negative fixer" "kg/m3/s" "DENS_t_MP_NF"
"ENGI_t_MP_NF" "internal energy supply by the negative fixer" "J/m3/s" "ENGI_t_MP_NF"
"RHOH_MP_NF" "latent heat by the negative fixer" "J/m3/s" "RHOH_MP_NF"
Vterm_{TRACER_NAME} terminal velocity of {TRACER_NAME};
{TRACER_NAME} depends on the physics schemes, e.g., QV, QC, QR.
m/s {'Vterm_'//trim}
DENS_t_MP tendency DENS in MP kg/m3/s DENS_t_MP
EVAPORATE evaporated cloud number num/m3/s EVAPORATE
MOMZ_t_MP tendency MOMZ in MP kg/m2/s2 MOMZ_t_MP
PREC_MP surface precipitation rate by MP kg/m2/s precip
QSPLT_G Charge split of QG by Non-inductive process fC/m3/s QSPLT_in
QSPLT_I Charge split of QI by Non-inductive process fC/m3/s QSPLT_in
QSPLT_S Charge split of QS by Non-inductive process fC/m3/s QSPLT_in
RAIN_MP surface rain rate by MP kg/m2/s SFLX_rain
RHOH_MP diabatic heating rate in MP J/m3/s RHOH_MP
RHOU_t_MP tendency RHOU in MP kg/m2/s2 RHOU_t_MP
RHOV_t_MP tendency RHOV in MP kg/m2/s2 RHOV_t_MP
SNOW_MP surface snow rate by MP kg/m2/s SFLX_snow
{TRACER_NAME}_t_MP tendency rho*{TRACER_NAME} in MP;
{TRACER_NAME} depends on the physics schemes, e.g., QV, QC, QR.
fC/m3/s RHOC_t_MP
QCRG_H Ratio of charge density of Hail fC/kg QCRG_H
QH Ratio of Hail Water mass to total mass kg/kg QH

Function/Subroutine Documentation

◆ atmos_phy_mp_driver_tracer_setup()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver_tracer_setup

Config.

Definition at line 94 of file mod_atmos_phy_mp_driver.F90.

94  use scale_prc, only: &
95  prc_abort
96  use scale_tracer, only: &
98  use scale_atmos_hydrometeor, only: &
100  use scale_atmos_phy_mp_kessler, only: &
107  use scale_atmos_phy_mp_tomita08, only: &
114  use scale_atmos_phy_mp_sn14, only: &
121  use scale_atmos_phy_mp_suzuki10, only: &
130  use mod_atmos_admin, only: &
132  atmos_sw_phy_mp, &
134  use mod_atmos_phy_mp_vars, only: &
135  qa_mp, &
136  qs_mp, &
137  qe_mp
138  implicit none
139 
140  integer :: QS2
141  !---------------------------------------------------------------------------
142 
143  log_newline
144  log_info("ATMOS_PHY_MP_driver_tracer_setup",*) 'Setup'
145 
146  if ( atmos_sw_phy_mp ) then
147  select case ( atmos_phy_mp_type )
148  case ( 'KESSLER' )
155  qs_mp ) ! [OUT]
157  if ( atmos_sw_phy_lt ) then
158  log_error("ATMOS_PHY_MP_driver_tracer_setup",*) 'ATMOS_PHY_MP_TYPE is invalud for Lightning: ', trim(atmos_phy_mp_type)
159  log_error("ATMOS_PHY_MP_driver_tracer_setup",*) 'ATMOS_PHY_MP_TYPE is should be TOMITA08 or SN14 or SUZUKI10 for Lightning: '
160  call prc_abort
161  endif
162  case ( 'TOMITA08' )
169  qs_mp ) ! [OUT]
171  case( 'SN14' )
173  atmos_phy_mp_sn14_nwaters, & ! [IN]
174  atmos_phy_mp_sn14_nices, & ! [IN]
175  atmos_phy_mp_sn14_tracer_names(1:6), & ! [IN]
177  atmos_phy_mp_sn14_tracer_units(1:6), & ! [IN]
178  qs_mp ) ! [OUT]
179  call tracer_regist( qs2, & ! [OUT]
180  5, & ! [IN]
181  atmos_phy_mp_sn14_tracer_names(7:11), & ! [IN]
183  atmos_phy_mp_sn14_tracer_units(7:11) ) ! [IN]
185  case ( 'SUZUKI10' )
193  qs_mp ) ! [OUT]
194  if( atmos_phy_mp_suzuki10_nccn > 0 ) then
195  call tracer_regist( qs2, & ! [OUT]
199  + 2 : ), & ! [IN]
202  + 2 : ), & ! [IN]
205  + 2 : ) ) ! [IN]
206  end if
208  case default
209  log_error("ATMOS_PHY_MP_driver_tracer_setup",*) 'ATMOS_PHY_MP_TYPE is invalud: ', trim(atmos_phy_mp_type)
210  call prc_abort
211  end select
212 
213  qe_mp = qs_mp + qa_mp - 1
214 
215  else
216  qa_mp = 0
217  qs_mp = -1
218  qe_mp = -2
219  end if
220 
221  return

References scale_atmos_hydrometeor::atmos_hydrometeor_regist(), scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_nices, scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_ntracers, scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_nwaters, scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_tracer_descriptions, scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_tracer_names, scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_tracer_units, scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_nices, scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_ntracers, scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_nwaters, scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_tracer_descriptions, scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_tracer_names, scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_tracer_units, scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_nccn, scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_nices, scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_ntracers, scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_nwaters, scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tracer_descriptions, scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tracer_names, scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tracer_setup(), scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tracer_units, scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_nices, scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_ntracers, scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_nwaters, scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_tracer_descriptions, scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_tracer_names, scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_tracer_units, mod_atmos_admin::atmos_phy_mp_type, mod_atmos_admin::atmos_sw_phy_lt, mod_atmos_admin::atmos_sw_phy_mp, scale_prc::prc_abort(), mod_atmos_phy_mp_vars::qa_mp, mod_atmos_phy_mp_vars::qe_mp, mod_atmos_phy_mp_vars::qs_mp, and scale_tracer::tracer_regist().

Referenced by mod_atmos_driver::atmos_driver_tracer_setup().

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 227 of file mod_atmos_phy_mp_driver.F90.

227  use scale_prc, only: &
228  prc_abort
229  use scale_atmos_grid_cartesc, only: &
231  use scale_const, only: &
232  eps => const_eps
233  use scale_time, only: &
235  use scale_atmos_hydrometeor, only: &
236  n_hyd
237  use scale_atmos_phy_mp_kessler, only: &
239  use scale_atmos_phy_mp_tomita08, only: &
241  use scale_atmos_phy_mp_sn14, only: &
243  use scale_atmos_phy_mp_suzuki10, only: &
245  use scale_file_history, only: &
247  use scale_monitor, only: &
248  monitor_reg, &
249  monitor_put
250  use mod_atmos_admin, only: &
253  use mod_atmos_phy_mp_vars, only: &
255  sflx_rain => atmos_phy_mp_sflx_rain, &
256  sflx_snow => atmos_phy_mp_sflx_snow, &
257  sflx_engi => atmos_phy_mp_sflx_engi
258  use mod_atmos_phy_mp_vars, only: &
259  qs_mp, &
260  qe_mp
261  use mod_atmos_phy_lt_vars, only: &
262  flg_lt
263  implicit none
264 
265  namelist / param_atmos_phy_mp / &
266  mp_do_precipitation, &
267  mp_do_negative_fixer, &
268  mp_limit_negative, &
269  mp_ntmax_sedimentation, &
270  mp_max_term_vel, &
271  mp_cldfrac_thleshold
272 
273  character(len=H_SHORT) :: w_name(N_HYD)
274  character(len=H_MID) :: w_longname(N_HYD)
275  character(len=H_SHORT) :: w_unit(N_HYD)
276  data w_name / 'QC', &
277  'QR', &
278  'QI', &
279  'QS', &
280  'QG', &
281  'QH' /
282  data w_longname / &
283  'Ratio of Cloud Water mass to total mass', &
284  'Ratio of Rain Water mass to total mass', &
285  'Ratio of Ice Water mass to total mass', &
286  'Ratio of Snow Water mass to total mass', &
287  'Ratio of Graupel Water mass to total mass', &
288  'Ratio of Hail Water mass to total mass' /
289  data w_unit / &
290  'kg/kg', &
291  'kg/kg', &
292  'kg/kg', &
293  'kg/kg', &
294  'kg/kg', &
295  'kg/kg' /
296 
297  character(len=H_SHORT) :: w_crg_name(N_HYD)
298  character(len=H_MID) :: w_crg_longname(N_HYD)
299  character(len=H_SHORT) :: w_crg_unit(N_HYD)
300  data w_crg_name / 'QCRG_C', &
301  'QCRG_R', &
302  'QCRG_I', &
303  'QCRG_S', &
304  'QCRG_G', &
305  'QCRG_H' /
306  data w_crg_longname / &
307  'Ratio of charge density of Cloud Water', &
308  'Ratio of charge density of Rain Water', &
309  'Ratio of charge density of Ice', &
310  'Ratio of charge density of Snow', &
311  'Ratio of charge density of Graupel', &
312  'Ratio of charge density of Hail' /
313  data w_crg_unit / &
314  'fC/kg', &
315  'fC/kg', &
316  'fC/kg', &
317  'fC/kg', &
318  'fC/kg', &
319  'fC/kg' /
320 
321  real(RP) :: ZERO(KA,IA,JA)
322 
323  integer :: nstep_max
324 
325  integer :: iq
326  integer :: ierr
327  !---------------------------------------------------------------------------
328 
329  log_newline
330  log_info("ATMOS_PHY_MP_driver_setup",*) 'Setup'
331 
332  if ( atmos_sw_phy_mp ) then
333 
334  mp_cldfrac_thleshold = eps
335 
336  mp_do_precipitation = .true.
337  mp_do_negative_fixer = .true.
338  mp_limit_negative = 0.1_rp
339  mp_ntmax_sedimentation = 1
340  mp_max_term_vel = 10.0_rp
341 
342  !--- read namelist
343  rewind(io_fid_conf)
344  read(io_fid_conf,nml=param_atmos_phy_mp,iostat=ierr)
345  if( ierr < 0 ) then !--- missing
346  log_info("ATMOS_PHY_MP_driver_setup",*) 'Not found namelist. Default used.'
347  elseif( ierr > 0 ) then !--- fatal error
348  log_error("ATMOS_PHY_MP_driver_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_MP. Check!'
349  call prc_abort
350  endif
351  log_nml(param_atmos_phy_mp)
352 
353  nstep_max = ceiling( ( time_dtsec_atmos_phy_mp * mp_max_term_vel ) / minval( cdz(:) ) )
354  mp_ntmax_sedimentation = max( mp_ntmax_sedimentation, nstep_max )
355 
356  mp_nstep_sedimentation = mp_ntmax_sedimentation
357  mp_rnstep_sedimentation = 1.0_rp / real(mp_ntmax_sedimentation,kind=rp)
358  mp_dtsec_sedimentation = time_dtsec_atmos_phy_mp * mp_rnstep_sedimentation
359 
360  atmos_phy_mp_cldfrac_thleshold = mp_cldfrac_thleshold
361 
362  log_newline
363  log_info("ATMOS_PHY_MP_driver_setup",*) 'Enable negative fixer? : ', mp_do_negative_fixer
364  log_info("ATMOS_PHY_MP_driver_setup",*) 'Value limit of negative fixer (abs) : ', abs(mp_limit_negative)
365  log_info("ATMOS_PHY_MP_driver_setup",*) 'Enable sedimentation (precipitation)? : ', mp_do_precipitation
366  log_info("ATMOS_PHY_MP_driver_setup",*) 'Timestep of sedimentation is divided into : ', mp_ntmax_sedimentation, 'step'
367  log_info("ATMOS_PHY_MP_driver_setup",*) 'DT of sedimentation : ', mp_dtsec_sedimentation, '[s]'
368 
369  select case ( atmos_phy_mp_type )
370  case ( 'KESSLER' )
372  case ( 'TOMITA08' )
374  ka, ks, ke, ia, is, ie, ja, js, je, &
375  flg_lt )
376  case ( 'SN14' )
378  ka, ia, ja )
379  case ( 'SUZUKI10' )
381  ka, ia, ja, &
382  flg_lt )
383  allocate( hist_hyd_id(n_hyd) )
384  do iq = 1, n_hyd
385  call file_history_reg( w_name(iq), w_longname(iq), w_unit(iq), & ! [IN]
386  hist_hyd_id(iq) ) ! [OUT]
387  enddo
388  if( flg_lt ) then
389  allocate( hist_crg_id(n_hyd) )
390  do iq = 1, n_hyd
391  call file_history_reg( w_crg_name(iq), w_crg_longname(iq), w_crg_unit(iq), & ! [IN]
392  hist_crg_id(iq) ) ! [OUT]
393  enddo
394  endif
395  end select
396 
397  ! history putput
398  if ( mp_do_precipitation ) then
399 
400  allocate( hist_vterm_id(qs_mp+1:qe_mp) )
401  do iq = qs_mp+1, qe_mp
402  call file_history_reg( 'Vterm_'//trim(tracer_name(iq)), 'terminal velocity of '//trim(tracer_name(iq)), 'm/s', hist_vterm_id(iq) )
403  end do
404 
405  else
406 
407  !$acc kernels
408  sflx_rain(:,:) = 0.0_rp
409  !$acc end kernels
410  !$acc kernels
411  sflx_snow(:,:) = 0.0_rp
412  !$acc end kernels
413  !$acc kernels
414  sflx_engi(:,:) = 0.0_rp
415  !$acc end kernels
416 
417  end if
418 
419  ! monitor
420  if ( mp_do_negative_fixer ) then
421  call file_history_reg( "RHOH_MP_NF", "latent heat by the negative fixer", "J/m3/s", & ! [IN]
422  hist_nf_rhoh_id ) ! [OUT]
423  call file_history_reg( "DENS_t_MP_NF", "vapor supply by the negative fixer", "kg/m3/s", & ! [IN]
424  hist_nf_dens_id ) ! [OUT]
425  call file_history_reg( "ENGI_t_MP_NF", "internal energy supply by the negative fixer", "J/m3/s", & ! [IN]
426  hist_nf_engi_id ) ! [OUT]
427  call monitor_reg( "QTOTTND_NF", "vapor supply by the negative fixer", "kg", & ! [IN]
428  monit_nf_mass_id, & ! [OUT]
429  is_tendency=.true. ) ! [IN]
430  call monitor_reg( "ENGITND_NF", "internal energy supply by the negative fixer", "J", & ! [IN]
431  monit_nf_engi_id, & ! [OUT]
432  is_tendency=.true. ) ! [IN]
433  zero(:,:,:) = 0.0_rp
434  call monitor_put( monit_nf_mass_id, zero(:,:,:) )
435  call monitor_put( monit_nf_engi_id, zero(:,:,:) )
436  end if
437 
438  else
439 
440  log_info("ATMOS_PHY_MP_driver_setup",*) 'this component is never called.'
441  log_info("ATMOS_PHY_MP_driver_setup",*) 'SFLX_rain and SFLX_snow is set to zero.'
442  !$acc kernels
443  sflx_rain(:,:) = 0.0_rp
444  !$acc end kernels
445  !$acc kernels
446  sflx_snow(:,:) = 0.0_rp
447  !$acc end kernels
448  !$acc kernels
449  sflx_engi(:,:) = 0.0_rp
450  !$acc end kernels
451 
452  endif
453 
454  return

References scale_atmos_grid_cartesc::atmos_grid_cartesc_cdz, mod_atmos_phy_mp_vars::atmos_phy_mp_cldfrac_thleshold, scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_setup(), mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_engi, mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_rain, mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_snow, scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_setup(), scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_setup(), scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_setup(), mod_atmos_admin::atmos_phy_mp_type, mod_atmos_admin::atmos_sw_phy_mp, scale_const::const_eps, scale_file_history::file_history_reg(), mod_atmos_phy_lt_vars::flg_lt, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_io::io_fid_conf, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::js, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, scale_monitor::monitor_reg(), scale_atmos_hydrometeor::n_hyd, scale_prc::prc_abort(), mod_atmos_phy_mp_vars::qe_mp, mod_atmos_phy_mp_vars::qs_mp, scale_precision::rp, scale_time::time_dtsec_atmos_phy_mp, and scale_tracer::tracer_name.

Referenced by mod_atmos_driver::atmos_driver_setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_mp_driver_finalize()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver_finalize

finalize

Definition at line 460 of file mod_atmos_phy_mp_driver.F90.

460  use mod_atmos_admin, only: &
463  use scale_atmos_phy_mp_tomita08, only: &
465  use scale_atmos_phy_mp_sn14, only: &
467  use scale_atmos_phy_mp_suzuki10, only: &
469  implicit none
470  !---------------------------------------------------------------------------
471 
472  log_newline
473  log_info("ATMOS_PHY_MP_driver_finalize",*) 'Finalize'
474 
475  if ( atmos_sw_phy_mp ) then
476  select case ( atmos_phy_mp_type )
477  case ( 'KESSLER' )
478  case ( 'TOMITA08' )
480  case ( 'SN14' )
482  case ( 'SUZUKI10' )
484  end select
485  end if
486 
487  if ( allocated(hist_hyd_id) ) deallocate( hist_hyd_id )
488  if ( allocated(hist_crg_id) ) deallocate( hist_crg_id )
489  if ( allocated(hist_vterm_id) ) deallocate( hist_vterm_id )
490 
491  return

References scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_finalize(), scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_finalize(), scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_finalize(), mod_atmos_admin::atmos_phy_mp_type, and mod_atmos_admin::atmos_sw_phy_mp.

Referenced by mod_atmos_driver::atmos_driver_finalize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_mp_driver_adjustment()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver_adjustment

adjustment

Definition at line 496 of file mod_atmos_phy_mp_driver.F90.

496  use scale_const, only: &
497  pre00 => const_pre00
498  use scale_atmos_hydrometeor, only: &
500  i_qv, &
501  qla, &
502  qia, &
503  qhs, &
504  qhe
505  use scale_atmos_phy_mp_common, only: &
507  use mod_atmos_vars, only: &
508  temp, &
509  cvtot, &
510  cptot, &
511  dens, &
512  rhot, &
513  qtrc
514  use mod_atmos_phy_mp_vars, only: &
515  qe_mp
516  use scale_time, only: &
517  dt => time_dtsec
518  use scale_file_history, only: &
519  file_history_query, &
520  file_history_put
521  use scale_monitor, only: &
522  monitor_put
523 
524  real(RP) :: RHOH (KA,IA,JA)
525  real(RP) :: DENS_d(KA,IA,JA)
526  real(RP) :: ENGI_d(KA,IA,JA)
527  real(RP) :: Rtot
528 
529  logical :: do_put_rhoh
530  logical :: do_put_dens
531  logical :: do_put_engi
532 
533  integer :: k, i, j, iq
534 
535  if ( mp_do_negative_fixer .and. (.not. atmos_hydrometeor_dry) ) then
536 
537  !$acc data copy(DENS, TEMP, CVtot, CPtot, QTRC(:,:,:,I_QV:QE_MP)) create(RHOH, DENS_d, ENGI_d) copyout(RHOT)
538 
539  call file_history_query( hist_nf_rhoh_id, do_put_rhoh )
540  call file_history_query( hist_nf_dens_id, do_put_dens )
541  call file_history_query( hist_nf_engi_id, do_put_engi )
542 
543  if ( monit_nf_mass_id > 0 .or. monit_nf_engi_id > 0 .or. &
544  do_put_rhoh .or. do_put_dens .or. do_put_engi ) then
546  ka, ks, ke, ia, is, ie, ja, js, je, qla, qia, &
547  mp_limit_negative, & ! [IN]
548  dens(:,:,:), temp(:,:,:), & ! [INOUT]
549  cvtot(:,:,:), cptot(:,:,:), & ! [INOUT]
550  qtrc(:,:,:,i_qv), qtrc(:,:,:,qhs:qhe), & ! [INOUT]
551  rhoh = rhoh, & ! [OUT, optional]
552  dens_diff = dens_d, engi_diff = engi_d ) ! [OUT, optional]
553  else
555  ka, ks, ke, ia, is, ie, ja, js, je, qla, qia, &
556  mp_limit_negative, & ! [IN]
557  dens(:,:,:), temp(:,:,:), & ! [INOUT]
558  cvtot(:,:,:), cptot(:,:,:), & ! [INOUT]
559  qtrc(:,:,:,i_qv), qtrc(:,:,:,qhs:qhe) ) ! [INOUT]
560  end if
561 
562  !$omp parallel private(Rtot)
563 
564  !$omp do
565  !$acc kernels async
566  !$acc loop collapse(3) independent
567  do j = js, je
568  do i = is, ie
569  do k = ks, ke
570  rtot = cptot(k,i,j) - cvtot(k,i,j)
571  rhot(k,i,j) = pre00 / rtot * ( dens(k,i,j) * temp(k,i,j) * rtot / pre00 )**( cvtot(k,i,j) / cptot(k,i,j) )
572  end do
573  end do
574  end do
575  !$acc end kernels
576  !$omp end do nowait
577 
578  ! for non-mass tracers, such as number density
579  !$acc kernels async
580  do iq = qhe+1, qe_mp
581  !$omp do
582  do j = js, je
583  do i = is, ie
584  do k = ks, ke
585  qtrc(k,i,j,iq) = max( qtrc(k,i,j,iq), 0.0_rp )
586  end do
587  end do
588  end do
589  end do
590  !$acc end kernels
591 
592  !$omp end parallel
593 
594  if ( do_put_rhoh ) then
595  !$omp parallel do
596  !$acc kernels async
597  do j = js, je
598  do i = is, ie
599  do k = ks, ke
600  rhoh(k,i,j) = rhoh(k,i,j) / dt
601  end do
602  end do
603  end do
604  !$acc end kernels
605  !$acc update host(RHOH)
606  call file_history_put( hist_nf_rhoh_id, rhoh(:,:,:) )
607  end if
608  if ( monit_nf_mass_id > 0 .or. do_put_dens ) then
609  !$omp parallel do
610  !$acc kernels async
611  do j = js, je
612  do i = is, ie
613  do k = ks, ke
614  dens_d(k,i,j) = dens_d(k,i,j) / dt
615  end do
616  end do
617  end do
618  !$acc end kernels
619  !$acc update host(DENS_d)
620  call file_history_put( hist_nf_dens_id, dens_d(:,:,:) )
621  call monitor_put( monit_nf_mass_id, dens_d(:,:,:) )
622  end if
623  if ( monit_nf_engi_id > 0 .or. do_put_engi ) then
624  !$omp parallel do
625  !$acc kernels async
626  do j = js, je
627  do i = is, ie
628  do k = ks, ke
629  engi_d(k,i,j) = engi_d(k,i,j) / dt
630  end do
631  end do
632  end do
633  !$acc end kernels
634  !$acc update host(ENGI_d)
635  call file_history_put( hist_nf_engi_id, engi_d(:,:,:) )
636  call monitor_put( monit_nf_engi_id, engi_d(:,:,:) )
637  end if
638 
639  !$acc wait
640 
641  !$acc end data
642 
643  end if
644 
645  return

References scale_atmos_hydrometeor::atmos_hydrometeor_dry, scale_atmos_phy_mp_common::atmos_phy_mp_negative_fixer(), scale_const::const_pre00, mod_atmos_vars::cptot, mod_atmos_vars::cvtot, mod_atmos_vars::dens, scale_atmos_hydrometeor::i_qv, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::js, scale_tracer::k, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, mod_atmos_phy_mp_vars::qe_mp, scale_atmos_hydrometeor::qhe, scale_atmos_hydrometeor::qhs, scale_atmos_hydrometeor::qia, scale_atmos_hydrometeor::qla, mod_atmos_vars::qtrc, mod_atmos_vars::rhot, mod_atmos_vars::temp, and scale_time::time_dtsec.

Referenced by mod_atmos_driver::atmos_driver_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_mp_driver_calc_tendency()

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

calculate tendency

Definition at line 651 of file mod_atmos_phy_mp_driver.F90.

651  use scale_const, only: &
652  pre00 => const_pre00
653  use scale_time, only: &
654  dt_mp => time_dtsec_atmos_phy_mp, &
655  dt_lt => time_dtsec_atmos_phy_lt
656  use scale_atmos_grid_cartesc_real, only: &
657  real_cz => atmos_grid_cartesc_real_cz, &
658  real_fz => atmos_grid_cartesc_real_fz, &
667  use scale_statistics, only: &
669  statistics_total
670  use scale_file_history, only: &
671  file_history_in, &
672  file_history_query, &
673  file_history_put
674  use scale_atmos_hydrometeor, only: &
675  lhf, &
676  i_qv, &
677  n_hyd, &
678  qha, &
679  qhs, &
680  qhe, &
681  qla, &
682  qls, &
683  qle, &
684  qia
685  use scale_atmos_phy_mp_common, only: &
689  use scale_atmos_refstate, only: &
690  refstate_dens => atmos_refstate_dens
691  use scale_atmos_phy_mp_kessler, only: &
694  use scale_atmos_phy_mp_tomita08, only: &
697  use scale_atmos_phy_mp_sn14, only: &
700  use scale_atmos_phy_mp_suzuki10, only: &
705  use scale_atmos_phy_lt_sato2019, only: &
707  use scale_file_history, only: &
708  file_history_query, &
709  file_history_put
710  use mod_atmos_admin, only: &
714  use mod_atmos_vars, only: &
715  dens => dens_av, &
716  momz => momz_av, &
717  u, &
718  v, &
719  w, &
720  pott, &
721  qtrc => qtrc_av, &
722  dens_t => dens_tp, &
723  momz_t => momz_tp, &
724  rhou_t => rhou_tp, &
725  rhov_t => rhov_tp, &
726 ! RHOT_t => RHOT_tp, &
727  rhoq_t => rhoq_tp, &
728  rhoh => rhoh_p, &
729  temp, &
730  pres, &
731  qdry, &
732  cvtot, &
733  cptot, &
734  exner, &
735  rhot => rhot_av
736  use mod_atmos_phy_mp_vars, only: &
737  qs_mp, &
738  qe_mp, &
739  dens_t_mp => atmos_phy_mp_dens_t, &
740  momz_t_mp => atmos_phy_mp_momz_t, &
741 ! RHOT_t_MP => ATMOS_PHY_MP_RHOT_t, &
742  rhou_t_mp => atmos_phy_mp_rhou_t, &
743  rhov_t_mp => atmos_phy_mp_rhov_t, &
744  rhoq_t_mp => atmos_phy_mp_rhoq_t, &
745  rhoc_t_mp => atmos_phy_mp_rhoc_t, &
746  rhoh_mp => atmos_phy_mp_rhoh, &
747  evaporate => atmos_phy_mp_evaporate, &
748  sflx_rain => atmos_phy_mp_sflx_rain, &
749  sflx_snow => atmos_phy_mp_sflx_snow, &
750  sflx_engi => atmos_phy_mp_sflx_engi
751  use mod_atmos_phy_ae_vars, only: &
752  ccn_t => atmos_phy_ae_ccn_t
753  use mod_atmos_phy_lt_vars, only: &
754  qa_lt, &
755  qs_lt, &
756  qe_lt, &
757  d0_crg, &
758  v0_crg, &
759  flg_lt, &
760  sarea => atmos_phy_lt_sarea
761  implicit none
762 
763  logical, intent(in) :: update_flag
764 
765  real(RP) :: RHOE_t(KA,IA,JA)
766  real(RP) :: TEMP1 (KA,IA,JA)
767  real(RP) :: CPtot1(KA,IA,JA)
768  real(RP) :: CVtot1(KA,IA,JA)
769  real(RP) :: CCN (KA,IA,JA)
770  real(RP) :: vterm (KA,QS_MP+1:QE_MP)
771  real(RP), target :: QTRC1(KA,IA,JA,QS_MP:QE_MP)
772 
773  real(RP) :: FLX_hydro(KA)
774  real(RP) :: DENS2 (KA)
775  real(RP) :: TEMP2 (KA)
776  real(RP) :: PRES2 (KA)
777  real(RP) :: CPtot2 (KA)
778  real(RP) :: CVtot2 (KA)
779  real(RP) :: RHOE (KA)
780  real(RP) :: RHOE2 (KA)
781  real(RP) :: RHOQ (KA,QS_MP+1:QE_MP)
782  real(RP) :: RHOQ2 (KA,QS_MP+1:QE_MP)
783  real(RP) :: mflux (KA)
784  real(RP) :: sflux (2)
785  real(RP) :: eflux
786 
787  real(RP) :: FZ (KA)
788  real(RP) :: FDZ (KA)
789  real(RP) :: RFDZ(KA)
790  real(RP) :: RCDZ(KA)
791 
792  real(RP) :: CPtot_t(KA,IA,JA), CVtot_t(KA,IA,JA)
793  real(RP) :: CP_t, CV_t
794 
795  real(RP) :: precip (IA,JA)
796 
797  real(RP) :: Qe(KA,IA,JA,N_HYD)
798  logical :: HIST_sw(N_HYD)
799  real(RP) :: Qecrg(KA,IA,JA,N_HYD)
800  logical :: HIST_crg_sw(N_HYD)
801 
802  ! for history output
803  real(RP), allocatable :: vterm_hist(:,:,:,:)
804  integer :: hist_vterm_idx(QS_MP+1:QE_MP)
805  logical :: flag
806  integer :: ih
807 
808  integer :: k, i, j, iq
809  integer :: step
810 
811  real(RP) :: QTRC1_crg(KA,IA,JA,QS_LT:QE_LT)
812  real(RP) :: RHOQ2_crg(KA,QS_LT:QE_LT)
813  real(RP) :: mflux_crg(KA), sflux_crg(2), eflux_crg
814  real(RP) :: QSPLT_in(KA,IA,JA,3)
815  real(RP) :: dqcrg(KA,IA,JA), beta_crg(KA,IA,JA)
816  !---------------------------------------------------------------------------
817 
818  !$acc data copy(DENS_t, MOMZ_t, RHOU_t, RHOV_t, RHOQ_t(:,:,:,:), RHOH, &
819  !$acc DENS_t_MP, MOMZ_t_MP, RHOU_t_MP, RHOV_t_MP, RHOQ_t_MP, RHOC_t_MP, RHOH_MP, &
820  !$acc EVAPORATE, SFLX_rain, SFLX_snow, SFLX_ENGI, &
821  !$acc Sarea) &
822  !$acc copyin(DENS(:,:,:), MOMZ(:,:,:), U, V, TEMP, QTRC(:,:,:,:), PRES, CVtot, CPtot, &
823  !$acc REAL_CZ, REAL_FZ, &
824  !$acc ATMOS_PHY_MP_TYPE, ATMOS_PHY_PRECIP_TYPE) &
825  !$acc create(RHOE_t, TEMP1, CPtot1, CVtot1, CCN, QTRC1, CPtot_t, CVtot_t, precip, &
826  !$acc QTRC1_crg, QSPLT_in, dqcrg, beta_crg, &
827  !$acc hist_vterm_idx, vterm_hist)
828 
829 
830  if ( update_flag ) then
831 
832  !$acc kernels
833  ccn(:,:,:) = ccn_t(:,:,:) * dt_mp
834  !$acc end kernels
835 
836  select case ( atmos_phy_mp_type )
837  case ( 'KESSLER' )
838  !$omp workshare
839  !$acc kernels
840 !OCL XFILL
841  temp1(:,:,:) = temp(:,:,:)
842 !OCL XFILL
843  qtrc1(:,:,:,qs_mp:qe_mp) = qtrc(:,:,:,qs_mp:qe_mp)
844 !OCL XFILL
845  cvtot1(:,:,:) = cvtot(:,:,:)
846 !OCL XFILL
847  cptot1(:,:,:) = cptot(:,:,:)
848  !$acc end kernels
849  !$omp end workshare
850 
851  !$acc update host(DENS,PRES,TEMP1,QTRC1(:,:,:,QS_MP:QE_MP),CPtot1,CVtot1)
853  ka, ks, ke, ia, is, ie, ja, js, je, &
854  dens(:,:,:), pres(:,:,:), dt_mp, & ! [IN]
855  temp1(:,:,:), qtrc1(:,:,:,qs_mp:qe_mp), cptot1(:,:,:), cvtot1(:,:,:), & ! [INOUT]
856  rhoe_t(:,:,:), evaporate(:,:,:) ) ! [OUT]
857  !acc update device(TEMP1,QTRC1(:,:,:,QS_MP:QE_MP),CPtot1,CVtot1,RHOE_t,EVAPORATE)
858 
859  !$omp parallel do collapse(3)
860  !$acc kernels
861  do iq = qs_mp, qe_mp
862  do j = js, je
863  do i = is, ie
864  do k = ks, ke
865  rhoq_t_mp(k,i,j,iq) = ( qtrc1(k,i,j,iq) - qtrc(k,i,j,iq) ) * dens(k,i,j) / dt_mp
866  enddo
867  enddo
868  enddo
869  enddo
870  !$acc end kernels
871 
872  !$omp parallel do collapse(2)
873  !$acc kernels
874  do j = js, je
875  do i = is, ie
876  do k = ks, ke
877  cptot_t(k,i,j) = ( cptot1(k,i,j) - cptot(k,i,j) ) / dt_mp
878  cvtot_t(k,i,j) = ( cvtot1(k,i,j) - cvtot(k,i,j) ) / dt_mp
879  end do
880  end do
881  end do
882  !$acc end kernels
883 
884  case ( 'TOMITA08' )
885 !OCL XFILL
886  !$omp parallel do collapse(2)
887  !$acc parallel async
888  !$acc loop collapse(2)
889  do j = js, je
890  do i = is, ie
891  do k = ks, ke
892  temp1(k,i,j) = temp(k,i,j)
893  end do
894  end do
895  end do
896  !$acc end parallel
897 !OCL XFILL
898  !$omp parallel do collapse(3)
899  !$acc parallel async
900  !$acc loop collapse(3)
901  do iq = qs_mp, qe_mp
902  do j = js, je
903  do i = is, ie
904  do k = ks, ke
905  qtrc1(k,i,j,iq) = qtrc(k,i,j,iq)
906  end do
907  end do
908  end do
909  end do
910  !$acc end parallel
911 !OCL XFILL
912  !$omp parallel do collapse(2)
913  !$acc parallel async
914  !$acc loop collapse(2)
915  do j = js, je
916  do i = is, ie
917  do k = ks, ke
918  cvtot1(k,i,j) = cvtot(k,i,j)
919  end do
920  end do
921  end do
922  !$acc end parallel
923 !OCL XFILL
924  !$acc parallel async
925  !$acc loop collapse(2)
926  do j = js, je
927  do i = is, ie
928  do k = ks, ke
929  cptot1(k,i,j) = cptot(k,i,j)
930  end do
931  end do
932  end do
933  !$acc end parallel
934 
935  !$acc wait
936 
937  if( flg_lt ) then
938 !OCL XFILL
939  !$omp parallel do collapse(3)
940  !$acc parallel
941  !$acc loop collapse(3)
942  do iq = qs_lt, qe_lt
943  do j = js, je
944  do i = is, ie
945  do k = ks, ke
946  qtrc1_crg(k,i,j,iq) = qtrc(k,i,j,iq)
947  end do
948  end do
949  end do
950  end do
951  !$acc end parallel
952 
954  ka, ks, ke, ia, is, ie, ja, js, je, & ! [IN]
955  qla, & ! [IN]
956  temp1(:,:,:), dens(:,:,:), & ! [IN]
957  qtrc1(:,:,:,qls:qle), & ! [IN]
958  dqcrg(:,:,:), beta_crg(:,:,:) ) ! [OUT]
959 
961  ka, ks, ke, ia, is, ie, ja, js, je, &
962  dens(:,:,:), pres(:,:,:), ccn(:,:,:), dt_mp, & ! [IN]
963  temp1(:,:,:), qtrc1(:,:,:,qs_mp:qe_mp), cptot1(:,:,:), cvtot1(:,:,:), & ! [INOUT]
964  rhoe_t(:,:,:), evaporate(:,:,:), & ! [OUT]
965  flg_lt, d0_crg, v0_crg, dqcrg(:,:,:), beta_crg(:,:,:), & ! [IN:optional]
966  qsplt_in(:,:,:,:), sarea(:,:,:,:), & ! [OUT:optional]
967  qtrc1_crg(:,:,:,qs_lt:qe_lt) ) ! [INOUT:optional]
968  else
970  ka, ks, ke, ia, is, ie, ja, js, je, &
971  dens(:,:,:), pres(:,:,:), ccn(:,:,:), dt_mp, & ! [IN]
972  temp1(:,:,:), qtrc1(:,:,:,qs_mp:qe_mp), cptot1(:,:,:), cvtot1(:,:,:), & ! [INOUT]
973  rhoe_t(:,:,:), evaporate(:,:,:) ) ! [OUT]
974  endif
975 
976  !$omp parallel do collapse(3)
977  !$acc parallel async
978  !$acc loop collapse(3)
979  do iq = qs_mp, qe_mp
980  do j = js, je
981  do i = is, ie
982  do k = ks, ke
983  rhoq_t_mp(k,i,j,iq) = ( qtrc1(k,i,j,iq) - qtrc(k,i,j,iq) ) * dens(k,i,j) / dt_mp
984  enddo
985  enddo
986  enddo
987  enddo
988  !$acc end parallel
989 
990  !$omp parallel do collapse(2)
991  !$acc parallel async
992  !$acc loop collapse(2)
993  do j = js, je
994  do i = is, ie
995  do k = ks, ke
996  cptot_t(k,i,j) = ( cptot1(k,i,j) - cptot(k,i,j) ) / dt_mp
997  cvtot_t(k,i,j) = ( cvtot1(k,i,j) - cvtot(k,i,j) ) / dt_mp
998  end do
999  end do
1000  end do
1001  !$acc end parallel
1002 
1003  if( flg_lt ) then
1004  !$omp parallel do collapse(3)
1005  !$acc parallel async
1006  !$acc loop collapse(3)
1007  do iq = qs_lt, qe_lt
1008  do j = js, je
1009  do i = is, ie
1010  do k = ks, ke
1011  rhoc_t_mp(k,i,j,iq) = ( qtrc1_crg(k,i,j,iq) - qtrc(k,i,j,iq) ) * dens(k,i,j) / dt_mp
1012  enddo
1013  enddo
1014  enddo
1015  enddo
1016  !$acc end parallel
1017  endif
1018 
1019  !$acc wait
1020 
1021  case ( 'SN14' )
1022 
1023  !$acc update host(DENS,W,QTRC(:,:,:,QS_MP:QE_MP),PRES,TEMP,Qdry,CPtot,CVtot,CCN)
1024  if( flg_lt ) then
1026  ka, ks, ke, ia, is, ie, ja, js, je, & ! [IN]
1027  qla, & ! [IN]
1028  temp(:,:,:), dens(:,:,:), & ! [IN]
1029  qtrc(:,:,:,qls:qle), & ! [IN]
1030  dqcrg(:,:,:), beta_crg(:,:,:) ) ! [OUT]
1031  !$acc update host(dqcrg,beta_crg,QTRC(:,:,:,QS_LT:QE_LT))
1033  ka, ks, ke, ia, is, ie, ja, js, je, &
1034  dens(:,:,:), w(:,:,:), qtrc(:,:,:,qs_mp:qe_mp), pres(:,:,:), temp(:,:,:), & ! [IN]
1035  qdry(:,:,:), cptot(:,:,:), cvtot(:,:,:), ccn(:,:,:), dt_mp, real_cz(:,:,:), real_fz(:,:,:), & ! [IN]
1036  rhoq_t_mp(:,:,:,qs_mp:qe_mp), rhoe_t(:,:,:), cptot_t(:,:,:), cvtot_t(:,:,:), evaporate(:,:,:),& ! [OUT]
1037  flg_lt, d0_crg, v0_crg, dqcrg(:,:,:), beta_crg(:,:,:), & ! [IN:optional]
1038  qtrc(:,:,:,qs_lt:qe_lt), & ! [IN:optional]
1039  qsplt_in(:,:,:,:), sarea(:,:,:,:), & ! [OUT:optional]
1040  rhoc_t_mp(:,:,:,qs_lt:qe_lt) ) ! [OUT:optional]
1041  !$acc update device(QSPLT_in,Sarea,RHOC_t_MP(:,:,:,QS_LT:QE_LT))
1042  else
1044  ka, ks, ke, ia, is, ie, ja, js, je, &
1045  dens(:,:,:), w(:,:,:), qtrc(:,:,:,qs_mp:qe_mp), pres(:,:,:), temp(:,:,:), & ! [IN]
1046  qdry(:,:,:), cptot(:,:,:), cvtot(:,:,:), ccn(:,:,:), dt_mp, real_cz(:,:,:), real_fz(:,:,:), & ! [IN]
1047  rhoq_t_mp(:,:,:,qs_mp:qe_mp), rhoe_t(:,:,:), cptot_t(:,:,:), cvtot_t(:,:,:), evaporate(:,:,:) ) ! [OUT]
1048  endif
1049  !$acc update device(RHOQ_t_MP(:,:,:,QS_MP:QE_MP),RHOE_t,CPtot_t,CVtot_t,EVAPORATE)
1050 
1051  case ( 'SUZUKI10' )
1052 
1053  !$acc update host(DENS,PRES,TEMP,QTRC(:,:,:,QS_MP:QE_MP),QDRY,CPtot,CVtot,CCN)
1054  if( flg_lt ) then
1056  ka, ks, ke, ia, is, ie, ja, js, je, & ! [IN]
1057  qla, & ! [IN]
1058  temp(:,:,:), dens(:,:,:), & ! [IN]
1059  qtrc(:,:,:,qls:qle), & ! [IN]
1060  dqcrg(:,:,:), beta_crg(:,:,:) ) ! [OUT]
1061  !$acc update host(dqcrg,beta_crg,QTRC(:,:,:,QS_LT:QE_LT))
1062  call atmos_phy_mp_suzuki10_tendency( ka, ks, ke, ia, is, ie, ja, js, je, kijmax, &
1063  dt_mp, & ! [IN]
1064  dens(:,:,:), pres(:,:,:), temp(:,:,:), & ! [IN]
1065  qtrc(:,:,:,qs_mp:qe_mp), qdry(:,:,:), & ! [IN]
1066  cptot(:,:,:), cvtot(:,:,:), & ! [IN]
1067  ccn(:,:,:), & ! [IN]
1068  rhoq_t_mp(:,:,:,qs_mp:qe_mp), & ! [OUT]
1069  rhoe_t(:,:,:), & ! [OUT]
1070  cptot_t(:,:,:), cvtot_t(:,:,:), & ! [OUT]
1071  evaporate(:,:,:), & ! [OUT]
1072  flg_lt, d0_crg, v0_crg, & ! [IN:optional]
1073  dqcrg(:,:,:), beta_crg(:,:,:), & ! [IN:optional]
1074  qtrc(:,:,:,qs_lt:qe_lt), & ! [IN:optional]
1075  qsplt_in(:,:,:,:), sarea(:,:,:,:), & ! [OUT:optional]
1076  rhoc_t_mp(:,:,:,qs_lt:qe_lt) ) ! [OUT:optional]
1077  !$acc update device(QSPLT_in,Sarea,RHOC_t_MP(:,:,:,QS_LT:QE_LT))
1078  else
1079  call atmos_phy_mp_suzuki10_tendency( ka, ks, ke, ia, is, ie, ja, js, je, kijmax, &
1080  dt_mp, & ! [IN]
1081  dens(:,:,:), pres(:,:,:), temp(:,:,:), & ! [IN]
1082  qtrc(:,:,:,qs_mp:qe_mp), qdry(:,:,:), & ! [IN]
1083  cptot(:,:,:), cvtot(:,:,:), & ! [IN]
1084  ccn(:,:,:), & ! [IN]
1085  rhoq_t_mp(:,:,:,qs_mp:qe_mp), & ! [OUT]
1086  rhoe_t(:,:,:), & ! [OUT]
1087  cptot_t(:,:,:), cvtot_t(:,:,:), & ! [OUT]
1088  evaporate(:,:,:) ) ! [OUT]
1089  endif
1090  !$acc update device(RHOQ_t_MP(:,:,:,QS_MP:QE_mp),RHOE_t,CPtot_t,CVtot_t,EVAPORATE)
1091 
1092  call atmos_phy_mp_suzuki10_qtrc2qhyd( ka, ks, ke, ia, is, ie, ja, js, je, & ! [IN]
1093  qtrc(:,:,:,qs_mp+1:qe_mp), & ! [IN]
1094  qe(:,:,:,:) ) ! [OUT]
1095  !$acc update device(Qe)
1096 
1097  do iq = 1, n_hyd
1098  call file_history_query( hist_hyd_id(iq), hist_sw(iq) )
1099  enddo
1100  do iq = 1, n_hyd
1101  if( hist_sw(iq) ) then
1102  call file_history_put( hist_hyd_id(iq), qe(:,:,:,iq) )
1103  endif
1104  enddo
1105 
1106  if( flg_lt ) then
1107 
1108  call atmos_phy_mp_suzuki10_crg_qtrc2qhyd( ka, ks, ke, ia, is, ie, ja, js, je, & ! [IN]
1109  qtrc(:,:,:,qs_lt:qe_lt), & ! [IN]
1110  qecrg(:,:,:,:) ) ! [OUT]
1111  !$acc update device(Qecrg)
1112 
1113  do iq = 1, n_hyd
1114  call file_history_query( hist_crg_id(iq), hist_crg_sw(iq) )
1115  enddo
1116  do iq = 1, n_hyd
1117  if( hist_crg_sw(iq) ) then
1118  call file_history_put( hist_crg_id(iq), qecrg(:,:,:,iq) )
1119  endif
1120  enddo
1121 
1122  endif
1123 
1124  end select
1125 
1126 
1127  !$omp parallel do collapse(2)
1128  !$acc parallel
1129  !$acc loop collapse(2)
1130  do j = js, je
1131  do i = is, ie
1132  do k = ks, ke
1133  rhoh_mp(k,i,j) = rhoe_t(k,i,j) &
1134  - ( cptot_t(k,i,j) + log( pres(k,i,j) / pre00 ) * ( cvtot(k,i,j) / cptot(k,i,j) * cptot_t(k,i,j) - cvtot_t(k,i,j) ) ) &
1135  * dens(k,i,j) * temp(k,i,j)
1136 ! RHOT_t_MP(k,i,j) = RHOE_t(k,i,j) / ( EXNER(k,i,j) * CPtot(k,i,j) ) &
1137 ! - RHOT(k,i,j) * CPtot_t(k,i,j) / CPtot(k,i,j) &
1138 ! - RHOT(k,i,j) * CVtot(k,i,j) / ( CPtot(k,i,j) - CVtot(k,i,j) ) &
1139 ! * log( EXNER(k,i,j) ) * ( CPtot_t(k,i,j) / CPtot(k,i,j) - CVtot_t(k,i,j) / CVtot(k,i,j) )
1140  end do
1141  end do
1142  end do
1143  !$acc end parallel
1144 
1145  if ( mp_do_precipitation ) then
1146 
1147  call prof_rapstart('MP_Precipitation', 2)
1148 
1149  ! prepare for history output
1150  hist_vterm_idx(:) = -1
1151  ih = 0
1152  do iq = qs_mp+1, qe_mp
1153  call file_history_query( hist_vterm_id(iq), flag )
1154  if ( flag ) then
1155  ih = ih + 1
1156  hist_vterm_idx(iq) = ih
1157  end if
1158  end do
1159  !$acc update device(hist_vterm_idx)
1160  if ( ih > 0 ) then
1161  allocate( vterm_hist(ka,ia,ja,ih) )
1162  !$acc kernels
1163  vterm_hist(:,:,:,:) = 0.0_rp
1164  !$acc end kernels
1165  end if
1166 
1167  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
1168  !$omp shared (KA,KS,KE,IS,IE,JS,JE,QS_MP,QE_MP,QHA,QHS,QHE,QLA,QIA, &
1169  !$omp QA_LT,QS_LT,QE_LT, &
1170  !$omp PRE00,LHF, &
1171  !$omp ATMOS_PHY_MP_TYPE, ATMOS_PHY_PRECIP_TYPE, &
1172  !$omp dt_MP,MP_NSTEP_SEDIMENTATION,MP_RNSTEP_SEDIMENTATION, &
1173  !$omp REAL_CZ,REAL_FZ, &
1174  !$omp DENS,MOMZ,U,V,TEMP,PRES,QTRC,CPtot,CVtot, &
1175  !$omp DENS_t_MP,MOMZ_t_MP,RHOU_t_MP,RHOV_t_MP,RHOQ_t_MP,RHOH_MP, &
1176  !$omp SFLX_rain,SFLX_snow,SFLX_ENGI, &
1177  !$omp REFSTATE_dens, &
1178  !$omp flg_lt,RHOC_t_MP, &
1179  !$omp MP_DTSEC_SEDIMENTATION, &
1180  !$omp vterm_hist,hist_vterm_idx) &
1181  !$omp private(i,j,k,iq,step, &
1182  !$omp FZ,FDZ,RFDZ,RCDZ, &
1183  !$omp DENS2,TEMP2,PRES2,CPtot2,CVtot2,RHOE,RHOE2,RHOQ,RHOQ2, &
1184  !$omp RHOQ2_crg,mflux_crg,sflux_crg,eflux_crg, &
1185  !$omp vterm,mflux,sflux,eflux,FLX_hydro,CP_t,CV_t)
1186  !$acc parallel
1187  !$acc loop collapse(2) gang &
1188  !$acc private(vterm,FLX_hydro,DENS2,TEMP2,PRES2,CPtot2,CVtot2,RHOE,RHOE2,RHOQ,RHOQ2,mflux,sflux,eflux,FZ,FDZ,RFDZ,RCDZ, &
1189  !$acc RHOQ2_crg,mflux_crg,sflux_crg,eflux_crg)
1190  do j = js, je
1191  do i = is, ie
1192 
1193  fz(1:ka) = real_fz(1:ka,i,j)
1194 
1195  fdz(ks-1) = real_cz(ks,i,j) - real_fz(ks-1,i,j)
1196  rfdz(ks-1) = 1.0_rp / fdz(ks-1)
1197  do k = ks, ke
1198  fdz(k) = real_cz(k+1,i,j) - real_cz(k ,i,j)
1199  rfdz(k) = 1.0_rp / fdz(k)
1200  rcdz(k) = 1.0_rp / ( real_fz(k ,i,j) - real_fz(k-1,i,j) )
1201  enddo
1202 
1203  do k = ks, ke
1204  dens2(k) = dens(k,i,j)
1205  temp2(k) = temp(k,i,j)
1206  pres2(k) = pres(k,i,j)
1207  cptot2(k) = cptot(k,i,j)
1208  cvtot2(k) = cvtot(k,i,j)
1209  rhoe(k) = temp(k,i,j) * cvtot(k,i,j) * dens2(k)
1210  rhoe2(k) = rhoe(k)
1211  end do
1212  !$acc loop collapse(2)
1213  do iq = qs_mp+1, qe_mp
1214  do k = ks, ke
1215  rhoq(k,iq) = dens2(k) * qtrc(k,i,j,iq) + rhoq_t_mp(k,i,j,iq) * dt_mp
1216  rhoq2(k,iq) = rhoq(k,iq)
1217  end do
1218  end do
1219 
1220  if( flg_lt ) then
1221  !$acc loop collapse(2)
1222  do iq = qs_lt, qe_lt
1223  do k = ks, ke
1224  rhoq2_crg(k,iq) = dens2(k) * qtrc(k,i,j,iq)
1225  end do
1226  end do
1227  endif
1228 
1229  sflx_rain(i,j) = 0.0_rp
1230  sflx_snow(i,j) = 0.0_rp
1231  sflx_engi(i,j) = 0.0_rp
1232  flx_hydro(:) = 0.0_rp
1233 
1234  !$acc loop seq
1235  do step = 1, mp_nstep_sedimentation
1236 
1237  select case ( atmos_phy_mp_type )
1238  case ( 'KESSLER' )
1240  ka, ks, ke, &
1241  dens2(:), rhoq2(:,:), & ! [IN]
1242  refstate_dens(:,i,j), & ! [IN]
1243  vterm(:,:) ) ! [OUT]
1244  case ( 'TOMITA08' )
1246  ka, ks, ke, &
1247  dens2(:), temp2(:), rhoq2(:,:), & ! [IN]
1248  vterm(:,:) ) ! [OUT]
1249  case ( 'SN14' )
1251  ka, ks, ke, &
1252  dens2(:), temp2(:), rhoq2(:,:), pres2(:), & ! [IN]
1253  vterm(:,:) ) ! [OUT]
1254  case ( 'SUZUKI10' )
1256  ka, & ! [IN]
1257  vterm(:,:) ) ! [OUT]
1258  case default
1259  !$acc loop seq
1260  do iq = qs_mp+1, qe_mp
1261  do k = ks, ke
1262  vterm(k,iq) = 0.0_rp ! tentative
1263  end do
1264  end do
1265  end select
1266 
1267  ! store to history output
1268  !$acc loop seq
1269  do iq = qs_mp+1, qe_mp
1270  if ( hist_vterm_idx(iq) > 0 ) then
1271  !$acc loop independent
1272  do k = ks, ke
1273  vterm_hist(k,i,j,hist_vterm_idx(iq)) = vterm_hist(k,i,j,hist_vterm_idx(iq)) &
1274  + vterm(k,iq) * mp_rnstep_sedimentation
1275  end do
1276  end if
1277  end do
1278 
1279  select case ( atmos_phy_precip_type )
1280  case ( 'Upwind-Euler' )
1282  ka, ks, ke, qe_mp-qs_mp, qla, qia, &
1283  temp2(:), vterm(:,:), & ! [IN]
1284  fdz(:), rcdz(:), & ! [IN]
1285  mp_dtsec_sedimentation, & ! [IN]
1286  i, j, & ! [IN]
1287  dens2(:), rhoq2(:,:), & ! [INOUT]
1288  cptot2(:), cvtot2(:), & ! [INOUT]
1289  rhoe2(:), & ! [INOUT]
1290  mflux(:), sflux(:), & ! [OUT]
1291  eflux ) ! [OUT]
1292  case ( 'Semilag' )
1294  ka, ks, ke, qe_mp-qs_mp, qla, qia, &
1295  temp2(:), vterm(:,:), & ! [IN]
1296  fz(:), fdz(:), rcdz(:), & ! [IN]
1297  mp_dtsec_sedimentation, & ! [IN]
1298  i, j, & ! [IN]
1299  dens2(:), rhoq2(:,:), & ! [INOUT]
1300  cptot2(:), cvtot2(:), & ! [INOUT]
1301  rhoe2(:), & ! [INOUT]
1302  mflux(:), sflux(:), & ! [OUT]
1303  eflux ) ! [OUT]
1304  case default
1305  mflux(:) = 0.0_rp
1306  sflux(:) = 0.0_rp
1307  eflux = 0.0_rp
1308  end select
1309 
1310  if( flg_lt ) then
1311 
1312  select case ( atmos_phy_precip_type )
1313  case ( 'Upwind-Euler' )
1315  ka, ks, ke, qa_lt, 0, 0, & ! no mass tracer for charge density
1316  temp2(:), vterm(:,qhs:qhe), & ! [IN]
1317  fdz(:), rcdz(:), & ! [IN]
1318  mp_dtsec_sedimentation, & ! [IN]
1319  i, j, & ! [IN]
1320  dens2(:), rhoq2_crg(:,:), & ! [INOUT]
1321  cptot2(:), cvtot2(:), & ! [INOUT]
1322  rhoe2(:), & ! [INOUT]
1323  mflux_crg(:), sflux_crg(:), & ! [OUT] dummy
1324  eflux_crg ) ! [OUT] dummy
1325  case ( 'Semilag' )
1327  ka, ks, ke, qa_lt, 0, 0, & ! no mass tracer for charge density
1328  temp2(:), vterm(:,qhs:qhe), & ! [IN]
1329  fz(:), fdz(:), rcdz(:), & ! [IN]
1330  mp_dtsec_sedimentation, & ! [IN]
1331  i, j, & ! [IN]
1332  dens2(:), rhoq2_crg(:,:), & ! [INOUT]
1333  cptot2(:), cvtot2(:), & ! [INOUT]
1334  rhoe2(:), & ! [INOUT]
1335  mflux_crg(:), sflux_crg(:), & ! [OUT] dummy
1336  eflux_crg ) ! [OUT] dummy
1337  case default
1338  mflux_crg(:) = 0.0_rp
1339  sflux_crg(:) = 0.0_rp
1340  eflux_crg = 0.0_rp
1341  end select
1342 
1343  endif
1344 
1345  !$acc loop independent
1346  do k = ks, ke
1347  temp2(k) = rhoe2(k) / ( dens2(k) * cvtot2(k) )
1348  end do
1349 
1350  !$acc loop independent
1351  do k = ks-1, ke-1
1352  flx_hydro(k) = flx_hydro(k) + mflux(k) * mp_rnstep_sedimentation
1353  enddo
1354 
1355  sflx_rain(i,j) = sflx_rain(i,j) - sflux(1) * mp_rnstep_sedimentation
1356  sflx_snow(i,j) = sflx_snow(i,j) - sflux(2) * mp_rnstep_sedimentation
1357  sflx_engi(i,j) = sflx_engi(i,j) - eflux * mp_rnstep_sedimentation
1358 
1359  enddo
1360 
1361  sflx_engi(i,j) = sflx_engi(i,j) - sflx_snow(i,j) * lhf ! moist internal energy
1362 
1363 !OCL XFILL
1364  do k = ks, ke
1365  dens_t_mp(k,i,j) = ( dens2(k) - dens(k,i,j) ) / dt_mp
1366  end do
1367 
1368  do k = ks, ke
1369  cp_t = ( cptot2(k) - cptot(k,i,j) ) / dt_mp
1370  cv_t = ( cvtot2(k) - cvtot(k,i,j) ) / dt_mp
1371  rhoh_mp(k,i,j) = rhoh_mp(k,i,j) &
1372  + ( rhoe2(k) - rhoe(k) ) / dt_mp &
1373  - ( cp_t + log( pres(k,i,j) / pre00 ) * ( cvtot(k,i,j) / cptot(k,i,j) * cp_t - cv_t ) ) &
1374  * dens(k,i,j) * temp(k,i,j)
1375 ! RHOT_t_MP(k,i,j) = RHOT_t_MP(k,i,j) &
1376 ! + ( RHOE2(k) - RHOE(k) ) / ( dt_MP * EXNER(k,i,j) * CPtot(k,i,j) ) &
1377 ! - RHOT(k,i,j) * CP_t / CPtot(k,i,j) &
1378 ! - RHOT(k,i,j) * CVtot(k,i,j) / ( CPtot(k,i,j) - CVtot(k,i,j) ) &
1379 ! * log( EXNER(k,i,j) ) * ( CP_t / CPtot(k,i,j) - CV_t / CVtot(k,i,j) )
1380  end do
1381 
1382  !$acc loop collapse(2)
1383  do iq = qs_mp+1, qe_mp
1384  do k = ks, ke
1385  rhoq_t_mp(k,i,j,iq) = rhoq_t_mp(k,i,j,iq) &
1386  + ( rhoq2(k,iq) - rhoq(k,iq) ) / dt_mp
1387  enddo
1388  enddo
1389 
1390  if( flg_lt ) then
1391  !$acc loop collapse(2)
1392  do iq = qs_lt, qe_lt
1393  do k = ks, ke
1394  rhoc_t_mp(k,i,j,iq) = rhoc_t_mp(k,i,j,iq) &
1395  + ( rhoq2_crg(k,iq) - dens(k,i,j) * qtrc(k,i,j,iq) ) / dt_mp
1396  enddo
1397  enddo
1398  endif
1399 
1401  ka, ks, ke, &
1402  dens(:,i,j), momz(:,i,j), u(:,i,j), v(:,i,j), & ! [IN]
1403  flx_hydro(:), & ! [IN]
1404  rcdz(:), rfdz(:), & ! [IN]
1405  momz_t_mp(:,i,j), rhou_t_mp(:,i,j), rhov_t_mp(:,i,j) ) ! [OUT]
1406 
1407  enddo
1408  enddo
1409  !$acc end parallel
1410 
1411  ! history output
1412  do iq = qs_mp+1, qe_mp
1413  if ( hist_vterm_idx(iq) > 0 ) then
1414  call file_history_put( hist_vterm_id(iq), vterm_hist(:,:,:,hist_vterm_idx(iq)) )
1415  end if
1416  end do
1417  if ( allocated( vterm_hist ) ) then
1418  deallocate( vterm_hist )
1419  end if
1420 
1421  call prof_rapend ('MP_Precipitation', 2)
1422 
1423  end if
1424 
1425 !OCL XFILL
1426  !$acc kernels
1427  do j = js, je
1428  do i = is, ie
1429  precip(i,j) = sflx_rain(i,j) + sflx_snow(i,j)
1430  end do
1431  end do
1432  !$acc end kernels
1433 
1434  call file_history_in( sflx_rain(:,:), 'RAIN_MP', 'surface rain rate by MP', 'kg/m2/s', fill_halo=.true. )
1435  call file_history_in( sflx_snow(:,:), 'SNOW_MP', 'surface snow rate by MP', 'kg/m2/s', fill_halo=.true. )
1436  call file_history_in( precip(:,:), 'PREC_MP', 'surface precipitation rate by MP', 'kg/m2/s', fill_halo=.true. )
1437  call file_history_in( evaporate(:,:,:), 'EVAPORATE', 'evaporated cloud number', 'num/m3/s', fill_halo=.true. )
1438 
1439  call file_history_in( dens_t_mp(:,:,:), 'DENS_t_MP', 'tendency DENS in MP', 'kg/m3/s' , fill_halo=.true. )
1440  call file_history_in( momz_t_mp(:,:,:), 'MOMZ_t_MP', 'tendency MOMZ in MP', 'kg/m2/s2' , fill_halo=.true. )
1441  call file_history_in( rhou_t_mp(:,:,:), 'RHOU_t_MP', 'tendency RHOU in MP', 'kg/m2/s2' , fill_halo=.true. )
1442  call file_history_in( rhov_t_mp(:,:,:), 'RHOV_t_MP', 'tendency RHOV in MP', 'kg/m2/s2' , fill_halo=.true. )
1443 ! call FILE_HISTORY_in( RHOT_t_MP(:,:,:), 'RHOT_t_MP', 'tendency RHOT in MP', 'K*kg/m3/s', fill_halo=.true. )
1444  call file_history_in( rhoh_mp(:,:,:), 'RHOH_MP', 'diabatic heating rate in MP', 'J/m3/s', fill_halo=.true. )
1445  do iq = qs_mp, qe_mp
1446  call file_history_in( rhoq_t_mp(:,:,:,iq), trim(tracer_name(iq))//'_t_MP', &
1447  'tendency rho*'//trim(tracer_name(iq))//' in MP', 'kg/m3/s', fill_halo=.true. )
1448  enddo
1449 
1450  if ( flg_lt ) then
1451  call file_history_in( qsplt_in(:,:,:,1), 'QSPLT_G', 'Charge split of QG by Non-inductive process', 'fC/m3/s', fill_halo=.true. )
1452  call file_history_in( qsplt_in(:,:,:,2), 'QSPLT_I', 'Charge split of QI by Non-inductive process', 'fC/m3/s', fill_halo=.true. )
1453  call file_history_in( qsplt_in(:,:,:,3), 'QSPLT_S', 'Charge split of QS by Non-inductive process', 'fC/m3/s', fill_halo=.true. )
1454 
1455  do iq = qs_lt, qe_lt
1456  call file_history_in( rhoc_t_mp(:,:,:,iq), trim(tracer_name(iq))//'_t_MP', &
1457  'tendency rho*'//trim(tracer_name(iq))//' in MP', 'fC/m3/s', fill_halo=.true. )
1458  enddo
1459 
1460  end if
1461 
1462  endif
1463 
1464  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1465  !$omp shared(KS,KE,IS,IE,JS,JE, &
1466  !$omp DENS_t_MP,MOMZ_t_MP,RHOU_t_MP,RHOV_t_MP,RHOH_MP, &
1467  !$omp DENS_t,MOMZ_t,RHOU_t,RHOV_t,RHOH)
1468  !$acc parallel
1469  !$acc loop collapse(2)
1470  do j = js, je
1471  do i = is, ie
1472  do k = ks, ke
1473  dens_t(k,i,j) = dens_t(k,i,j) + dens_t_mp(k,i,j)
1474  momz_t(k,i,j) = momz_t(k,i,j) + momz_t_mp(k,i,j)
1475  rhou_t(k,i,j) = rhou_t(k,i,j) + rhou_t_mp(k,i,j)
1476  rhov_t(k,i,j) = rhov_t(k,i,j) + rhov_t_mp(k,i,j)
1477 ! RHOT_t(k,i,j) = RHOT_t(k,i,j) + RHOT_t_MP(k,i,j)
1478  rhoh(k,i,j) = rhoh(k,i,j) + rhoh_mp(k,i,j)
1479  enddo
1480  enddo
1481  enddo
1482  !$acc end parallel
1483 
1484  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(3) &
1485  !$omp private(iq,i,j,k) &
1486  !$omp shared(QS_MP,QE_MP,JS,JE,IS,IE,KS,KE,RHOQ_t,RHOQ_t_MP)
1487  !$acc parallel
1488  !$acc loop collapse(3)
1489  do iq = qs_mp, qe_mp
1490  do j = js, je
1491  do i = is, ie
1492  do k = ks, ke
1493  rhoq_t(k,i,j,iq) = rhoq_t(k,i,j,iq) + rhoq_t_mp(k,i,j,iq)
1494  enddo
1495  enddo
1496  enddo
1497  enddo
1498  !$acc end parallel
1499 
1500  if( flg_lt ) then
1501  !$omp parallel do collapse(3)
1502  !$acc parallel
1503  !$acc loop collapse(3)
1504  do iq = qs_lt, qe_lt
1505  do j = js, je
1506  do i = is, ie
1507  do k = ks, ke
1508  rhoq_t(k,i,j,iq) = rhoq_t(k,i,j,iq) &
1509  + rhoc_t_mp(k,i,j,iq)
1510  enddo
1511  enddo
1512  enddo
1513  enddo
1514  !$acc end parallel
1515  endif
1516 
1517  if ( statistics_checktotal ) then
1518  call statistics_total( ka, ks, ke, ia, is, ie, ja, js, je, &
1519  dens_t_mp(:,:,:), 'DENS_t_MP', &
1520  atmos_grid_cartesc_real_vol(:,:,:), &
1522  call statistics_total( ka, ks, ke, ia, is, ie, ja, js, je, &
1523  momz_t_mp(:,:,:), 'MOMZ_t_MP', &
1526  call statistics_total( ka, ks, ke, ia, is, ie, ja, js, je, &
1527  rhoh_mp(:,:,:), 'RHOH_MP', &
1528  atmos_grid_cartesc_real_vol(:,:,:), &
1530 ! call STATISTICS_total( KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1531 ! RHOT_t_MP(:,:,:), 'RHOT_t_MP', &
1532 ! ATMOS_GRID_CARTESC_REAL_VOL(:,:,:), &
1533 ! ATMOS_GRID_CARTESC_REAL_TOTVOL )
1534 
1535  do iq = qs_mp, qe_mp
1536  call statistics_total( ka, ks, ke, ia, is, ie, ja, js, je, &
1537  rhoq_t_mp(:,:,:,iq), trim(tracer_name(iq))//'_t_MP', &
1538  atmos_grid_cartesc_real_vol(:,:,:), &
1540  enddo
1541  endif
1542 
1543  !$acc end data
1544 
1545  return

References scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_cz, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fz, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvol, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolwxy, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolzuy, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolzxv, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_vol, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volwxy, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volzuy, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volzxv, mod_atmos_phy_ae_vars::atmos_phy_ae_ccn_t, mod_atmos_phy_lt_vars::atmos_phy_lt_sarea, scale_atmos_phy_lt_sato2019::atmos_phy_lt_sato2019_select_dqcrg_from_lut(), mod_atmos_phy_mp_vars::atmos_phy_mp_dens_t, scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_adjustment(), scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_terminal_velocity(), mod_atmos_phy_mp_vars::atmos_phy_mp_momz_t, scale_atmos_phy_mp_common::atmos_phy_mp_precipitation_momentum(), scale_atmos_phy_mp_common::atmos_phy_mp_precipitation_semilag(), scale_atmos_phy_mp_common::atmos_phy_mp_precipitation_upwind(), scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_tendency(), scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_terminal_velocity(), scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_crg_qtrc2qhyd(), scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_qtrc2qhyd(), scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tendency(), scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_terminal_velocity(), scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_adjustment(), scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_terminal_velocity(), mod_atmos_admin::atmos_phy_mp_type, mod_atmos_admin::atmos_phy_precip_type, scale_atmos_refstate::atmos_refstate_dens, mod_atmos_admin::atmos_sw_phy_lt, scale_const::const_pre00, mod_atmos_phy_lt_vars::d0_crg, mod_atmos_vars::dens, mod_atmos_vars::dens_av, mod_atmos_vars::dens_tp, mod_atmos_phy_lt_vars::flg_lt, scale_atmos_hydrometeor::i_qv, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::js, scale_tracer::k, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::kijmax, scale_atmos_grid_cartesc_index::ks, scale_atmos_hydrometeor::lhf, mod_atmos_vars::momz, mod_atmos_vars::momz_av, mod_atmos_vars::momz_tp, scale_atmos_hydrometeor::n_hyd, mod_atmos_vars::pott, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), mod_atmos_phy_lt_vars::qa_lt, mod_atmos_phy_lt_vars::qe_lt, mod_atmos_phy_mp_vars::qe_mp, scale_atmos_hydrometeor::qha, scale_atmos_hydrometeor::qhe, scale_atmos_hydrometeor::qhs, scale_atmos_hydrometeor::qia, scale_atmos_hydrometeor::qla, scale_atmos_hydrometeor::qle, scale_atmos_hydrometeor::qls, mod_atmos_phy_lt_vars::qs_lt, mod_atmos_phy_mp_vars::qs_mp, mod_atmos_vars::qtrc, mod_atmos_vars::qtrc_av, mod_atmos_vars::rhou_tp, mod_atmos_vars::rhov_tp, scale_statistics::statistics_checktotal, scale_time::time_dtsec_atmos_phy_lt, scale_time::time_dtsec_atmos_phy_mp, scale_tracer::tracer_name, mod_atmos_vars::u, mod_atmos_vars::v, mod_atmos_phy_lt_vars::v0_crg, and mod_atmos_vars::w.

Referenced by mod_atmos_driver::atmos_driver_calc_tendency().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_mp_driver_qhyd2qtrc()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver_qhyd2qtrc ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ka,ia,ja), intent(in)  QV,
real(rp), dimension(ka,ia,ja,n_hyd), intent(in)  QHYD,
real(rp), dimension(ka,ia,ja,qa_mp), intent(out)  QTRC,
real(rp), dimension(ka,ia,ja,n_hyd), intent(in), optional  QNUM 
)

Definition at line 1553 of file mod_atmos_phy_mp_driver.F90.

1553  use scale_prc, only: &
1554  prc_abort
1555  use scale_atmos_hydrometeor, only: &
1556  n_hyd
1557  use mod_atmos_phy_mp_vars, only: &
1558  qa_mp
1559  use mod_atmos_admin, only: &
1561  use scale_atmos_phy_mp_kessler, only: &
1563  use scale_atmos_phy_mp_tomita08, only: &
1565  use scale_atmos_phy_mp_sn14, only: &
1567  use scale_atmos_phy_mp_suzuki10, only: &
1569  integer, intent(in) :: KA, KS, KE
1570  integer, intent(in) :: IA, IS, IE
1571  integer, intent(in) :: JA, JS, JE
1572 
1573  real(RP), intent(in) :: QV (KA,IA,JA)
1574  real(RP), intent(in) :: QHYD(KA,IA,JA,N_HYD)
1575 
1576  real(RP), intent(out) :: QTRC(KA,IA,JA,QA_MP)
1577 
1578  real(RP), intent(in), optional :: QNUM(KA,IA,JA,N_HYD)
1579 
1580  integer :: k, i, j
1581 
1582  !$acc data copyin(QV, QHYD) copyout(QTRC)
1583  !$acc data copyin(QNUM) if(present(QNUM))
1584 
1585  select case( atmos_phy_mp_type )
1586  case ( "NONE" )
1587  if ( associated( atmos_phy_mp_user_qhyd2qtrc ) ) then
1588  call atmos_phy_mp_user_qhyd2qtrc( ka, ks, ke, ia, is, ie, ja, js, je, &
1589  qv(:,:,:), qhyd(:,:,:,:), & ! [IN]
1590  qtrc(:,:,:,:), & ! [OUT]
1591  qnum=qnum ) ! [IN]
1592  end if
1593  case ( "KESSLER" )
1594  !$omp parallel do OMP_SCHEDULE_
1595  do j = js, je
1596  do i = is, ie
1597  do k = ks, ke
1598  qtrc(k,i,j,1) = qv(k,i,j)
1599  end do
1600  end do
1601  end do
1602  !$acc update host(QHYD)
1603  call atmos_phy_mp_kessler_qhyd2qtrc( ka, ks, ke, ia, is, ie, ja, js, je, &
1604  qhyd(:,:,:,:), & ! [IN]
1605  qtrc(:,:,:,2:) ) ! [OUT]
1606  !$acc update device(QTRC(:,:,:,2:))
1607  case ( "TOMITA08" )
1608  !$omp parallel do OMP_SCHEDULE_
1609  !$acc kernels
1610  do j = js, je
1611  do i = is, ie
1612  do k = ks, ke
1613  qtrc(k,i,j,1) = qv(k,i,j)
1614  end do
1615  end do
1616  end do
1617  !$acc end kernels
1618  call atmos_phy_mp_tomita08_qhyd2qtrc( ka, ks, ke, ia, is, ie, ja, js, je, &
1619  qhyd(:,:,:,:), & ! [IN]
1620  qtrc(:,:,:,2:) ) ! [OUT]
1621  case ( "SN14" )
1622  !$omp parallel do OMP_SCHEDULE_
1623  do j = js, je
1624  do i = is, ie
1625  do k = ks, ke
1626  qtrc(k,i,j,1) = qv(k,i,j)
1627  end do
1628  end do
1629  end do
1630  !$acc update host(QHYD)
1631  call atmos_phy_mp_sn14_qhyd2qtrc( ka, ks, ke, ia, is, ie, ja, js, je, &
1632  qhyd(:,:,:,:), & ! [IN]
1633  qtrc(:,:,:,2:), & ! [OUT]
1634  qnum=qnum ) ! [IN]
1635  !$acc update device(QTRC(:,:,:,2:))
1636  !$acc update device(QNUM) if(present(QNUM))
1637  case ( "SUZUKI10" )
1638  !$omp parallel do OMP_SCHEDULE_
1639  do j = js, je
1640  do i = is, ie
1641  do k = ks, ke
1642  qtrc(k,i,j,1) = qv(k,i,j)
1643  end do
1644  end do
1645  end do
1646  !$acc update host(QHYD)
1647  call atmos_phy_mp_suzuki10_qhyd2qtrc( ka, ks, ke, ia, is, ie, ja, js, je, &
1648  qhyd(:,:,:,:), & ! [IN]
1649  qtrc(:,:,:,2:), & ! [OUT]
1650  qnum=qnum ) ! [IN]
1651  !$acc update device(QTRC(:,:,:,2:))
1652  !$acc update device(QNUM) if(present(QNUM))
1653  case default
1654  log_error("ATMOS_PHY_MP_driver_qhyd2qtrc",*) 'ATMOS_PHY_MP_TYPE (', trim(atmos_phy_mp_type), ') is not supported'
1655  call prc_abort
1656  end select
1657 
1658  !$acc end data
1659  !$acc end data
1660 
1661  return

References scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_qhyd2qtrc(), scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_qhyd2qtrc(), scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_qhyd2qtrc(), scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_qhyd2qtrc(), mod_atmos_admin::atmos_phy_mp_type, atmos_phy_mp_user_qhyd2qtrc, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::js, scale_tracer::k, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, scale_atmos_hydrometeor::n_hyd, scale_prc::prc_abort(), and mod_atmos_phy_mp_vars::qa_mp.

Referenced by mod_atmos_bnd_driver::atmos_boundary_driver_send(), mod_atmos_phy_cp_driver::atmos_phy_cp_driver_calc_tendency(), mod_da_driver::da_driver_update(), mod_mkinit::mkinit(), and mod_realinput::realinput_surface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_mp_driver_qhyd2qtrc_onlyqv()

subroutine, public mod_atmos_phy_mp_driver::atmos_phy_mp_driver_qhyd2qtrc_onlyqv ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ka,ia,ja), intent(in)  QV,
real(rp), dimension(ka,ia,ja,n_hyd), intent(in)  QHYD,
real(rp), dimension(ka,ia,ja,qa_mp), intent(out)  QTRC,
real(rp), dimension(ka,ia,ja,n_hyd), intent(in), optional  QNUM 
)

Definition at line 1669 of file mod_atmos_phy_mp_driver.F90.

1669  use scale_atmos_hydrometeor, only: &
1670  n_hyd
1671  use mod_atmos_phy_mp_vars, only: &
1672  qa_mp
1673  integer, intent(in) :: KA, KS, KE
1674  integer, intent(in) :: IA, IS, IE
1675  integer, intent(in) :: JA, JS, JE
1676 
1677  real(RP), intent(in) :: QV (KA,IA,JA)
1678  real(RP), intent(in) :: QHYD(KA,IA,JA,N_HYD)
1679 
1680  real(RP), intent(out) :: QTRC(KA,IA,JA,QA_MP)
1681 
1682  real(RP), intent(in), optional :: QNUM(KA,IA,JA,N_HYD)
1683 
1684  integer :: k, i, j
1685 
1686  !$omp parallel do
1687  !$acc kernels copyin(QV) copyout(QTRC(:,:,:,1))
1688  do j = js, je
1689  do i = is, ie
1690  do k = ks, ke
1691  qtrc(k,i,j,1) = qv(k,i,j)
1692  end do
1693  end do
1694  end do
1695  !$acc end kernels
1696 
1697  return

References scale_atmos_grid_cartesc_index::ie, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::js, scale_tracer::k, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, scale_atmos_hydrometeor::n_hyd, and mod_atmos_phy_mp_vars::qa_mp.

Referenced by mod_atmos_driver::atmos_driver_tracer_setup().

Here is the caller graph for this function:

Variable Documentation

◆ atmos_phy_mp_user_qhyd2qtrc

procedure(qhyd2qtrc), pointer, public mod_atmos_phy_mp_driver::atmos_phy_mp_user_qhyd2qtrc => NULL()

Definition at line 55 of file mod_atmos_phy_mp_driver.F90.

55  procedure(qhyd2qtrc), pointer :: ATMOS_PHY_MP_USER_qhyd2qtrc => null()

Referenced by mod_atmos_driver::atmos_driver_tracer_setup(), and atmos_phy_mp_driver_qhyd2qtrc().

mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_engi
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_engi
Definition: mod_atmos_phy_mp_vars.F90:76
mod_atmos_vars::momz_av
real(rp), dimension(:,:,:), pointer, public momz_av
Definition: mod_atmos_vars.F90:91
scale_statistics
module Statistics
Definition: scale_statistics.F90:11
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_terminal_velocity
subroutine, public atmos_phy_mp_kessler_terminal_velocity(KA, KS, KE, DENS0, RHOQ0, REFSTATE_dens_profile, vterm)
Kessler-type warm rain microphysics (terminal velocity)
Definition: scale_atmos_phy_mp_kessler.F90:356
mod_atmos_phy_mp_vars
module Atmosphere / Physics Cloud Microphysics
Definition: mod_atmos_phy_mp_vars.F90:12
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:349
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_qhyd2qtrc
subroutine, public atmos_phy_mp_tomita08_qhyd2qtrc(KA, KS, KE, IA, IS, IE, JA, JS, JE, Qe, QTRC)
get mass ratio of each category
Definition: scale_atmos_phy_mp_tomita08.F90:2944
scale_atmos_hydrometeor::qia
integer, public qia
Definition: scale_atmos_hydrometeor.F90:139
mod_atmos_phy_mp_vars::qa_mp
integer, public qa_mp
Definition: mod_atmos_phy_mp_vars.F90:78
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_ntracers
integer, parameter, public atmos_phy_mp_tomita08_ntracers
Definition: scale_atmos_phy_mp_tomita08.F90:46
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_tracer_names
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_sn14_tracer_names
Definition: scale_atmos_phy_mp_sn14.F90:115
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_terminal_velocity
subroutine, public atmos_phy_mp_tomita08_terminal_velocity(KA, KS, KE, DENS, TEMP, RHOQ, vterm)
Lin-type cold rain microphysics (terminal velocity)
Definition: scale_atmos_phy_mp_tomita08.F90:2257
scale_atmos_grid_cartesc::atmos_grid_cartesc_cdz
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdz
z-length of control volume [m]
Definition: scale_atmos_grid_cartesC.F90:43
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolzxv
real(rp), public atmos_grid_cartesc_real_totvolzxv
total volume (zxv, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:91
mod_atmos_admin::atmos_phy_precip_type
character(len=h_short), public atmos_phy_precip_type
Definition: mod_atmos_admin.F90:46
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_cz
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
Definition: scale_atmos_grid_cartesC_real.F90:39
mod_atmos_vars::pott
real(rp), dimension(:,:,:), allocatable, target, public pott
Definition: mod_atmos_vars.F90:133
scale_atmos_phy_mp_tomita08
module atmosphere / physics / microphysics / Tomita08
Definition: scale_atmos_phy_mp_tomita08.F90:13
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volwxy
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volwxy
control volume (wxy) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:85
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_adjustment
subroutine, public atmos_phy_mp_kessler_adjustment(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, PRES, dt, TEMP, QTRC, CPtot, CVtot, RHOE_t, EVAPORATE)
ATMOS_PHY_MP_kessler_adjustment calculate state after saturation process.
Definition: scale_atmos_phy_mp_kessler.F90:118
mod_atmos_vars::qtrc_av
real(rp), dimension(:,:,:,:), pointer, public qtrc_av
Definition: mod_atmos_vars.F90:95
scale_atmos_hydrometeor::qhs
integer, public qhs
Definition: scale_atmos_hydrometeor.F90:132
scale_atmos_refstate::atmos_refstate_dens
real(rp), dimension(:,:,:), allocatable, public atmos_refstate_dens
refernce density [kg/m3]
Definition: scale_atmos_refstate.F90:39
mod_atmos_phy_mp_vars::atmos_phy_mp_momz_t
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_momz_t
Definition: mod_atmos_phy_mp_vars.F90:65
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_nwaters
integer, parameter, public atmos_phy_mp_tomita08_nwaters
Definition: scale_atmos_phy_mp_tomita08.F90:47
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_ntracers
integer, parameter, public atmos_phy_mp_sn14_ntracers
Definition: scale_atmos_phy_mp_sn14.F90:112
mod_atmos_vars::rhov_tp
real(rp), dimension(:,:,:), allocatable, public rhov_tp
Definition: mod_atmos_vars.F90:118
mod_atmos_admin
module ATMOS admin
Definition: mod_atmos_admin.F90:11
scale_time::time_dtsec_atmos_phy_mp
real(dp), public time_dtsec_atmos_phy_mp
time interval of physics(microphysics) [sec]
Definition: scale_time.F90:38
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_qhyd2qtrc
subroutine, public atmos_phy_mp_sn14_qhyd2qtrc(KA, KS, KE, IA, IS, IE, JA, JS, JE, Qe, QTRC, QNUM)
Definition: scale_atmos_phy_mp_sn14.F90:1132
mod_atmos_phy_lt_vars
module Atmosphere / Physics Chemistry
Definition: mod_atmos_phy_lt_vars.F90:12
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_tracer_units
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_tomita08_tracer_units
Definition: scale_atmos_phy_mp_tomita08.F90:63
mod_atmos_phy_mp_vars::qs_mp
integer, public qs_mp
Definition: mod_atmos_phy_mp_vars.F90:79
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_finalize
subroutine, public atmos_phy_mp_tomita08_finalize
finalize
Definition: scale_atmos_phy_mp_tomita08.F90:656
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_crg_qtrc2qhyd
subroutine, public atmos_phy_mp_suzuki10_crg_qtrc2qhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC0, Qecrg)
get charge density ratio of each category
Definition: scale_atmos_phy_mp_suzuki10.F90:1991
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_qtrc2qhyd
subroutine, public atmos_phy_mp_suzuki10_qtrc2qhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC0, Qe)
Calculate mass ratio of each category.
Definition: scale_atmos_phy_mp_suzuki10.F90:1646
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tendency
subroutine, public atmos_phy_mp_suzuki10_tendency(KA, KS, KE, IA, IS, IE, JA, JS, JE, KIJMAX, dt, DENS, PRES, TEMP, QTRC, QDRY, CPtot, CVtot, CCN, RHOQ_t, RHOE_t, CPtot_t, CVtot_t, EVAPORATE, flg_lt, d0_crg, v0_crg, dqcrg, beta_crg, QTRC_crg, QSPLT_in, Sarea, RHOC_t_mp)
Cloud Microphysics.
Definition: scale_atmos_phy_mp_suzuki10.F90:954
mod_atmos_vars::cptot
real(rp), dimension(:,:,:), allocatable, target, public cptot
Definition: mod_atmos_vars.F90:143
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolwxy
real(rp), public atmos_grid_cartesc_real_totvolwxy
total volume (wxy, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:89
scale_const::const_eps
real(rp), public const_eps
small number
Definition: scale_const.F90:35
mod_atmos_admin::atmos_sw_phy_mp
logical, public atmos_sw_phy_mp
Definition: mod_atmos_admin.F90:52
scale_atmos_hydrometeor
module atmosphere / hydrometeor
Definition: scale_atmos_hydrometeor.F90:12
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_setup
subroutine, public atmos_phy_mp_tomita08_setup(KA, KS, KE, IA, IS, IE, JA, JS, JE, flg_lt)
ATMOS_PHY_MP_tomita08_setup Setup.
Definition: scale_atmos_phy_mp_tomita08.F90:399
scale_atmos_refstate
module atmosphere / reference state
Definition: scale_atmos_refstate.F90:12
mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_rain
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_rain
Definition: mod_atmos_phy_mp_vars.F90:74
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_tracer_names
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_kessler_tracer_names
Definition: scale_atmos_phy_mp_kessler.F90:47
scale_atmos_hydrometeor::atmos_hydrometeor_dry
logical, public atmos_hydrometeor_dry
Definition: scale_atmos_hydrometeor.F90:114
mod_atmos_phy_lt_vars::qe_lt
integer, public qe_lt
Definition: mod_atmos_phy_lt_vars.F90:61
mod_atmos_phy_lt_vars::atmos_phy_lt_sarea
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_lt_sarea
Definition: mod_atmos_phy_lt_vars.F90:57
mod_atmos_vars::rhot
real(rp), dimension(:,:,:), allocatable, target, public rhot
Definition: mod_atmos_vars.F90:80
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_adjustment
subroutine, public atmos_phy_mp_tomita08_adjustment(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, PRES, CCN, dt, TEMP, QTRC, CPtot, CVtot, RHOE_t, EVAPORATE, flg_lt, d0_crg, v0_crg, dqcrg, beta_crg, QSPLT_in, Sarea, QTRC_crg)
ATMOS_PHY_MP_tomita08_adjustment calculate state after saturation process.
Definition: scale_atmos_phy_mp_tomita08.F90:735
scale_atmos_grid_cartesc_real
module Atmosphere GRID CartesC Real(real space)
Definition: scale_atmos_grid_cartesC_real.F90:11
mod_atmos_vars::qtrc
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc
Definition: mod_atmos_vars.F90:81
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_terminal_velocity
subroutine, public atmos_phy_mp_suzuki10_terminal_velocity(KA, vterm_o)
get terminal velocity
Definition: scale_atmos_phy_mp_suzuki10.F90:1423
scale_file_history
module file_history
Definition: scale_file_history.F90:15
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volzuy
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzuy
control volume (zuy) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:86
scale_atmos_phy_mp_sn14
module ATMOSPHERE / Physics Cloud Microphysics
Definition: scale_atmos_phy_mp_sn14.F90:51
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_tracer_descriptions
character(len=h_mid), dimension(qa_mp), parameter, public atmos_phy_mp_sn14_tracer_descriptions
Definition: scale_atmos_phy_mp_sn14.F90:127
mod_atmos_phy_mp_vars::atmos_phy_mp_dens_t
real(rp), dimension(:,:,:), allocatable, public atmos_phy_mp_dens_t
Definition: mod_atmos_phy_mp_vars.F90:64
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_atmos_hydrometeor::qle
integer, public qle
Definition: scale_atmos_hydrometeor.F90:137
mod_atmos_vars::rhou_tp
real(rp), dimension(:,:,:), allocatable, public rhou_tp
Definition: mod_atmos_vars.F90:117
scale_atmos_phy_mp_common::atmos_phy_mp_negative_fixer
subroutine, public atmos_phy_mp_negative_fixer(KA, KS, KE, IA, IS, IE, JA, JS, JE, QLA, QIA, limit_negative, DENS, TEMP, CVtot, CPtot, QV, QTRC, RHOH, DENS_diff, ENGI_diff)
ATMOS_PHY_MP_negative_fixer negative fixer.
Definition: scale_atmos_phy_mp_common.F90:69
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_nwaters
integer, parameter, public atmos_phy_mp_kessler_nwaters
Definition: scale_atmos_phy_mp_kessler.F90:45
scale_atmos_phy_mp_common::atmos_phy_mp_precipitation_semilag
subroutine, public atmos_phy_mp_precipitation_semilag(KA, KS, KE, QHA, QLA, QIA, TEMP, vterm, FZ, FDZ, RCDZ, dt, i, j, DENS, RHOQ, CPtot, CVtot, RHOE, mflx, sflx, esflx)
Definition: scale_atmos_phy_mp_common.F90:641
mod_atmos_vars::dens
real(rp), dimension(:,:,:), allocatable, target, public dens
Definition: mod_atmos_vars.F90:76
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_ntracers
integer, parameter, public atmos_phy_mp_kessler_ntracers
Definition: scale_atmos_phy_mp_kessler.F90:44
scale_atmos_hydrometeor::qhe
integer, public qhe
Definition: scale_atmos_hydrometeor.F90:133
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volzxv
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzxv
control volume (zxv) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:87
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_vol
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:84
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_nwaters
integer, public atmos_phy_mp_suzuki10_nwaters
Definition: scale_atmos_phy_mp_suzuki10.F90:57
mod_atmos_phy_lt_vars::v0_crg
real(rp), parameter, public v0_crg
Definition: mod_atmos_phy_lt_vars.F90:64
mod_atmos_vars::momz
real(rp), dimension(:,:,:), allocatable, target, public momz
Definition: mod_atmos_vars.F90:77
mod_atmos_admin::atmos_sw_phy_lt
logical, public atmos_sw_phy_lt
Definition: mod_atmos_admin.F90:60
scale_atmos_phy_mp_common::atmos_phy_mp_precipitation_momentum
subroutine, public atmos_phy_mp_precipitation_momentum(KA, KS, KE, DENS, MOMZ, U, V, mflx, RCDZ, RFDZ, MOMZ_t, RHOU_t, RHOV_t)
Definition: scale_atmos_phy_mp_common.F90:852
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_terminal_velocity
subroutine, public atmos_phy_mp_sn14_terminal_velocity(KA, KS, KE, DENS, TEMP, RHOQ, PRES, vterm)
ATMOS_PHY_MP_sn14_terminal_velocity Calculate terminal velocity.
Definition: scale_atmos_phy_mp_sn14.F90:1364
scale_atmos_phy_mp_common
module ATMOSPHERE / Physics Cloud Microphysics - Common
Definition: scale_atmos_phy_mp_common.F90:13
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_qhyd2qtrc
subroutine, public atmos_phy_mp_suzuki10_qhyd2qtrc(KA, KS, KE, IA, IS, IE, JA, JS, JE, Qe, QTRC, QNUM)
get mass ratio of each category
Definition: scale_atmos_phy_mp_suzuki10.F90:1788
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tracer_units
character(len=h_short), dimension(:), allocatable, public atmos_phy_mp_suzuki10_tracer_units
Definition: scale_atmos_phy_mp_suzuki10.F90:65
mod_atmos_vars::v
real(rp), dimension(:,:,:), allocatable, target, public v
Definition: mod_atmos_vars.F90:131
mod_atmos_vars::w
real(rp), dimension(:,:,:), allocatable, target, public w
Definition: mod_atmos_vars.F90:129
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_finalize
subroutine, public atmos_phy_mp_sn14_finalize
finalize
Definition: scale_atmos_phy_mp_sn14.F90:773
mod_atmos_vars::momz_tp
real(rp), dimension(:,:,:), allocatable, public momz_tp
Definition: mod_atmos_vars.F90:116
scale_atmos_phy_mp_common::atmos_phy_mp_precipitation_upwind
subroutine, public atmos_phy_mp_precipitation_upwind(KA, KS, KE, QHA, QLA, QIA, TEMP, vterm, FDZ, RCDZ, dt, i, j, DENS, RHOQ, CPtot, CVtot, RHOE, mflx, sflx, esflx)
Definition: scale_atmos_phy_mp_common.F90:451
scale_atmos_phy_mp_suzuki10
module Spectran Bin Microphysics
Definition: scale_atmos_phy_mp_suzuki10.F90:23
mod_atmos_vars::temp
real(rp), dimension(:,:,:), allocatable, target, public temp
Definition: mod_atmos_vars.F90:134
scale_monitor::monitor_reg
subroutine, public monitor_reg(name, desc, unit, itemid, ndims, dim_type, is_tendency)
Search existing item, or matching check between requested and registered item.
Definition: scale_monitor.F90:243
mod_atmos_vars::dens_tp
real(rp), dimension(:,:,:), allocatable, public dens_tp
Definition: mod_atmos_vars.F90:115
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_tracer_names
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_tomita08_tracer_names
Definition: scale_atmos_phy_mp_tomita08.F90:49
scale_atmos_hydrometeor::qha
integer, public qha
Definition: scale_atmos_hydrometeor.F90:131
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolzuy
real(rp), public atmos_grid_cartesc_real_totvolzuy
total volume (zuy, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:90
scale_atmos_phy_mp_kessler
module atmosphere / physics / microphysics / Kessler
Definition: scale_atmos_phy_mp_kessler.F90:14
scale_time
module TIME
Definition: scale_time.F90:11
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tracer_descriptions
character(len=h_mid), dimension(:), allocatable, public atmos_phy_mp_suzuki10_tracer_descriptions
Definition: scale_atmos_phy_mp_suzuki10.F90:64
scale_tracer::tracer_regist
subroutine, public tracer_regist(QS, NQ, NAME, DESC, UNIT, CV, CP, R, ENGI0, ADVC, MASS)
Regist tracer.
Definition: scale_tracer.F90:68
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_tracer_descriptions
character(len=h_mid), dimension(qa_mp), parameter, public atmos_phy_mp_kessler_tracer_descriptions
Definition: scale_atmos_phy_mp_kessler.F90:51
scale_tracer
module TRACER
Definition: scale_tracer.F90:12
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_tendency
subroutine, public atmos_phy_mp_sn14_tendency(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, W, QTRC, PRES, TEMP, Qdry, CPtot, CVtot, CCN, dt, cz, fz, RHOQ_t, RHOE_t, CPtot_t, CVtot_t, EVAPORATE, flg_lt, d0_crg, v0_crg, dqcrg, beta_crg, QTRC_crg, QSPLT_in, Sarea, RHOQcrg_t)
ATMOS_PHY_MP_sn14_tendency calculate tendency.
Definition: scale_atmos_phy_mp_sn14.F90:809
scale_atmos_hydrometeor::i_qv
integer, public i_qv
Definition: scale_atmos_hydrometeor.F90:93
mod_atmos_phy_lt_vars::qa_lt
integer, public qa_lt
Definition: mod_atmos_phy_lt_vars.F90:59
mod_atmos_phy_lt_vars::d0_crg
real(rp), parameter, public d0_crg
Definition: mod_atmos_phy_lt_vars.F90:63
mod_atmos_vars::dens_av
real(rp), dimension(:,:,:), pointer, public dens_av
Definition: mod_atmos_vars.F90:90
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_qhyd2qtrc
subroutine, public atmos_phy_mp_kessler_qhyd2qtrc(KA, KS, KE, IA, IS, IE, JA, JS, JE, Qe, QTRC)
Calculate mass ratio of each category.
Definition: scale_atmos_phy_mp_kessler.F90:489
mod_atmos_vars::u
real(rp), dimension(:,:,:), allocatable, target, public u
Definition: mod_atmos_vars.F90:130
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tracer_setup
subroutine, public atmos_phy_mp_suzuki10_tracer_setup
Config.
Definition: scale_atmos_phy_mp_suzuki10.F90:300
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_ntracers
integer, public atmos_phy_mp_suzuki10_ntracers
Definition: scale_atmos_phy_mp_suzuki10.F90:56
scale_statistics::statistics_checktotal
logical, public statistics_checktotal
calc&report variable totals to logfile?
Definition: scale_statistics.F90:109
scale_time::time_dtsec
real(dp), public time_dtsec
time interval of model [sec]
Definition: scale_time.F90:33
mod_atmos_vars
module ATMOSPHERIC Variables
Definition: mod_atmos_vars.F90:12
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_tracer_names
character(len=h_short), dimension(:), allocatable, public atmos_phy_mp_suzuki10_tracer_names
Definition: scale_atmos_phy_mp_suzuki10.F90:63
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_nices
integer, parameter, public atmos_phy_mp_kessler_nices
Definition: scale_atmos_phy_mp_kessler.F90:46
mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_snow
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_snow
Definition: mod_atmos_phy_mp_vars.F90:75
mod_atmos_phy_lt_vars::flg_lt
logical, public flg_lt
Definition: mod_atmos_phy_lt_vars.F90:65
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_nices
integer, parameter, public atmos_phy_mp_sn14_nices
Definition: scale_atmos_phy_mp_sn14.F90:114
scale_atmos_hydrometeor::lhf
real(rp), public lhf
latent heat of fusion for use [J/kg]
Definition: scale_atmos_hydrometeor.F90:146
scale_atmos_hydrometeor::atmos_hydrometeor_regist
subroutine, public atmos_hydrometeor_regist(NL, NI, NAME, DESC, UNIT, Q0, ADVC)
ATMOS_HYDROMETEOR_regist Regist tracer.
Definition: scale_atmos_hydrometeor.F90:279
mod_atmos_phy_ae_vars
module ATMOSPHERE / Physics Aerosol Microphysics
Definition: mod_atmos_phy_ae_vars.F90:12
scale_atmos_phy_lt_sato2019
module atmosphere / physics / lightninh / SATO2019
Definition: scale_atmos_phy_lt_sato2019.F90:27
mod_atmos_admin::atmos_phy_mp_type
character(len=h_short), public atmos_phy_mp_type
Definition: mod_atmos_admin.F90:36
scale_file_history::file_history_reg
subroutine, public file_history_reg(name, desc, unit, itemid, standard_name, ndims, dim_type, cell_measures, fill_halo)
Register/Append variable to history file.
Definition: scale_file_history.F90:685
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_nwaters
integer, parameter, public atmos_phy_mp_sn14_nwaters
Definition: scale_atmos_phy_mp_sn14.F90:113
mod_atmos_phy_mp_vars::qe_mp
integer, public qe_mp
Definition: mod_atmos_phy_mp_vars.F90:80
mod_atmos_phy_mp_vars::atmos_phy_mp_cldfrac_thleshold
real(rp), public atmos_phy_mp_cldfrac_thleshold
Definition: mod_atmos_phy_mp_vars.F90:62
scale_time::time_dtsec_atmos_phy_lt
real(dp), public time_dtsec_atmos_phy_lt
time interval of physics(lightning ) [sec]
Definition: scale_time.F90:45
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_tracer_units
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_sn14_tracer_units
Definition: scale_atmos_phy_mp_sn14.F90:139
mod_atmos_phy_ae_vars::atmos_phy_ae_ccn_t
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ae_ccn_t
Definition: mod_atmos_phy_ae_vars.F90:64
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fz
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
Definition: scale_atmos_grid_cartesC_real.F90:43
scale_atmos_phy_lt_sato2019::atmos_phy_lt_sato2019_select_dqcrg_from_lut
subroutine, public atmos_phy_lt_sato2019_select_dqcrg_from_lut(KA, KS, KE, IA, IS, IE, JA, JS, JE, NLIQ, TEMP, DENS, QLIQ, dqcrg, beta_crg)
Select cwc-temp point on LUT.
Definition: scale_atmos_phy_lt_sato2019.F90:3849
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvol
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:88
scale_atmos_grid_cartesc
module atmosphere / grid / cartesC
Definition: scale_atmos_grid_cartesC.F90:12
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_nices
integer, parameter, public atmos_phy_mp_tomita08_nices
Definition: scale_atmos_phy_mp_tomita08.F90:48
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_finalize
subroutine, public atmos_phy_mp_suzuki10_finalize
finalize
Definition: scale_atmos_phy_mp_suzuki10.F90:895
scale_atmos_hydrometeor::qla
integer, public qla
Definition: scale_atmos_hydrometeor.F90:135
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_setup
subroutine, public atmos_phy_mp_suzuki10_setup(KA, IA, JA, flg_lt)
Setup.
Definition: scale_atmos_phy_mp_suzuki10.F90:394
scale_atmos_hydrometeor::qls
integer, public qls
Definition: scale_atmos_hydrometeor.F90:136
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_nices
integer, public atmos_phy_mp_suzuki10_nices
Definition: scale_atmos_phy_mp_suzuki10.F90:58
scale_atmos_phy_mp_sn14::atmos_phy_mp_sn14_setup
subroutine, public atmos_phy_mp_sn14_setup(KA, IA, JA)
ATMOS_PHY_MP_sn14_setup setup.
Definition: scale_atmos_phy_mp_sn14.F90:716
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_setup
subroutine, public atmos_phy_mp_kessler_setup
ATMOS_PHY_MP_kessler_setup Setup.
Definition: scale_atmos_phy_mp_kessler.F90:90
scale_const::const_pre00
real(rp), public const_pre00
pressure reference [Pa]
Definition: scale_const.F90:97
scale_atmos_hydrometeor::n_hyd
integer, parameter, public n_hyd
Definition: scale_atmos_hydrometeor.F90:95
scale_atmos_phy_mp_suzuki10::atmos_phy_mp_suzuki10_nccn
integer, public atmos_phy_mp_suzuki10_nccn
Definition: scale_atmos_phy_mp_suzuki10.F90:59
mod_atmos_vars::cvtot
real(rp), dimension(:,:,:), allocatable, target, public cvtot
Definition: mod_atmos_vars.F90:142
scale_atmos_phy_mp_kessler::atmos_phy_mp_kessler_tracer_units
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_kessler_tracer_units
Definition: scale_atmos_phy_mp_kessler.F90:55
scale_atmos_phy_mp_tomita08::atmos_phy_mp_tomita08_tracer_descriptions
character(len=h_mid), dimension(qa_mp), parameter, public atmos_phy_mp_tomita08_tracer_descriptions
Definition: scale_atmos_phy_mp_tomita08.F90:56
mod_atmos_phy_lt_vars::qs_lt
integer, public qs_lt
Definition: mod_atmos_phy_lt_vars.F90:60
scale_monitor
module MONITOR
Definition: scale_monitor.F90:12