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
subroutine, public atmos_phy_ch_rn222_tendency(KA, KS, KE, IA, IS, IE, JA, JS, JE, QA_CH, DENS, QTRC, RHOQ_t)
Chemistry Microphysics.
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
module PROCESS
Definition: scale_prc.F90:11
character(len=h_mid), dimension(qa_ch), public atmos_phy_ch_rn222_desc
subroutine, public atmos_phy_ch_rn222_setup
Setup.
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
module atmosphere / physics / chemistry / RN222
module profiler
Definition: scale_prof.F90:11
module PRECISION
character(len=h_short), dimension(qa_ch), public atmos_phy_ch_rn222_unit
module STDIO
Definition: scale_io.F90:10
character(len=h_short), dimension(qa_ch), public atmos_phy_ch_rn222_name