SCALE-RM
Functions/Subroutines
scale_atmos_dyn_tstep_tracer_fvm_heve Module Reference

module Atmosphere / Dynamics More...

Functions/Subroutines

subroutine, public atmos_dyn_tstep_tracer_fvm_heve_setup (type)
 Setup. More...
 
subroutine, public atmos_dyn_tstep_tracer_fvm_heve (QTRCo, QTRC, QTRC0, RHOQ_t, DENS0, DENS, mflx_hi, num_diff, GSQRT, MAPF, CDZ, RCDZ, RCDX, RCDY, dtl, FLAG_FCT_TRACER, FLAG_FCT_ALONG_STREAM)
 

Detailed Description

module Atmosphere / Dynamics

Description
HEVE FVM scheme for tracer advection in Atmospheric dynamical process
Author
Team SCALE
History
  • 2016-05-17 (S.Nishizawa) [new]

Function/Subroutine Documentation

◆ atmos_dyn_tstep_tracer_fvm_heve_setup()

subroutine, public scale_atmos_dyn_tstep_tracer_fvm_heve::atmos_dyn_tstep_tracer_fvm_heve_setup ( character(len=*), intent(in)  type)

Setup.

Definition at line 62 of file scale_atmos_dyn_tstep_tracer_fvm_heve.F90.

References scale_process::prc_mpistop().

Referenced by scale_atmos_dyn_tstep_tracer::atmos_dyn_tstep_tracer_setup().

62  use scale_process, only: &
64  implicit none
65  character(len=*), intent(in) :: type
66 
67  if ( type /= 'FVM-HEVE' ) then
68  write(*,*) 'xxx Tstep_tracer_type is not "FVM-HEVE"!'
69  call prc_mpistop
70  end if
71 
72  return
subroutine, public prc_mpistop
Abort MPI.
module PROCESS
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_tstep_tracer_fvm_heve()

subroutine, public scale_atmos_dyn_tstep_tracer_fvm_heve::atmos_dyn_tstep_tracer_fvm_heve ( real(rp), dimension (ka,ia,ja), intent(out)  QTRCo,
real(rp), dimension (ka,ia,ja), intent(in)  QTRC,
real(rp), dimension (ka,ia,ja), intent(in)  QTRC0,
real(rp), dimension (ka,ia,ja), intent(in)  RHOQ_t,
real(rp), dimension (ka,ia,ja), intent(in)  DENS0,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja,3), intent(in)  mflx_hi,
real(rp), dimension(ka,ia,ja,3), intent(in)  num_diff,
real(rp), dimension (ka,ia,ja,7), intent(in)  GSQRT,
real(rp), dimension (ia,ja,2), intent(in)  MAPF,
real(rp), dimension(ka), intent(in)  CDZ,
real(rp), dimension(ka), intent(in)  RCDZ,
real(rp), dimension(ia), intent(in)  RCDX,
real(rp), dimension(ja), intent(in)  RCDY,
real(rp), intent(in)  dtl,
logical, intent(in)  FLAG_FCT_TRACER,
logical, intent(in)  FLAG_FCT_ALONG_STREAM 
)

Definition at line 85 of file scale_atmos_dyn_tstep_tracer_fvm_heve.F90.

References scale_atmos_dyn_common::atmos_dyn_fct(), scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_fluxx_xyz_tracer, scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_xyz_ud1(), scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_fluxy_xyz_tracer, scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_xyz_ud1(), scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_fluxz_xyz_tracer, scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_xyz_ud1(), scale_gridtrans::i_uy, scale_gridtrans::i_uyz, scale_gridtrans::i_xv, scale_gridtrans::i_xvz, scale_gridtrans::i_xy, scale_gridtrans::i_xyw, scale_gridtrans::i_xyz, scale_grid_index::iblock, scale_grid_index::ie, scale_grid_index::is, scale_grid_index::jblock, scale_grid_index::je, scale_grid_index::js, scale_grid_index::ke, scale_grid_index::ks, scale_grid_index::xdir, scale_grid_index::ydir, and scale_grid_index::zdir.

Referenced by scale_atmos_dyn_tstep_tracer::atmos_dyn_tstep_tracer_setup().

85  use scale_gridtrans, only: &
86  i_xyz, &
87  i_xyw, &
88  i_uyz, &
89  i_xvz, &
90  i_xy, &
91  i_uy, &
92  i_xv
93  use scale_atmos_dyn_common, only: &
95  use scale_atmos_dyn_fvm_flux, only: &
99  use scale_atmos_dyn_fvm_flux_ud1, only: &
103  implicit none
104  real(RP), intent(out) :: qtrco (ka,ia,ja)
105  real(RP), intent(in) :: qtrc (ka,ia,ja)
106  real(RP), intent(in) :: qtrc0 (ka,ia,ja)
107  real(RP), intent(in) :: rhoq_t (ka,ia,ja)
108  real(RP), intent(in) :: dens0 (ka,ia,ja)
109  real(RP), intent(in) :: dens (ka,ia,ja)
110  real(RP), intent(in) :: mflx_hi (ka,ia,ja,3)
111  real(RP), intent(in) :: num_diff(ka,ia,ja,3)
112  real(RP), intent(in) :: gsqrt (ka,ia,ja,7)
113  real(RP), intent(in) :: mapf (ia,ja,2)
114  real(RP), intent(in) :: cdz(ka)
115  real(RP), intent(in) :: rcdz(ka)
116  real(RP), intent(in) :: rcdx(ia)
117  real(RP), intent(in) :: rcdy(ja)
118  real(RP), intent(in) :: dtl
119  logical, intent(in) :: flag_fct_tracer
120  logical, intent(in) :: flag_fct_along_stream
121 
122 
123  ! For tracer advection
124  real(RP) :: qflx_hi (ka,ia,ja,3) ! rho * vel(x,y,z) * phi @ (u,v,w)-face high order
125  real(RP) :: qflx_lo (ka,ia,ja,3) ! rho * vel(x,y,z) * phi, monotone flux
126  real(RP) :: qflx_anti(ka,ia,ja,3) ! anti-diffusive flux
127 
128  integer :: iis, iie
129  integer :: jjs, jje
130  integer :: i, j, k
131  !---------------------------------------------------------------------------
132 
133 #ifdef DEBUG
134  qflx_hi(:,:,:,:) = undef
135  qflx_lo(:,:,:,:) = undef
136 #endif
137 
138  do jjs = js, je, jblock
139  jje = jjs+jblock-1
140  do iis = is, ie, iblock
141  iie = iis+iblock-1
142 
143  ! at (x, y, w)
144  call atmos_dyn_fvm_fluxz_xyz_tracer( qflx_hi(:,:,:,zdir), & ! (out)
145  mflx_hi(:,:,:,zdir), qtrc, gsqrt(:,:,:,i_xyw), & ! (in)
146  num_diff(:,:,:,zdir), & ! (in)
147  cdz, & ! (in)
148  iis, iie, jjs, jje ) ! (in)
149 
150  ! at (u, y, z)
151  call atmos_dyn_fvm_fluxx_xyz_tracer( qflx_hi(:,:,:,xdir), & ! (out)
152  mflx_hi(:,:,:,xdir), qtrc, gsqrt(:,:,:,i_uyz), & ! (in)
153  num_diff(:,:,:,xdir), & ! (in)
154  cdz, & ! (in)
155  iis, iie, jjs, jje ) ! (in)
156 
157  ! at (x, v, z)
158  call atmos_dyn_fvm_fluxy_xyz_tracer( qflx_hi(:,:,:,ydir), & ! (out)
159  mflx_hi(:,:,:,ydir), qtrc, gsqrt(:,:,:,i_xvz), & ! (in)
160  num_diff(:,:,:,ydir), & ! (in)
161  cdz, & ! (in)
162  iis, iie, jjs, jje ) ! (in)
163 
164  if ( flag_fct_tracer ) then
165 
166  call atmos_dyn_fvm_fluxz_xyz_ud1( qflx_lo(:,:,:,zdir), & ! (out)
167  mflx_hi(:,:,:,zdir), qtrc, gsqrt(:,:,:,i_xyz), & ! (in)
168  cdz, & ! (in)
169  iis-1, iie+1, jjs-1, jje+1 ) ! (in)
170 
171  call atmos_dyn_fvm_fluxx_xyz_ud1( qflx_lo(:,:,:,xdir), & ! (out)
172  mflx_hi(:,:,:,xdir), qtrc, gsqrt(:,:,:,i_uyz), & ! (in)
173  cdz, & ! (in)
174  iis-1, iie+1, jjs-1, jje+1 ) ! (in)
175 
176  call atmos_dyn_fvm_fluxy_xyz_ud1( qflx_lo(:,:,:,ydir), & ! (out)
177  mflx_hi(:,:,:,ydir), qtrc, gsqrt(:,:,:,i_xvz), & ! (in)
178  cdz, & ! (in)
179  iis-1, iie+1, jjs-1, jje+1 ) ! (in)
180  end if
181 
182  enddo
183  enddo
184 
185  if ( flag_fct_tracer ) then
186 
187  call atmos_dyn_fct( qflx_anti, & ! (out)
188  qtrc0, dens0, dens, & ! (in)
189  qflx_hi, qflx_lo, & ! (in)
190  mflx_hi, & ! (in)
191  rcdz, rcdx, rcdy, & ! (in)
192  gsqrt(:,:,:,i_xyz), & ! (in)
193  mapf, dtl, & ! (in)
194  flag_fct_along_stream ) ! (in)
195 
196  do jjs = js, je, jblock
197  jje = jjs+jblock-1
198  do iis = is, ie, iblock
199  iie = iis+iblock-1
200 
201  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
202  do j = jjs, jje
203  do i = iis, iie
204  do k = ks, ke
205  qtrco(k,i,j) = ( qtrc0(k,i,j) * dens0(k,i,j) &
206  + dtl * ( - ( ( qflx_hi(k ,i ,j ,zdir) - qflx_anti(k ,i ,j ,zdir) &
207  - qflx_hi(k-1,i ,j ,zdir) + qflx_anti(k-1,i ,j ,zdir) ) * rcdz(k) &
208  + ( qflx_hi(k ,i ,j ,xdir) - qflx_anti(k ,i ,j ,xdir) &
209  - qflx_hi(k ,i-1,j ,xdir) + qflx_anti(k ,i-1,j ,xdir) ) * rcdx(i) &
210  + ( qflx_hi(k ,i ,j ,ydir) - qflx_anti(k ,i ,j ,ydir) &
211  - qflx_hi(k ,i ,j-1,ydir) + qflx_anti(k ,i ,j-1,ydir) ) * rcdy(j) &
212  ) * mapf(i,j,1) * mapf(i,j,2) / gsqrt(k,i,j,i_xyz) &
213  + rhoq_t(k,i,j) ) ) / dens(k,i,j)
214  enddo
215  enddo
216  enddo
217 
218  enddo
219  enddo
220 
221  else ! skip FCT
222 
223  do jjs = js, je, jblock
224  jje = jjs+jblock-1
225  do iis = is, ie, iblock
226  iie = iis+iblock-1
227 
228  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
229  do j = jjs, jje
230  do i = iis, iie
231  do k = ks, ke
232  qtrco(k,i,j) = ( qtrc0(k,i,j) * dens0(k,i,j) &
233  + dtl * ( - ( ( qflx_hi(k,i,j,zdir) - qflx_hi(k-1,i ,j ,zdir) ) * rcdz(k) &
234  + ( qflx_hi(k,i,j,xdir) - qflx_hi(k ,i-1,j ,xdir) ) * rcdx(i) &
235  + ( qflx_hi(k,i,j,ydir) - qflx_hi(k ,i ,j-1,ydir) ) * rcdy(j) &
236  ) * mapf(i,j,1) * mapf(i,j,2) / gsqrt(k,i,j,i_xyz) &
237  + rhoq_t(k,i,j) ) ) / dens(k,i,j)
238  enddo
239  enddo
240  enddo
241 
242  enddo
243  enddo
244 
245  end if
246 
247  return
integer, public is
start point of inner domain: x, local
integer, public i_xvz
integer, public je
end point of inner domain: y, local
subroutine, public atmos_dyn_fvm_fluxy_xyz_ud1(flux, mflx, val, GSQRT, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYZ
integer, public iblock
block size for cache blocking: x
integer, parameter, public zdir
integer, parameter, public ydir
integer, public ke
end point of inner domain: z, local
integer, parameter, public xdir
procedure(flux_phi), pointer, public atmos_dyn_fvm_fluxy_xyz_tracer
integer, public i_xy
integer, public ia
of x whole cells (local, with HALO)
module GRIDTRANS
procedure(flux_phi), pointer, public atmos_dyn_fvm_fluxx_xyz_tracer
integer, public ka
of z whole cells (local, with HALO)
integer, public i_uy
integer, public jblock
block size for cache blocking: y
integer, public i_xyw
procedure(flux_phi), pointer, public atmos_dyn_fvm_fluxz_xyz_tracer
subroutine, public atmos_dyn_fvm_fluxz_xyz_ud1(flux, mflx, val, GSQRT, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XYZ
integer, public js
start point of inner domain: y, local
module Atmosphere / Dynamics common
integer, public ks
start point of inner domain: z, local
integer, public i_xv
integer, public ie
end point of inner domain: x, local
module scale_atmos_dyn_fvm_flux
integer, public i_uyz
subroutine, public atmos_dyn_fct(qflx_anti, phi_in, DENS0, DENS, qflx_hi, qflx_lo, mflx_hi, rdz, rdx, rdy, GSQRT, MAPF, dt, flag_vect)
Flux Correction Transport Limiter.
subroutine, public atmos_dyn_fvm_fluxx_xyz_ud1(flux, mflx, val, GSQRT, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYZ
integer, public i_xyz
module scale_atmos_dyn_fvm_flux_ud1
integer, public ja
of y whole cells (local, with HALO)
Here is the call graph for this function:
Here is the caller graph for this function: