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)))
77 #define F2H(k,p,q) 0.5_RP
84 real(RP),
parameter :: F2 = 0.5_rp
87 real(RP),
parameter :: F31 = -1.0_rp/12.0_rp
88 real(RP),
parameter :: F32 = 7.0_rp/12.0_rp
89 real(RP),
parameter :: F33 = 3.0_rp/12.0_rp
105 real(rp),
intent(out) :: valw (
ka)
106 real(rp),
intent(in) :: mflx (
ka)
107 real(rp),
intent(in) :: val (
ka)
108 real(rp),
intent(in) :: gsqrt(
ka)
109 real(rp),
intent(in) :: cdz (
ka)
116 call check( __line__, mflx(
k) )
118 call check( __line__, val(
k) )
119 call check( __line__, val(
k+1) )
121 call check( __line__, val(
k-1) )
122 call check( __line__, val(
k+2) )
125 valw(
k) = ( f31 * ( val(
k+2)+val(
k-1) ) + f32 * ( val(
k+1)+val(
k) ) ) &
126 - ( f31 * ( val(
k+2)-val(
k-1) ) + f33 * ( val(
k+1)-val(
k) ) ) * sign(1.0_rp,mflx(
k))
134 call check( __line__, mflx(
ks) )
135 call check( __line__, val(
ks ) )
136 call check( __line__, val(
ks+1) )
137 call check( __line__, mflx(
ke-1) )
138 call check( __line__, val(
ke ) )
139 call check( __line__, val(
ke-1) )
143 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) ) &
144 * ( 0.5_rp + sign(0.5_rp,mflx(
ks)) ) &
145 + ( 2.0_rp * val(
ks) + 5.0_rp * val(
ks+1) - val(
ks+2) ) / 6.0_rp &
146 * ( 0.5_rp - sign(0.5_rp,mflx(
ks)) )
147 valw(
ke-1) = ( 2.0_rp * val(
ke) + 5.0_rp * val(
ke-1) - val(
ke-2) ) / 6.0_rp &
148 * ( 0.5_rp + sign(0.5_rp,mflx(
ke-1)) ) &
149 + f2 * ( val(
ke)+val(
ke-1) ) &
150 * ( 0.5_rp - sign(0.5_rp,mflx(
ke-1)) )
168 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
169 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
170 real(rp),
intent(in) :: val (
ka,
ia,
ja)
171 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
172 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
173 real(rp),
intent(in) :: cdz (
ka)
174 integer,
intent(in) :: iis, iie, jjs, jje
188 call check( __line__, mflx(
k,i,j) )
190 call check( __line__, val(
k,i,j) )
191 call check( __line__, val(
k+1,i,j) )
193 call check( __line__, val(
k-1,i,j) )
194 call check( __line__, val(
k+2,i,j) )
199 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
200 - ( 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) ) &
201 + gsqrt(
k,i,j) * num_diff(
k,i,j)
207 k = iundef; i = iundef; j = iundef
215 call check( __line__, mflx(
ks,i,j) )
216 call check( __line__, val(
ks ,i,j) )
217 call check( __line__, val(
ks+1,i,j) )
218 call check( __line__, mflx(
ke-1,i,j) )
219 call check( __line__, val(
ke ,i,j) )
220 call check( __line__, val(
ke-1,i,j) )
223 flux(
ks-1,i,j) = 0.0_rp
227 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
228 * ( 0.5_rp + sign(0.5_rp,vel) ) &
229 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
230 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
231 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
233 flux(
ke-1,i,j) = vel &
234 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
235 * ( 0.5_rp + sign(0.5_rp,vel) ) &
236 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
237 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
238 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
240 flux(
ke ,i,j) = 0.0_rp
247 k = iundef; i = iundef; j = iundef
263 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
264 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
265 real(rp),
intent(in) :: val (
ka,
ia,
ja)
266 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
267 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
268 real(rp),
intent(in) :: cdz(
ka)
269 integer,
intent(in) :: iis, iie, jjs, jje
282 call check( __line__, mflx(
k,i,j) )
284 call check( __line__, val(
k,i,j) )
285 call check( __line__, val(
k,i+1,j) )
287 call check( __line__, val(
k,i-1,j) )
288 call check( __line__, val(
k,i+2,j) )
293 * ( ( f31 * ( val(
k,i+2,j)+val(
k,i-1,j) ) + f32 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
294 - ( 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) ) &
295 + gsqrt(
k,i,j) * num_diff(
k,i,j)
300 k = iundef; i = iundef; j = iundef
316 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
317 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
318 real(rp),
intent(in) :: val (
ka,
ia,
ja)
319 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
320 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
321 real(rp),
intent(in) :: cdz(
ka)
322 integer,
intent(in) :: iis, iie, jjs, jje
335 call check( __line__, mflx(
k,i,j) )
337 call check( __line__, val(
k,i,j) )
338 call check( __line__, val(
k,i,j+1) )
340 call check( __line__, val(
k,i,j-1) )
341 call check( __line__, val(
k,i,j+2) )
346 * ( ( f31 * ( val(
k,i,j+2)+val(
k,i,j-1) ) + f32 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
347 - ( 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) ) &
348 + gsqrt(
k,i,j) * num_diff(
k,i,j)
353 k = iundef; i = iundef; j = iundef
372 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
373 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
374 real(rp),
intent(in) :: val (
ka,
ia,
ja)
375 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
376 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
377 real(rp),
intent(in) :: j33g
378 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
379 real(rp),
intent(in) :: cdz (
ka)
380 real(rp),
intent(in) :: fdz (
ka-1)
381 real(rp),
intent(in) :: dtrk
382 integer,
intent(in) :: iis, iie, jjs, jje
398 call check( __line__, mom(
k-1,i,j) )
399 call check( __line__, mom(
k ,i,j) )
401 call check( __line__, val(
k-1,i,j) )
402 call check( __line__, val(
k,i,j) )
404 call check( __line__, val(
k-2,i,j) )
405 call check( __line__, val(
k+1,i,j) )
408 vel = ( 0.5_rp * ( mom(
k-1,i,j) &
411 flux(
k-1,i,j) = j33g * vel &
412 * ( ( f31 * ( val(
k+1,i,j)+val(
k-2,i,j) ) + f32 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
413 - ( 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) ) &
414 + gsqrt(
k,i,j) * num_diff(
k,i,j)
420 k = iundef; i = iundef; j = iundef
428 call check( __line__, val(
ks,i,j) )
429 call check( __line__, val(
ks+1,i,j) )
430 call check( __line__, val(
ks+2,i,j) )
437 flux(
ks-1,i,j) = 0.0_rp
439 vel = ( 0.5_rp * ( mom(
ks,i,j) &
440 + mom(
ks+1,i,j) ) ) &
442 flux(
ks,i,j) = j33g * vel &
443 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
444 * ( 0.5_rp + sign(0.5_rp,vel) ) &
445 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
446 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
447 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
451 flux(
ke-1,i,j) = 0.0_rp
452 flux(
ke ,i,j) = 0.0_rp
473 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
474 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
475 real(rp),
intent(in) :: val (
ka,
ia,
ja)
476 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
477 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
478 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
479 real(rp),
intent(in) :: mapf (
ia,
ja,2)
480 real(rp),
intent(in) :: cdz (
ka)
481 logical,
intent(in) :: twod
482 integer,
intent(in) :: iis, iie, jjs, jje
495 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
497 vel = vel * j13g(
k,i,j)
498 flux(
k-1,i,j) = vel / mapf(i,j,+2) &
499 * ( ( f31 * ( val(
k+1,i,j)+val(
k-2,i,j) ) + f32 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
500 - ( 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) )
512 flux(
ks-1,i,j) = 0.0_rp
515 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
516 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
519 vel = vel * j13g(
ks+1,i,j)
520 flux(
ks,i,j) = vel / mapf(i,j,+2) &
521 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
522 * ( 0.5_rp + sign(0.5_rp,vel) ) &
523 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
524 * ( 0.5_rp - sign(0.5_rp,vel) ) )
527 flux(
ke-1,i,j) = 0.0_rp
547 real(rp),
intent(inout) :: 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) :: j23g (
ka,
ia,
ja)
553 real(rp),
intent(in) :: mapf (
ia,
ja,2)
554 real(rp),
intent(in) :: cdz (
ka)
555 logical,
intent(in) :: twod
556 integer,
intent(in) :: iis, iie, jjs, jje
569 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
571 vel = vel * j23g(
k,i,j)
572 flux(
k-1,i,j) = vel / mapf(i,j,+1) &
573 * ( ( f31 * ( val(
k+1,i,j)+val(
k-2,i,j) ) + f32 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
574 - ( 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) )
586 flux(
ks-1,i,j) = 0.0_rp
589 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
590 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
593 vel = vel * j23g(
ks+1,i,j)
594 flux(
ks,i,j) = vel / mapf(i,j,+1) &
595 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
596 * ( 0.5_rp + sign(0.5_rp,vel) ) &
597 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
598 * ( 0.5_rp - sign(0.5_rp,vel) ) )
601 flux(
ke-1,i,j) = 0.0_rp
623 real(rp),
intent(inout) :: 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 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
630 real(rp),
intent(in) :: cdz (
ka)
631 logical,
intent(in) :: twod
632 integer,
intent(in) :: iis, iie, jjs, jje
647 call check( __line__, mom(
k ,i,j) )
648 call check( __line__, mom(
k+1,i,j) )
650 call check( __line__, val(
k,i,j) )
651 call check( __line__, val(
k,i+1,j) )
653 call check( __line__, val(
k,i-1,j) )
654 call check( __line__, val(
k,i+2,j) )
662 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
664 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
665 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
666 * ( ( f31 * ( val(
k,i+2,j)+val(
k,i-1,j) ) + f32 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
667 - ( 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) ) &
668 + gsqrt(
k,i,j) * num_diff(
k,i,j)
674 k = iundef; i = iundef; j = iundef
680 flux(
ke,i,j) = 0.0_rp
687 k = iundef; i = iundef; j = iundef
704 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
705 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
706 real(rp),
intent(in) :: val (
ka,
ia,
ja)
707 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
708 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
709 real(rp),
intent(in) :: mapf (
ia,
ja,2)
710 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
711 real(rp),
intent(in) :: cdz (
ka)
712 logical,
intent(in) :: twod
713 integer,
intent(in) :: iis, iie, jjs, jje
728 call check( __line__, mom(
k ,i,j) )
729 call check( __line__, mom(
k+1,i,j) )
731 call check( __line__, val(
k,i,j) )
732 call check( __line__, val(
k,i,j+1) )
734 call check( __line__, val(
k,i,j-1) )
735 call check( __line__, val(
k,i,j+2) )
743 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
745 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
746 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
747 * ( ( f31 * ( val(
k,i,j+2)+val(
k,i,j-1) ) + f32 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
748 - ( 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) ) &
749 + gsqrt(
k,i,j) * num_diff(
k,i,j)
755 k = iundef; i = iundef; j = iundef
761 flux(
ke,i,j) = 0.0_rp
768 k = iundef; i = iundef; j = iundef
786 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
787 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
788 real(rp),
intent(in) :: val (
ka,
ia,
ja)
789 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
790 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
791 real(rp),
intent(in) :: j33g
792 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
793 real(rp),
intent(in) :: cdz (
ka)
794 logical,
intent(in) :: twod
795 integer,
intent(in) :: iis, iie, jjs, jje
812 call check( __line__, mom(
k,i,j) )
814 call check( __line__, val(
k,i,j) )
815 call check( __line__, val(
k+1,i,j) )
817 call check( __line__, val(
k-1,i,j) )
818 call check( __line__, val(
k+2,i,j) )
822 vel = ( mom(
k,i,j) ) &
827 flux(
k,i,j) = j33g * vel &
828 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
829 - ( 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) ) &
830 + gsqrt(
k,i,j) * num_diff(
k,i,j)
835 k = iundef; i = iundef; j = iundef
842 call check( __line__, mom(
ks,i ,j) )
843 call check( __line__, val(
ks+1,i,j) )
844 call check( __line__, val(
ks,i,j) )
851 flux(
ks-1,i,j) = 0.0_rp
853 vel = ( mom(
ks,i,j) ) &
858 flux(
ks,i,j) = j33g * vel &
859 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
860 * ( 0.5_rp + sign(0.5_rp,vel) ) &
861 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
862 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
863 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
864 vel = ( mom(
ke-1,i,j) ) &
869 flux(
ke-1,i,j) = j33g * vel &
870 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
871 * ( 0.5_rp + sign(0.5_rp,vel) ) &
872 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
873 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
874 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
876 flux(
ke,i,j) = 0.0_rp
888 call check( __line__, mom(
k,i,j) )
889 call check( __line__, mom(
k,i+1,j) )
891 call check( __line__, val(
k,i,j) )
892 call check( __line__, val(
k+1,i,j) )
894 call check( __line__, val(
k-1,i,j) )
895 call check( __line__, val(
k+2,i,j) )
898 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
900 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
902 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
903 flux(
k,i,j) = j33g * vel &
904 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
905 - ( 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) ) &
906 + gsqrt(
k,i,j) * num_diff(
k,i,j)
912 k = iundef; i = iundef; j = iundef
920 call check( __line__, mom(
ks,i ,j) )
921 call check( __line__, mom(
ks,i+1,j) )
922 call check( __line__, val(
ks+1,i,j) )
923 call check( __line__, val(
ks,i,j) )
929 flux(
ks-1,i,j) = 0.0_rp
931 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
933 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
935 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
936 flux(
ks,i,j) = j33g * vel &
937 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
938 * ( 0.5_rp + sign(0.5_rp,vel) ) &
939 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
940 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
941 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
942 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
944 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
946 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
947 flux(
ke-1,i,j) = j33g * vel &
948 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
949 * ( 0.5_rp + sign(0.5_rp,vel) ) &
950 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
951 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
952 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
954 flux(
ke,i,j) = 0.0_rp
964 k = iundef; i = iundef; j = iundef
980 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
981 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
982 real(rp),
intent(in) :: val (
ka,
ia,
ja)
983 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
984 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
985 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
986 real(rp),
intent(in) :: mapf (
ia,
ja,2)
987 real(rp),
intent(in) :: cdz (
ka)
988 logical,
intent(in) :: twod
989 integer,
intent(in) :: iis, iie, jjs, jje
1010 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1012 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1013 vel = vel * j13g(
k,i,j)
1014 flux(
k,i,j) = vel / mapf(i,j,+2) &
1015 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1016 - ( 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) )
1028 flux(
ks-1,i,j) = 0.0_rp
1035 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1037 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1038 vel = vel * j13g(
ks,i,j)
1039 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1040 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1041 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1042 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1043 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1050 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1052 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1053 vel = vel * j13g(
ke-1,i,j)
1054 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1055 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1056 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1057 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1058 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1060 flux(
ke ,i,j) = 0.0_rp
1076 GSQRT, J23G, MAPF, &
1078 IIS, IIE, JJS, JJE )
1081 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1082 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1083 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1084 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1085 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1086 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
1087 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1088 real(rp),
intent(in) :: cdz (
ka)
1089 logical,
intent(in) :: twod
1090 integer,
intent(in) :: iis, iie, jjs, jje
1108 * 0.5_rp * ( mom(
k+1,i,j)+mom(
k+1,i,j-1) ) &
1110 * 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
1115 vel = vel * j23g(
k,i,j)
1116 flux(
k,i,j) = vel * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1117 - ( 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) )
1128 flux(
ks-1,i,j) = 0.0_rp
1131 * 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) &
1133 * 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) &
1138 vel = vel * j23g(
ks,i,j)
1139 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1140 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1141 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1142 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1143 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1146 * 0.5_rp * ( mom(
ke,i,j)+mom(
ke,i,j-1) ) &
1148 * 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
1153 vel = vel * j23g(
ke-1,i,j)
1154 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1155 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1156 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1157 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1158 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1160 flux(
ke ,i,j) = 0.0_rp
1172 * 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) ) &
1174 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i+1,j)+mom(
k,i,j-1)+mom(
k,i+1,j-1) ) ) &
1176 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1178 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1179 vel = vel * j23g(
k,i,j)
1180 flux(
k,i,j) = vel / mapf(i,j,+1) &
1181 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1182 - ( 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) )
1194 flux(
ks-1,i,j) = 0.0_rp
1197 * 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) ) &
1199 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
1201 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1203 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1204 vel = vel * j23g(
ks,i,j)
1205 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1206 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1207 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1208 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1209 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1212 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
1214 * 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) ) ) &
1216 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1218 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1219 vel = vel * j23g(
ke-1,i,j)
1220 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1221 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1222 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1223 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1224 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1226 flux(
ke ,i,j) = 0.0_rp
1247 IIS, IIE, JJS, JJE )
1250 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1251 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1252 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1253 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1254 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1255 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1256 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1257 real(rp),
intent(in) :: cdz (
ka)
1258 logical,
intent(in) :: twod
1259 integer,
intent(in) :: iis, iie, jjs, jje
1276 call check( __line__, mom(
k,i ,j) )
1277 call check( __line__, mom(
k,i-1,j) )
1279 call check( __line__, val(
k,i-1,j) )
1280 call check( __line__, val(
k,i,j) )
1282 call check( __line__, val(
k,i-2,j) )
1283 call check( __line__, val(
k,i+1,j) )
1286 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
1288 flux(
k,i-1,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
1289 * ( ( f31 * ( val(
k,i+1,j)+val(
k,i-2,j) ) + f32 * ( val(
k,i,j)+val(
k,i-1,j) ) ) &
1290 - ( 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) ) &
1291 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1296 k = iundef; i = iundef; j = iundef
1312 IIS, IIE, JJS, JJE )
1315 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1316 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1317 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1318 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1319 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1320 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1321 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1322 real(rp),
intent(in) :: cdz (
ka)
1323 logical,
intent(in) :: twod
1324 integer,
intent(in) :: iis, iie, jjs, jje
1341 call check( __line__, mom(
k,i ,j) )
1343 call check( __line__, val(
k,i,j) )
1344 call check( __line__, val(
k,i,j+1) )
1346 call check( __line__, val(
k,i,j-1) )
1347 call check( __line__, val(
k,i,j+2) )
1350 vel = ( mom(
k,i,j) ) &
1351 / ( 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1352 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1353 * ( ( f31 * ( val(
k,i,j+2)+val(
k,i,j-1) ) + f32 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
1354 - ( 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) ) &
1355 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1359 k = iundef; i = iundef; j = iundef
1372 call check( __line__, mom(
k,i ,j) )
1373 call check( __line__, mom(
k,i-1,j) )
1375 call check( __line__, val(
k,i,j) )
1376 call check( __line__, val(
k,i,j+1) )
1378 call check( __line__, val(
k,i,j-1) )
1379 call check( __line__, val(
k,i,j+2) )
1382 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
1383 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
1384 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1385 * ( ( f31 * ( val(
k,i,j+2)+val(
k,i,j-1) ) + f32 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
1386 - ( 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) ) &
1387 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1392 k = iundef; i = iundef; j = iundef
1412 IIS, IIE, JJS, JJE )
1415 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1416 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1417 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1418 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1419 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1420 real(rp),
intent(in) :: j33g
1421 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1422 real(rp),
intent(in) :: cdz (
ka)
1423 logical,
intent(in) :: twod
1424 integer,
intent(in) :: iis, iie, jjs, jje
1440 call check( __line__, mom(
k,i,j) )
1441 call check( __line__, mom(
k,i,j+1) )
1443 call check( __line__, val(
k,i,j) )
1444 call check( __line__, val(
k+1,i,j) )
1446 call check( __line__, val(
k-1,i,j) )
1447 call check( __line__, val(
k+2,i,j) )
1450 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
1452 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
1454 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1455 flux(
k,i,j) = j33g * vel &
1456 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1457 - ( 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) ) &
1458 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1464 k = iundef; i = iundef; j = iundef
1472 call check( __line__, mom(
ks,i ,j) )
1473 call check( __line__, mom(
ks,i,j+1) )
1474 call check( __line__, val(
ks+1,i,j) )
1475 call check( __line__, val(
ks,i,j) )
1481 flux(
ks-1,i,j) = 0.0_rp
1483 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1485 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1487 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1488 flux(
ks,i,j) = j33g * vel &
1489 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1490 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1491 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1492 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1493 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1494 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1496 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1498 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1499 flux(
ke-1,i,j) = j33g * vel &
1500 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1501 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1502 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1503 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1504 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1506 flux(
ke,i,j) = 0.0_rp
1514 k = iundef; i = iundef; j = iundef
1525 GSQRT, J13G, MAPF, &
1527 IIS, IIE, JJS, JJE )
1530 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1531 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1532 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1533 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1534 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1535 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
1536 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1537 real(rp),
intent(in) :: cdz (
ka)
1538 logical,
intent(in) :: twod
1539 integer,
intent(in) :: iis, iie, jjs, jje
1556 * 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) ) &
1558 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i-1,j)+mom(
k,i,j+1)+mom(
k,i-1,j+1) ) ) &
1560 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
1562 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1563 vel = vel * j13g(
k,i,j)
1564 flux(
k,i,j) = vel / mapf(i,j,+2) &
1565 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1566 - ( 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) )
1578 flux(
ks-1,i,j) = 0.0_rp
1581 * 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) ) &
1583 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
1585 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1587 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1588 vel = vel * j13g(
ks,i,j)
1589 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1590 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1591 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1592 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1593 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1596 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
1598 * 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) ) ) &
1600 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1602 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1603 vel = vel * j13g(
ke-1,i,j)
1604 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1605 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1606 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1607 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1608 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1610 flux(
ke ,i,j) = 0.0_rp
1626 GSQRT, J23G, MAPF, &
1628 IIS, IIE, JJS, JJE )
1631 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1632 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1633 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1634 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1635 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1636 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
1637 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1638 real(rp),
intent(in) :: cdz (
ka)
1639 logical,
intent(in) :: twod
1640 integer,
intent(in) :: iis, iie, jjs, jje
1661 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
1663 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1664 vel = vel * j23g(
k,i,j)
1665 flux(
k,i,j) = vel / mapf(i,j,+1) &
1666 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1667 - ( 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) )
1679 flux(
ks-1,i,j) = 0.0_rp
1686 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1688 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1689 vel = vel * j23g(
ks,i,j)
1690 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1691 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1692 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1693 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1694 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1701 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1703 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1704 vel = vel * j23g(
ke-1,i,j)
1705 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1706 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1707 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1708 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1709 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1711 flux(
ke ,i,j) = 0.0_rp
1730 IIS, IIE, JJS, JJE )
1733 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1734 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1735 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1736 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1737 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1738 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1739 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1740 real(rp),
intent(in) :: cdz (
ka)
1741 logical,
intent(in) :: twod
1742 integer,
intent(in) :: iis, iie, jjs, jje
1757 call check( __line__, mom(
k,i ,j) )
1758 call check( __line__, mom(
k,i,j-1) )
1760 call check( __line__, val(
k,i,j) )
1761 call check( __line__, val(
k,i+1,j) )
1763 call check( __line__, val(
k,i-1,j) )
1764 call check( __line__, val(
k,i+2,j) )
1767 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
1768 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
1769 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
1770 * ( ( f31 * ( val(
k,i+2,j)+val(
k,i-1,j) ) + f32 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
1771 - ( 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) ) &
1772 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1777 k = iundef; i = iundef; j = iundef
1793 IIS, IIE, JJS, JJE )
1796 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1797 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1798 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1799 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1800 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1801 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1802 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1803 real(rp),
intent(in) :: cdz (
ka)
1804 logical,
intent(in) :: twod
1805 integer,
intent(in) :: iis, iie, jjs, jje
1822 call check( __line__, mom(
k,i ,j) )
1823 call check( __line__, mom(
k,i,j-1) )
1825 call check( __line__, val(
k,i,j-1) )
1826 call check( __line__, val(
k,i,j) )
1828 call check( __line__, val(
k,i,j-2) )
1829 call check( __line__, val(
k,i,j+1) )
1832 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
1834 flux(
k,i,j-1) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1835 * ( ( f31 * ( val(
k,i,j+1)+val(
k,i,j-2) ) + f32 * ( val(
k,i,j)+val(
k,i,j-1) ) ) &
1836 - ( 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) ) &
1837 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1842 k = iundef; i = iundef; j = iundef