SCALE-RM
mod_atmos_phy_ch_driver.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
12 !-------------------------------------------------------------------------------
13 #include "inc_openmp.h"
15  !-----------------------------------------------------------------------------
16  !
17  !++ used modules
18  !
19  use scale_precision
20  use scale_stdio
21  use scale_prof
23  use scale_tracer
24  !-----------------------------------------------------------------------------
25  implicit none
26  private
27  !-----------------------------------------------------------------------------
28  !
29  !++ Public procedure
30  !
33  public :: atmos_phy_ch_driver
34 
35  !-----------------------------------------------------------------------------
36  !
37  !++ Public parameters & variables
38  !
39  !-----------------------------------------------------------------------------
40  !
41  !++ Private procedure
42  !
43  !-----------------------------------------------------------------------------
44  !
45  !++ Private parameters & variables
46  !
47  !-----------------------------------------------------------------------------
48 contains
49  !-----------------------------------------------------------------------------
51  subroutine atmos_phy_ch_driver_setup
52 ! use scale_atmos_phy_ch, only: &
53 ! ATMOS_PHY_CH_setup
54  use mod_atmos_admin, only: &
57  implicit none
58  !---------------------------------------------------------------------------
59 
60  if( io_l ) write(io_fid_log,*)
61  if( io_l ) write(io_fid_log,*) '++++++ Module[DRIVER] / Categ[ATMOS PHY_CH] / Origin[SCALE-RM]'
62 
63  if ( atmos_sw_phy_ch ) then
64 
65  ! setup library component
66  !call ATMOS_PHY_CH_setup( ATMOS_PHY_CH_TYPE )
67 
68  else
69  if( io_l ) write(io_fid_log,*) '*** this component is never called.'
70  endif
71 
72  return
73  end subroutine atmos_phy_ch_driver_setup
74 
75  !-----------------------------------------------------------------------------
78  use mod_atmos_admin, only: &
80  implicit none
81 
82  if ( atmos_sw_phy_ch ) then
83 
84  ! run once (only for the diagnostic value)
85  call prof_rapstart('ATM_Chemistry', 1)
86  call atmos_phy_ch_driver( update_flag = .true. )
87  call prof_rapend ('ATM_Chemistry', 1)
88 
89  end if
90 
91  return
92  end subroutine atmos_phy_ch_driver_resume
93 
94  !-----------------------------------------------------------------------------
96  subroutine atmos_phy_ch_driver( update_flag )
97 ! use scale_time, only: &
98 ! dt_CH => TIME_DTSEC_ATMOS_PHY_CH
99  use scale_rm_statistics, only: &
101  stat_total
102  use scale_history, only: &
103  hist_in
104 ! use scale_atmos_phy_ch, only: &
105 ! ATMOS_PHY_CH
106  use mod_atmos_vars, only: &
107 ! DENS, &
108 ! MOMZ, &
109 ! MOMX, &
110 ! MOMY, &
111 ! RHOT, &
112 ! QTRC, &
113  rhoq_t => rhoq_tp
114  use mod_atmos_phy_ch_vars, only: &
115  rhoq_t_ch => atmos_phy_ch_rhoq_t, &
116  o3 => atmos_phy_ch_o3
117  implicit none
118 
119  logical, intent(in) :: update_flag
120 
121  real(RP) :: total ! dummy
122 
123  integer :: k, i, j, iq
124  !---------------------------------------------------------------------------
125 
126  if ( update_flag ) then
127 
128 ! call ATMOS_PHY_CH( DENS, & ! [IN]
129 ! MOMZ, & ! [IN]
130 ! MOMX, & ! [IN]
131 ! MOMY, & ! [IN]
132 ! RHOT, & ! [IN]
133 ! QTRC, & ! [IN]
134 ! RHOQ_t_CH, & ! [INOUT]
135 ! O3 ) ! [INOUT]
136 
137  ! tentative!
138 !OCL XFILL
139  rhoq_t_ch(:,:,:,:) = 0.0_rp
140 !OCL XFILL
141  o3(:,:,:) = 0.0_rp
142 
143  call hist_in( o3(:,:,:), 'Ozone', 'Ozone', 'PPM' )
144  endif
145 
146  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(3)
147  do iq = 1, qa
148  do j = js, je
149  do i = is, ie
150  do k = ks, ke
151  rhoq_t(k,i,j,iq) = rhoq_t(k,i,j,iq) + rhoq_t_ch(k,i,j,iq)
152  enddo
153  enddo
154  enddo
155  enddo
156 
157  if ( statistics_checktotal ) then
158  do iq = 1, qa
159  call stat_total( total, rhoq_t_ch(:,:,:,iq), trim(aq_name(iq))//'_t_CH' )
160  enddo
161  endif
162 
163  return
164  end subroutine atmos_phy_ch_driver
165 
166 end module mod_atmos_phy_ch_driver
module ATMOS admin
integer, public is
start point of inner domain: x, local
logical, public statistics_checktotal
calc&report variable totals to logfile?
integer, public je
end point of inner domain: y, local
subroutine, public atmos_phy_ch_driver_resume
Resume.
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
module ATMOSPHERIC Variables
subroutine, public atmos_phy_ch_driver(update_flag)
Driver.
module STDIO
Definition: scale_stdio.F90:12
integer, public ke
end point of inner domain: z, local
integer, public qa
module ATMOSPHERE / Physics Chemistry
real(rp), dimension(:,:,:), allocatable, public atmos_phy_ch_o3
module Statistics
character(len=h_short), public atmos_phy_ch_type
module grid index
module TRACER
real(rp), dimension(:,:,:,:), allocatable, public rhoq_tp
character(len=h_short), dimension(:), allocatable, public aq_name
integer, public js
start point of inner domain: y, local
logical, public atmos_sw_phy_ch
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_ch_rhoq_t
module Atmosphere / Physics Chemistry
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
Definition: scale_prof.F90:132
module profiler
Definition: scale_prof.F90:10
integer, public ie
end point of inner domain: x, local
subroutine, public atmos_phy_ch_driver_setup
Setup.
module PRECISION
module HISTORY
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
subroutine, public prof_rapend(rapname_base, level)
Save raptime.
Definition: scale_prof.F90:178