SCALE-RM
Functions/Subroutines | Variables
scale_tracer Module Reference

module TRACER More...

Functions/Subroutines

subroutine, public tracer_regist (QS, NQ, NAME, DESC, UNIT, CV, CP, R, ADVC, MASS)
 Regist tracer. More...
 

Variables

integer, public qa = 0
 
real(rp), dimension(qa_max), public tracer_cp
 
real(rp), dimension(qa_max), public tracer_cv
 
real(rp), dimension(qa_max), public tracer_r
 
real(rp), dimension(qa_max), public tracer_mass
 
logical, dimension(qa_max), public tracer_advc
 
character(len=h_short), dimension(qa_max), public tracer_name
 
character(len=h_mid), dimension(qa_max), public tracer_desc
 
character(len=h_short), dimension(qa_max), public tracer_unit
 

Detailed Description

module TRACER

Description
Tracer module
Author
Team SCALE
History
  • 2013-12-04 (S.Nishizawa) [new]
  • 2016-08-02 (S.Nishizawa) [mod] add register

Function/Subroutine Documentation

◆ tracer_regist()

subroutine, public scale_tracer::tracer_regist ( integer, intent(out)  QS,
integer, intent(in)  NQ,
character(len=*), dimension(nq), intent(in)  NAME,
character(len=*), dimension(nq), intent(in)  DESC,
character(len=*), dimension(nq), intent(in)  UNIT,
real(rp), dimension (nq), intent(in), optional  CV,
real(rp), dimension (nq), intent(in), optional  CP,
real(rp), dimension (nq), intent(in), optional  R,
logical, dimension(nq), intent(in), optional  ADVC,
logical, dimension(nq), intent(in), optional  MASS 
)

Regist tracer.

Parameters
[in]advcif .true., the tracer is advected in the dynamical process. (default is .true.)
[in]massif .true., the tracer has mass. (default is .false.)

Definition at line 66 of file scale_tracer.F90.

References scale_prc::prc_abort(), qa, tracer_advc, tracer_cp, tracer_cv, tracer_desc, tracer_mass, tracer_name, tracer_r, and tracer_unit.

Referenced by scale_atmos_hydrometeor::atmos_hydrometeor_regist(), mod_atmos_phy_ae_driver::atmos_phy_ae_driver_tracer_setup(), mod_atmos_phy_bl_driver::atmos_phy_bl_driver_tracer_setup(), mod_atmos_phy_ch_driver::atmos_phy_ch_driver_tracer_setup(), mod_atmos_phy_mp_driver::atmos_phy_mp_driver_tracer_setup(), scale_atmos_phy_tb_d1980::atmos_phy_tb_d1980_config(), and mod_user::user_tracer_setup().

66  use scale_prc, only: &
67  prc_abort
68  implicit none
69 
70  integer, intent(out) :: qs
71  integer, intent(in) :: nq
72  character(len=*), intent(in) :: name(nq)
73  character(len=*), intent(in) :: desc(nq)
74  character(len=*), intent(in) :: unit(nq)
75  real(RP), intent(in), optional :: cv (nq)
76  real(RP), intent(in), optional :: cp (nq)
77  real(RP), intent(in), optional :: r (nq)
78  logical, intent(in), optional :: advc(nq)
79  logical, intent(in), optional :: mass(nq)
80 
81  real(RP) :: cv_ (nq)
82  real(RP) :: cp_ (nq)
83  real(RP) :: r_ (nq)
84  logical :: advc_(nq)
85  logical :: mass_(nq)
86 
87  character(len=24) :: name_trim
88 
89  integer :: n
90  !---------------------------------------------------------------------------
91 
92  if ( qa + nq > qa_max ) then
93  log_error("TRACER_regist",*) 'total number of tracer must be less or equal to ', qa_max
94  call prc_abort
95  end if
96 
97  if ( present(cv) ) then
98  cv_(:) = cv(:)
99  else
100  cv_(:) = 0.0_rp
101  end if
102 
103  if ( present(cp) ) then
104  cp_(:) = cp(:)
105  else
106  cp_(:) = 0.0_rp
107  end if
108 
109  if ( present(r) ) then
110  r_(:) = r(:)
111  else
112  r_(:) = 0.0_rp
113  end if
114 
115  if ( present(advc) ) then
116  advc_(:) = advc(:)
117  else
118  advc_(:) = .true.
119  end if
120 
121  if ( present(mass) ) then
122  mass_(:) = mass(:)
123  else
124  mass_(:) = .false.
125  end if
126 
127  log_newline
128  do n = 1, nq
129 
130  name_trim = trim(name(n))
131 
132  log_info("TRACER_regist",'(1x,A,I3,A,A,A,F6.1,A,F6.1,A,L1,A,L1)') &
133  '] Register tracer : No.', qa+n, &
134  ', NAME = ', name_trim, &
135  ', CV = ', cv_(n), &
136  ', CP = ', cp_(n), &
137  ', ADVC = ', advc_(n), &
138  ', MASS = ', mass_(n)
139 
140  tracer_name(qa+n) = name(n)
141  tracer_desc(qa+n) = desc(n)
142  tracer_unit(qa+n) = unit(n)
143  tracer_cv(qa+n) = cv_(n)
144  tracer_cp(qa+n) = cp_(n)
145  tracer_r(qa+n) = r_(n)
146  tracer_advc(qa+n) = advc_(n)
147 
148  if ( mass_(n) ) then
149  tracer_mass(qa+n) = 1.0_rp
150  else
151  tracer_mass(qa+n) = 0.0_rp
152  end if
153  end do
154 
155  qs = qa + 1
156  qa = qa + nq
157 
158  return
real(rp), dimension(qa_max), public tracer_r
integer, public qa
logical, dimension(qa_max), public tracer_advc
character(len=h_short), dimension(qa_max), public tracer_name
real(rp), dimension(qa_max), public tracer_cv
character(len=h_short), dimension(qa_max), public tracer_unit
real(rp), dimension(qa_max), public tracer_cp
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
character(len=h_mid), dimension(qa_max), public tracer_desc
real(rp), dimension(qa_max), public tracer_mass
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ qa

integer, public scale_tracer::qa = 0

Definition at line 37 of file scale_tracer.F90.

Referenced by mod_atmos_bnd_driver::atmos_boundary_driver_update(), scale_atmos_dyn::atmos_dyn(), mod_atmos_dyn_driver::atmos_dyn_driver(), scale_atmos_dyn::atmos_dyn_setup(), scale_atmos_dyn_tstep_large_fvm_heve::atmos_dyn_tstep_large_fvm_heve(), scale_atmos_dyn_tstep_large_fvm_heve::atmos_dyn_tstep_large_fvm_heve_setup(), mod_atmos_phy_ae_vars::atmos_phy_ae_vars_get_diagnostic(), mod_atmos_phy_ae_vars::atmos_phy_ae_vars_history(), mod_atmos_phy_bl_driver::atmos_phy_bl_driver_calc_tendency(), mod_atmos_phy_bl_vars::atmos_phy_bl_vars_setup(), mod_atmos_phy_sf_driver::atmos_phy_sf_driver_calc_tendency(), mod_atmos_phy_sf_vars::atmos_phy_sf_vars_setup(), scale_atmos_phy_tb_d1980::atmos_phy_tb_d1980(), scale_atmos_phy_tb_dns::atmos_phy_tb_dns(), mod_atmos_phy_tb_driver::atmos_phy_tb_driver_calc_tendency(), scale_atmos_phy_tb_smg::atmos_phy_tb_smg(), mod_atmos_phy_tb_vars::atmos_phy_tb_vars_setup(), mod_atmos_vars::atmos_vars_calc_diagnostics(), mod_atmos_vars::atmos_vars_fillhalo(), mod_atmos_vars::atmos_vars_get_diagnostic_3d(), mod_atmos_vars::atmos_vars_history(), mod_atmos_vars::atmos_vars_monitor(), mod_atmos_vars::atmos_vars_restart_check(), mod_atmos_vars::atmos_vars_restart_create(), mod_atmos_vars::atmos_vars_restart_def_var(), mod_atmos_vars::atmos_vars_restart_read(), mod_atmos_vars::atmos_vars_restart_write(), mod_atmos_vars::atmos_vars_setup(), mod_atmos_vars::atmos_vars_total(), scale_comm_cartesc::comm_setup(), mod_cpl_vars::cpl_getsfc_atm(), mod_cpl_vars::cpl_vars_setup(), mod_atmos_phy_sf_driver::history_output(), mod_land_driver::land_driver_calc_tendency(), mod_land_vars::land_vars_setup(), mod_ocean_driver::ocean_driver_calc_tendency(), mod_ocean_vars::ocean_vars_setup(), mod_realinput_scale::parentatmosinputscale(), mod_realinput::realinput_atmos(), mod_realinput::realinput_surface(), tracer_regist(), mod_urban_driver::urban_driver_calc_tendency(), and mod_urban_vars::urban_vars_setup().

37  integer, public :: qa = 0
integer, public qa

◆ tracer_cp

real(rp), dimension (qa_max), public scale_tracer::tracer_cp

◆ tracer_cv

real(rp), dimension (qa_max), public scale_tracer::tracer_cv

◆ tracer_r

real(rp), dimension (qa_max), public scale_tracer::tracer_r

◆ tracer_mass

real(rp), dimension(qa_max), public scale_tracer::tracer_mass

◆ tracer_advc

logical, dimension(qa_max), public scale_tracer::tracer_advc

◆ tracer_name

character(len=h_short), dimension(qa_max), public scale_tracer::tracer_name

◆ tracer_desc

character(len=h_mid), dimension(qa_max), public scale_tracer::tracer_desc

Definition at line 47 of file scale_tracer.F90.

Referenced by mod_atmos_vars::atmos_vars_restart_def_var(), mod_atmos_vars::atmos_vars_setup(), and tracer_regist().

47  character(len=H_MID), public :: tracer_desc(qa_max)
character(len=h_mid), dimension(qa_max), public tracer_desc

◆ tracer_unit

character(len=h_short), dimension(qa_max), public scale_tracer::tracer_unit

Definition at line 48 of file scale_tracer.F90.

Referenced by mod_atmos_bnd_driver::atmos_boundary_driver_set(), mod_atmos_vars::atmos_vars_restart_def_var(), mod_atmos_vars::atmos_vars_setup(), and tracer_regist().

48  character(len=H_SHORT), public :: tracer_unit(qa_max)
character(len=h_short), dimension(qa_max), public tracer_unit