SCALE-RM
scale_atmos_phy_ch_rn222.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 !-------------------------------------------------------------------------------
11 #include "scalelib.h"
13  !-----------------------------------------------------------------------------
14  !
15  !++ used modules
16  !
17  use scale_precision
18  use scale_io
19  use scale_prof
20  !-----------------------------------------------------------------------------
21  implicit none
22  private
23  !-----------------------------------------------------------------------------
24  !
25  !++ Public procedure
26  !
27  public :: atmos_phy_ch_rn222_setup
29 
30  !-----------------------------------------------------------------------------
31  !
32  !++ Public parameters & variables
33  !
34  integer, private, parameter :: QA_CH = 1
35 
36  integer, public :: atmos_phy_ch_rn222_ntracers = qa_ch
37 
38  character(len=H_SHORT), public :: atmos_phy_ch_rn222_name(qa_ch) = (/ "RN222" /)
39  character(len=H_MID) , public :: atmos_phy_ch_rn222_desc(qa_ch) = (/ "Ratio of Rn222 to total mass" /)
40  character(len=H_SHORT), public :: atmos_phy_ch_rn222_unit(qa_ch) = (/ "Bq/kg" /)
41 
42  !-----------------------------------------------------------------------------
43  !
44  !++ Private procedure
45  !
46  !-----------------------------------------------------------------------------
47  !
48  !++ Private parameters & variables
49  !
50  integer, private, parameter :: i_ch_rn222 = 1
51 
52  real(rp), private :: atmos_phy_ch_rn222_decay_ratio ! Decay constant [/s]
53 
54  !-----------------------------------------------------------------------------
55 contains
56  !-----------------------------------------------------------------------------
58  subroutine atmos_phy_ch_rn222_setup
59  use scale_prc, only: &
60  prc_abort
61  implicit none
62 
63  real(rp) :: atmos_phy_ch_rn222_half_life = 3.30048e+5_rp
64 
65  namelist / param_atmos_phy_ch_rn222 / &
66  atmos_phy_ch_rn222_half_life
67 
68  integer :: ierr
69  !---------------------------------------------------------------------------
70 
71  log_newline
72  log_info("ATMOS_PHY_CH_rn222_setup",*) 'Setup'
73  log_info("ATMOS_PHY_CH_rn222_setup",*) 'rn222 process'
74 
75  !--- read namelist
76  rewind(io_fid_conf)
77  read(io_fid_conf,nml=param_atmos_phy_ch_rn222,iostat=ierr)
78  if( ierr < 0 ) then !--- missing
79  log_info("ATMOS_PHY_CH_rn222_setup",*) 'Not found namelist. Default used.'
80  elseif( ierr > 0 ) then !--- fatal error
81  log_error("ATMOS_PHY_CH_rn222_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_CH_RN222. Check!'
82  call prc_abort
83  endif
84  log_nml(param_atmos_phy_ch_rn222)
85 
86  atmos_phy_ch_rn222_decay_ratio = log(2.0_rp) / atmos_phy_ch_rn222_half_life
87 
88  log_newline
89  log_info("ATMOS_PHY_CH_rn222_setup",*) 'Characteristics of Rn222'
90  log_info_cont('(A,E16.6)') 'Half life [s] : ', atmos_phy_ch_rn222_half_life
91  log_info_cont('(A,E16.6)') 'Decay ratio [1/s] : ', atmos_phy_ch_rn222_decay_ratio
92 
93  return
94  end subroutine atmos_phy_ch_rn222_setup
95 
96  !-----------------------------------------------------------------------------
98  subroutine atmos_phy_ch_rn222_tendency( &
99  KA, KS, KE, &
100  IA, IS, IE, &
101  JA, JS, JE, &
102  QA_CH, &
103  DENS, &
104  QTRC, &
105  RHOQ_t )
106  implicit none
107 
108  integer, intent(in) :: ka, ks, ke
109  integer, intent(in) :: ia, is, ie
110  integer, intent(in) :: ja, js, je
111  integer, intent(in) :: qa_ch
112  real(rp), intent(in) :: dens (ka,ia,ja)
113  real(rp), intent(in) :: qtrc (ka,ia,ja,qa_ch)
114  real(rp), intent(inout) :: rhoq_t(ka,ia,ja,qa_ch)
115 
116  integer :: k, i, j
117  !---------------------------------------------------------------------------
118 
119  log_progress(*) 'atmosphere / physics / chemistry / Rn222'
120 
121  !--- Decay based on half life
122  do j = js, je
123  do i = is, ie
124  do k = ks, ke
125  rhoq_t(k,i,j,i_ch_rn222) = rhoq_t(k,i,j,i_ch_rn222) &
126  - dens(k,i,j) * qtrc(k,i,j,1) * atmos_phy_ch_rn222_decay_ratio ! [Bq/m3/s]
127  enddo
128  enddo
129  enddo
130 
131  return
132  end subroutine atmos_phy_ch_rn222_tendency
133 
134 end module scale_atmos_phy_ch_rn222
scale_atmos_grid_cartesc_index::ke
integer, public ke
end point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:52
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_atmos_grid_cartesc_index::ka
integer, public ka
Definition: scale_atmos_grid_cartesC_index.F90:47
scale_atmos_phy_ch_rn222::atmos_phy_ch_rn222_unit
character(len=h_short), dimension(qa_ch), public atmos_phy_ch_rn222_unit
Definition: scale_atmos_phy_ch_rn222.F90:40
scale_atmos_phy_ch_rn222::atmos_phy_ch_rn222_desc
character(len=h_mid), dimension(qa_ch), public atmos_phy_ch_rn222_desc
Definition: scale_atmos_phy_ch_rn222.F90:39
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
scale_atmos_grid_cartesc_index::ie
integer, public ie
end point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:54
scale_io
module STDIO
Definition: scale_io.F90:10
scale_atmos_phy_ch_rn222::atmos_phy_ch_rn222_name
character(len=h_short), dimension(qa_ch), public atmos_phy_ch_rn222_name
Definition: scale_atmos_phy_ch_rn222.F90:38
scale_tracer::k
real(rp), public k
Definition: scale_tracer.F90:45
scale_atmos_grid_cartesc_index::ia
integer, public ia
Definition: scale_atmos_grid_cartesC_index.F90:48
scale_atmos_phy_ch_rn222::atmos_phy_ch_rn222_tendency
subroutine, public atmos_phy_ch_rn222_tendency(KA, KS, KE, IA, IS, IE, JA, JS, JE, QA_CH, DENS, QTRC, RHOQ_t)
Chemistry Microphysics.
Definition: scale_atmos_phy_ch_rn222.F90:106
scale_atmos_phy_ch_rn222::atmos_phy_ch_rn222_ntracers
integer, public atmos_phy_ch_rn222_ntracers
Definition: scale_atmos_phy_ch_rn222.F90:36
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_atmos_grid_cartesc_index::is
integer, public is
start point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:53
scale_atmos_phy_ch_rn222::atmos_phy_ch_rn222_setup
subroutine, public atmos_phy_ch_rn222_setup
Setup.
Definition: scale_atmos_phy_ch_rn222.F90:59
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
scale_atmos_grid_cartesc_index::ks
integer, public ks
start point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:51
scale_atmos_phy_ch_rn222
module atmosphere / physics / chemistry / RN222
Definition: scale_atmos_phy_ch_rn222.F90:12
scale_atmos_grid_cartesc_index::js
integer, public js
start point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:55
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57
scale_atmos_grid_cartesc_index::je
integer, public je
end point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:56