SCALE-RM
scale_atmos_dyn_fvm_flux_ud1.F90
Go to the documentation of this file.
1 
2 !-------------------------------------------------------------------------------
11 !-------------------------------------------------------------------------------
12 ! Warning: This file was generated from atmos-rm/dynamics/scale_atmos_dyn_fvm_flux_udcd.F90.erb.
13 ! Do not edit this file.
14 !-------------------------------------------------------------------------------
15 #include "scalelib.h"
17  !-----------------------------------------------------------------------------
18  !
19  !++ used modules
20  !
21  use scale_precision
22  use scale_io
23  use scale_prof
25  use scale_index
26  use scale_tracer
27  use scale_prc
28 #ifdef DEBUG
29  use scale_debug, only: &
30  check
31  use scale_const, only: &
32  undef => const_undef, &
33  iundef => const_undef2
34 #endif
35  !-----------------------------------------------------------------------------
36  implicit none
37  private
38  !-----------------------------------------------------------------------------
39  !
40  !++ Public procedure
41  !
43 
47 
53 
59 
65 
66  !-----------------------------------------------------------------------------
67  !
68  !++ Public parameters & variables
69  !
70  !-----------------------------------------------------------------------------
71  !
72  !++ Private procedure
73  !
74 #if 1
75 #define F2H(k,p,q) (CDZ(k+p-1)*GSQRT(k+p-1,i,j)/(CDZ(k)*GSQRT(k,i,j)+CDZ(k+1)*GSQRT(k+1,i,j)))
76 #else
77 #define F2H(k,p,q) 0.5_RP
78 #endif
79  !-----------------------------------------------------------------------------
80  !
81  !++ Private parameters & variables
82  !
83 
84  real(RP), parameter :: F1 = 0.5_rp
85 
86  real(RP), parameter :: F2 = 0.5_rp ! F2 is always used to calculate flux near boundary.
87 
88 
89 
90 
91 
92 
93 contains
94  !-----------------------------------------------------------------------------
96 !OCL SERIAL
98  valW, &
99  mflx, val, GSQRT, &
100  CDZ )
101  !$acc routine vector
102  implicit none
103 
104  real(rp), intent(out) :: valw (ka)
105  real(rp), intent(in) :: mflx (ka)
106  real(rp), intent(in) :: val (ka)
107  real(rp), intent(in) :: gsqrt(ka)
108  real(rp), intent(in) :: cdz (ka)
109 
110  integer :: k
111  !---------------------------------------------------------------------------
112 
113  do k = ks, ke-1
114 #ifdef DEBUG
115  call check( __line__, mflx(k) )
116 
117  call check( __line__, val(k) )
118  call check( __line__, val(k+1) )
119 
120 #endif
121  valw(k) = f1 * ( val(k+1)+val(k) ) - sign(f1,mflx(k)) * ( val(k+1)-val(k) )
122  enddo
123 #ifdef DEBUG
124  k = iundef
125 #endif
126 
127 #ifdef DEBUG
128 
129 #endif
130 
131 
132  return
133  end subroutine atmos_dyn_fvm_flux_valuew_z_ud1
134 
135  !-----------------------------------------------------------------------------
137  subroutine atmos_dyn_fvm_fluxz_xyz_ud1( &
138  flux, &
139  mflx, val, GSQRT, &
140  num_diff, &
141  CDZ, &
142  IIS, IIE, JJS, JJE )
143  use scale_const, only: &
144  eps => const_eps
145  implicit none
146 
147  real(rp), intent(inout) :: flux (ka,ia,ja)
148  real(rp), intent(in) :: mflx (ka,ia,ja)
149  real(rp), intent(in) :: val (ka,ia,ja)
150  real(rp), intent(in) :: gsqrt (ka,ia,ja)
151  real(rp), intent(in) :: num_diff(ka,ia,ja)
152  real(rp), intent(in) :: cdz (ka)
153  integer, intent(in) :: iis, iie, jjs, jje
154 
155  real(rp) :: vel
156  integer :: k, i, j
157  !---------------------------------------------------------------------------
158 
159  !$omp parallel default(none) private(i,j,k, vel) &
160  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mflx,val,flux,GSQRT,num_diff,EPS)
161 
162  !$acc data copy(flux) copyin(mflx, val, GSQRT, num_diff, CDZ)
163 
164  !$omp do OMP_SCHEDULE_ collapse(2)
165  !$acc kernels
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  !$acc end kernels
183  !$omp end do nowait
184 #ifdef DEBUG
185  k = iundef; i = iundef; j = iundef
186 #endif
187 
188  !$omp do OMP_SCHEDULE_ collapse(2)
189  !$acc kernels
190  do j = jjs, jje
191  do i = iis, iie
192 #ifdef DEBUG
193 
194 #endif
195  flux(ks-1,i,j) = 0.0_rp
196 
197  flux(ke ,i,j) = 0.0_rp
198  enddo
199  enddo
200  !$acc end kernels
201  !$omp end do nowait
202 
203  !$acc end data
204 
205  !$omp end parallel
206 #ifdef DEBUG
207  k = iundef; i = iundef; j = iundef
208 #endif
209 
210  return
211  end subroutine atmos_dyn_fvm_fluxz_xyz_ud1
212 
213  !-----------------------------------------------------------------------------
215  subroutine atmos_dyn_fvm_fluxx_xyz_ud1( &
216  flux, &
217  mflx, val, GSQRT, &
218  num_diff, &
219  CDZ, &
220  IIS, IIE, JJS, JJE )
221  implicit none
222 
223  real(rp), intent(inout) :: flux (ka,ia,ja)
224  real(rp), intent(in) :: mflx (ka,ia,ja)
225  real(rp), intent(in) :: val (ka,ia,ja)
226  real(rp), intent(in) :: gsqrt (ka,ia,ja)
227  real(rp), intent(in) :: num_diff(ka,ia,ja)
228  real(rp), intent(in) :: cdz(ka)
229  integer, intent(in) :: iis, iie, jjs, jje
230 
231  real(rp) :: vel
232  integer :: k, i, j
233  !---------------------------------------------------------------------------
234 
235  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
236  !$omp private(vel) &
237  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mflx,val,flux,GSQRT,num_diff)
238  !$acc kernels
239  do j = jjs, jje
240  do i = iis-1, iie
241  do k = ks, ke
242 #ifdef DEBUG
243  call check( __line__, mflx(k,i,j) )
244 
245  call check( __line__, val(k,i,j) )
246  call check( __line__, val(k,i+1,j) )
247 
248 #endif
249  vel = mflx(k,i,j)
250  flux(k,i,j) = vel &
251  * ( f1 * ( val(k,i+1,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i+1,j)-val(k,i,j) ) )
252  enddo
253  enddo
254  enddo
255  !$acc end kernels
256 #ifdef DEBUG
257  k = iundef; i = iundef; j = iundef
258 #endif
259 
260  return
261  end subroutine atmos_dyn_fvm_fluxx_xyz_ud1
262 
263  !-----------------------------------------------------------------------------
265  subroutine atmos_dyn_fvm_fluxy_xyz_ud1( &
266  flux, &
267  mflx, val, GSQRT, &
268  num_diff, &
269  CDZ, &
270  IIS, IIE, JJS, JJE )
271  implicit none
272 
273  real(rp), intent(inout) :: flux (ka,ia,ja)
274  real(rp), intent(in) :: mflx (ka,ia,ja)
275  real(rp), intent(in) :: val (ka,ia,ja)
276  real(rp), intent(in) :: gsqrt (ka,ia,ja)
277  real(rp), intent(in) :: num_diff(ka,ia,ja)
278  real(rp), intent(in) :: cdz(ka)
279  integer, intent(in) :: iis, iie, jjs, jje
280 
281  real(rp) :: vel
282  integer :: k, i, j
283  !---------------------------------------------------------------------------
284 
285  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
286  !$omp private(vel) &
287  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mflx,val,flux,GSQRT,num_diff)
288  !$acc kernels
289  do j = jjs-1, jje
290  do i = iis, iie
291  do k = ks, ke
292 #ifdef DEBUG
293  call check( __line__, mflx(k,i,j) )
294 
295  call check( __line__, val(k,i,j) )
296  call check( __line__, val(k,i,j+1) )
297 
298 #endif
299  vel = mflx(k,i,j)
300  flux(k,i,j) = vel &
301  * ( f1 * ( val(k,i,j+1)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i,j+1)-val(k,i,j) ) )
302  enddo
303  enddo
304  enddo
305  !$acc end kernels
306 #ifdef DEBUG
307  k = iundef; i = iundef; j = iundef
308 #endif
309 
310  return
311  end subroutine atmos_dyn_fvm_fluxy_xyz_ud1
312 
313 
314  !-----------------------------------------------------------------------------
316  subroutine atmos_dyn_fvm_fluxz_xyw_ud1( &
317  flux, &
318  mom, val, DENS, &
319  GSQRT, J33G, &
320  num_diff, &
321  CDZ, FDZ, &
322  dtrk, &
323  IIS, IIE, JJS, JJE )
324  implicit none
325 
326  real(rp), intent(inout) :: flux (ka,ia,ja)
327  real(rp), intent(in) :: mom (ka,ia,ja)
328  real(rp), intent(in) :: val (ka,ia,ja)
329  real(rp), intent(in) :: dens (ka,ia,ja)
330  real(rp), intent(in) :: gsqrt (ka,ia,ja)
331  real(rp), intent(in) :: j33g
332  real(rp), intent(in) :: num_diff(ka,ia,ja)
333  real(rp), intent(in) :: cdz (ka)
334  real(rp), intent(in) :: fdz (ka-1)
335  real(rp), intent(in) :: dtrk
336  integer, intent(in) :: iis, iie, jjs, jje
337 
338  real(rp) :: vel
339  integer :: k, i, j
340  !---------------------------------------------------------------------------
341 
342  ! note than z-index is added by -1
343 
344  !$omp parallel default(none) private(i,j,k,vel) &
345  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,flux,J33G,GSQRT,num_diff,DENS,FDZ,dtrk)
346 
347  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, num_diff, CDZ, FDZ)
348 
349  !$omp do OMP_SCHEDULE_ collapse(2)
350  !$acc kernels
351  do j = jjs, jje
352  do i = iis, iie
353  do k = ks+1, ke-1
354 #ifdef DEBUG
355  call check( __line__, mom(k-1,i,j) )
356  call check( __line__, mom(k ,i,j) )
357 
358  call check( __line__, val(k-1,i,j) )
359  call check( __line__, val(k,i,j) )
360 
361 #endif
362  vel = ( 0.5_rp * ( mom(k-1,i,j) &
363  + mom(k,i,j) ) ) &
364  / dens(k,i,j)
365  flux(k-1,i,j) = j33g * vel &
366  * ( f1 * ( val(k,i,j)+val(k-1,i,j) ) - sign(f1,vel) * ( val(k,i,j)-val(k-1,i,j) ) )
367  enddo
368  enddo
369  enddo
370  !$acc end kernels
371  !$omp end do nowait
372 #ifdef DEBUG
373  k = iundef; i = iundef; j = iundef
374 #endif
375 
376  !$omp do OMP_SCHEDULE_ collapse(2)
377  !$acc kernels
378  do j = jjs, jje
379  do i = iis, iie
380 #ifdef DEBUG
381 
382 
383 #endif
384  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS.
385  ! The flux at KS can be non-zero.
386  ! To reduce calculations, all the fluxes are set to zero.
387  flux(ks-1,i,j) = 0.0_rp ! k = KS
388 
389 
390 
391  flux(ke-1,i,j) = 0.0_rp ! k = KE
392  flux(ke ,i,j) = 0.0_rp ! k = KE+1
393  enddo
394  enddo
395  !$acc end kernels
396  !$omp end do nowait
397 
398  !$acc end data
399 
400  !$omp end parallel
401 
402  return
403  end subroutine atmos_dyn_fvm_fluxz_xyw_ud1
404 
405 
406  !-----------------------------------------------------------------------------
408  subroutine atmos_dyn_fvm_fluxj13_xyw_ud1( &
409  flux, &
410  mom, val, DENS, &
411  GSQRT, J13G, MAPF, &
412  CDZ, TwoD, &
413  IIS, IIE, JJS, JJE )
414  implicit none
415 
416  real(rp), intent(inout) :: flux (ka,ia,ja)
417  real(rp), intent(in) :: mom (ka,ia,ja)
418  real(rp), intent(in) :: val (ka,ia,ja)
419  real(rp), intent(in) :: dens (ka,ia,ja)
420  real(rp), intent(in) :: gsqrt (ka,ia,ja)
421  real(rp), intent(in) :: j13g (ka,ia,ja)
422  real(rp), intent(in) :: mapf ( ia,ja,2)
423  real(rp), intent(in) :: cdz (ka)
424  logical, intent(in) :: twod
425  integer, intent(in) :: iis, iie, jjs, jje
426 
427  real(rp) :: vel
428  integer :: k, i, j
429  !---------------------------------------------------------------------------
430 
431  !$omp parallel default(none) private(i,j,k,vel) &
432  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF)
433 
434  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, J13G, MAPF, CDZ)
435 
436  !$omp do OMP_SCHEDULE_ collapse(2)
437  !$acc kernels
438  do j = jjs, jje
439  do i = iis, iie
440  do k = ks+2, ke-1
441  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
442  / dens(k,i,j)
443  vel = vel * j13g(k,i,j)
444  flux(k-1,i,j) = vel / mapf(i,j,+2) &
445  * ( f1 * ( val(k,i,j)+val(k-1,i,j) ) - sign(f1,vel) * ( val(k,i,j)-val(k-1,i,j) ) )
446  enddo
447  enddo
448  enddo
449  !$acc end kernels
450  !$omp end do nowait
451 
452  !$omp do OMP_SCHEDULE_ collapse(2)
453  !$acc kernels
454  do j = jjs, jje
455  do i = iis, iie
456  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS.
457  ! The flux at KS can be non-zero.
458  ! To reduce calculations, all the fluxes are set to zero.
459  flux(ks-1,i,j) = 0.0_rp ! k = KS
460 
461  ! physically incorrect but for numerical stability
462  vel = ( ( 0.5_rp * ( mom(ks+1,i,j)+mom(ks+1,i-1,j) ) ) / dens(ks+1,i,j) &
463  + ( 0.5_rp * ( mom(ks,i,j)+mom(ks,i-1,j) ) ) / dens(ks ,i,j) ) * 0.5_rp
464 ! vel = ( 0.5_RP * ( mom(KS+1,i,j)+mom(KS+1,i-1,j) ) ) &
465 ! / DENS(KS+1,i,j)
466  vel = vel * j13g(ks+1,i,j)
467  flux(ks,i,j) = vel / mapf(i,j,+2) &
468  * ( val(ks,i,j) &
469  * ( 0.5_rp + sign(0.5_rp,vel) ) &
470  + ( 2.0_rp * val(ks,i,j) + 5.0_rp * val(ks+1,i,j) - val(ks+2,i,j) ) / 6.0_rp &
471  * ( 0.5_rp - sign(0.5_rp,vel) ) ) ! k = KS+1
472 
473 
474  flux(ke-1,i,j) = 0.0_rp
475  enddo
476  enddo
477  !$acc end kernels
478  !$omp end do nowait
479 
480  !$acc end data
481 
482  !$omp end parallel
483 
484  return
485  end subroutine atmos_dyn_fvm_fluxj13_xyw_ud1
486 
487  !-----------------------------------------------------------------------------
489  subroutine atmos_dyn_fvm_fluxj23_xyw_ud1( &
490  flux, &
491  mom, val, DENS, &
492  GSQRT, J23G, MAPF, &
493  CDZ, TwoD, &
494  IIS, IIE, JJS, JJE )
495  implicit none
496 
497  real(rp), intent(inout) :: flux (ka,ia,ja)
498  real(rp), intent(in) :: mom (ka,ia,ja)
499  real(rp), intent(in) :: val (ka,ia,ja)
500  real(rp), intent(in) :: dens (ka,ia,ja)
501  real(rp), intent(in) :: gsqrt (ka,ia,ja)
502  real(rp), intent(in) :: j23g (ka,ia,ja)
503  real(rp), intent(in) :: mapf ( ia,ja,2)
504  real(rp), intent(in) :: cdz (ka)
505  logical, intent(in) :: twod
506  integer, intent(in) :: iis, iie, jjs, jje
507 
508  real(rp) :: vel
509  integer :: k, i, j
510  !---------------------------------------------------------------------------
511 
512  !$omp parallel default(none) private(i,j,k,vel) &
513  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF)
514 
515  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, J23G, MAPF, CDZ)
516 
517  !$omp do OMP_SCHEDULE_ collapse(2)
518  !$acc kernels
519  do j = jjs, jje
520  do i = iis, iie
521  do k = ks+2, ke-1
522  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
523  / dens(k,i,j)
524  vel = vel * j23g(k,i,j)
525  flux(k-1,i,j) = vel / mapf(i,j,+1) &
526  * ( f1 * ( val(k,i,j)+val(k-1,i,j) ) - sign(f1,vel) * ( val(k,i,j)-val(k-1,i,j) ) )
527  enddo
528  enddo
529  enddo
530  !$acc end kernels
531  !$omp end do nowait
532 
533  !$omp do OMP_SCHEDULE_ collapse(2)
534  !$acc kernels
535  do j = jjs, jje
536  do i = iis, iie
537  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS.
538  ! The flux at KS can be non-zero.
539  ! To reduce calculations, all the fluxes are set to zero.
540  flux(ks-1,i,j) = 0.0_rp ! k = KS
541 
542  ! physically incorrect but for numerical stability
543  vel = ( ( 0.5_rp * ( mom(ks+1,i,j)+mom(ks+1,i,j-1) ) ) / dens(ks+1,i,j) &
544  + ( 0.5_rp * ( mom(ks,i,j)+mom(ks,i,j-1) ) ) / dens(ks ,i,j) ) * 0.5_rp
545 ! vel = ( 0.5_RP * ( mom(KS+1,i,j)+mom(KS+1,i,j-1) ) ) &
546 ! / DENS(KS+1,i,j)
547  vel = vel * j23g(ks+1,i,j)
548  flux(ks,i,j) = vel / mapf(i,j,+1) &
549  * ( val(ks,i,j) &
550  * ( 0.5_rp + sign(0.5_rp,vel) ) &
551  + ( 2.0_rp * val(ks,i,j) + 5.0_rp * val(ks+1,i,j) - val(ks+2,i,j) ) / 6.0_rp &
552  * ( 0.5_rp - sign(0.5_rp,vel) ) ) ! k = KS+1
553 
554 
555  flux(ke-1,i,j) = 0.0_rp
556  enddo
557  enddo
558  !$acc end kernels
559  !$omp end do nowait
560 
561  !$acc end data
562 
563  !$omp end parallel
564 
565  return
566  end subroutine atmos_dyn_fvm_fluxj23_xyw_ud1
567 
568 
569  !-----------------------------------------------------------------------------
571  subroutine atmos_dyn_fvm_fluxx_xyw_ud1( &
572  flux, &
573  mom, val, DENS, &
574  GSQRT, MAPF, &
575  num_diff, &
576  CDZ, TwoD, &
577  IIS, IIE, JJS, JJE )
578  implicit none
579 
580  real(rp), intent(inout) :: flux (ka,ia,ja)
581  real(rp), intent(in) :: mom (ka,ia,ja)
582  real(rp), intent(in) :: val (ka,ia,ja)
583  real(rp), intent(in) :: dens (ka,ia,ja)
584  real(rp), intent(in) :: gsqrt (ka,ia,ja)
585  real(rp), intent(in) :: mapf ( ia,ja,2)
586  real(rp), intent(in) :: num_diff(ka,ia,ja)
587  real(rp), intent(in) :: cdz (ka)
588  logical, intent(in) :: twod
589  integer, intent(in) :: iis, iie, jjs, jje
590 
591  real(rp) :: vel
592  integer :: k, i, j
593  !---------------------------------------------------------------------------
594 
595  !$omp parallel default(none) private(i,j,k,vel) &
596  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff) &
597  !$omp shared(CDZ)
598 
599  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, MAPF, num_diff, CDZ)
600 
601  !$omp do OMP_SCHEDULE_ collapse(2)
602  !$acc kernels
603  do j = jjs, jje
604  do i = iis-1, iie
605  do k = ks, ke-1
606 #ifdef DEBUG
607  call check( __line__, mom(k ,i,j) )
608  call check( __line__, mom(k+1,i,j) )
609 
610  call check( __line__, val(k,i,j) )
611  call check( __line__, val(k,i+1,j) )
612 
613 #endif
614  vel = ( f2h(k,1,i_uyz) &
615  * mom(k+1,i,j) &
616  + f2h(k,2,i_uyz) &
617  * mom(k,i,j) ) &
618  / ( f2h(k,1,i_uyz) &
619  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
620  + f2h(k,2,i_uyz) &
621  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
622  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
623  * ( f1 * ( val(k,i+1,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i+1,j)-val(k,i,j) ) )
624  enddo
625  enddo
626  enddo
627  !$acc end kernels
628  !$omp end do nowait
629 #ifdef DEBUG
630  k = iundef; i = iundef; j = iundef
631 #endif
632 
633  !$omp do OMP_SCHEDULE_ collapse(2)
634  !$acc kernels
635  do j = jjs, jje
636  do i = iis-1, iie
637  flux(ke,i,j) = 0.0_rp
638  enddo
639  enddo
640  !$acc end kernels
641  !$omp end do nowait
642 
643  !$acc end data
644 
645  !$omp end parallel
646 #ifdef DEBUG
647  k = iundef; i = iundef; j = iundef
648 #endif
649 
650  return
651  end subroutine atmos_dyn_fvm_fluxx_xyw_ud1
652 
653  !-----------------------------------------------------------------------------
655  subroutine atmos_dyn_fvm_fluxy_xyw_ud1( &
656  flux, &
657  mom, val, DENS, &
658  GSQRT, MAPF, &
659  num_diff, &
660  CDZ, TwoD, &
661  IIS, IIE, JJS, JJE )
662  implicit none
663 
664  real(rp), intent(inout) :: flux (ka,ia,ja)
665  real(rp), intent(in) :: mom (ka,ia,ja)
666  real(rp), intent(in) :: val (ka,ia,ja)
667  real(rp), intent(in) :: dens (ka,ia,ja)
668  real(rp), intent(in) :: gsqrt (ka,ia,ja)
669  real(rp), intent(in) :: mapf ( ia,ja,2)
670  real(rp), intent(in) :: num_diff(ka,ia,ja)
671  real(rp), intent(in) :: cdz (ka)
672  logical, intent(in) :: twod
673  integer, intent(in) :: iis, iie, jjs, jje
674 
675  real(rp) :: vel
676  integer :: k, i, j
677  !---------------------------------------------------------------------------
678 
679  !$omp parallel default(none) private(i,j,k,vel) &
680  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff) &
681  !$omp shared(CDZ)
682 
683  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, MAPF, num_diff, CDZ)
684 
685  !$omp do OMP_SCHEDULE_ collapse(2)
686  !$acc kernels
687  do j = jjs-1, 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+1,i,j) )
693 
694  call check( __line__, val(k,i,j) )
695  call check( __line__, val(k,i,j+1) )
696 
697 #endif
698  vel = ( f2h(k,1,i_xvz) &
699  * mom(k+1,i,j) &
700  + f2h(k,2,i_xvz) &
701  * mom(k,i,j) ) &
702  / ( f2h(k,1,i_xvz) &
703  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
704  + f2h(k,2,i_xvz) &
705  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
706  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
707  * ( f1 * ( val(k,i,j+1)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i,j+1)-val(k,i,j) ) )
708  enddo
709  enddo
710  enddo
711  !$acc end kernels
712  !$omp end do nowait
713 #ifdef DEBUG
714  k = iundef; i = iundef; j = iundef
715 #endif
716 
717  !$omp do OMP_SCHEDULE_ collapse(2)
718  !$acc kernels
719  do j = jjs-1, jje
720  do i = iis, iie
721  flux(ke,i,j) = 0.0_rp
722  enddo
723  enddo
724  !$acc end kernels
725  !$omp end do nowait
726 
727  !$acc end data
728 
729  !$omp end parallel
730 #ifdef DEBUG
731  k = iundef; i = iundef; j = iundef
732 #endif
733 
734  return
735  end subroutine atmos_dyn_fvm_fluxy_xyw_ud1
736 
737 
738  !-----------------------------------------------------------------------------
740  subroutine atmos_dyn_fvm_fluxz_uyz_ud1( &
741  flux, &
742  mom, val, DENS, &
743  GSQRT, J33G, &
744  num_diff, &
745  CDZ, TwoD, &
746  IIS, IIE, JJS, JJE )
747  implicit none
748 
749  real(rp), intent(inout) :: flux (ka,ia,ja)
750  real(rp), intent(in) :: mom (ka,ia,ja)
751  real(rp), intent(in) :: val (ka,ia,ja)
752  real(rp), intent(in) :: dens (ka,ia,ja)
753  real(rp), intent(in) :: gsqrt (ka,ia,ja)
754  real(rp), intent(in) :: j33g
755  real(rp), intent(in) :: num_diff(ka,ia,ja)
756  real(rp), intent(in) :: cdz (ka)
757  logical, intent(in) :: twod
758  integer, intent(in) :: iis, iie, jjs, jje
759 
760  real(rp) :: vel
761  integer :: k, i, j
762  !---------------------------------------------------------------------------
763 
764  !$omp parallel default(none) private(i,j,k,vel) &
765  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J33G,GSQRT,num_diff) &
766  !$omp shared(CDZ,TwoD)
767 
768  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, num_diff, CDZ)
769 
770 
771  if ( twod ) then
772 
773  !$omp do OMP_SCHEDULE_
774  !$acc kernels
775  do j = jjs, jje
776  do k = ks, ke-1
777  i = iis
778 #ifdef DEBUG
779  call check( __line__, mom(k,i,j) )
780 
781  call check( __line__, val(k,i,j) )
782  call check( __line__, val(k+1,i,j) )
783 
784 #endif
785  vel = ( mom(k,i,j) ) &
786  / ( f2h(k,1,i_xyz) &
787  * dens(k+1,i,j) &
788  + f2h(k,2,i_xyz) &
789  * dens(k,i,j) )
790  flux(k,i,j) = j33g * vel &
791  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
792  enddo
793  enddo
794  !$acc end kernels
795  !$omp end do nowait
796 #ifdef DEBUG
797  k = iundef; i = iundef; j = iundef
798 #endif
799 
800  !$omp do OMP_SCHEDULE_
801  !$acc kernels
802  do j = jjs, jje
803  i = iis
804 #ifdef DEBUG
805 
806 #endif
807  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
808  ! The flux at KS-1 can be non-zero.
809  ! To reduce calculations, all the fluxes are set to zero.
810  flux(ks-1,i,j) = 0.0_rp
811 
812  flux(ke,i,j) = 0.0_rp
813  enddo
814  !$acc end kernels
815  !$omp end do nowait
816 
817  else
818 
819 
820  !$omp do OMP_SCHEDULE_ collapse(2)
821  !$acc kernels
822  do j = jjs, jje
823  do i = iis, iie
824  do k = ks, ke-1
825 #ifdef DEBUG
826  call check( __line__, mom(k,i,j) )
827  call check( __line__, mom(k,i+1,j) )
828 
829  call check( __line__, val(k,i,j) )
830  call check( __line__, val(k+1,i,j) )
831 
832 #endif
833  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
834  / ( f2h(k,1,i_uyz) &
835  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
836  + f2h(k,2,i_uyz) &
837  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
838  flux(k,i,j) = j33g * vel &
839  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
840  enddo
841  enddo
842  enddo
843  !$acc end kernels
844  !$omp end do nowait
845 #ifdef DEBUG
846  k = iundef; i = iundef; j = iundef
847 #endif
848 
849  !$omp do OMP_SCHEDULE_ collapse(2)
850  !$acc kernels
851  do j = jjs, jje
852  do i = iis, iie
853 #ifdef DEBUG
854 
855 #endif
856  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
857  ! The flux at KS-1 can be non-zero.
858  ! To reduce calculations, all the fluxes are set to zero.
859  flux(ks-1,i,j) = 0.0_rp
860 
861  flux(ke,i,j) = 0.0_rp
862  enddo
863  enddo
864  !$acc end kernels
865  !$omp end do nowait
866 
867  end if
868 
869 
870  !$acc end data
871 
872  !$omp end parallel
873 #ifdef DEBUG
874  k = iundef; i = iundef; j = iundef
875 #endif
876 
877  return
878  end subroutine atmos_dyn_fvm_fluxz_uyz_ud1
879 
880  !-----------------------------------------------------------------------------
882  subroutine atmos_dyn_fvm_fluxj13_uyz_ud1( &
883  flux, &
884  mom, val, DENS, &
885  GSQRT, J13G, MAPF, &
886  CDZ, TwoD, &
887  IIS, IIE, JJS, JJE )
888  implicit none
889 
890  real(rp), intent(inout) :: flux (ka,ia,ja)
891  real(rp), intent(in) :: mom (ka,ia,ja)
892  real(rp), intent(in) :: val (ka,ia,ja)
893  real(rp), intent(in) :: dens (ka,ia,ja)
894  real(rp), intent(in) :: gsqrt (ka,ia,ja)
895  real(rp), intent(in) :: j13g (ka,ia,ja)
896  real(rp), intent(in) :: mapf ( ia,ja,2)
897  real(rp), intent(in) :: cdz (ka)
898  logical, intent(in) :: twod
899  integer, intent(in) :: iis, iie, jjs, jje
900 
901  real(rp) :: vel
902  integer :: k, i, j
903  !---------------------------------------------------------------------------
904 
905  !$omp parallel default(none) private(i,j,k,vel) &
906  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF) &
907  !$omp shared(GSQRT,CDZ,TwoD)
908 
909  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, J13G, MAPF, CDZ)
910 
911 
912 
913  !$omp do OMP_SCHEDULE_ collapse(2)
914  !$acc kernels
915  do j = jjs, jje
916  do i = iis, iie
917  do k = ks, ke-1
918  vel = ( f2h(k,1,i_uyz) &
919  * mom(k+1,i,j) &
920  + f2h(k,2,i_uyz) &
921  * mom(k,i,j) ) &
922  / ( f2h(k,1,i_uyz) &
923  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
924  + f2h(k,2,i_uyz) &
925  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
926  vel = vel * j13g(k,i,j)
927  flux(k,i,j) = vel / mapf(i,j,+2) &
928  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
929  enddo
930  enddo
931  enddo
932  !$acc end kernels
933  !$omp end do nowait
934 
935  !$omp do OMP_SCHEDULE_ collapse(2)
936  !$acc kernels
937  do j = jjs, jje
938  do i = iis, iie
939  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
940  ! The flux at KS-1 can be non-zero.
941  ! To reduce calculations, all the fluxes are set to zero.
942  flux(ks-1,i,j) = 0.0_rp
943 
944  flux(ke ,i,j) = 0.0_rp
945  enddo
946  enddo
947  !$acc end kernels
948  !$omp end do nowait
949 
950 
951 
952  !$acc end data
953 
954  !$omp end parallel
955  return
956  end subroutine atmos_dyn_fvm_fluxj13_uyz_ud1
957 
958  !-----------------------------------------------------------------------------
960  subroutine atmos_dyn_fvm_fluxj23_uyz_ud1( &
961  flux, &
962  mom, val, DENS, &
963  GSQRT, J23G, MAPF, &
964  CDZ, TwoD, &
965  IIS, IIE, JJS, JJE )
966  implicit none
967 
968  real(rp), intent(inout) :: flux (ka,ia,ja)
969  real(rp), intent(in) :: mom (ka,ia,ja)
970  real(rp), intent(in) :: val (ka,ia,ja)
971  real(rp), intent(in) :: dens (ka,ia,ja)
972  real(rp), intent(in) :: gsqrt (ka,ia,ja)
973  real(rp), intent(in) :: j23g (ka,ia,ja)
974  real(rp), intent(in) :: mapf ( ia,ja,2)
975  real(rp), intent(in) :: cdz (ka)
976  logical, intent(in) :: twod
977  integer, intent(in) :: iis, iie, jjs, jje
978 
979  real(rp) :: vel
980  integer :: k, i, j
981  !---------------------------------------------------------------------------
982 
983  !$omp parallel default(none) private(i,j,k,vel) &
984  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF) &
985  !$omp shared(GSQRT,CDZ,TwoD)
986 
987  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, J23G, MAPF, CDZ)
988 
989 
990  if ( twod ) then
991 
992  !$omp do OMP_SCHEDULE_
993  !$acc kernels
994  do j = jjs, jje
995  do k = ks, ke-1
996  i = iis
997  vel = ( f2h(k,1,i_xyz) &
998  * 0.5_rp * ( mom(k+1,i,j)+mom(k+1,i,j-1) ) &
999  + f2h(k,2,i_xyz) &
1000  * 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1001  / ( f2h(k,1,i_xyz) &
1002  * dens(k+1,i,j) &
1003  + f2h(k,2,i_xyz) &
1004  * dens(k,i,j) )
1005  vel = vel * j23g(k,i,j)
1006  flux(k,i,j) = vel * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
1007  enddo
1008  enddo
1009  !$acc end kernels
1010  !$omp end do nowait
1011 
1012  !$omp do OMP_SCHEDULE_
1013  !$acc kernels
1014  do j = jjs, jje
1015  i = iis
1016  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
1017  ! The flux at KS-1 can be non-zero.
1018  ! To reduce calculations, all the fluxes are set to zero.
1019  flux(ks-1,i,j) = 0.0_rp
1020 
1021  flux(ke ,i,j) = 0.0_rp
1022  enddo
1023  !$acc end kernels
1024  !$omp end do nowait
1025 
1026  else
1027 
1028 
1029  !$omp do OMP_SCHEDULE_ collapse(2)
1030  !$acc kernels
1031  do j = jjs, jje
1032  do i = iis, iie
1033  do k = ks, ke-1
1034  vel = ( f2h(k,1,i_uyz) &
1035  * 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) ) &
1036  + f2h(k,2,i_uyz) &
1037  * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
1038  / ( f2h(k,1,i_uyz) &
1039  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
1040  + f2h(k,2,i_uyz) &
1041  * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
1042  vel = vel * j23g(k,i,j)
1043  flux(k,i,j) = vel / mapf(i,j,+1) &
1044  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
1045  enddo
1046  enddo
1047  enddo
1048  !$acc end kernels
1049  !$omp end do nowait
1050 
1051  !$omp do OMP_SCHEDULE_ collapse(2)
1052  !$acc kernels
1053  do j = jjs, jje
1054  do i = iis, iie
1055  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
1056  ! The flux at KS-1 can be non-zero.
1057  ! To reduce calculations, all the fluxes are set to zero.
1058  flux(ks-1,i,j) = 0.0_rp
1059 
1060  flux(ke ,i,j) = 0.0_rp
1061  enddo
1062  enddo
1063  !$acc end kernels
1064  !$omp end do nowait
1065 
1066 
1067  end if
1068 
1069 
1070  !$acc end data
1071 
1072  !$omp end parallel
1073  return
1074  end subroutine atmos_dyn_fvm_fluxj23_uyz_ud1
1075 
1076  !-----------------------------------------------------------------------------
1078  subroutine atmos_dyn_fvm_fluxx_uyz_ud1( &
1079  flux, &
1080  mom, val, DENS, &
1081  GSQRT, MAPF, &
1082  num_diff, &
1083  CDZ, TwoD, &
1084  IIS, IIE, JJS, JJE )
1085  implicit none
1086 
1087  real(rp), intent(inout) :: flux (ka,ia,ja)
1088  real(rp), intent(in) :: mom (ka,ia,ja)
1089  real(rp), intent(in) :: val (ka,ia,ja)
1090  real(rp), intent(in) :: dens (ka,ia,ja)
1091  real(rp), intent(in) :: gsqrt (ka,ia,ja)
1092  real(rp), intent(in) :: mapf ( ia,ja,2)
1093  real(rp), intent(in) :: num_diff(ka,ia,ja)
1094  real(rp), intent(in) :: cdz (ka)
1095  logical, intent(in) :: twod
1096  integer, intent(in) :: iis, iie, jjs, jje
1097 
1098  real(rp) :: vel
1099  integer :: k, i, j
1100  !---------------------------------------------------------------------------
1101 
1102  ! note that x-index is added by -1
1103 
1104 
1105 
1106  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1107  !$omp private(vel) &
1108  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff)
1109  !$acc kernels
1110  do j = jjs, jje
1111  do i = iis, iie+1
1112  do k = ks, ke
1113 #ifdef DEBUG
1114  call check( __line__, mom(k,i ,j) )
1115  call check( __line__, mom(k,i-1,j) )
1116 
1117  call check( __line__, val(k,i-1,j) )
1118  call check( __line__, val(k,i,j) )
1119 
1120 #endif
1121  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
1122  / ( dens(k,i,j) )
1123  flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1124  * ( f1 * ( val(k,i,j)+val(k,i-1,j) ) - sign(f1,vel) * ( val(k,i,j)-val(k,i-1,j) ) )
1125  enddo
1126  enddo
1127  enddo
1128  !$acc end kernels
1129 #ifdef DEBUG
1130  k = iundef; i = iundef; j = iundef
1131 #endif
1132 
1133 
1134 
1135  return
1136  end subroutine atmos_dyn_fvm_fluxx_uyz_ud1
1137 
1138  !-----------------------------------------------------------------------------
1140  subroutine atmos_dyn_fvm_fluxy_uyz_ud1( &
1141  flux, &
1142  mom, val, DENS, &
1143  GSQRT, MAPF, &
1144  num_diff, &
1145  CDZ, TwoD, &
1146  IIS, IIE, JJS, JJE )
1147  implicit none
1148 
1149  real(rp), intent(inout) :: flux (ka,ia,ja)
1150  real(rp), intent(in) :: mom (ka,ia,ja)
1151  real(rp), intent(in) :: val (ka,ia,ja)
1152  real(rp), intent(in) :: dens (ka,ia,ja)
1153  real(rp), intent(in) :: gsqrt (ka,ia,ja)
1154  real(rp), intent(in) :: mapf ( ia,ja,2)
1155  real(rp), intent(in) :: num_diff(ka,ia,ja)
1156  real(rp), intent(in) :: cdz (ka)
1157  logical, intent(in) :: twod
1158  integer, intent(in) :: iis, iie, jjs, jje
1159 
1160  real(rp) :: vel
1161  integer :: k, i, j
1162  !---------------------------------------------------------------------------
1163 
1164 
1165 
1166  if ( twod ) then
1167 
1168  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ &
1169  !$omp private(vel) &
1170  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff,TwoD)
1171  !$acc kernels
1172  do j = jjs-1, jje
1173  do k = ks, ke
1174  i = iis
1175 #ifdef DEBUG
1176  call check( __line__, mom(k,i ,j) )
1177 
1178  call check( __line__, val(k,i,j) )
1179  call check( __line__, val(k,i,j+1) )
1180 
1181 #endif
1182  vel = ( mom(k,i,j) ) &
1183  / ( 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1184  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1185  * ( f1 * ( val(k,i,j+1)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i,j+1)-val(k,i,j) ) )
1186  enddo
1187  enddo
1188  !$acc end kernels
1189 #ifdef DEBUG
1190  k = iundef; i = iundef; j = iundef
1191 #endif
1192 
1193  else
1194 
1195 
1196  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1197  !$omp private(vel) &
1198  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff)
1199  !$acc kernels
1200  do j = jjs-1, jje
1201  do i = iis, iie
1202  do k = ks, ke
1203 #ifdef DEBUG
1204  call check( __line__, mom(k,i ,j) )
1205  call check( __line__, mom(k,i-1,j) )
1206 
1207  call check( __line__, val(k,i,j) )
1208  call check( __line__, val(k,i,j+1) )
1209 
1210 #endif
1211  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
1212  / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1213  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1214  * ( f1 * ( val(k,i,j+1)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i,j+1)-val(k,i,j) ) )
1215  enddo
1216  enddo
1217  enddo
1218  !$acc end kernels
1219 #ifdef DEBUG
1220  k = iundef; i = iundef; j = iundef
1221 #endif
1222 
1223 
1224  end if
1225 
1226 
1227  return
1228  end subroutine atmos_dyn_fvm_fluxy_uyz_ud1
1229 
1230 
1231 
1232  !-----------------------------------------------------------------------------
1234  subroutine atmos_dyn_fvm_fluxz_xvz_ud1( &
1235  flux, &
1236  mom, val, DENS, &
1237  GSQRT, J33G, &
1238  num_diff, &
1239  CDZ, TwoD, &
1240  IIS, IIE, JJS, JJE )
1241  implicit none
1242 
1243  real(rp), intent(inout) :: flux (ka,ia,ja)
1244  real(rp), intent(in) :: mom (ka,ia,ja)
1245  real(rp), intent(in) :: val (ka,ia,ja)
1246  real(rp), intent(in) :: dens (ka,ia,ja)
1247  real(rp), intent(in) :: gsqrt (ka,ia,ja)
1248  real(rp), intent(in) :: j33g
1249  real(rp), intent(in) :: num_diff(ka,ia,ja)
1250  real(rp), intent(in) :: cdz (ka)
1251  logical, intent(in) :: twod
1252  integer, intent(in) :: iis, iie, jjs, jje
1253 
1254  real(rp) :: vel
1255  integer :: k, i, j
1256  !---------------------------------------------------------------------------
1257 
1258  !$omp parallel default(none) private(i,j,k,vel) &
1259  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J33G,GSQRT,num_diff) &
1260  !$omp shared(CDZ,TwoD)
1261 
1262  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, num_diff, CDZ)
1263 
1264 
1265  !$omp do OMP_SCHEDULE_ collapse(2)
1266  !$acc kernels
1267  do j = jjs, jje
1268  do i = iis, iie
1269  do k = ks, ke-1
1270 #ifdef DEBUG
1271  call check( __line__, mom(k,i,j) )
1272  call check( __line__, mom(k,i,j+1) )
1273 
1274  call check( __line__, val(k,i,j) )
1275  call check( __line__, val(k+1,i,j) )
1276 
1277 #endif
1278  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1279  / ( f2h(k,1,i_xvz) &
1280  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1281  + f2h(k,2,i_xvz) &
1282  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1283  flux(k,i,j) = j33g * vel &
1284  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
1285  enddo
1286  enddo
1287  enddo
1288  !$acc end kernels
1289  !$omp end do nowait
1290 #ifdef DEBUG
1291  k = iundef; i = iundef; j = iundef
1292 #endif
1293 
1294  !$omp do OMP_SCHEDULE_ collapse(2)
1295  !$acc kernels
1296  do j = jjs, jje
1297  do i = iis, iie
1298 #ifdef DEBUG
1299 
1300 #endif
1301  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
1302  ! The flux at KS-1 can be non-zero.
1303  ! To reduce calculations, all the fluxes are set to zero.
1304  flux(ks-1,i,j) = 0.0_rp
1305 
1306  flux(ke,i,j) = 0.0_rp
1307  enddo
1308  enddo
1309  !$acc end kernels
1310  !$omp end do nowait
1311 
1312 
1313  !$acc end data
1314 
1315  !$omp end parallel
1316 #ifdef DEBUG
1317  k = iundef; i = iundef; j = iundef
1318 #endif
1319 
1320  return
1321  end subroutine atmos_dyn_fvm_fluxz_xvz_ud1
1322 
1323  !-----------------------------------------------------------------------------
1325  subroutine atmos_dyn_fvm_fluxj13_xvz_ud1( &
1326  flux, &
1327  mom, val, DENS, &
1328  GSQRT, J13G, MAPF, &
1329  CDZ, TwoD, &
1330  IIS, IIE, JJS, JJE )
1331  implicit none
1332 
1333  real(rp), intent(inout) :: flux (ka,ia,ja)
1334  real(rp), intent(in) :: mom (ka,ia,ja)
1335  real(rp), intent(in) :: val (ka,ia,ja)
1336  real(rp), intent(in) :: dens (ka,ia,ja)
1337  real(rp), intent(in) :: gsqrt (ka,ia,ja)
1338  real(rp), intent(in) :: j13g (ka,ia,ja)
1339  real(rp), intent(in) :: mapf ( ia,ja,2)
1340  real(rp), intent(in) :: cdz (ka)
1341  logical, intent(in) :: twod
1342  integer, intent(in) :: iis, iie, jjs, jje
1343 
1344  real(rp) :: vel
1345  integer :: k, i, j
1346  !---------------------------------------------------------------------------
1347 
1348  !$omp parallel default(none) private(i,j,k,vel) &
1349  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J13G,MAPF) &
1350  !$omp shared(GSQRT,CDZ,TwoD)
1351 
1352  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, J13G, MAPF, CDZ)
1353 
1354 
1355 
1356  !$omp do OMP_SCHEDULE_ collapse(2)
1357  !$acc kernels
1358  do j = jjs, jje
1359  do i = iis, iie
1360  do k = ks, ke-1
1361  vel = ( f2h(k,1,i_xvz) &
1362  * 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) ) &
1363  + f2h(k,2,i_xvz) &
1364  * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1365  / ( f2h(k,1,i_xvz) &
1366  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1367  + f2h(k,2,i_xvz) &
1368  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1369  vel = vel * j13g(k,i,j)
1370  flux(k,i,j) = vel / mapf(i,j,+2) &
1371  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
1372  enddo
1373  enddo
1374  enddo
1375  !$acc end kernels
1376  !$omp end do nowait
1377 
1378  !$omp do OMP_SCHEDULE_ collapse(2)
1379  !$acc kernels
1380  do j = jjs, jje
1381  do i = iis, iie
1382  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
1383  ! The flux at KS-1 can be non-zero.
1384  ! To reduce calculations, all the fluxes are set to zero.
1385  flux(ks-1,i,j) = 0.0_rp
1386 
1387  flux(ke ,i,j) = 0.0_rp
1388  enddo
1389  enddo
1390  !$acc end kernels
1391  !$omp end do nowait
1392 
1393 
1394 
1395  !$acc end data
1396 
1397  !$omp end parallel
1398  return
1399  end subroutine atmos_dyn_fvm_fluxj13_xvz_ud1
1400 
1401  !-----------------------------------------------------------------------------
1403  subroutine atmos_dyn_fvm_fluxj23_xvz_ud1( &
1404  flux, &
1405  mom, val, DENS, &
1406  GSQRT, J23G, MAPF, &
1407  CDZ, TwoD, &
1408  IIS, IIE, JJS, JJE )
1409  implicit none
1410 
1411  real(rp), intent(inout) :: flux (ka,ia,ja)
1412  real(rp), intent(in) :: mom (ka,ia,ja)
1413  real(rp), intent(in) :: val (ka,ia,ja)
1414  real(rp), intent(in) :: dens (ka,ia,ja)
1415  real(rp), intent(in) :: gsqrt (ka,ia,ja)
1416  real(rp), intent(in) :: j23g (ka,ia,ja)
1417  real(rp), intent(in) :: mapf ( ia,ja,2)
1418  real(rp), intent(in) :: cdz (ka)
1419  logical, intent(in) :: twod
1420  integer, intent(in) :: iis, iie, jjs, jje
1421 
1422  real(rp) :: vel
1423  integer :: k, i, j
1424  !---------------------------------------------------------------------------
1425 
1426  !$omp parallel default(none) private(i,j,k,vel) &
1427  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,J23G,MAPF) &
1428  !$omp shared(GSQRT,CDZ,TwoD)
1429 
1430  !$acc data copy(flux) copyin(mom, val, DENS, GSQRT, J23G, MAPF, CDZ)
1431 
1432 
1433 
1434  !$omp do OMP_SCHEDULE_ collapse(2)
1435  !$acc kernels
1436  do j = jjs, jje
1437  do i = iis, iie
1438  do k = ks, ke-1
1439  vel = ( f2h(k,1,i_xvz) &
1440  * mom(k+1,i,j) &
1441  + f2h(k,2,i_xvz) &
1442  * mom(k,i,j) ) &
1443  / ( f2h(k,1,i_xvz) &
1444  * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1445  + f2h(k,2,i_xvz) &
1446  * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1447  vel = vel * j23g(k,i,j)
1448  flux(k,i,j) = vel / mapf(i,j,+1) &
1449  * ( f1 * ( val(k+1,i,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k+1,i,j)-val(k,i,j) ) )
1450  enddo
1451  enddo
1452  enddo
1453  !$acc end kernels
1454  !$omp end do nowait
1455 
1456  !$omp do OMP_SCHEDULE_ collapse(2)
1457  !$acc kernels
1458  do j = jjs, jje
1459  do i = iis, iie
1460  ! The boundary condition is qflx_hi + qflxJ13 + qfluxJ23 = 0 at KS-1.
1461  ! The flux at KS-1 can be non-zero.
1462  ! To reduce calculations, all the fluxes are set to zero.
1463  flux(ks-1,i,j) = 0.0_rp
1464 
1465  flux(ke ,i,j) = 0.0_rp
1466  enddo
1467  enddo
1468  !$acc end kernels
1469  !$omp end do nowait
1470 
1471 
1472 
1473  !$acc end data
1474 
1475  !$omp end parallel
1476  return
1477  end subroutine atmos_dyn_fvm_fluxj23_xvz_ud1
1478 
1479  !-----------------------------------------------------------------------------
1481  subroutine atmos_dyn_fvm_fluxx_xvz_ud1( &
1482  flux, &
1483  mom, val, DENS, &
1484  GSQRT, MAPF, &
1485  num_diff, &
1486  CDZ, TwoD, &
1487  IIS, IIE, JJS, JJE )
1488  implicit none
1489 
1490  real(rp), intent(inout) :: flux (ka,ia,ja)
1491  real(rp), intent(in) :: mom (ka,ia,ja)
1492  real(rp), intent(in) :: val (ka,ia,ja)
1493  real(rp), intent(in) :: dens (ka,ia,ja)
1494  real(rp), intent(in) :: gsqrt (ka,ia,ja)
1495  real(rp), intent(in) :: mapf ( ia,ja,2)
1496  real(rp), intent(in) :: num_diff(ka,ia,ja)
1497  real(rp), intent(in) :: cdz (ka)
1498  logical, intent(in) :: twod
1499  integer, intent(in) :: iis, iie, jjs, jje
1500 
1501  real(rp) :: vel
1502  integer :: k, i, j
1503  !---------------------------------------------------------------------------
1504 
1505 
1506 
1507  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1508  !$omp private(vel) &
1509  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff)
1510  !$acc kernels
1511  do j = jjs, jje
1512  do i = iis-1, iie
1513  do k = ks, ke
1514 #ifdef DEBUG
1515  call check( __line__, mom(k,i ,j) )
1516  call check( __line__, mom(k,i,j-1) )
1517 
1518  call check( __line__, val(k,i,j) )
1519  call check( __line__, val(k,i+1,j) )
1520 
1521 #endif
1522  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1523  / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1524  flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1525  * ( f1 * ( val(k,i+1,j)+val(k,i,j) ) - sign(f1,vel) * ( val(k,i+1,j)-val(k,i,j) ) )
1526  enddo
1527  enddo
1528  enddo
1529  !$acc end kernels
1530 #ifdef DEBUG
1531  k = iundef; i = iundef; j = iundef
1532 #endif
1533 
1534 
1535 
1536  return
1537  end subroutine atmos_dyn_fvm_fluxx_xvz_ud1
1538 
1539  !-----------------------------------------------------------------------------
1541  subroutine atmos_dyn_fvm_fluxy_xvz_ud1( &
1542  flux, &
1543  mom, val, DENS, &
1544  GSQRT, MAPF, &
1545  num_diff, &
1546  CDZ, TwoD, &
1547  IIS, IIE, JJS, JJE )
1548  implicit none
1549 
1550  real(rp), intent(inout) :: flux (ka,ia,ja)
1551  real(rp), intent(in) :: mom (ka,ia,ja)
1552  real(rp), intent(in) :: val (ka,ia,ja)
1553  real(rp), intent(in) :: dens (ka,ia,ja)
1554  real(rp), intent(in) :: gsqrt (ka,ia,ja)
1555  real(rp), intent(in) :: mapf ( ia,ja,2)
1556  real(rp), intent(in) :: num_diff(ka,ia,ja)
1557  real(rp), intent(in) :: cdz (ka)
1558  logical, intent(in) :: twod
1559  integer, intent(in) :: iis, iie, jjs, jje
1560 
1561  real(rp) :: vel
1562  integer :: k, i, j
1563  !---------------------------------------------------------------------------
1564 
1565  ! note that y-index is added by -1
1566 
1567 
1568 
1569  !$omp parallel do default(none) private(i,j,k) OMP_SCHEDULE_ collapse(2) &
1570  !$omp private(vel) &
1571  !$omp shared(JJS,JJE,IIS,IIE,KS,KE,mom,val,DENS,flux,GSQRT,MAPF,num_diff)
1572  !$acc kernels
1573  do j = jjs, jje+1
1574  do i = iis, iie
1575  do k = ks, ke
1576 #ifdef DEBUG
1577  call check( __line__, mom(k,i ,j) )
1578  call check( __line__, mom(k,i,j-1) )
1579 
1580  call check( __line__, val(k,i,j-1) )
1581  call check( __line__, val(k,i,j) )
1582 
1583 #endif
1584  vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1585  / ( dens(k,i,j) )
1586  flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1587  * ( f1 * ( val(k,i,j)+val(k,i,j-1) ) - sign(f1,vel) * ( val(k,i,j)-val(k,i,j-1) ) )
1588  enddo
1589  enddo
1590  enddo
1591  !$acc end kernels
1592 #ifdef DEBUG
1593  k = iundef; i = iundef; j = iundef
1594 #endif
1595 
1596 
1597 
1598  return
1599  end subroutine atmos_dyn_fvm_fluxy_xvz_ud1
1600 
1601 
1602 
1603 
1604 
1605 
1606 
1608 
1609 !--
1610 ! vi:set readonly sw=4 ts=8
1611 !
1612 !Local Variables:
1613 !mode: f90
1614 !buffer-read-only: t
1615 !End:
1616 !
1617 !++
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_xvz_ud1
subroutine, public atmos_dyn_fvm_fluxz_xvz_ud1(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation z-flux at XV
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:1241
scale_atmos_grid_cartesc_index::ke
integer, public ke
end point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:52
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_xyw_ud1
subroutine, public atmos_dyn_fvm_fluxx_xyw_ud1(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation X-flux at XYW
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:578
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj23_xyw_ud1
subroutine, public atmos_dyn_fvm_fluxj23_xyw_ud1(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation J23-flux at XYW
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:495
scale_index
module Index
Definition: scale_index.F90:11
scale_const::const_undef2
integer, parameter, public const_undef2
undefined value (INT2)
Definition: scale_const.F90:40
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj13_uyz_ud1
subroutine, public atmos_dyn_fvm_fluxj13_uyz_ud1(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation J13-flux at UYZ
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:888
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_atmos_grid_cartesc_index::ka
integer, public ka
Definition: scale_atmos_grid_cartesC_index.F90:47
scale_const::const_eps
real(rp), public const_eps
small number
Definition: scale_const.F90:35
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj23_xvz_ud1
subroutine, public atmos_dyn_fvm_fluxj23_xvz_ud1(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation J23-flux at XVZ
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:1409
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_xyz_ud1
subroutine, public atmos_dyn_fvm_fluxx_xyz_ud1(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYZ
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:221
scale_atmos_grid_cartesc_index::i_xyz
integer, public i_xyz
Definition: scale_atmos_grid_cartesC_index.F90:91
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_xyz_ud1
subroutine, public atmos_dyn_fvm_fluxy_xyz_ud1(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYZ
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:271
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_uyz_ud1
subroutine, public atmos_dyn_fvm_fluxx_uyz_ud1(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation X-flux at UY
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:1085
scale_atmos_grid_cartesc_index::i_uyz
integer, public i_uyz
Definition: scale_atmos_grid_cartesC_index.F90:95
scale_io
module STDIO
Definition: scale_io.F90:10
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_xyz_ud1
subroutine, public atmos_dyn_fvm_fluxz_xyz_ud1(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XYZ
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:143
scale_tracer::k
real(rp), public k
Definition: scale_tracer.F90:45
scale_atmos_grid_cartesc_index
module atmosphere / grid / cartesC index
Definition: scale_atmos_grid_cartesC_index.F90:12
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_atmos_grid_cartesc_index::ia
integer, public ia
Definition: scale_atmos_grid_cartesC_index.F90:48
scale_debug::check
subroutine, public check(current_line, v)
Undefined value checker.
Definition: scale_debug.F90:59
scale_atmos_dyn_fvm_flux_ud1
module scale_atmos_dyn_fvm_flux_ud1
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:16
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj13_xyw_ud1
subroutine, public atmos_dyn_fvm_fluxj13_xyw_ud1(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation J13-flux at XYW
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:414
scale_atmos_grid_cartesc_index::i_xvz
integer, public i_xvz
Definition: scale_atmos_grid_cartesC_index.F90:96
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_xvz_ud1
subroutine, public atmos_dyn_fvm_fluxy_xvz_ud1(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation Y-flux at XV
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:1548
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_uyz_ud1
subroutine, public atmos_dyn_fvm_fluxz_uyz_ud1(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation z-flux at UY
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:747
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_flux_valuew_z_ud1
subroutine, public atmos_dyn_fvm_flux_valuew_z_ud1(valW, mflx, val, GSQRT, CDZ)
value at XYW
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:101
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
scale_tracer
module TRACER
Definition: scale_tracer.F90:12
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxz_xyw_ud1
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
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:324
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj13_xvz_ud1
subroutine, public atmos_dyn_fvm_fluxj13_xvz_ud1(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation J13-flux at XVZ
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:1331
scale_atmos_grid_cartesc_index::ks
integer, public ks
start point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:51
scale_debug
module DEBUG
Definition: scale_debug.F90:11
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxj23_uyz_ud1
subroutine, public atmos_dyn_fvm_fluxj23_uyz_ud1(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation J23-flux at UYZ
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:966
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_xyw_ud1
subroutine, public atmos_dyn_fvm_fluxy_xyw_ud1(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation Y-flux at XYW
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:662
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxx_xvz_ud1
subroutine, public atmos_dyn_fvm_fluxx_xvz_ud1(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation X-flux at XV
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:1488
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:43
scale_atmos_dyn_fvm_flux_ud1::atmos_dyn_fvm_fluxy_uyz_ud1
subroutine, public atmos_dyn_fvm_fluxy_uyz_ud1(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, TwoD, IIS, IIE, JJS, JJE)
calculation Y-flux at UY
Definition: scale_atmos_dyn_fvm_flux_ud1.F90:1147