SCALE-RM
Functions/Subroutines
scale_atmos_dyn_fvm_flux_ud3 Module Reference

module scale_atmos_dyn_fvm_flux_ud3 More...

Functions/Subroutines

subroutine, public atmos_dyn_fvm_flux_valuew_z_ud3 (valW, mflx, val, GSQRT, CDZ)
 value at XYW More...
 
subroutine, public atmos_dyn_fvm_fluxz_xyz_ud3 (flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation z-flux at XYZ More...
 
subroutine, public atmos_dyn_fvm_fluxx_xyz_ud3 (flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation X-flux at XYZ More...
 
subroutine, public atmos_dyn_fvm_fluxy_xyz_ud3 (flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
 calculation Y-flux at XYZ More...
 
subroutine, public atmos_dyn_fvm_fluxz_xyw_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3 (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_ud3

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

Function/Subroutine Documentation

◆ atmos_dyn_fvm_flux_valuew_z_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_flux_valuew_z_ud3 ( 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 105 of file scale_atmos_dyn_fvm_flux_ud3.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().

105  implicit none
106 
107  real(RP), intent(out) :: valw (ka)
108  real(RP), intent(in) :: mflx (ka)
109  real(RP), intent(in) :: val (ka)
110  real(RP), intent(in) :: gsqrt(ka)
111  real(RP), intent(in) :: cdz (ka)
112 
113  integer :: k
114  !---------------------------------------------------------------------------
115 
116  do k = ks+1, ke-2
117 #ifdef DEBUG
118  call check( __line__, mflx(k) )
119 
120  call check( __line__, val(k) )
121  call check( __line__, val(k+1) )
122 
123  call check( __line__, val(k-1) )
124  call check( __line__, val(k+2) )
125 
126 #endif
127  valw(k) = ( f31 * ( val(k+2)+val(k-1) ) + f32 * ( val(k+1)+val(k) ) ) &
128  - ( f31 * ( val(k+2)-val(k-1) ) + f33 * ( val(k+1)-val(k) ) ) * sign(1.0_rp,mflx(k))
129  enddo
130 #ifdef DEBUG
131  k = iundef
132 #endif
133 
134 #ifdef DEBUG
135 
136  call check( __line__, mflx(ks) )
137  call check( __line__, val(ks ) )
138  call check( __line__, val(ks+1) )
139  call check( __line__, mflx(ke-1) )
140  call check( __line__, val(ke ) )
141  call check( __line__, val(ke-1) )
142 
143 #endif
144 
145  valw(ks) = f2 * ( val(ks+1)+val(ks) )
146  valw(ke-1) = f2 * ( val(ke)+val(ke-1) )
147 
148  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxz_xyz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxz_xyz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 161 of file scale_atmos_dyn_fvm_flux_ud3.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().

161  implicit none
162 
163  real(RP), intent(out) :: flux (ka,ia,ja)
164  real(RP), intent(in) :: mflx (ka,ia,ja)
165  real(RP), intent(in) :: val (ka,ia,ja)
166  real(RP), intent(in) :: gsqrt (ka,ia,ja)
167 
168  real(RP), intent(in) :: num_diff(ka,ia,ja)
169 
170  real(RP), intent(in) :: cdz (ka)
171  integer, intent(in) :: iis, iie, jjs, jje
172 
173  real(RP) :: vel
174  integer :: k, i, j
175  !---------------------------------------------------------------------------
176 
177  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
178  do j = jjs, jje
179  do i = iis, iie
180  do k = ks+1, ke-2
181 #ifdef DEBUG
182  call check( __line__, mflx(k,i,j) )
183 
184  call check( __line__, val(k,i,j) )
185  call check( __line__, val(k+1,i,j) )
186 
187  call check( __line__, val(k-1,i,j) )
188  call check( __line__, val(k+2,i,j) )
189 
190 #endif
191  vel = mflx(k,i,j)
192  flux(k,i,j) = vel &
193  * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
194  - ( f31 * ( val(k+2,i,j)-val(k-1,i,j) ) + f33 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
195  + gsqrt(k,i,j) * num_diff(k,i,j)
196  enddo
197  enddo
198  enddo
199 #ifdef DEBUG
200  k = iundef; i = iundef; j = iundef
201 #endif
202 
203  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
204  do j = jjs, jje
205  do i = iis, iie
206 #ifdef DEBUG
207 
208  call check( __line__, mflx(ks,i,j) )
209  call check( __line__, val(ks ,i,j) )
210  call check( __line__, val(ks+1,i,j) )
211  call check( __line__, mflx(ke-1,i,j) )
212  call check( __line__, val(ke ,i,j) )
213  call check( __line__, val(ke-1,i,j) )
214 
215 #endif
216  flux(ks-1,i,j) = 0.0_rp
217 
218  vel = mflx(ks,i,j)
219  flux(ks,i,j) = vel &
220  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) ) &
221  + gsqrt(ks,i,j) * num_diff(ks,i,j)
222  vel = mflx(ke-1,i,j)
223  flux(ke-1,i,j) = vel &
224  * ( f2 * ( val(ke,i,j)+val(ke-1,i,j) ) ) &
225  + gsqrt(ke-1,i,j) * num_diff(ke-1,i,j)
226 
227  flux(ke ,i,j) = 0.0_rp
228  enddo
229  enddo
230 #ifdef DEBUG
231  k = iundef; i = iundef; j = iundef
232 #endif
233 
234  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxx_xyz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxx_xyz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 247 of file scale_atmos_dyn_fvm_flux_ud3.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().

247  implicit none
248 
249  real(RP), intent(out) :: flux (ka,ia,ja)
250  real(RP), intent(in) :: mflx (ka,ia,ja)
251  real(RP), intent(in) :: val (ka,ia,ja)
252  real(RP), intent(in) :: gsqrt (ka,ia,ja)
253 
254  real(RP), intent(in) :: num_diff(ka,ia,ja)
255 
256  real(RP), intent(in) :: cdz(ka)
257  integer, intent(in) :: iis, iie, jjs, jje
258 
259  real(RP) :: vel
260  integer :: k, i, j
261  !---------------------------------------------------------------------------
262 
263  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
264  do j = jjs, jje
265  do i = iis-1, iie
266  do k = ks, ke
267 #ifdef DEBUG
268  call check( __line__, mflx(k,i,j) )
269 
270  call check( __line__, val(k,i,j) )
271  call check( __line__, val(k,i+1,j) )
272 
273  call check( __line__, val(k,i-1,j) )
274  call check( __line__, val(k,i+2,j) )
275 
276 #endif
277  vel = mflx(k,i,j)
278  flux(k,i,j) = vel &
279  * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
280  - ( f31 * ( val(k,i+2,j)-val(k,i-1,j) ) + f33 * ( val(k,i+1,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
281  + gsqrt(k,i,j) * num_diff(k,i,j)
282  enddo
283  enddo
284  enddo
285 #ifdef DEBUG
286  k = iundef; i = iundef; j = iundef
287 #endif
288 
289  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxy_xyz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxy_xyz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 302 of file scale_atmos_dyn_fvm_flux_ud3.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().

302  implicit none
303 
304  real(RP), intent(out) :: flux (ka,ia,ja)
305  real(RP), intent(in) :: mflx (ka,ia,ja)
306  real(RP), intent(in) :: val (ka,ia,ja)
307  real(RP), intent(in) :: gsqrt (ka,ia,ja)
308 
309  real(RP), intent(in) :: num_diff(ka,ia,ja)
310 
311  real(RP), intent(in) :: cdz(ka)
312  integer, intent(in) :: iis, iie, jjs, jje
313 
314  real(RP) :: vel
315  integer :: k, i, j
316  !---------------------------------------------------------------------------
317 
318  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
319  do j = jjs-1, jje
320  do i = iis, iie
321  do k = ks, ke
322 #ifdef DEBUG
323  call check( __line__, mflx(k,i,j) )
324 
325  call check( __line__, val(k,i,j) )
326  call check( __line__, val(k,i,j+1) )
327 
328  call check( __line__, val(k,i,j-1) )
329  call check( __line__, val(k,i,j+2) )
330 
331 #endif
332  vel = mflx(k,i,j)
333  flux(k,i,j) = vel &
334  * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
335  - ( f31 * ( val(k,i,j+2)-val(k,i,j-1) ) + f33 * ( val(k,i,j+1)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
336  + gsqrt(k,i,j) * num_diff(k,i,j)
337  enddo
338  enddo
339  enddo
340 #ifdef DEBUG
341  k = iundef; i = iundef; j = iundef
342 #endif
343 
344  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxz_xyw_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxz_xyw_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 360 of file scale_atmos_dyn_fvm_flux_ud3.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().

360  implicit none
361 
362  real(RP), intent(out) :: flux (ka,ia,ja)
363  real(RP), intent(in) :: mom (ka,ia,ja)
364  real(RP), intent(in) :: val (ka,ia,ja)
365  real(RP), intent(in) :: dens (ka,ia,ja)
366  real(RP), intent(in) :: gsqrt (ka,ia,ja)
367  real(RP), intent(in) :: j33g
368 
369  real(RP), intent(in) :: num_diff(ka,ia,ja)
370 
371  real(RP), intent(in) :: cdz (ka)
372  real(RP), intent(in) :: fdz (ka-1)
373  real(RP), intent(in) :: dtrk
374  integer, intent(in) :: iis, iie, jjs, jje
375 
376  real(RP) :: vel
377  real(RP) :: sw
378  integer :: k, i, j
379  !---------------------------------------------------------------------------
380 
381  ! note than z-index is added by -1
382 
383  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
384  do j = jjs, jje
385  do i = iis, iie
386  do k = ks+1, ke-1
387 #ifdef DEBUG
388  call check( __line__, mom(k-1,i,j) )
389  call check( __line__, mom(k ,i,j) )
390 
391  call check( __line__, val(k-1,i,j) )
392  call check( __line__, val(k,i,j) )
393 
394  call check( __line__, val(k-2,i,j) )
395  call check( __line__, val(k+1,i,j) )
396 
397 #endif
398  vel = ( 0.5_rp * ( mom(k-1,i,j) &
399  + mom(k,i,j) ) ) &
400  / dens(k,i,j)
401  flux(k-1,i,j) = j33g * vel &
402  * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
403  - ( f31 * ( val(k+1,i,j)-val(k-2,i,j) ) + f33 * ( val(k,i,j)-val(k-1,i,j) ) ) * sign(1.0_rp,vel) ) &
404  + gsqrt(k,i,j) * num_diff(k,i,j)
405  enddo
406  enddo
407  enddo
408 #ifdef DEBUG
409  k = iundef; i = iundef; j = iundef
410 #endif
411 
412  !$omp parallel do private(i,j,sw) OMP_SCHEDULE_ collapse(2)
413  do j = jjs, jje
414  do i = iis, iie
415 #ifdef DEBUG
416 
417 #endif
418  flux(ks-1,i,j) = 0.0_rp ! k = KS
419 
420  ! if w>0; min(f,w*dz/dt)
421  ! else ; max(f,w*dz/dt) = -min(-f,-w*dz/dt)
422  sw = sign( 1.0_rp, mom(ks,i,j) )
423  flux(ks ,i,j) = sw * min( sw*flux(ks,i,j), sw*val(ks,i,j)*gsqrt(ks,i,j)*fdz(ks)/dtrk )
424 
425 
426  flux(ke-1,i,j) = 0.0_rp ! k = KE
427  flux(ke ,i,j) = 0.0_rp ! k = KE+1
428  enddo
429  enddo
430 
431  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj13_xyw_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxj13_xyw_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 443 of file scale_atmos_dyn_fvm_flux_ud3.F90.

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

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

443  implicit none
444 
445  real(RP), intent(out) :: flux (ka,ia,ja)
446  real(RP), intent(in) :: mom (ka,ia,ja)
447  real(RP), intent(in) :: val (ka,ia,ja)
448  real(RP), intent(in) :: dens (ka,ia,ja)
449  real(RP), intent(in) :: gsqrt (ka,ia,ja)
450  real(RP), intent(in) :: j13g (ka,ia,ja)
451  real(RP), intent(in) :: mapf ( ia,ja,2)
452  real(RP), intent(in) :: cdz (ka)
453  integer, intent(in) :: iis, iie, jjs, jje
454 
455  real(RP) :: vel
456  integer :: k, i, j
457  !---------------------------------------------------------------------------
458 
459  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
460  do j = jjs, jje
461  do i = iis, iie
462  do k = ks+1, ke-1
463  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
464  / dens(k,i,j)
465  flux(k-1,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
466  * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
467  - ( f31 * ( val(k+1,i,j)-val(k-2,i,j) ) + f33 * ( val(k,i,j)-val(k-1,i,j) ) ) * sign(1.0_rp,vel) )
468  enddo
469  enddo
470  enddo
471 
472  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
473  do j = jjs, jje
474  do i = iis, iie
475  flux(ks-1,i,j) = 0.0_rp
476 
477  flux(ke-1,i,j) = 0.0_rp
478  enddo
479  enddo
480 
481  return
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj23_xyw_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxj23_xyw_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 492 of file scale_atmos_dyn_fvm_flux_ud3.F90.

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

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

492  implicit none
493 
494  real(RP), intent(out) :: flux (ka,ia,ja)
495  real(RP), intent(in) :: mom (ka,ia,ja)
496  real(RP), intent(in) :: val (ka,ia,ja)
497  real(RP), intent(in) :: dens (ka,ia,ja)
498  real(RP), intent(in) :: gsqrt (ka,ia,ja)
499  real(RP), intent(in) :: j23g (ka,ia,ja)
500  real(RP), intent(in) :: mapf ( ia,ja,2)
501  real(RP), intent(in) :: cdz (ka)
502  integer, intent(in) :: iis, iie, jjs, jje
503 
504  real(RP) :: vel
505  integer :: k, i, j
506  !---------------------------------------------------------------------------
507 
508  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
509  do j = jjs, jje
510  do i = iis, iie
511  do k = ks+1, ke-1
512  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
513  / dens(k,i,j)
514  flux(k-1,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
515  * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
516  - ( f31 * ( val(k+1,i,j)-val(k-2,i,j) ) + f33 * ( val(k,i,j)-val(k-1,i,j) ) ) * sign(1.0_rp,vel) )
517  enddo
518  enddo
519  enddo
520 
521  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
522  do j = jjs, jje
523  do i = iis, iie
524  flux(ks-1,i,j) = 0.0_rp
525 
526  flux(ke-1,i,j) = 0.0_rp
527  enddo
528  enddo
529 
530  return
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxx_xyw_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxx_xyw_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 545 of file scale_atmos_dyn_fvm_flux_ud3.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().

545  implicit none
546 
547  real(RP), intent(out) :: flux (ka,ia,ja)
548  real(RP), intent(in) :: mom (ka,ia,ja)
549  real(RP), intent(in) :: val (ka,ia,ja)
550  real(RP), intent(in) :: dens (ka,ia,ja)
551  real(RP), intent(in) :: gsqrt (ka,ia,ja)
552  real(RP), intent(in) :: mapf ( ia,ja,2)
553 
554  real(RP), intent(in) :: num_diff(ka,ia,ja)
555 
556  real(RP), intent(in) :: cdz (ka)
557  integer, intent(in) :: iis, iie, jjs, jje
558 
559  real(RP) :: vel
560  integer :: k, i, j
561  !---------------------------------------------------------------------------
562 
563  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
564  do j = jjs, jje
565  do i = iis-1, iie
566  do k = ks, ke-1
567 #ifdef DEBUG
568  call check( __line__, mom(k ,i,j) )
569  call check( __line__, mom(k+1,i,j) )
570 
571  call check( __line__, val(k,i,j) )
572  call check( __line__, val(k,i+1,j) )
573 
574  call check( __line__, val(k,i-1,j) )
575  call check( __line__, val(k,i+2,j) )
576 
577 #endif
578  vel = ( f2h(k,1,i_uyz) &
579  * mom(k+1,i,j) &
580  + f2h(k,2,i_uyz) &
581  * mom(k,i,j) ) &
582  / ( f2h(k,1,i_xyz) &
583  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
584  + f2h(k,2,i_xyz) &
585  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
586  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
587  * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
588  - ( f31 * ( val(k,i+2,j)-val(k,i-1,j) ) + f33 * ( val(k,i+1,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
589  + gsqrt(k,i,j) * num_diff(k,i,j)
590  enddo
591  enddo
592  enddo
593 #ifdef DEBUG
594  k = iundef; i = iundef; j = iundef
595 #endif
596 
597  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
598  do j = jjs, jje
599  do i = iis-1, iie
600  flux(ke,i,j) = 0.0_rp
601  enddo
602  enddo
603 #ifdef DEBUG
604  k = iundef; i = iundef; j = iundef
605 #endif
606 
607  return
integer, public i_uyz
integer, public i_xyz
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxy_xyw_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxy_xyw_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 621 of file scale_atmos_dyn_fvm_flux_ud3.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().

621  implicit none
622 
623  real(RP), intent(out) :: flux (ka,ia,ja)
624  real(RP), intent(in) :: mom (ka,ia,ja)
625  real(RP), intent(in) :: val (ka,ia,ja)
626  real(RP), intent(in) :: dens (ka,ia,ja)
627  real(RP), intent(in) :: gsqrt (ka,ia,ja)
628  real(RP), intent(in) :: mapf ( ia,ja,2)
629 
630  real(RP), intent(in) :: num_diff(ka,ia,ja)
631 
632  real(RP), intent(in) :: cdz (ka)
633  integer, intent(in) :: iis, iie, jjs, jje
634 
635  real(RP) :: vel
636  integer :: k, i, j
637  !---------------------------------------------------------------------------
638 
639  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
640  do j = jjs-1, jje
641  do i = iis, iie
642  do k = ks, ke-1
643 #ifdef DEBUG
644  call check( __line__, mom(k ,i,j) )
645  call check( __line__, mom(k+1,i,j) )
646 
647  call check( __line__, val(k,i,j) )
648  call check( __line__, val(k,i,j+1) )
649 
650  call check( __line__, val(k,i,j-1) )
651  call check( __line__, val(k,i,j+2) )
652 
653 #endif
654  vel = ( f2h(k,1,i_xvz) &
655  * mom(k+1,i,j) &
656  + f2h(k,2,i_xvz) &
657  * mom(k,i,j) ) &
658  / ( f2h(k,1,i_xyz) &
659  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
660  + f2h(k,2,i_xyz) &
661  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
662  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
663  * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
664  - ( f31 * ( val(k,i,j+2)-val(k,i,j-1) ) + f33 * ( val(k,i,j+1)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
665  + gsqrt(k,i,j) * num_diff(k,i,j)
666  enddo
667  enddo
668  enddo
669 #ifdef DEBUG
670  k = iundef; i = iundef; j = iundef
671 #endif
672 
673  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
674  do j = jjs-1, jje
675  do i = iis, iie
676  flux(ke,i,j) = 0.0_rp
677  enddo
678  enddo
679 #ifdef DEBUG
680  k = iundef; i = iundef; j = iundef
681 #endif
682 
683  return
integer, public i_xvz
integer, public i_xyz
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxz_uyz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxz_uyz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 698 of file scale_atmos_dyn_fvm_flux_ud3.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().

698  implicit none
699 
700  real(RP), intent(out) :: flux (ka,ia,ja)
701  real(RP), intent(in) :: mom (ka,ia,ja)
702  real(RP), intent(in) :: val (ka,ia,ja)
703  real(RP), intent(in) :: dens (ka,ia,ja)
704  real(RP), intent(in) :: gsqrt (ka,ia,ja)
705  real(RP), intent(in) :: j33g
706 
707  real(RP), intent(in) :: num_diff(ka,ia,ja)
708 
709  real(RP), intent(in) :: cdz (ka)
710  integer, intent(in) :: iis, iie, jjs, jje
711 
712  real(RP) :: vel
713  integer :: k, i, j
714  !---------------------------------------------------------------------------
715 
716  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
717  do j = jjs, jje
718  do i = iis, iie
719  do k = ks+1, ke-2
720 #ifdef DEBUG
721  call check( __line__, mom(k,i,j) )
722  call check( __line__, mom(k,i+1,j) )
723 
724  call check( __line__, val(k,i,j) )
725  call check( __line__, val(k+1,i,j) )
726 
727  call check( __line__, val(k-1,i,j) )
728  call check( __line__, val(k+2,i,j) )
729 
730 #endif
731  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
732  / ( f2h(k,1,i_xyz) &
733  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
734  + f2h(k,2,i_xyz) &
735  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
736  flux(k,i,j) = j33g * vel &
737  * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
738  - ( f31 * ( val(k+2,i,j)-val(k-1,i,j) ) + f33 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
739  + gsqrt(k,i,j) * num_diff(k,i,j)
740  enddo
741  enddo
742  enddo
743 #ifdef DEBUG
744  k = iundef; i = iundef; j = iundef
745 #endif
746 
747  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
748  do j = jjs, jje
749  do i = iis, iie
750 #ifdef DEBUG
751 
752  call check( __line__, mom(ks,i ,j) )
753  call check( __line__, mom(ks,i+1,j) )
754  call check( __line__, val(ks+1,i,j) )
755  call check( __line__, val(ks,i,j) )
756 
757 #endif
758  flux(ks-1,i,j) = 0.0_rp
759 
760  vel = ( 0.5_rp * ( mom(ks,i,j)+mom(ks,i+1,j) ) ) &
761  / ( f2h(ks,1,i_xyz) &
762  * 0.5_rp * ( dens(ks+1,i,j)+dens(ks+1,i+1,j) ) &
763  + f2h(ks,2,i_xyz) &
764  * 0.5_rp * ( dens(ks,i,j)+dens(ks,i+1,j) ) )
765  flux(ks,i,j) = j33g * vel &
766  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) ) &
767  + gsqrt(ks,i,j) * num_diff(ks,i,j)
768  vel = ( 0.5_rp * ( mom(ke-1,i,j)+mom(ke-1,i+1,j) ) ) &
769  / ( f2h(ke-1,1,i_xyz) &
770  * 0.5_rp * ( dens(ke,i,j)+dens(ke,i+1,j) ) &
771  + f2h(ke-1,2,i_xyz) &
772  * 0.5_rp * ( dens(ke-1,i,j)+dens(ke-1,i+1,j) ) )
773  flux(ke-1,i,j) = j33g * vel &
774  * ( f2 * ( val(ke,i,j)+val(ke-1,i,j) ) ) &
775  + gsqrt(ke-1,i,j) * num_diff(ke-1,i,j)
776 
777  flux(ke,i,j) = 0.0_rp
778  enddo
779  enddo
780 #ifdef DEBUG
781  k = iundef; i = iundef; j = iundef
782 #endif
783 
784  return
integer, public i_xyz
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj13_uyz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxj13_uyz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 795 of file scale_atmos_dyn_fvm_flux_ud3.F90.

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

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

795  implicit none
796 
797  real(RP), intent(out) :: flux (ka,ia,ja)
798  real(RP), intent(in) :: mom (ka,ia,ja)
799  real(RP), intent(in) :: val (ka,ia,ja)
800  real(RP), intent(in) :: dens (ka,ia,ja)
801  real(RP), intent(in) :: gsqrt (ka,ia,ja)
802  real(RP), intent(in) :: j13g (ka,ia,ja)
803  real(RP), intent(in) :: mapf ( ia,ja,2)
804  real(RP), intent(in) :: cdz (ka)
805  integer, intent(in) :: iis, iie, jjs, jje
806 
807  real(RP) :: vel
808  integer :: k, i, j
809  !---------------------------------------------------------------------------
810 
811  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
812  do j = jjs, jje
813  do i = iis, iie
814  do k = ks+1, ke-2
815  vel = ( f2h(k,1,i_uyz) &
816  * mom(k+1,i,j) &
817  + f2h(k,2,i_uyz) &
818  * mom(k,i,j) ) &
819  / ( f2h(k,1,i_xyz) &
820  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
821  + f2h(k,2,i_xyz) &
822  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
823  flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
824  * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
825  - ( f31 * ( val(k+2,i,j)-val(k-1,i,j) ) + f33 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) )
826  enddo
827  enddo
828  enddo
829 
830  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
831  do j = jjs, jje
832  do i = iis, iie
833  flux(ks-1,i,j) = 0.0_rp
834 
835  vel = ( f2h(ks,1,i_uyz) &
836  * mom(ks+1,i,j) &
837  + f2h(ks,2,i_uyz) &
838  * mom(ks,i,j) ) &
839  / ( f2h(ks,1,i_xyz) &
840  * 0.5_rp * ( dens(ks+1,i,j)+dens(ks+1,i+1,j) ) &
841  + f2h(ks,2,i_xyz) &
842  * 0.5_rp * ( dens(ks,i,j)+dens(ks,i+1,j) ) )
843  flux(ks,i,j) = j13g(ks,i,j) / mapf(i,j,+2) * vel &
844  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) )
845  vel = ( f2h(ke-1,1,i_uyz) &
846  * mom(ke,i,j) &
847  + f2h(ke-1,2,i_uyz) &
848  * mom(ke-1,i,j) ) &
849  / ( f2h(ke-1,1,i_xyz) &
850  * 0.5_rp * ( dens(ke,i,j)+dens(ke,i+1,j) ) &
851  + f2h(ke-1,2,i_xyz) &
852  * 0.5_rp * ( dens(ke-1,i,j)+dens(ke-1,i+1,j) ) )
853  flux(ke-1,i,j) = j13g(ke-1,i,j) / mapf(i,j,+2) * vel &
854  * ( f2 * ( val(ke,i,j)+val(ke-1,i,j) ) )
855 
856  flux(ke ,i,j) = 0.0_rp
857  enddo
858  enddo
859 
860  return
integer, public i_uyz
integer, public i_xyz
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj23_uyz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxj23_uyz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 871 of file scale_atmos_dyn_fvm_flux_ud3.F90.

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

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

871  implicit none
872 
873  real(RP), intent(out) :: flux (ka,ia,ja)
874  real(RP), intent(in) :: mom (ka,ia,ja)
875  real(RP), intent(in) :: val (ka,ia,ja)
876  real(RP), intent(in) :: dens (ka,ia,ja)
877  real(RP), intent(in) :: gsqrt (ka,ia,ja)
878  real(RP), intent(in) :: j23g (ka,ia,ja)
879  real(RP), intent(in) :: mapf ( ia,ja,2)
880  real(RP), intent(in) :: cdz (ka)
881  integer, intent(in) :: iis, iie, jjs, jje
882 
883  real(RP) :: vel
884  integer :: k, i, j
885  !---------------------------------------------------------------------------
886 
887  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
888  do j = jjs, jje
889  do i = iis, iie
890  do k = ks+1, ke-2
891  vel = ( f2h(k,1,i_xvz) &
892  * 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) ) &
893  + f2h(k,2,i_xvz) &
894  * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
895  / ( f2h(k,1,i_xyz) &
896  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
897  + f2h(k,2,i_xyz) &
898  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
899  flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
900  * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
901  - ( f31 * ( val(k+2,i,j)-val(k-1,i,j) ) + f33 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) )
902  enddo
903  enddo
904  enddo
905 
906  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
907  do j = jjs, jje
908  do i = iis, iie
909  flux(ks-1,i,j) = 0.0_rp
910 
911  vel = ( f2h(ks,1,i_xvz) &
912  * 0.25_rp * ( mom(ks+1,i,j)+mom(ks+1,i+1,j)+mom(ks+1,i,j-1)+mom(ks+1,i+1,j-1) ) &
913  + f2h(ks,2,i_xvz) &
914  * 0.25_rp * ( mom(ks,i,j)+mom(ks,i+1,j)+mom(ks,i,j-1)+mom(ks,i+1,j-1) ) ) &
915  / ( f2h(ks,1,i_xyz) &
916  * 0.5_rp * ( dens(ks+1,i,j)+dens(ks+1,i+1,j) ) &
917  + f2h(ks,2,i_xyz) &
918  * 0.5_rp * ( dens(ks,i,j)+dens(ks,i+1,j) ) )
919  flux(ks,i,j) = j23g(ks,i,j) / mapf(i,j,+1) * vel &
920  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) )
921  vel = ( f2h(ke-1,1,i_xvz) &
922  * 0.25_rp * ( mom(ke,i,j)+mom(ke,i+1,j)+mom(ke,i,j-1)+mom(ke,i+1,j-1) ) &
923  + f2h(ke-1,2,i_xvz) &
924  * 0.25_rp * ( mom(ke-1,i,j)+mom(ke-1,i+1,j)+mom(ke-1,i,j-1)+mom(ke-1,i+1,j-1) ) ) &
925  / ( f2h(ke-1,1,i_xyz) &
926  * 0.5_rp * ( dens(ke,i,j)+dens(ke,i+1,j) ) &
927  + f2h(ke-1,2,i_xyz) &
928  * 0.5_rp * ( dens(ke-1,i,j)+dens(ke-1,i+1,j) ) )
929  flux(ke-1,i,j) = j23g(ke-1,i,j) / mapf(i,j,+1) * vel &
930  * ( f2 * ( val(ke,i,j)+val(ke-1,i,j) ) )
931 
932  flux(ke ,i,j) = 0.0_rp
933  enddo
934  enddo
935 
936  return
integer, public i_xvz
integer, public i_xyz
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxx_uyz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxx_uyz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 950 of file scale_atmos_dyn_fvm_flux_ud3.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().

950  implicit none
951 
952  real(RP), intent(out) :: flux (ka,ia,ja)
953  real(RP), intent(in) :: mom (ka,ia,ja)
954  real(RP), intent(in) :: val (ka,ia,ja)
955  real(RP), intent(in) :: dens (ka,ia,ja)
956  real(RP), intent(in) :: gsqrt (ka,ia,ja)
957  real(RP), intent(in) :: mapf ( ia,ja,2)
958 
959  real(RP), intent(in) :: num_diff(ka,ia,ja)
960 
961  real(RP), intent(in) :: cdz (ka)
962  integer, intent(in) :: iis, iie, jjs, jje
963 
964  real(RP) :: vel
965  integer :: k, i, j
966  !---------------------------------------------------------------------------
967 
968  ! note that x-index is added by -1
969 
970  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
971  do j = jjs, jje
972  do i = iis, iie+1
973  do k = ks, ke
974 #ifdef DEBUG
975  call check( __line__, mom(k,i ,j) )
976  call check( __line__, mom(k,i-1,j) )
977 
978  call check( __line__, val(k,i-1,j) )
979  call check( __line__, val(k,i,j) )
980 
981  call check( __line__, val(k,i-2,j) )
982  call check( __line__, val(k,i+1,j) )
983 
984 #endif
985  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
986  / ( dens(k,i,j) )
987  flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
988  * ( ( f31 * ( val(k,i+1,j)+val(k,i-2,j) ) + f32 * ( val(k,i,j)+val(k,i-1,j) ) ) &
989  - ( f31 * ( val(k,i+1,j)-val(k,i-2,j) ) + f33 * ( val(k,i,j)-val(k,i-1,j) ) ) * sign(1.0_rp,vel) ) &
990  + gsqrt(k,i,j) * num_diff(k,i,j)
991  enddo
992  enddo
993  enddo
994 #ifdef DEBUG
995  k = iundef; i = iundef; j = iundef
996 #endif
997 
998  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxy_uyz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxy_uyz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 1012 of file scale_atmos_dyn_fvm_flux_ud3.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().

1012  implicit none
1013 
1014  real(RP), intent(out) :: flux (ka,ia,ja)
1015  real(RP), intent(in) :: mom (ka,ia,ja)
1016  real(RP), intent(in) :: val (ka,ia,ja)
1017  real(RP), intent(in) :: dens (ka,ia,ja)
1018  real(RP), intent(in) :: gsqrt (ka,ia,ja)
1019  real(RP), intent(in) :: mapf ( ia,ja,2)
1020 
1021  real(RP), intent(in) :: num_diff(ka,ia,ja)
1022 
1023  real(RP), intent(in) :: cdz (ka)
1024  integer, intent(in) :: iis, iie, jjs, jje
1025 
1026  real(RP) :: vel
1027  integer :: k, i, j
1028  !---------------------------------------------------------------------------
1029 
1030  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
1031  do j = jjs-1, jje
1032  do i = iis, iie
1033  do k = ks, ke
1034 #ifdef DEBUG
1035  call check( __line__, mom(k,i ,j) )
1036  call check( __line__, mom(k,i-1,j) )
1037 
1038  call check( __line__, val(k,i,j) )
1039  call check( __line__, val(k,i,j+1) )
1040 
1041  call check( __line__, val(k,i,j-1) )
1042  call check( __line__, val(k,i,j+2) )
1043 
1044 #endif
1045  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
1046  / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1047  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1048  * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
1049  - ( f31 * ( val(k,i,j+2)-val(k,i,j-1) ) + f33 * ( val(k,i,j+1)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
1050  + gsqrt(k,i,j) * num_diff(k,i,j)
1051  enddo
1052  enddo
1053  enddo
1054 #ifdef DEBUG
1055  k = iundef; i = iundef; j = iundef
1056 #endif
1057 
1058  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxz_xvz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxz_xvz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 1074 of file scale_atmos_dyn_fvm_flux_ud3.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().

1074  implicit none
1075 
1076  real(RP), intent(out) :: flux (ka,ia,ja)
1077  real(RP), intent(in) :: mom (ka,ia,ja)
1078  real(RP), intent(in) :: val (ka,ia,ja)
1079  real(RP), intent(in) :: dens (ka,ia,ja)
1080  real(RP), intent(in) :: gsqrt (ka,ia,ja)
1081  real(RP), intent(in) :: j33g
1082 
1083  real(RP), intent(in) :: num_diff(ka,ia,ja)
1084 
1085  real(RP), intent(in) :: cdz (ka)
1086  integer, intent(in) :: iis, iie, jjs, jje
1087 
1088  real(RP) :: vel
1089  integer :: k, i, j
1090  !---------------------------------------------------------------------------
1091 
1092  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
1093  do j = jjs, jje
1094  do i = iis, iie
1095  do k = ks+1, ke-2
1096 #ifdef DEBUG
1097  call check( __line__, mom(k,i,j) )
1098  call check( __line__, mom(k,i,j+1) )
1099 
1100  call check( __line__, val(k,i,j) )
1101  call check( __line__, val(k+1,i,j) )
1102 
1103  call check( __line__, val(k-1,i,j) )
1104  call check( __line__, val(k+2,i,j) )
1105 
1106 #endif
1107  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1108  / ( f2h(k,1,i_xyz) &
1109  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1110  + f2h(k,2,i_xyz) &
1111  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1112  flux(k,i,j) = j33g * vel &
1113  * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1114  - ( f31 * ( val(k+2,i,j)-val(k-1,i,j) ) + f33 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
1115  + gsqrt(k,i,j) * num_diff(k,i,j)
1116  enddo
1117  enddo
1118  enddo
1119 #ifdef DEBUG
1120  k = iundef; i = iundef; j = iundef
1121 #endif
1122 
1123  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
1124  do j = jjs, jje
1125  do i = iis, iie
1126 #ifdef DEBUG
1127 
1128  call check( __line__, mom(ks,i ,j) )
1129  call check( __line__, mom(ks,i,j+1) )
1130  call check( __line__, val(ks+1,i,j) )
1131  call check( __line__, val(ks,i,j) )
1132 
1133 #endif
1134  flux(ks-1,i,j) = 0.0_rp
1135 
1136  vel = ( 0.5_rp * ( mom(ks,i,j)+mom(ks,i,j+1) ) ) &
1137  / ( f2h(ks,1,i_xyz) &
1138  * 0.5_rp * ( dens(ks+1,i,j)+dens(ks+1,i,j+1) ) &
1139  + f2h(ks,2,i_xyz) &
1140  * 0.5_rp * ( dens(ks,i,j)+dens(ks,i,j+1) ) )
1141  flux(ks,i,j) = j33g * vel &
1142  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) ) &
1143  + gsqrt(ks,i,j) * num_diff(ks,i,j)
1144  vel = ( 0.5_rp * ( mom(ke-1,i,j)+mom(ke-1,i,j+1) ) ) &
1145  / ( f2h(ke-1,1,i_xyz) &
1146  * 0.5_rp * ( dens(ke,i,j)+dens(ke,i,j+1) ) &
1147  + f2h(ke-1,2,i_xyz) &
1148  * 0.5_rp * ( dens(ke-1,i,j)+dens(ke-1,i,j+1) ) )
1149  flux(ke-1,i,j) = j33g * vel &
1150  * ( f2 * ( val(ke,i,j)+val(ke-1,i,j) ) ) &
1151  + gsqrt(ke-1,i,j) * num_diff(ke-1,i,j)
1152 
1153  flux(ke,i,j) = 0.0_rp
1154  enddo
1155  enddo
1156 #ifdef DEBUG
1157  k = iundef; i = iundef; j = iundef
1158 #endif
1159 
1160  return
integer, public i_xyz
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj13_xvz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxj13_xvz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 1171 of file scale_atmos_dyn_fvm_flux_ud3.F90.

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

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

1171  implicit none
1172 
1173  real(RP), intent(out) :: flux (ka,ia,ja)
1174  real(RP), intent(in) :: mom (ka,ia,ja)
1175  real(RP), intent(in) :: val (ka,ia,ja)
1176  real(RP), intent(in) :: dens (ka,ia,ja)
1177  real(RP), intent(in) :: gsqrt (ka,ia,ja)
1178  real(RP), intent(in) :: j13g (ka,ia,ja)
1179  real(RP), intent(in) :: mapf ( ia,ja,2)
1180  real(RP), intent(in) :: cdz (ka)
1181  integer, intent(in) :: iis, iie, jjs, jje
1182 
1183  real(RP) :: vel
1184  integer :: k, i, j
1185  !---------------------------------------------------------------------------
1186 
1187  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
1188  do j = jjs, jje
1189  do i = iis, iie
1190  do k = ks+1, ke-2
1191  vel = ( f2h(k,1,i_uyz) &
1192  * 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) ) &
1193  + f2h(k,2,i_uyz) &
1194  * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1195  / ( f2h(k,1,i_xyz) &
1196  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1197  + f2h(k,2,i_xyz) &
1198  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1199  flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
1200  * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1201  - ( f31 * ( val(k+2,i,j)-val(k-1,i,j) ) + f33 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) )
1202  enddo
1203  enddo
1204  enddo
1205 
1206  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
1207  do j = jjs, jje
1208  do i = iis, iie
1209  flux(ks-1,i,j) = 0.0_rp
1210 
1211  vel = ( f2h(ks,1,i_uyz) &
1212  * 0.25_rp * ( mom(ks+1,i,j)+mom(ks+1,i-1,j)+mom(ks+1,i,j+1)+mom(ks+1,i-1,j+1) ) &
1213  + f2h(ks,2,i_uyz) &
1214  * 0.25_rp * ( mom(ks,i,j)+mom(ks,i-1,j)+mom(ks,i,j+1)+mom(ks,i-1,j+1) ) ) &
1215  / ( f2h(ks,1,i_xyz) &
1216  * 0.5_rp * ( dens(ks+1,i,j)+dens(ks+1,i,j+1) ) &
1217  + f2h(ks,2,i_xyz) &
1218  * 0.5_rp * ( dens(ks,i,j)+dens(ks,i,j+1) ) )
1219  flux(ks,i,j) = j13g(ks,i,j) / mapf(i,j,+2) * vel &
1220  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) )
1221  vel = ( f2h(ke-1,1,i_uyz) &
1222  * 0.25_rp * ( mom(ke,i,j)+mom(ke,i-1,j)+mom(ke,i,j+1)+mom(ke,i-1,j+1) ) &
1223  + f2h(ke-1,2,i_uyz) &
1224  * 0.25_rp * ( mom(ke-1,i,j)+mom(ke-1,i-1,j)+mom(ke-1,i,j+1)+mom(ke-1,i-1,j+1) ) ) &
1225  / ( f2h(ke-1,1,i_xyz) &
1226  * 0.5_rp * ( dens(ke,i,j)+dens(ke,i,j+1) ) &
1227  + f2h(ke-1,2,i_xyz) &
1228  * 0.5_rp * ( dens(ke-1,i,j)+dens(ke-1,i,j+1) ) )
1229  flux(ke-1,i,j) = j13g(ke-1,i,j) / mapf(i,j,+2) * vel &
1230  * ( f2 * ( val(ke,i,j)+val(ke-1,i,j) ) )
1231 
1232  flux(ke ,i,j) = 0.0_rp
1233  enddo
1234  enddo
1235 
1236  return
integer, public i_uyz
integer, public i_xyz
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxj23_xvz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxj23_xvz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 1247 of file scale_atmos_dyn_fvm_flux_ud3.F90.

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

Referenced by scale_atmos_dyn_fvm_flux::atmos_dyn_fvm_flux_setup().

1247  implicit none
1248 
1249  real(RP), intent(out) :: flux (ka,ia,ja)
1250  real(RP), intent(in) :: mom (ka,ia,ja)
1251  real(RP), intent(in) :: val (ka,ia,ja)
1252  real(RP), intent(in) :: dens (ka,ia,ja)
1253  real(RP), intent(in) :: gsqrt (ka,ia,ja)
1254  real(RP), intent(in) :: j23g (ka,ia,ja)
1255  real(RP), intent(in) :: mapf ( ia,ja,2)
1256  real(RP), intent(in) :: cdz (ka)
1257  integer, intent(in) :: iis, iie, jjs, jje
1258 
1259  real(RP) :: vel
1260  integer :: k, i, j
1261  !---------------------------------------------------------------------------
1262 
1263  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
1264  do j = jjs, jje
1265  do i = iis, iie
1266  do k = ks+1, ke-2
1267  vel = ( f2h(k,1,i_xvz) &
1268  * mom(k+1,i,j) &
1269  + f2h(k,2,i_xvz) &
1270  * mom(k,i,j) ) &
1271  / ( f2h(k,1,i_xyz) &
1272  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1273  + f2h(k,2,i_xyz) &
1274  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1275  flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
1276  * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1277  - ( f31 * ( val(k+2,i,j)-val(k-1,i,j) ) + f33 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) )
1278  enddo
1279  enddo
1280  enddo
1281 
1282  !$omp parallel do private(i,j) OMP_SCHEDULE_ collapse(2)
1283  do j = jjs, jje
1284  do i = iis, iie
1285  flux(ks-1,i,j) = 0.0_rp
1286 
1287  vel = ( f2h(ks,1,i_xvz) &
1288  * mom(ks+1,i,j) &
1289  + f2h(ks,2,i_xvz) &
1290  * mom(ks,i,j) ) &
1291  / ( f2h(ks,1,i_xyz) &
1292  * 0.5_rp * ( dens(ks+1,i,j)+dens(ks+1,i,j+1) ) &
1293  + f2h(ks,2,i_xyz) &
1294  * 0.5_rp * ( dens(ks,i,j)+dens(ks,i,j+1) ) )
1295  flux(ks,i,j) = j23g(ks,i,j) / mapf(i,j,+1) * vel &
1296  * ( f2 * ( val(ks+1,i,j)+val(ks,i,j) ) )
1297  vel = ( f2h(ke-1,1,i_xvz) &
1298  * mom(ke,i,j) &
1299  + f2h(ke-1,2,i_xvz) &
1300  * mom(ke-1,i,j) ) &
1301  / ( f2h(ke-1,1,i_xyz) &
1302  * 0.5_rp * ( dens(ke,i,j)+dens(ke,i,j+1) ) &
1303  + f2h(ke-1,2,i_xyz) &
1304  * 0.5_rp * ( dens(ke-1,i,j)+dens(ke-1,i,j+1) ) )
1305  flux(ke-1,i,j) = j23g(ke-1,i,j) / mapf(i,j,+1) * vel &
1306  * ( f2 * ( val(ke,i,j)+val(ke-1,i,j) ) )
1307 
1308  flux(ke ,i,j) = 0.0_rp
1309  enddo
1310  enddo
1311 
1312  return
integer, public i_xvz
integer, public i_xyz
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxx_xvz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxx_xvz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 1326 of file scale_atmos_dyn_fvm_flux_ud3.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().

1326  implicit none
1327 
1328  real(RP), intent(out) :: flux (ka,ia,ja)
1329  real(RP), intent(in) :: mom (ka,ia,ja)
1330  real(RP), intent(in) :: val (ka,ia,ja)
1331  real(RP), intent(in) :: dens (ka,ia,ja)
1332  real(RP), intent(in) :: gsqrt (ka,ia,ja)
1333  real(RP), intent(in) :: mapf ( ia,ja,2)
1334 
1335  real(RP), intent(in) :: num_diff(ka,ia,ja)
1336 
1337  real(RP), intent(in) :: cdz (ka)
1338  integer, intent(in) :: iis, iie, jjs, jje
1339 
1340  real(RP) :: vel
1341  integer :: k, i, j
1342  !---------------------------------------------------------------------------
1343 
1344  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
1345  do j = jjs, jje
1346  do i = iis-1, iie
1347  do k = ks, ke
1348 #ifdef DEBUG
1349  call check( __line__, mom(k,i ,j) )
1350  call check( __line__, mom(k,i,j-1) )
1351 
1352  call check( __line__, val(k,i,j) )
1353  call check( __line__, val(k,i+1,j) )
1354 
1355  call check( __line__, val(k,i-1,j) )
1356  call check( __line__, val(k,i+2,j) )
1357 
1358 #endif
1359  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1360  / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1361  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1362  * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
1363  - ( f31 * ( val(k,i+2,j)-val(k,i-1,j) ) + f33 * ( val(k,i+1,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
1364  + gsqrt(k,i,j) * num_diff(k,i,j)
1365  enddo
1366  enddo
1367  enddo
1368 #ifdef DEBUG
1369  k = iundef; i = iundef; j = iundef
1370 #endif
1371 
1372  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_dyn_fvm_fluxy_xvz_ud3()

subroutine, public scale_atmos_dyn_fvm_flux_ud3::atmos_dyn_fvm_fluxy_xvz_ud3 ( real(rp), dimension (ka,ia,ja), intent(out)  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 1386 of file scale_atmos_dyn_fvm_flux_ud3.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().

1386  implicit none
1387 
1388  real(RP), intent(out) :: flux (ka,ia,ja)
1389  real(RP), intent(in) :: mom (ka,ia,ja)
1390  real(RP), intent(in) :: val (ka,ia,ja)
1391  real(RP), intent(in) :: dens (ka,ia,ja)
1392  real(RP), intent(in) :: gsqrt (ka,ia,ja)
1393  real(RP), intent(in) :: mapf ( ia,ja,2)
1394 
1395  real(RP), intent(in) :: num_diff(ka,ia,ja)
1396 
1397  real(RP), intent(in) :: cdz (ka)
1398  integer, intent(in) :: iis, iie, jjs, jje
1399 
1400  real(RP) :: vel
1401  integer :: k, i, j
1402  !---------------------------------------------------------------------------
1403 
1404  ! note that y-index is added by -1
1405 
1406  !$omp parallel do private(i,j,k) OMP_SCHEDULE_ collapse(2)
1407  do j = jjs, jje+1
1408  do i = iis, iie
1409  do k = ks, ke
1410 #ifdef DEBUG
1411  call check( __line__, mom(k,i ,j) )
1412  call check( __line__, mom(k,i,j-1) )
1413 
1414  call check( __line__, val(k,i,j-1) )
1415  call check( __line__, val(k,i,j) )
1416 
1417  call check( __line__, val(k,i,j-2) )
1418  call check( __line__, val(k,i,j+1) )
1419 
1420 #endif
1421  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1422  / ( dens(k,i,j) )
1423  flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1424  * ( ( f31 * ( val(k,i,j+1)+val(k,i,j-2) ) + f32 * ( val(k,i,j)+val(k,i,j-1) ) ) &
1425  - ( f31 * ( val(k,i,j+1)-val(k,i,j-2) ) + f33 * ( val(k,i,j)-val(k,i,j-1) ) ) * sign(1.0_rp,vel) ) &
1426  + gsqrt(k,i,j) * num_diff(k,i,j)
1427  enddo
1428  enddo
1429  enddo
1430 #ifdef DEBUG
1431  k = iundef; i = iundef; j = iundef
1432 #endif
1433 
1434  return
Here is the call graph for this function:
Here is the caller graph for this function: