SCALE-RM
Functions/Subroutines
scale_atmos_dyn_fvm_flux_ud1 Module Reference

module scale_atmos_dyn_fvm_flux_ud1 More...

Functions/Subroutines

subroutine, public atmos_dyn_fvm_flux_valuew_z_ud1 (valW, mflx, val, GSQRT, CDZ)
 value at XYW More...
 
subroutine, public atmos_dyn_fvm_fluxz_xyz_ud1 (flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation z-flux at XYZ More...
 
subroutine, public atmos_dyn_fvm_fluxx_xyz_ud1 (flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation X-flux at XYZ More...
 
subroutine, public atmos_dyn_fvm_fluxy_xyz_ud1 (flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation Y-flux at XYZ More...
 
subroutine, public atmos_dyn_fvm_fluxz_xyw_ud1 (flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, FDZ, dtrk, IIS, IIE, JJS, JJE)
 calculation z-flux at XYW More...
 
subroutine, public atmos_dyn_fvm_fluxj13_xyw_ud1 (flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
 calculation J13-flux at XYW More...
 
subroutine, public atmos_dyn_fvm_fluxj23_xyw_ud1 (flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
 calculation J23-flux at XYW More...
 
subroutine, public atmos_dyn_fvm_fluxx_xyw_ud1 (flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation X-flux at XYW More...
 
subroutine, public atmos_dyn_fvm_fluxy_xyw_ud1 (flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation Y-flux at XYW More...
 
subroutine, public atmos_dyn_fvm_fluxz_uyz_ud1 (flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation z-flux at UY More...
 
subroutine, public atmos_dyn_fvm_fluxj13_uyz_ud1 (flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
 calculation J13-flux at UYZ More...
 
subroutine, public atmos_dyn_fvm_fluxj23_uyz_ud1 (flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
 calculation J23-flux at UYZ More...
 
subroutine, public atmos_dyn_fvm_fluxx_uyz_ud1 (flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation X-flux at UY More...
 
subroutine, public atmos_dyn_fvm_fluxy_uyz_ud1 (flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation Y-flux at UY More...
 
subroutine, public atmos_dyn_fvm_fluxz_xvz_ud1 (flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation z-flux at XV More...
 
subroutine, public atmos_dyn_fvm_fluxj13_xvz_ud1 (flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
 calculation J13-flux at XVZ More...
 
subroutine, public atmos_dyn_fvm_fluxj23_xvz_ud1 (flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
 calculation J23-flux at XVZ More...
 
subroutine, public atmos_dyn_fvm_fluxx_xvz_ud1 (flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation X-flux at XV More...
 
subroutine, public atmos_dyn_fvm_fluxy_xvz_ud1 (flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation Y-flux at XV More...
 

Detailed Description

module scale_atmos_dyn_fvm_flux_ud1

Description
FVM flux scheme with the ud1 order
Author
Team SCALE
History
  • 2016-04-18 (S.Nishizawa) [new]

Function/Subroutine Documentation

◆ atmos_dyn_fvm_flux_valuew_z_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_flux_valuew_z_ud1 ( real(rp), dimension (ka), intent(out)  valW,
real(rp), dimension (ka), intent(in)  mflx,
real(rp), dimension (ka), intent(in)  val,
real(rp), dimension(ka), intent(in)  GSQRT,
real(rp), dimension (ka), intent(in)  CDZ 
)

value at XYW

Definition at line 103 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

103  implicit none
104 
105  real(RP), intent(out) :: valW (KA)
106  real(RP), intent(in) :: mflx (KA)
107  real(RP), intent(in) :: val (KA)
108  real(RP), intent(in) :: GSQRT(KA)
109  real(RP), intent(in) :: CDZ (KA)
110 
111  integer :: k
112  !---------------------------------------------------------------------------
113 
114  do k = ks, ke-1
115 #ifdef DEBUG
116  call check( __line__, mflx(k) )
117 
118  call check( __line__, val(k) )
119  call check( __line__, val(k+1) )
120 
121 #endif
122  valw(k) = f1 * ( val(k+1)+val(k) ) - sign(f1,mflx(k)) * ( val(k+1)-val(k) )
123  enddo
124 #ifdef DEBUG
125  k = iundef
126 #endif
127 
128 #ifdef DEBUG
129 
130 #endif
131 
132 
133 
134  valw(ks) = f2 * ( val(ks+1)+val(ks) )
135  valw(ke-1) = f2 * ( val(ke)+val(ke-1) )
136 
137 
138  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxz_xyz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_xyz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mflx,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation z-flux at XYZ

Definition at line 149 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), scale_atmos_dyn_tinteg_large_euler::atmos_dyn_tinteg_large_euler(), scale_atmos_dyn_tinteg_large_rk3::atmos_dyn_tinteg_large_rk3(), scale_atmos_dyn_tstep_large_fvm_heve::atmos_dyn_tstep_large_fvm_heve(), scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve(), and scale_atmos_dyn_tstep_tracer_fvm_heve::atmos_dyn_tstep_tracer_fvm_heve().

149  implicit none
150 
151  real(RP), intent(inout) :: flux (KA,IA,JA)
152  real(RP), intent(in) :: mflx (KA,IA,JA)
153  real(RP), intent(in) :: val (KA,IA,JA)
154  real(RP), intent(in) :: GSQRT (KA,IA,JA)
155  real(RP), intent(in) :: num_diff(KA,IA,JA)
156  real(RP), intent(in) :: CDZ (KA)
157  integer, intent(in) :: IIS, IIE, JJS, JJE
158 
159  real(RP) :: vel
160  integer :: k, i, j
161  !---------------------------------------------------------------------------
162 
163  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
164  !$omp private(vel) &
165  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mflx,val,flux,GSQRT,num_diff)
166  do j = jjs, jje
167  do i = iis, iie
168  do k = ks, ke-1
169 #ifdef DEBUG
170  call check( __line__, mflx(k,i,j) )
171 
172  call check( __line__, val(k,i,j) )
173  call check( __line__, val(k+1,i,j) )
174 
175 #endif
176  vel = mflx(k,i,j)
177  flux(k,i,j) = vel &
178  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
179  enddo
180  enddo
181  enddo
182 #ifdef DEBUG
183  k = iundef; i = iundef; j = iundef
184 #endif
185 
186  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
187  !$omp private(vel) &
188  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mflx,val,flux,GSQRT,num_diff)
189  do j = jjs, jje
190  do i = iis, iie
191 #ifdef DEBUG
192 
193 #endif
194  flux(ks-1,i,j) = 0.0_rp
195 
196  flux(ke ,i,j) = 0.0_rp
197  enddo
198  enddo
199 #ifdef DEBUG
200  k = iundef; i = iundef; j = iundef
201 #endif
202 
203  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxx_xyz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_xyz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mflx,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension(ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation X-flux at XYZ

Definition at line 214 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), scale_atmos_dyn_tinteg_large_euler::atmos_dyn_tinteg_large_euler(), scale_atmos_dyn_tinteg_large_rk3::atmos_dyn_tinteg_large_rk3(), scale_atmos_dyn_tstep_large_fvm_heve::atmos_dyn_tstep_large_fvm_heve(), scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve(), and scale_atmos_dyn_tstep_tracer_fvm_heve::atmos_dyn_tstep_tracer_fvm_heve().

214  implicit none
215 
216  real(RP), intent(inout) :: flux (KA,IA,JA)
217  real(RP), intent(in) :: mflx (KA,IA,JA)
218  real(RP), intent(in) :: val (KA,IA,JA)
219  real(RP), intent(in) :: GSQRT (KA,IA,JA)
220  real(RP), intent(in) :: num_diff(KA,IA,JA)
221  real(RP), intent(in) :: CDZ(KA)
222  integer, intent(in) :: IIS, IIE, JJS, JJE
223 
224  real(RP) :: vel
225  integer :: k, i, j
226  !---------------------------------------------------------------------------
227 
228  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
229  !$omp private(vel) &
230  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mflx,val,flux,GSQRT,num_diff)
231  do j = jjs, jje
232  do i = iis-1, iie
233  do k = ks, ke
234 #ifdef DEBUG
235  call check( __line__, mflx(k,i,j) )
236 
237  call check( __line__, val(k,i,j) )
238  call check( __line__, val(k,i+1,j) )
239 
240 #endif
241  vel = mflx(k,i,j)
242  flux(k,i,j) = vel &
243  * ( f1 * ( val(k,i+1,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i+1,j)-val(k,i,j) ) )
244  enddo
245  enddo
246  enddo
247 #ifdef DEBUG
248  k = iundef; i = iundef; j = iundef
249 #endif
250 
251  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxy_xyz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_xyz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mflx,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension(ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation Y-flux at XYZ

Definition at line 262 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), scale_atmos_dyn_tinteg_large_euler::atmos_dyn_tinteg_large_euler(), scale_atmos_dyn_tinteg_large_rk3::atmos_dyn_tinteg_large_rk3(), scale_atmos_dyn_tstep_large_fvm_heve::atmos_dyn_tstep_large_fvm_heve(), scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve(), and scale_atmos_dyn_tstep_tracer_fvm_heve::atmos_dyn_tstep_tracer_fvm_heve().

262  implicit none
263 
264  real(RP), intent(inout) :: flux (KA,IA,JA)
265  real(RP), intent(in) :: mflx (KA,IA,JA)
266  real(RP), intent(in) :: val (KA,IA,JA)
267  real(RP), intent(in) :: GSQRT (KA,IA,JA)
268  real(RP), intent(in) :: num_diff(KA,IA,JA)
269  real(RP), intent(in) :: CDZ(KA)
270  integer, intent(in) :: IIS, IIE, JJS, JJE
271 
272  real(RP) :: vel
273  integer :: k, i, j
274  !---------------------------------------------------------------------------
275 
276  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
277  !$omp private(vel) &
278  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mflx,val,flux,GSQRT,num_diff)
279  do j = jjs-1, jje
280  do i = iis, iie
281  do k = ks, ke
282 #ifdef DEBUG
283  call check( __line__, mflx(k,i,j) )
284 
285  call check( __line__, val(k,i,j) )
286  call check( __line__, val(k,i,j+1) )
287 
288 #endif
289  vel = mflx(k,i,j)
290  flux(k,i,j) = vel &
291  * ( f1 * ( val(k,i,j+1)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i,j+1)-val(k,i,j) ) )
292  enddo
293  enddo
294  enddo
295 #ifdef DEBUG
296  k = iundef; i = iundef; j = iundef
297 #endif
298 
299  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxz_xyw_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_xyw_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), intent(in)  J33G,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
real(rp), dimension (ka-1), intent(in)  FDZ,
real(rp), intent(in)  dtrk,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation z-flux at XYW

Definition at line 313 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

313  implicit none
314 
315  real(RP), intent(inout) :: flux (KA,IA,JA)
316  real(RP), intent(in) :: mom (KA,IA,JA)
317  real(RP), intent(in) :: val (KA,IA,JA)
318  real(RP), intent(in) :: DENS (KA,IA,JA)
319  real(RP), intent(in) :: GSQRT (KA,IA,JA)
320  real(RP), intent(in) :: J33G
321  real(RP), intent(in) :: num_diff(KA,IA,JA)
322  real(RP), intent(in) :: CDZ (KA)
323  real(RP), intent(in) :: FDZ (KA-1)
324  real(RP), intent(in) :: dtrk
325  integer, intent(in) :: IIS, IIE, JJS, JJE
326 
327  real(RP) :: vel
328  integer :: k, i, j
329  !---------------------------------------------------------------------------
330 
331  ! note than z-index is added by -1
332 
333  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
334  !$omp private(vel) &
335  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,flux,J33G,GSQRT,num_diff,DENS)
336  do j = jjs, jje
337  do i = iis, iie
338  do k = ks+1, ke-1
339 #ifdef DEBUG
340  call check( __line__, mom(k-1,i,j) )
341  call check( __line__, mom(k ,i,j) )
342 
343  call check( __line__, val(k-1,i,j) )
344  call check( __line__, val(k,i,j) )
345 
346 #endif
347  vel = ( 0.5_rp * ( mom(k-1,i,j) &
348  + mom(k,i,j) ) ) &
349  / dens(k,i,j)
350  flux(k-1,i,j) = j33g * vel &
351  * ( f1 * ( val(k,i,j)+val(k-1,i,j) ) - sign(f1,vel) * ( val(k,i,j)-val(k-1,i,j) ) )
352  enddo
353  enddo
354  enddo
355 #ifdef DEBUG
356  k = iundef; i = iundef; j = iundef
357 #endif
358 
359  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
360  !$omp private(vel) &
361  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J33G,GSQRT,num_diff,FDZ,dtrk)
362  do j = jjs, jje
363  do i = iis, iie
364 #ifdef DEBUG
365 
366 
367 #endif
368  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS.
369  ! The flux at KS can be non-zero.
370  ! To reduce calculations, all the fluxes are set to zero.
371  flux(ks-1,i,j) = 0.0_rp ! k = KS
372 
373 
374 
375  flux(ke-1,i,j) = 0.0_rp ! k = KE
376  flux(ke ,i,j) = 0.0_rp ! k = KE+1
377  enddo
378  enddo
379 
380  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj13_xyw_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj13_xyw_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension (ka,ia,ja), intent(in)  J13G,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation J13-flux at XYW

Definition at line 392 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

392  implicit none
393 
394  real(RP), intent(inout) :: flux (KA,IA,JA)
395  real(RP), intent(in) :: mom (KA,IA,JA)
396  real(RP), intent(in) :: val (KA,IA,JA)
397  real(RP), intent(in) :: DENS (KA,IA,JA)
398  real(RP), intent(in) :: GSQRT (KA,IA,JA)
399  real(RP), intent(in) :: J13G (KA,IA,JA)
400  real(RP), intent(in) :: MAPF ( IA,JA,2)
401  real(RP), intent(in) :: CDZ (KA)
402  integer, intent(in) :: IIS, IIE, JJS, JJE
403 
404  real(RP) :: vel
405  integer :: k, i, j
406  !---------------------------------------------------------------------------
407 
408  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
409  !$omp private(vel) &
410  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF)
411  do j = jjs, jje
412  do i = iis, iie
413  do k = ks+2, ke-1
414  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
415  / dens(k,i,j)
416  flux(k-1,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
417  * ( f1 * ( val(k,i,j)+val(k-1,i,j) ) - sign(f1,vel) * ( val(k,i,j)-val(k-1,i,j) ) )
418  enddo
419  enddo
420  enddo
421 
422  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
423  !$omp private(vel) &
424  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF)
425  do j = jjs, jje
426  do i = iis, iie
427  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS.
428  ! The flux at KS can be non-zero.
429  ! To reduce calculations, all the fluxes are set to zero.
430  flux(ks-1,i,j) = 0.0_rp ! k = KS
431 
432  ! physically incorrect but for numerical stability
433  vel = ( ( 0.5_rp * ( mom(ks+1,i,j)+mom(ks+1,i-1,j) ) ) / dens(ks+1,i,j) &
434  + ( 0.5_rp * ( mom(ks,i,j)+mom(ks,i-1,j) ) ) / dens(ks ,i,j) ) * 0.5_rp
435 ! vel = ( 0.5_RP * ( mom(KS+1,i,j)+mom(KS+1,i-1,j) ) ) &
436 ! / DENS(KS+1,i,j)
437  flux(ks,i,j) = j13g(ks+1,i,j) / mapf(i,j,+2) * vel &
438  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) ) ! k = KS+1
439 
440 
441  flux(ke-1,i,j) = 0.0_rp
442  enddo
443  enddo
444 
445  return
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj23_xyw_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj23_xyw_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension (ka,ia,ja), intent(in)  J23G,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation J23-flux at XYW

Definition at line 456 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

456  implicit none
457 
458  real(RP), intent(inout) :: flux (KA,IA,JA)
459  real(RP), intent(in) :: mom (KA,IA,JA)
460  real(RP), intent(in) :: val (KA,IA,JA)
461  real(RP), intent(in) :: DENS (KA,IA,JA)
462  real(RP), intent(in) :: GSQRT (KA,IA,JA)
463  real(RP), intent(in) :: J23G (KA,IA,JA)
464  real(RP), intent(in) :: MAPF ( IA,JA,2)
465  real(RP), intent(in) :: CDZ (KA)
466  integer, intent(in) :: IIS, IIE, JJS, JJE
467 
468  real(RP) :: vel
469  integer :: k, i, j
470  !---------------------------------------------------------------------------
471 
472  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
473  !$omp private(vel) &
474  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF)
475  do j = jjs, jje
476  do i = iis, iie
477  do k = ks+2, ke-1
478  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
479  / dens(k,i,j)
480  flux(k-1,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
481  * ( f1 * ( val(k,i,j)+val(k-1,i,j) ) - sign(f1,vel) * ( val(k,i,j)-val(k-1,i,j) ) )
482  enddo
483  enddo
484  enddo
485 
486  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
487  !$omp private(vel) &
488  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF)
489  do j = jjs, jje
490  do i = iis, iie
491  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS.
492  ! The flux at KS can be non-zero.
493  ! To reduce calculations, all the fluxes are set to zero.
494  flux(ks-1,i,j) = 0.0_rp ! k = KS
495 
496  ! physically incorrect but for numerical stability
497  vel = ( ( 0.5_rp * ( mom(ks+1,i,j)+mom(ks+1,i,j-1) ) ) / dens(ks+1,i,j) &
498  + ( 0.5_rp * ( mom(ks,i,j)+mom(ks,i,j-1) ) ) / dens(ks ,i,j) ) * 0.5_rp
499 ! vel = ( 0.5_RP * ( mom(KS+1,i,j)+mom(KS+1,i,j-1) ) ) &
500 ! / DENS(KS+1,i,j)
501  flux(ks,i,j) = j23g(ks+1,i,j) / mapf(i,j,+1) * vel &
502  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) ) ! k = KS+1
503 
504 
505  flux(ke-1,i,j) = 0.0_rp
506  enddo
507  enddo
508 
509  return
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxx_xyw_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_xyw_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation X-flux at XYW

Definition at line 522 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

522  implicit none
523 
524  real(RP), intent(inout) :: flux (KA,IA,JA)
525  real(RP), intent(in) :: mom (KA,IA,JA)
526  real(RP), intent(in) :: val (KA,IA,JA)
527  real(RP), intent(in) :: DENS (KA,IA,JA)
528  real(RP), intent(in) :: GSQRT (KA,IA,JA)
529  real(RP), intent(in) :: MAPF ( IA,JA,2)
530  real(RP), intent(in) :: num_diff(KA,IA,JA)
531  real(RP), intent(in) :: CDZ (KA)
532  integer, intent(in) :: IIS, IIE, JJS, JJE
533 
534  real(RP) :: vel
535  integer :: k, i, j
536  !---------------------------------------------------------------------------
537 
538  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
539  !$omp private(vel) &
540  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff) &
541  !$omp shared(CDZ)
542  do j = jjs, jje
543  do i = iis-1, iie
544  do k = ks, ke-1
545 #ifdef DEBUG
546  call check( __line__, mom(k ,i,j) )
547  call check( __line__, mom(k+1,i,j) )
548 
549  call check( __line__, val(k,i,j) )
550  call check( __line__, val(k,i+1,j) )
551 
552 #endif
553  vel = ( f2h(k,1,i_uyz) &
554  * mom(k+1,i,j) &
555  + f2h(k,2,i_uyz) &
556  * mom(k,i,j) ) &
557  / ( f2h(k,1,i_uyz) &
558  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
559  + f2h(k,2,i_uyz) &
560  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
561  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
562  * ( f1 * ( val(k,i+1,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i+1,j)-val(k,i,j) ) )
563  enddo
564  enddo
565  enddo
566 #ifdef DEBUG
567  k = iundef; i = iundef; j = iundef
568 #endif
569 
570  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
571  !$omp private(vel) &
572  !$omp shared(JJS,JJE,IIS,IIE,KE,flux)
573  do j = jjs, jje
574  do i = iis-1, iie
575  flux(ke,i,j) = 0.0_rp
576  enddo
577  enddo
578 #ifdef DEBUG
579  k = iundef; i = iundef; j = iundef
580 #endif
581 
582  return
integer, public i_uyz
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxy_xyw_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_xyw_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation Y-flux at XYW

Definition at line 594 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

594  implicit none
595 
596  real(RP), intent(inout) :: flux (KA,IA,JA)
597  real(RP), intent(in) :: mom (KA,IA,JA)
598  real(RP), intent(in) :: val (KA,IA,JA)
599  real(RP), intent(in) :: DENS (KA,IA,JA)
600  real(RP), intent(in) :: GSQRT (KA,IA,JA)
601  real(RP), intent(in) :: MAPF ( IA,JA,2)
602  real(RP), intent(in) :: num_diff(KA,IA,JA)
603  real(RP), intent(in) :: CDZ (KA)
604  integer, intent(in) :: IIS, IIE, JJS, JJE
605 
606  real(RP) :: vel
607  integer :: k, i, j
608  !---------------------------------------------------------------------------
609 
610  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
611  !$omp private(vel) &
612  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff) &
613  !$omp shared(CDZ)
614  do j = jjs-1, jje
615  do i = iis, iie
616  do k = ks, ke-1
617 #ifdef DEBUG
618  call check( __line__, mom(k ,i,j) )
619  call check( __line__, mom(k+1,i,j) )
620 
621  call check( __line__, val(k,i,j) )
622  call check( __line__, val(k,i,j+1) )
623 
624 #endif
625  vel = ( f2h(k,1,i_xvz) &
626  * mom(k+1,i,j) &
627  + f2h(k,2,i_xvz) &
628  * mom(k,i,j) ) &
629  / ( f2h(k,1,i_xvz) &
630  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
631  + f2h(k,2,i_xvz) &
632  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
633  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
634  * ( f1 * ( val(k,i,j+1)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i,j+1)-val(k,i,j) ) )
635  enddo
636  enddo
637  enddo
638 #ifdef DEBUG
639  k = iundef; i = iundef; j = iundef
640 #endif
641 
642  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
643  !$omp private(vel) &
644  !$omp shared(JJS,JJE,IIS,IIE,KE,flux)
645  do j = jjs-1, jje
646  do i = iis, iie
647  flux(ke,i,j) = 0.0_rp
648  enddo
649  enddo
650 #ifdef DEBUG
651  k = iundef; i = iundef; j = iundef
652 #endif
653 
654  return
integer, public i_xvz
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxz_uyz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_uyz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), intent(in)  J33G,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation z-flux at UY

Definition at line 667 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

667  implicit none
668 
669  real(RP), intent(inout) :: flux (KA,IA,JA)
670  real(RP), intent(in) :: mom (KA,IA,JA)
671  real(RP), intent(in) :: val (KA,IA,JA)
672  real(RP), intent(in) :: DENS (KA,IA,JA)
673  real(RP), intent(in) :: GSQRT (KA,IA,JA)
674  real(RP), intent(in) :: J33G
675  real(RP), intent(in) :: num_diff(KA,IA,JA)
676  real(RP), intent(in) :: CDZ (KA)
677  integer, intent(in) :: IIS, IIE, JJS, JJE
678 
679  real(RP) :: vel
680  integer :: k, i, j
681  !---------------------------------------------------------------------------
682 
683  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
684  !$omp private(vel) &
685  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J33G,GSQRT,num_diff) &
686  !$omp shared(CDZ)
687  do j = jjs, jje
688  do i = iis, iie
689  do k = ks, ke-1
690 #ifdef DEBUG
691  call check( __line__, mom(k,i,j) )
692  call check( __line__, mom(k,i+1,j) )
693 
694  call check( __line__, val(k,i,j) )
695  call check( __line__, val(k+1,i,j) )
696 
697 #endif
698  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
699  / ( f2h(k,1,i_uyz) &
700  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
701  + f2h(k,2,i_uyz) &
702  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
703  flux(k,i,j) = j33g * vel &
704  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
705  enddo
706  enddo
707  enddo
708 #ifdef DEBUG
709  k = iundef; i = iundef; j = iundef
710 #endif
711 
712  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
713  !$omp private(vel) &
714  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,flux,J33G,GSQRT,num_diff,DENS,CDZ)
715  do j = jjs, jje
716  do i = iis, iie
717 #ifdef DEBUG
718 
719 #endif
720  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
721  ! The flux at KS-1 can be non-zero.
722  ! To reduce calculations, all the fluxes are set to zero.
723  flux(ks-1,i,j) = 0.0_rp
724 
725  flux(ke,i,j) = 0.0_rp
726  enddo
727  enddo
728 #ifdef DEBUG
729  k = iundef; i = iundef; j = iundef
730 #endif
731 
732  return
integer, public i_uyz
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj13_uyz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj13_uyz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension (ka,ia,ja), intent(in)  J13G,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation J13-flux at UYZ

Definition at line 743 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

743  implicit none
744 
745  real(RP), intent(inout) :: flux (KA,IA,JA)
746  real(RP), intent(in) :: mom (KA,IA,JA)
747  real(RP), intent(in) :: val (KA,IA,JA)
748  real(RP), intent(in) :: DENS (KA,IA,JA)
749  real(RP), intent(in) :: GSQRT (KA,IA,JA)
750  real(RP), intent(in) :: J13G (KA,IA,JA)
751  real(RP), intent(in) :: MAPF ( IA,JA,2)
752  real(RP), intent(in) :: CDZ (KA)
753  integer, intent(in) :: IIS, IIE, JJS, JJE
754 
755  real(RP) :: vel
756  integer :: k, i, j
757  !---------------------------------------------------------------------------
758 
759  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
760  !$omp private(vel) &
761  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF) &
762  !$omp shared(GSQRT,CDZ)
763  do j = jjs, jje
764  do i = iis, iie
765  do k = ks, ke-1
766  vel = ( f2h(k,1,i_uyz) &
767  * mom(k+1,i,j) &
768  + f2h(k,2,i_uyz) &
769  * mom(k,i,j) ) &
770  / ( f2h(k,1,i_uyz) &
771  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
772  + f2h(k,2,i_uyz) &
773  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
774  flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
775  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
776  enddo
777  enddo
778  enddo
779 
780  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
781  !$omp private(vel) &
782  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF) &
783  !$omp shared(GSQRT,CDZ)
784  do j = jjs, jje
785  do i = iis, iie
786  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
787  ! The flux at KS-1 can be non-zero.
788  ! To reduce calculations, all the fluxes are set to zero.
789  flux(ks-1,i,j) = 0.0_rp
790 
791  flux(ke ,i,j) = 0.0_rp
792  enddo
793  enddo
794 
795  return
integer, public i_uyz
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj23_uyz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj23_uyz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension (ka,ia,ja), intent(in)  J23G,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation J23-flux at UYZ

Definition at line 806 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

806  implicit none
807 
808  real(RP), intent(inout) :: flux (KA,IA,JA)
809  real(RP), intent(in) :: mom (KA,IA,JA)
810  real(RP), intent(in) :: val (KA,IA,JA)
811  real(RP), intent(in) :: DENS (KA,IA,JA)
812  real(RP), intent(in) :: GSQRT (KA,IA,JA)
813  real(RP), intent(in) :: J23G (KA,IA,JA)
814  real(RP), intent(in) :: MAPF ( IA,JA,2)
815  real(RP), intent(in) :: CDZ (KA)
816  integer, intent(in) :: IIS, IIE, JJS, JJE
817 
818  real(RP) :: vel
819  integer :: k, i, j
820  !---------------------------------------------------------------------------
821 
822  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
823  !$omp private(vel) &
824  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF) &
825  !$omp shared(GSQRT,CDZ)
826  do j = jjs, jje
827  do i = iis, iie
828  do k = ks, ke-1
829  vel = ( f2h(k,1,i_uyz) &
830  * 0.25_rp * ( mom(k+1,i,j)+mom(k+1,i+1,j)+mom(k+1,i,j-1)+mom(k+1,i+1,j-1) ) &
831  + f2h(k,2,i_uyz) &
832  * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
833  / ( f2h(k,1,i_uyz) &
834  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
835  + f2h(k,2,i_uyz) &
836  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
837  flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
838  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
839  enddo
840  enddo
841  enddo
842 
843  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
844  !$omp private(vel) &
845  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF) &
846  !$omp shared(GSQRT,CDZ)
847  do j = jjs, jje
848  do i = iis, iie
849  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
850  ! The flux at KS-1 can be non-zero.
851  ! To reduce calculations, all the fluxes are set to zero.
852  flux(ks-1,i,j) = 0.0_rp
853 
854  flux(ke ,i,j) = 0.0_rp
855  enddo
856  enddo
857 
858  return
integer, public i_uyz
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxx_uyz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_uyz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation X-flux at UY

Definition at line 870 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

870  implicit none
871 
872  real(RP), intent(inout) :: flux (KA,IA,JA)
873  real(RP), intent(in) :: mom (KA,IA,JA)
874  real(RP), intent(in) :: val (KA,IA,JA)
875  real(RP), intent(in) :: DENS (KA,IA,JA)
876  real(RP), intent(in) :: GSQRT (KA,IA,JA)
877  real(RP), intent(in) :: MAPF ( IA,JA,2)
878  real(RP), intent(in) :: num_diff(KA,IA,JA)
879  real(RP), intent(in) :: CDZ (KA)
880  integer, intent(in) :: IIS, IIE, JJS, JJE
881 
882  real(RP) :: vel
883  integer :: k, i, j
884  !---------------------------------------------------------------------------
885 
886  ! note that x-index is added by -1
887 
888  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
889  !$omp private(vel) &
890  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff)
891  do j = jjs, jje
892  do i = iis, iie+1
893  do k = ks, ke
894 #ifdef DEBUG
895  call check( __line__, mom(k,i ,j) )
896  call check( __line__, mom(k,i-1,j) )
897 
898  call check( __line__, val(k,i-1,j) )
899  call check( __line__, val(k,i,j) )
900 
901 #endif
902  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
903  / ( dens(k,i,j) )
904  flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
905  * ( f1 * ( val(k,i,j)+val(k,i-1,j) ) - sign(f1,vel) * ( val(k,i,j)-val(k,i-1,j) ) )
906  enddo
907  enddo
908  enddo
909 #ifdef DEBUG
910  k = iundef; i = iundef; j = iundef
911 #endif
912 
913  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxy_uyz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_uyz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation Y-flux at UY

Definition at line 925 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

925  implicit none
926 
927  real(RP), intent(inout) :: flux (KA,IA,JA)
928  real(RP), intent(in) :: mom (KA,IA,JA)
929  real(RP), intent(in) :: val (KA,IA,JA)
930  real(RP), intent(in) :: DENS (KA,IA,JA)
931  real(RP), intent(in) :: GSQRT (KA,IA,JA)
932  real(RP), intent(in) :: MAPF ( IA,JA,2)
933  real(RP), intent(in) :: num_diff(KA,IA,JA)
934  real(RP), intent(in) :: CDZ (KA)
935  integer, intent(in) :: IIS, IIE, JJS, JJE
936 
937  real(RP) :: vel
938  integer :: k, i, j
939  !---------------------------------------------------------------------------
940 
941  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
942  !$omp private(vel) &
943  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff)
944  do j = jjs-1, jje
945  do i = iis, iie
946  do k = ks, ke
947 #ifdef DEBUG
948  call check( __line__, mom(k,i ,j) )
949  call check( __line__, mom(k,i-1,j) )
950 
951  call check( __line__, val(k,i,j) )
952  call check( __line__, val(k,i,j+1) )
953 
954 #endif
955  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
956  / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
957  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
958  * ( f1 * ( val(k,i,j+1)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i,j+1)-val(k,i,j) ) )
959  enddo
960  enddo
961  enddo
962 #ifdef DEBUG
963  k = iundef; i = iundef; j = iundef
964 #endif
965 
966  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxz_xvz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_xvz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), intent(in)  J33G,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation z-flux at XV

Definition at line 980 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

980  implicit none
981 
982  real(RP), intent(inout) :: flux (KA,IA,JA)
983  real(RP), intent(in) :: mom (KA,IA,JA)
984  real(RP), intent(in) :: val (KA,IA,JA)
985  real(RP), intent(in) :: DENS (KA,IA,JA)
986  real(RP), intent(in) :: GSQRT (KA,IA,JA)
987  real(RP), intent(in) :: J33G
988  real(RP), intent(in) :: num_diff(KA,IA,JA)
989  real(RP), intent(in) :: CDZ (KA)
990  integer, intent(in) :: IIS, IIE, JJS, JJE
991 
992  real(RP) :: vel
993  integer :: k, i, j
994  !---------------------------------------------------------------------------
995 
996  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
997  !$omp private(vel) &
998  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J33G,GSQRT,num_diff) &
999  !$omp shared(CDZ)
1000  do j = jjs, jje
1001  do i = iis, iie
1002  do k = ks, ke-1
1003 #ifdef DEBUG
1004  call check( __line__, mom(k,i,j) )
1005  call check( __line__, mom(k,i,j+1) )
1006 
1007  call check( __line__, val(k,i,j) )
1008  call check( __line__, val(k+1,i,j) )
1009 
1010 #endif
1011  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1012  / ( f2h(k,1,i_xvz) &
1013  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1014  + f2h(k,2,i_xvz) &
1015  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1016  flux(k,i,j) = j33g * vel &
1017  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
1018  enddo
1019  enddo
1020  enddo
1021 #ifdef DEBUG
1022  k = iundef; i = iundef; j = iundef
1023 #endif
1024 
1025  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
1026  !$omp private(vel) &
1027  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,flux,J33G,GSQRT,num_diff,DENS,CDZ)
1028  do j = jjs, jje
1029  do i = iis, iie
1030 #ifdef DEBUG
1031 
1032 #endif
1033  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
1034  ! The flux at KS-1 can be non-zero.
1035  ! To reduce calculations, all the fluxes are set to zero.
1036  flux(ks-1,i,j) = 0.0_rp
1037 
1038  flux(ke,i,j) = 0.0_rp
1039  enddo
1040  enddo
1041 #ifdef DEBUG
1042  k = iundef; i = iundef; j = iundef
1043 #endif
1044 
1045  return
integer, public i_xvz
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj13_xvz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj13_xvz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension (ka,ia,ja), intent(in)  J13G,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation J13-flux at XVZ

Definition at line 1056 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

1056  implicit none
1057 
1058  real(RP), intent(inout) :: flux (KA,IA,JA)
1059  real(RP), intent(in) :: mom (KA,IA,JA)
1060  real(RP), intent(in) :: val (KA,IA,JA)
1061  real(RP), intent(in) :: DENS (KA,IA,JA)
1062  real(RP), intent(in) :: GSQRT (KA,IA,JA)
1063  real(RP), intent(in) :: J13G (KA,IA,JA)
1064  real(RP), intent(in) :: MAPF ( IA,JA,2)
1065  real(RP), intent(in) :: CDZ (KA)
1066  integer, intent(in) :: IIS, IIE, JJS, JJE
1067 
1068  real(RP) :: vel
1069  integer :: k, i, j
1070  !---------------------------------------------------------------------------
1071 
1072  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1073  !$omp private(vel) &
1074  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF) &
1075  !$omp shared(GSQRT,CDZ)
1076  do j = jjs, jje
1077  do i = iis, iie
1078  do k = ks, ke-1
1079  vel = ( f2h(k,1,i_xvz) &
1080  * 0.25_rp * ( mom(k+1,i,j)+mom(k+1,i-1,j)+mom(k+1,i,j+1)+mom(k+1,i-1,j+1) ) &
1081  + f2h(k,2,i_xvz) &
1082  * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1083  / ( f2h(k,1,i_xvz) &
1084  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1085  + f2h(k,2,i_xvz) &
1086  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1087  flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
1088  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
1089  enddo
1090  enddo
1091  enddo
1092 
1093  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
1094  !$omp private(vel) &
1095  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF) &
1096  !$omp shared(GSQRT,CDZ)
1097  do j = jjs, jje
1098  do i = iis, iie
1099  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
1100  ! The flux at KS-1 can be non-zero.
1101  ! To reduce calculations, all the fluxes are set to zero.
1102  flux(ks-1,i,j) = 0.0_rp
1103 
1104  flux(ke ,i,j) = 0.0_rp
1105  enddo
1106  enddo
1107 
1108  return
integer, public i_xvz
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj23_xvz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj23_xvz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension (ka,ia,ja), intent(in)  J23G,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation J23-flux at XVZ

Definition at line 1119 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

1119  implicit none
1120 
1121  real(RP), intent(inout) :: flux (KA,IA,JA)
1122  real(RP), intent(in) :: mom (KA,IA,JA)
1123  real(RP), intent(in) :: val (KA,IA,JA)
1124  real(RP), intent(in) :: DENS (KA,IA,JA)
1125  real(RP), intent(in) :: GSQRT (KA,IA,JA)
1126  real(RP), intent(in) :: J23G (KA,IA,JA)
1127  real(RP), intent(in) :: MAPF ( IA,JA,2)
1128  real(RP), intent(in) :: CDZ (KA)
1129  integer, intent(in) :: IIS, IIE, JJS, JJE
1130 
1131  real(RP) :: vel
1132  integer :: k, i, j
1133  !---------------------------------------------------------------------------
1134 
1135  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1136  !$omp private(vel) &
1137  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF) &
1138  !$omp shared(GSQRT,CDZ)
1139  do j = jjs, jje
1140  do i = iis, iie
1141  do k = ks, ke-1
1142  vel = ( f2h(k,1,i_xvz) &
1143  * mom(k+1,i,j) &
1144  + f2h(k,2,i_xvz) &
1145  * mom(k,i,j) ) &
1146  / ( f2h(k,1,i_xvz) &
1147  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1148  + f2h(k,2,i_xvz) &
1149  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1150  flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
1151  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
1152  enddo
1153  enddo
1154  enddo
1155 
1156  !$omp parallel do default(none) private(i,j) OMP_SCHEDULE_ collapse(2) &
1157  !$omp private(vel) &
1158  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF) &
1159  !$omp shared(GSQRT,CDZ)
1160  do j = jjs, jje
1161  do i = iis, iie
1162  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
1163  ! The flux at KS-1 can be non-zero.
1164  ! To reduce calculations, all the fluxes are set to zero.
1165  flux(ks-1,i,j) = 0.0_rp
1166 
1167  flux(ke ,i,j) = 0.0_rp
1168  enddo
1169  enddo
1170 
1171  return
integer, public i_xvz
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxx_xvz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_xvz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation X-flux at XV

Definition at line 1183 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

1183  implicit none
1184 
1185  real(RP), intent(inout) :: flux (KA,IA,JA)
1186  real(RP), intent(in) :: mom (KA,IA,JA)
1187  real(RP), intent(in) :: val (KA,IA,JA)
1188  real(RP), intent(in) :: DENS (KA,IA,JA)
1189  real(RP), intent(in) :: GSQRT (KA,IA,JA)
1190  real(RP), intent(in) :: MAPF ( IA,JA,2)
1191  real(RP), intent(in) :: num_diff(KA,IA,JA)
1192  real(RP), intent(in) :: CDZ (KA)
1193  integer, intent(in) :: IIS, IIE, JJS, JJE
1194 
1195  real(RP) :: vel
1196  integer :: k, i, j
1197  !---------------------------------------------------------------------------
1198 
1199  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1200  !$omp private(vel) &
1201  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff)
1202  do j = jjs, jje
1203  do i = iis-1, iie
1204  do k = ks, ke
1205 #ifdef DEBUG
1206  call check( __line__, mom(k,i ,j) )
1207  call check( __line__, mom(k,i,j-1) )
1208 
1209  call check( __line__, val(k,i,j) )
1210  call check( __line__, val(k,i+1,j) )
1211 
1212 #endif
1213  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1214  / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1215  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1216  * ( f1 * ( val(k,i+1,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i+1,j)-val(k,i,j) ) )
1217  enddo
1218  enddo
1219  enddo
1220 #ifdef DEBUG
1221  k = iundef; i = iundef; j = iundef
1222 #endif
1223 
1224  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxy_xvz_ud1()

subroutine, public scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_xvz_ud1 ( real(rp), dimension (ka,ia,ja), intent(inout)  flux,
real(rp), dimension (ka,ia,ja), intent(in)  mom,
real(rp), dimension (ka,ia,ja), intent(in)  val,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  GSQRT,
real(rp), dimension ( ia,ja,2), intent(in)  MAPF,
real(rp), dimension(ka,ia,ja), intent(in)  num_diff,
real(rp), dimension (ka), intent(in)  CDZ,
integer, intent(in)  IIS,
integer, intent(in)  IIE,
integer, intent(in)  JJS,
integer, intent(in)  JJE 
)

calculation Y-flux at XV

Definition at line 1236 of file scale_atmos_dyn_fvm_flux_ud1.F90.

References scale_debug::check(), scale_grid_index::ke, and scale_grid_index::ks.

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup(), and scale_atmos_dyn_tstep_short_fvm_heve::atmos_dyn_tstep_short_fvm_heve().

1236  implicit none
1237 
1238  real(RP), intent(inout) :: flux (KA,IA,JA)
1239  real(RP), intent(in) :: mom (KA,IA,JA)
1240  real(RP), intent(in) :: val (KA,IA,JA)
1241  real(RP), intent(in) :: DENS (KA,IA,JA)
1242  real(RP), intent(in) :: GSQRT (KA,IA,JA)
1243  real(RP), intent(in) :: MAPF ( IA,JA,2)
1244  real(RP), intent(in) :: num_diff(KA,IA,JA)
1245  real(RP), intent(in) :: CDZ (KA)
1246  integer, intent(in) :: IIS, IIE, JJS, JJE
1247 
1248  real(RP) :: vel
1249  integer :: k, i, j
1250  !---------------------------------------------------------------------------
1251 
1252  ! note that y-index is added by -1
1253 
1254  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1255  !$omp private(vel) &
1256  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff)
1257  do j = jjs, jje+1
1258  do i = iis, iie
1259  do k = ks, ke
1260 #ifdef DEBUG
1261  call check( __line__, mom(k,i ,j) )
1262  call check( __line__, mom(k,i,j-1) )
1263 
1264  call check( __line__, val(k,i,j-1) )
1265  call check( __line__, val(k,i,j) )
1266 
1267 #endif
1268  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1269  / ( dens(k,i,j) )
1270  flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1271  * ( f1 * ( val(k,i,j)+val(k,i,j-1) ) - sign(f1,vel) * ( val(k,i,j)-val(k,i,j-1) ) )
1272  enddo
1273  enddo
1274  enddo
1275 #ifdef DEBUG
1276  k = iundef; i = iundef; j = iundef
1277 #endif
1278 
1279  return
Here is the call graph for this function:
Here is the caller graph for this function: