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
92 real(RP),
parameter :: F51 = 1.0_rp/60.0_rp
93 real(RP),
parameter :: F52 = -8.0_rp/60.0_rp
94 real(RP),
parameter :: F53 = 37.0_rp/60.0_rp
95 real(RP),
parameter :: F54 = -5.0_rp/60.0_rp
96 real(RP),
parameter :: F55 = 10.0_rp/60.0_rp
112 real(rp),
intent(out) :: valw (
ka)
113 real(rp),
intent(in) :: mflx (
ka)
114 real(rp),
intent(in) :: val (
ka)
115 real(rp),
intent(in) :: gsqrt(
ka)
116 real(rp),
intent(in) :: cdz (
ka)
123 call check( __line__, mflx(
k) )
125 call check( __line__, val(
k) )
126 call check( __line__, val(
k+1) )
128 call check( __line__, val(
k-1) )
129 call check( __line__, val(
k+2) )
131 call check( __line__, val(
k-2) )
132 call check( __line__, val(
k+3) )
135 valw(
k) = ( f51 * ( val(
k+3)+val(
k-2) ) &
136 + f52 * ( val(
k+2)+val(
k-1) ) &
137 + f53 * ( val(
k+1)+val(
k) ) ) &
138 - ( f51 * ( val(
k+3)-val(
k-2) ) &
139 + f54 * ( val(
k+2)-val(
k-1) ) &
140 + f55 * ( val(
k+1)-val(
k) ) ) * sign(1.0_rp,mflx(
k))
148 call check( __line__, mflx(
ks) )
149 call check( __line__, val(
ks ) )
150 call check( __line__, val(
ks+1) )
151 call check( __line__, mflx(
ke-1) )
152 call check( __line__, val(
ke ) )
153 call check( __line__, val(
ke-1) )
155 call check( __line__, mflx(
ks+1) )
156 call check( __line__, val(
ks+2 ) )
157 call check( __line__, val(
ks+3) )
158 call check( __line__, mflx(
ke-2) )
159 call check( __line__, val(
ke-2 ) )
160 call check( __line__, val(
ke-3) )
164 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) ) &
165 * ( 0.5_rp + sign(0.5_rp,mflx(
ks)) ) &
166 + ( 2.0_rp * val(
ks) + 5.0_rp * val(
ks+1) - val(
ks+2) ) / 6.0_rp &
167 * ( 0.5_rp - sign(0.5_rp,mflx(
ks)) )
168 valw(
ke-1) = ( 2.0_rp * val(
ke) + 5.0_rp * val(
ke-1) - val(
ke-2) ) / 6.0_rp &
169 * ( 0.5_rp + sign(0.5_rp,mflx(
ke-1)) ) &
170 + f2 * ( val(
ke)+val(
ke-1) ) &
171 * ( 0.5_rp - sign(0.5_rp,mflx(
ke-1)) )
173 valw(
ks+1) = ( 2.0_rp * val(
ks+2) + 5.0_rp * val(
ks+1) - val(
ks) ) / 6.0_rp &
174 * ( 0.5_rp + sign(0.5_rp,mflx(
ks+1)) ) &
175 + ( - 3.0_rp * val(
ks) &
176 + 27.0_rp * val(
ks+1) &
177 + 47.0_rp * val(
ks+2) &
178 - 13.0_rp * val(
ks+3) &
179 + 2.0_rp * val(
ks+4) ) / 60.0_rp &
180 * ( 0.5_rp - sign(0.5_rp,mflx(
ks+1)) )
181 valw(
ke-2) = ( - 3.0_rp * val(
ke) &
182 + 27.0_rp * val(
ke-1) &
183 + 47.0_rp * val(
ke-2) &
184 - 13.0_rp * val(
ke-3) &
185 + 2.0_rp * val(
ke-4) ) / 60.0_rp &
186 * ( 0.5_rp + sign(0.5_rp,mflx(
ke-2)) ) &
187 + ( 2.0_rp * val(
ke-2) + 5.0_rp * val(
ke-1) - val(
ke) ) / 6.0_rp &
188 * ( 0.5_rp - sign(0.5_rp,mflx(
ke-2)) )
206 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
207 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
208 real(rp),
intent(in) :: val (
ka,
ia,
ja)
209 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
210 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
211 real(rp),
intent(in) :: cdz (
ka)
212 integer,
intent(in) :: iis, iie, jjs, jje
229 call check( __line__, mflx(
k,i,j) )
231 call check( __line__, val(
k,i,j) )
232 call check( __line__, val(
k+1,i,j) )
234 call check( __line__, val(
k-1,i,j) )
235 call check( __line__, val(
k+2,i,j) )
237 call check( __line__, val(
k-2,i,j) )
238 call check( __line__, val(
k+3,i,j) )
243 * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
244 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
245 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
246 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
247 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
248 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
249 + gsqrt(
k,i,j) * num_diff(
k,i,j)
256 k = iundef; i = iundef; j = iundef
265 call check( __line__, mflx(
ks,i,j) )
266 call check( __line__, val(
ks ,i,j) )
267 call check( __line__, val(
ks+1,i,j) )
268 call check( __line__, mflx(
ke-1,i,j) )
269 call check( __line__, val(
ke ,i,j) )
270 call check( __line__, val(
ke-1,i,j) )
272 call check( __line__, mflx(
ks+1,i,j) )
273 call check( __line__, val(
ks+2 ,i,j) )
274 call check( __line__, val(
ks+3,i,j) )
275 call check( __line__, mflx(
ke-2,i,j) )
276 call check( __line__, val(
ke-2 ,i,j) )
277 call check( __line__, val(
ke-3,i,j) )
280 flux(
ks-1,i,j) = 0.0_rp
284 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
285 * ( 0.5_rp + sign(0.5_rp,vel) ) &
286 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
287 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
288 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
290 flux(
ke-1,i,j) = vel &
291 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
292 * ( 0.5_rp + sign(0.5_rp,vel) ) &
293 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
294 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
295 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
298 flux(
ks+1,i,j) = vel &
299 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
300 * ( 0.5_rp + sign(0.5_rp,vel) ) &
301 + ( - 3.0_rp * val(
ks,i,j) &
302 + 27.0_rp * val(
ks+1,i,j) &
303 + 47.0_rp * val(
ks+2,i,j) &
304 - 13.0_rp * val(
ks+3,i,j) &
305 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
306 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
307 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
309 flux(
ke-2,i,j) = vel &
310 * ( ( - 3.0_rp * val(
ke,i,j) &
311 + 27.0_rp * val(
ke-1,i,j) &
312 + 47.0_rp * val(
ke-2,i,j) &
313 - 13.0_rp * val(
ke-3,i,j) &
314 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
315 * ( 0.5_rp + sign(0.5_rp,vel) ) &
316 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
317 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
318 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
320 flux(
ke ,i,j) = 0.0_rp
330 k = iundef; i = iundef; j = iundef
346 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
347 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
348 real(rp),
intent(in) :: val (
ka,
ia,
ja)
349 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
350 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
351 real(rp),
intent(in) :: cdz(
ka)
352 integer,
intent(in) :: iis, iie, jjs, jje
366 call check( __line__, mflx(
k,i,j) )
368 call check( __line__, val(
k,i,j) )
369 call check( __line__, val(
k,i+1,j) )
371 call check( __line__, val(
k,i-1,j) )
372 call check( __line__, val(
k,i+2,j) )
374 call check( __line__, val(
k,i-2,j) )
375 call check( __line__, val(
k,i+3,j) )
380 * ( ( f51 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
381 + f52 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
382 + f53 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
383 - ( f51 * ( val(
k,i+3,j)-val(
k,i-2,j) ) &
384 + f54 * ( val(
k,i+2,j)-val(
k,i-1,j) ) &
385 + f55 * ( val(
k,i+1,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
386 + gsqrt(
k,i,j) * num_diff(
k,i,j)
392 k = iundef; i = iundef; j = iundef
408 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
409 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
410 real(rp),
intent(in) :: val (
ka,
ia,
ja)
411 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
412 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
413 real(rp),
intent(in) :: cdz(
ka)
414 integer,
intent(in) :: iis, iie, jjs, jje
428 call check( __line__, mflx(
k,i,j) )
430 call check( __line__, val(
k,i,j) )
431 call check( __line__, val(
k,i,j+1) )
433 call check( __line__, val(
k,i,j-1) )
434 call check( __line__, val(
k,i,j+2) )
436 call check( __line__, val(
k,i,j-2) )
437 call check( __line__, val(
k,i,j+3) )
442 * ( ( f51 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
443 + f52 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
444 + f53 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
445 - ( f51 * ( val(
k,i,j+3)-val(
k,i,j-2) ) &
446 + f54 * ( val(
k,i,j+2)-val(
k,i,j-1) ) &
447 + f55 * ( val(
k,i,j+1)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
448 + gsqrt(
k,i,j) * num_diff(
k,i,j)
454 k = iundef; i = iundef; j = iundef
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) :: j33g
479 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
480 real(rp),
intent(in) :: cdz (
ka)
481 real(rp),
intent(in) :: fdz (
ka-1)
482 real(rp),
intent(in) :: dtrk
483 integer,
intent(in) :: iis, iie, jjs, jje
502 call check( __line__, mom(
k-1,i,j) )
503 call check( __line__, mom(
k ,i,j) )
505 call check( __line__, val(
k-1,i,j) )
506 call check( __line__, val(
k,i,j) )
508 call check( __line__, val(
k-2,i,j) )
509 call check( __line__, val(
k+1,i,j) )
511 call check( __line__, val(
k-3,i,j) )
512 call check( __line__, val(
k+2,i,j) )
515 vel = ( 0.5_rp * ( mom(
k-1,i,j) &
518 flux(
k-1,i,j) = j33g * vel &
519 * ( ( f51 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
520 + f52 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
521 + f53 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
522 - ( f51 * ( val(
k+2,i,j)-val(
k-3,i,j) ) &
523 + f54 * ( val(
k+1,i,j)-val(
k-2,i,j) ) &
524 + f55 * ( val(
k,i,j)-val(
k-1,i,j) ) ) * sign(1.0_rp,vel) ) &
525 + gsqrt(
k,i,j) * num_diff(
k,i,j)
532 k = iundef; i = iundef; j = iundef
541 call check( __line__, val(
ks,i,j) )
542 call check( __line__, val(
ks+1,i,j) )
543 call check( __line__, val(
ks+2,i,j) )
544 call check( __line__, val(
ks+3,i,j) )
545 call check( __line__, val(
ks+4,i,j) )
548 call check( __line__, val(
ke-4,i,j) )
549 call check( __line__, val(
ke-3,i,j) )
550 call check( __line__, val(
ke-2,i,j) )
551 call check( __line__, val(
ke-1,i,j) )
557 flux(
ks-1,i,j) = 0.0_rp
559 vel = ( 0.5_rp * ( mom(
ks,i,j) &
560 + mom(
ks+1,i,j) ) ) &
562 flux(
ks,i,j) = j33g * vel &
563 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
564 * ( 0.5_rp + sign(0.5_rp,vel) ) &
565 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
566 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
567 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
569 vel = ( 0.5_rp * ( mom(
ks+1,i,j) &
570 + mom(
ks+2,i,j) ) ) &
572 flux(
ks+1,i,j) = j33g * vel &
573 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
574 * ( 0.5_rp + sign(0.5_rp,vel) ) &
575 + ( - 3.0_rp * val(
ks,i,j) &
576 + 27.0_rp * val(
ks+1,i,j) &
577 + 47.0_rp * val(
ks+2,i,j) &
578 - 13.0_rp * val(
ks+3,i,j) &
579 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
580 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
581 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
585 vel = ( 0.5_rp * ( mom(
ke-2,i,j) &
586 + mom(
ke-1,i,j) ) ) &
588 flux(
ke-2,i,j) = j33g * vel &
589 * ( ( - 3.0_rp * val(
ke,i,j) &
590 + 27.0_rp * val(
ke-1,i,j) &
591 + 47.0_rp * val(
ke-2,i,j) &
592 - 13.0_rp * val(
ke-3,i,j) &
593 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
594 * ( 0.5_rp + sign(0.5_rp,vel) ) &
595 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
596 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
597 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
599 flux(
ke-1,i,j) = 0.0_rp
600 flux(
ke ,i,j) = 0.0_rp
624 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
625 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
626 real(rp),
intent(in) :: val (
ka,
ia,
ja)
627 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
628 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
629 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
630 real(rp),
intent(in) :: mapf (
ia,
ja,2)
631 real(rp),
intent(in) :: cdz (
ka)
632 logical,
intent(in) :: twod
633 integer,
intent(in) :: iis, iie, jjs, jje
649 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
651 vel = vel * j13g(
k,i,j)
652 flux(
k-1,i,j) = vel / mapf(i,j,+2) &
653 * ( ( f51 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
654 + f52 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
655 + f53 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
656 - ( f51 * ( val(
k+2,i,j)-val(
k-3,i,j) ) &
657 + f54 * ( val(
k+1,i,j)-val(
k-2,i,j) ) &
658 + f55 * ( val(
k,i,j)-val(
k-1,i,j) ) ) * sign(1.0_rp,vel) )
672 flux(
ks-1,i,j) = 0.0_rp
675 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
676 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
679 vel = vel * j13g(
ks+1,i,j)
680 flux(
ks,i,j) = vel / mapf(i,j,+2) &
681 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
682 * ( 0.5_rp + sign(0.5_rp,vel) ) &
683 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
684 * ( 0.5_rp - sign(0.5_rp,vel) ) )
687 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i-1,j) ) ) &
689 vel = vel * j13g(
ke-1,i,j)
690 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
691 * ( ( 2.0_rp * val(
ke-1,i,j) + 5.0_rp * val(
ke-2,i,j) - val(
ke-3,i,j) ) / 6.0_rp &
692 * ( 0.5_rp + sign(0.5_rp,vel) ) &
693 + f2 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
694 * ( 0.5_rp - sign(0.5_rp,vel) ) )
696 flux(
ke-1,i,j) = 0.0_rp
719 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
720 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
721 real(rp),
intent(in) :: val (
ka,
ia,
ja)
722 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
723 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
724 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
725 real(rp),
intent(in) :: mapf (
ia,
ja,2)
726 real(rp),
intent(in) :: cdz (
ka)
727 logical,
intent(in) :: twod
728 integer,
intent(in) :: iis, iie, jjs, jje
744 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
746 vel = vel * j23g(
k,i,j)
747 flux(
k-1,i,j) = vel / mapf(i,j,+1) &
748 * ( ( f51 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
749 + f52 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
750 + f53 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
751 - ( f51 * ( val(
k+2,i,j)-val(
k-3,i,j) ) &
752 + f54 * ( val(
k+1,i,j)-val(
k-2,i,j) ) &
753 + f55 * ( val(
k,i,j)-val(
k-1,i,j) ) ) * sign(1.0_rp,vel) )
767 flux(
ks-1,i,j) = 0.0_rp
770 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
771 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
774 vel = vel * j23g(
ks+1,i,j)
775 flux(
ks,i,j) = vel / mapf(i,j,+1) &
776 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
777 * ( 0.5_rp + sign(0.5_rp,vel) ) &
778 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
779 * ( 0.5_rp - sign(0.5_rp,vel) ) )
782 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
784 vel = vel * j23g(
ke-1,i,j)
785 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
786 * ( ( 2.0_rp * val(
ke-1,i,j) + 5.0_rp * val(
ke-2,i,j) - val(
ke-3,i,j) ) / 6.0_rp &
787 * ( 0.5_rp + sign(0.5_rp,vel) ) &
788 + f2 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
789 * ( 0.5_rp - sign(0.5_rp,vel) ) )
791 flux(
ke-1,i,j) = 0.0_rp
816 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
817 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
818 real(rp),
intent(in) :: val (
ka,
ia,
ja)
819 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
820 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
821 real(rp),
intent(in) :: mapf (
ia,
ja,2)
822 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
823 real(rp),
intent(in) :: cdz (
ka)
824 logical,
intent(in) :: twod
825 integer,
intent(in) :: iis, iie, jjs, jje
843 call check( __line__, mom(
k ,i,j) )
844 call check( __line__, mom(
k+1,i,j) )
846 call check( __line__, val(
k,i,j) )
847 call check( __line__, val(
k,i+1,j) )
849 call check( __line__, val(
k,i-1,j) )
850 call check( __line__, val(
k,i+2,j) )
852 call check( __line__, val(
k,i-2,j) )
853 call check( __line__, val(
k,i+3,j) )
861 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
863 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
864 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
865 * ( ( f51 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
866 + f52 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
867 + f53 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
868 - ( f51 * ( val(
k,i+3,j)-val(
k,i-2,j) ) &
869 + f54 * ( val(
k,i+2,j)-val(
k,i-1,j) ) &
870 + f55 * ( val(
k,i+1,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
871 + gsqrt(
k,i,j) * num_diff(
k,i,j)
878 k = iundef; i = iundef; j = iundef
885 flux(
ke,i,j) = 0.0_rp
895 k = iundef; i = iundef; j = iundef
912 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
913 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
914 real(rp),
intent(in) :: val (
ka,
ia,
ja)
915 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
916 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
917 real(rp),
intent(in) :: mapf (
ia,
ja,2)
918 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
919 real(rp),
intent(in) :: cdz (
ka)
920 logical,
intent(in) :: twod
921 integer,
intent(in) :: iis, iie, jjs, jje
939 call check( __line__, mom(
k ,i,j) )
940 call check( __line__, mom(
k+1,i,j) )
942 call check( __line__, val(
k,i,j) )
943 call check( __line__, val(
k,i,j+1) )
945 call check( __line__, val(
k,i,j-1) )
946 call check( __line__, val(
k,i,j+2) )
948 call check( __line__, val(
k,i,j-2) )
949 call check( __line__, val(
k,i,j+3) )
957 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
959 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
960 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
961 * ( ( f51 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
962 + f52 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
963 + f53 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
964 - ( f51 * ( val(
k,i,j+3)-val(
k,i,j-2) ) &
965 + f54 * ( val(
k,i,j+2)-val(
k,i,j-1) ) &
966 + f55 * ( val(
k,i,j+1)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
967 + gsqrt(
k,i,j) * num_diff(
k,i,j)
974 k = iundef; i = iundef; j = iundef
981 flux(
ke,i,j) = 0.0_rp
991 k = iundef; i = iundef; j = iundef
1006 IIS, IIE, JJS, JJE )
1009 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1010 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1011 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1012 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1013 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1014 real(rp),
intent(in) :: j33g
1015 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1016 real(rp),
intent(in) :: cdz (
ka)
1017 logical,
intent(in) :: twod
1018 integer,
intent(in) :: iis, iie, jjs, jje
1039 call check( __line__, mom(
k,i,j) )
1041 call check( __line__, val(
k,i,j) )
1042 call check( __line__, val(
k+1,i,j) )
1044 call check( __line__, val(
k-1,i,j) )
1045 call check( __line__, val(
k+2,i,j) )
1047 call check( __line__, val(
k-2,i,j) )
1048 call check( __line__, val(
k+3,i,j) )
1051 vel = ( mom(
k,i,j) ) &
1056 flux(
k,i,j) = j33g * vel &
1057 * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1058 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1059 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1060 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
1061 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
1062 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1063 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1069 k = iundef; i = iundef; j = iundef
1078 call check( __line__, mom(
ks,i ,j) )
1079 call check( __line__, val(
ks+1,i,j) )
1080 call check( __line__, val(
ks,i,j) )
1082 call check( __line__, mom(
ks+1,i ,j) )
1083 call check( __line__, val(
ks+3,i,j) )
1084 call check( __line__, val(
ks+2,i,j) )
1090 flux(
ks-1,i,j) = 0.0_rp
1092 vel = ( mom(
ks,i,j) ) &
1097 flux(
ks,i,j) = j33g * vel &
1098 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1099 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1100 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1101 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1102 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1103 vel = ( mom(
ke-1,i,j) ) &
1108 flux(
ke-1,i,j) = j33g * vel &
1109 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1110 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1111 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1112 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1113 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1115 vel = ( mom(
ks+1,i,j) ) &
1120 flux(
ks+1,i,j) = j33g * vel &
1121 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
1122 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1123 + ( - 3.0_rp * val(
ks,i,j) &
1124 + 27.0_rp * val(
ks+1,i,j) &
1125 + 47.0_rp * val(
ks+2,i,j) &
1126 - 13.0_rp * val(
ks+3,i,j) &
1127 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
1128 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1129 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
1130 vel = ( mom(
ke-2,i,j) ) &
1135 flux(
ke-2,i,j) = j33g * vel &
1136 * ( ( - 3.0_rp * val(
ke,i,j) &
1137 + 27.0_rp * val(
ke-1,i,j) &
1138 + 47.0_rp * val(
ke-2,i,j) &
1139 - 13.0_rp * val(
ke-3,i,j) &
1140 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
1141 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1142 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
1143 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1144 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
1146 flux(
ke,i,j) = 0.0_rp
1160 call check( __line__, mom(
k,i,j) )
1161 call check( __line__, mom(
k,i+1,j) )
1163 call check( __line__, val(
k,i,j) )
1164 call check( __line__, val(
k+1,i,j) )
1166 call check( __line__, val(
k-1,i,j) )
1167 call check( __line__, val(
k+2,i,j) )
1169 call check( __line__, val(
k-2,i,j) )
1170 call check( __line__, val(
k+3,i,j) )
1173 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
1175 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1177 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1178 flux(
k,i,j) = j33g * vel &
1179 * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1180 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1181 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1182 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
1183 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
1184 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1185 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1192 k = iundef; i = iundef; j = iundef
1201 call check( __line__, mom(
ks,i ,j) )
1202 call check( __line__, mom(
ks,i+1,j) )
1203 call check( __line__, val(
ks+1,i,j) )
1204 call check( __line__, val(
ks,i,j) )
1206 call check( __line__, mom(
ks+1,i ,j) )
1207 call check( __line__, mom(
ks+1,i+1,j) )
1208 call check( __line__, val(
ks+3,i,j) )
1209 call check( __line__, val(
ks+2,i,j) )
1215 flux(
ks-1,i,j) = 0.0_rp
1217 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
1219 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1221 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1222 flux(
ks,i,j) = j33g * vel &
1223 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1224 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1225 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1226 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1227 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1228 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
1230 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1232 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1233 flux(
ke-1,i,j) = j33g * vel &
1234 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1235 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1236 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1237 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1238 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1240 vel = ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i+1,j) ) ) &
1242 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1244 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1245 flux(
ks+1,i,j) = j33g * vel &
1246 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
1247 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1248 + ( - 3.0_rp * val(
ks,i,j) &
1249 + 27.0_rp * val(
ks+1,i,j) &
1250 + 47.0_rp * val(
ks+2,i,j) &
1251 - 13.0_rp * val(
ks+3,i,j) &
1252 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
1253 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1254 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
1255 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i+1,j) ) ) &
1257 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1259 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1260 flux(
ke-2,i,j) = j33g * vel &
1261 * ( ( - 3.0_rp * val(
ke,i,j) &
1262 + 27.0_rp * val(
ke-1,i,j) &
1263 + 47.0_rp * val(
ke-2,i,j) &
1264 - 13.0_rp * val(
ke-3,i,j) &
1265 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
1266 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1267 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
1268 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1269 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
1271 flux(
ke,i,j) = 0.0_rp
1284 k = iundef; i = iundef; j = iundef
1295 GSQRT, J13G, MAPF, &
1297 IIS, IIE, JJS, JJE )
1300 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1301 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1302 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1303 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1304 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1305 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
1306 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1307 real(rp),
intent(in) :: cdz (
ka)
1308 logical,
intent(in) :: twod
1309 integer,
intent(in) :: iis, iie, jjs, jje
1333 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1335 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1336 vel = vel * j13g(
k,i,j)
1337 flux(
k,i,j) = vel / mapf(i,j,+2) &
1338 * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1339 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1340 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1341 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
1342 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
1343 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
1357 flux(
ks-1,i,j) = 0.0_rp
1364 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1366 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1367 vel = vel * j13g(
ks,i,j)
1368 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1369 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1370 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1371 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1372 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1379 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1381 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1382 vel = vel * j13g(
ke-1,i,j)
1383 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1384 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1385 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1386 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1387 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1394 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1396 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1397 vel = vel * j13g(
ks+1,i,j)
1398 flux(
ks+1,i,j) = vel / mapf(i,j,+2) &
1399 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
1400 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1401 + ( - 3.0_rp * val(
ks,i,j) &
1402 + 27.0_rp * val(
ks+1,i,j) &
1403 + 47.0_rp * val(
ks+2,i,j) &
1404 - 13.0_rp * val(
ks+3,i,j) &
1405 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
1406 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1413 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1415 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1416 vel = vel * j13g(
ke-2,i,j)
1417 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
1418 * ( ( - 3.0_rp * val(
ke,i,j) &
1419 + 27.0_rp * val(
ke-1,i,j) &
1420 + 47.0_rp * val(
ke-2,i,j) &
1421 - 13.0_rp * val(
ke-3,i,j) &
1422 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
1423 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1424 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
1425 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1427 flux(
ke ,i,j) = 0.0_rp
1446 GSQRT, J23G, MAPF, &
1448 IIS, IIE, JJS, JJE )
1451 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1452 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1453 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1454 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1455 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1456 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
1457 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1458 real(rp),
intent(in) :: cdz (
ka)
1459 logical,
intent(in) :: twod
1460 integer,
intent(in) :: iis, iie, jjs, jje
1481 * 0.5_rp * ( mom(
k+1,i,j)+mom(
k+1,i,j-1) ) &
1483 * 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
1488 vel = vel * j23g(
k,i,j)
1489 flux(
k,i,j) = vel * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1490 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1491 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1492 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
1493 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
1494 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
1507 flux(
ks-1,i,j) = 0.0_rp
1510 * 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) &
1512 * 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) &
1517 vel = vel * j23g(
ks,i,j)
1518 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1519 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1520 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1521 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1522 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1525 * 0.5_rp * ( mom(
ke,i,j)+mom(
ke,i,j-1) ) &
1527 * 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
1532 vel = vel * j23g(
ke-1,i,j)
1533 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1534 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1535 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1536 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1537 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1540 * 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j-1) ) &
1542 * 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) &
1547 vel = vel * j23g(
ks+1,i,j)
1548 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
1549 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
1550 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1551 + ( - 3.0_rp * val(
ks,i,j) &
1552 + 27.0_rp * val(
ks+1,i,j) &
1553 + 47.0_rp * val(
ks+2,i,j) &
1554 - 13.0_rp * val(
ks+3,i,j) &
1555 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
1556 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1559 * 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) &
1561 * 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j-1) ) ) &
1566 vel = vel * j23g(
ke-2,i,j)
1567 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
1568 * ( ( - 3.0_rp * val(
ke,i,j) &
1569 + 27.0_rp * val(
ke-1,i,j) &
1570 + 47.0_rp * val(
ke-2,i,j) &
1571 - 13.0_rp * val(
ke-3,i,j) &
1572 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
1573 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1574 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
1575 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1577 flux(
ke ,i,j) = 0.0_rp
1591 * 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) ) &
1593 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i+1,j)+mom(
k,i,j-1)+mom(
k,i+1,j-1) ) ) &
1595 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1597 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1598 vel = vel * j23g(
k,i,j)
1599 flux(
k,i,j) = vel / mapf(i,j,+1) &
1600 * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1601 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1602 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1603 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
1604 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
1605 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
1619 flux(
ks-1,i,j) = 0.0_rp
1622 * 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) ) &
1624 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
1626 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1628 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1629 vel = vel * j23g(
ks,i,j)
1630 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1631 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1632 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1633 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1634 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1637 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
1639 * 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) ) ) &
1641 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1643 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1644 vel = vel * j23g(
ke-1,i,j)
1645 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1646 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1647 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1648 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1649 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1652 * 0.25_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i+1,j)+mom(
ks+2,i,j-1)+mom(
ks+2,i+1,j-1) ) &
1654 * 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) ) ) &
1656 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1658 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1659 vel = vel * j23g(
ks+1,i,j)
1660 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
1661 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
1662 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1663 + ( - 3.0_rp * val(
ks,i,j) &
1664 + 27.0_rp * val(
ks+1,i,j) &
1665 + 47.0_rp * val(
ks+2,i,j) &
1666 - 13.0_rp * val(
ks+3,i,j) &
1667 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
1668 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1671 * 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) ) &
1673 * 0.25_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i+1,j)+mom(
ke-2,i,j-1)+mom(
ke-2,i+1,j-1) ) ) &
1675 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1677 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1678 vel = vel * j23g(
ke-2,i,j)
1679 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
1680 * ( ( - 3.0_rp * val(
ke,i,j) &
1681 + 27.0_rp * val(
ke-1,i,j) &
1682 + 47.0_rp * val(
ke-2,i,j) &
1683 - 13.0_rp * val(
ke-3,i,j) &
1684 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
1685 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1686 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
1687 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1689 flux(
ke ,i,j) = 0.0_rp
1713 IIS, IIE, JJS, JJE )
1716 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1717 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1718 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1719 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1720 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1721 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1722 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1723 real(rp),
intent(in) :: cdz (
ka)
1724 logical,
intent(in) :: twod
1725 integer,
intent(in) :: iis, iie, jjs, jje
1743 call check( __line__, mom(
k,i ,j) )
1744 call check( __line__, mom(
k,i-1,j) )
1746 call check( __line__, val(
k,i-1,j) )
1747 call check( __line__, val(
k,i,j) )
1749 call check( __line__, val(
k,i-2,j) )
1750 call check( __line__, val(
k,i+1,j) )
1752 call check( __line__, val(
k,i-3,j) )
1753 call check( __line__, val(
k,i+2,j) )
1756 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
1758 flux(
k,i-1,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
1759 * ( ( f51 * ( val(
k,i+2,j)+val(
k,i-3,j) ) &
1760 + f52 * ( val(
k,i+1,j)+val(
k,i-2,j) ) &
1761 + f53 * ( val(
k,i,j)+val(
k,i-1,j) ) ) &
1762 - ( f51 * ( val(
k,i+2,j)-val(
k,i-3,j) ) &
1763 + f54 * ( val(
k,i+1,j)-val(
k,i-2,j) ) &
1764 + f55 * ( val(
k,i,j)-val(
k,i-1,j) ) ) * sign(1.0_rp,vel) ) &
1765 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1771 k = iundef; i = iundef; j = iundef
1787 IIS, IIE, JJS, JJE )
1790 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1791 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1792 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1793 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1794 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1795 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1796 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1797 real(rp),
intent(in) :: cdz (
ka)
1798 logical,
intent(in) :: twod
1799 integer,
intent(in) :: iis, iie, jjs, jje
1817 call check( __line__, mom(
k,i ,j) )
1819 call check( __line__, val(
k,i,j) )
1820 call check( __line__, val(
k,i,j+1) )
1822 call check( __line__, val(
k,i,j-1) )
1823 call check( __line__, val(
k,i,j+2) )
1825 call check( __line__, val(
k,i,j-2) )
1826 call check( __line__, val(
k,i,j+3) )
1829 vel = ( mom(
k,i,j) ) &
1830 / ( 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1831 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1832 * ( ( f51 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
1833 + f52 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
1834 + f53 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
1835 - ( f51 * ( val(
k,i,j+3)-val(
k,i,j-2) ) &
1836 + f54 * ( val(
k,i,j+2)-val(
k,i,j-1) ) &
1837 + f55 * ( val(
k,i,j+1)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1838 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1843 k = iundef; i = iundef; j = iundef
1857 call check( __line__, mom(
k,i ,j) )
1858 call check( __line__, mom(
k,i-1,j) )
1860 call check( __line__, val(
k,i,j) )
1861 call check( __line__, val(
k,i,j+1) )
1863 call check( __line__, val(
k,i,j-1) )
1864 call check( __line__, val(
k,i,j+2) )
1866 call check( __line__, val(
k,i,j-2) )
1867 call check( __line__, val(
k,i,j+3) )
1870 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
1871 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
1872 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1873 * ( ( f51 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
1874 + f52 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
1875 + f53 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
1876 - ( f51 * ( val(
k,i,j+3)-val(
k,i,j-2) ) &
1877 + f54 * ( val(
k,i,j+2)-val(
k,i,j-1) ) &
1878 + f55 * ( val(
k,i,j+1)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1879 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1885 k = iundef; i = iundef; j = iundef
1905 IIS, IIE, JJS, JJE )
1908 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1909 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1910 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1911 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1912 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1913 real(rp),
intent(in) :: j33g
1914 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1915 real(rp),
intent(in) :: cdz (
ka)
1916 logical,
intent(in) :: twod
1917 integer,
intent(in) :: iis, iie, jjs, jje
1936 call check( __line__, mom(
k,i,j) )
1937 call check( __line__, mom(
k,i,j+1) )
1939 call check( __line__, val(
k,i,j) )
1940 call check( __line__, val(
k+1,i,j) )
1942 call check( __line__, val(
k-1,i,j) )
1943 call check( __line__, val(
k+2,i,j) )
1945 call check( __line__, val(
k-2,i,j) )
1946 call check( __line__, val(
k+3,i,j) )
1949 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
1951 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
1953 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1954 flux(
k,i,j) = j33g * vel &
1955 * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1956 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1957 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1958 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
1959 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
1960 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1961 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1968 k = iundef; i = iundef; j = iundef
1977 call check( __line__, mom(
ks,i ,j) )
1978 call check( __line__, mom(
ks,i,j+1) )
1979 call check( __line__, val(
ks+1,i,j) )
1980 call check( __line__, val(
ks,i,j) )
1982 call check( __line__, mom(
ks+1,i ,j) )
1983 call check( __line__, mom(
ks+1,i,j+1) )
1984 call check( __line__, val(
ks+3,i,j) )
1985 call check( __line__, val(
ks+2,i,j) )
1991 flux(
ks-1,i,j) = 0.0_rp
1993 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1995 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1997 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1998 flux(
ks,i,j) = j33g * vel &
1999 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
2000 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2001 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
2002 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
2003 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
2004 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
2006 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
2008 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
2009 flux(
ke-1,i,j) = j33g * vel &
2010 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
2011 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2012 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
2013 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
2014 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
2016 vel = ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j+1) ) ) &
2018 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
2020 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
2021 flux(
ks+1,i,j) = j33g * vel &
2022 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
2023 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2024 + ( - 3.0_rp * val(
ks,i,j) &
2025 + 27.0_rp * val(
ks+1,i,j) &
2026 + 47.0_rp * val(
ks+2,i,j) &
2027 - 13.0_rp * val(
ks+3,i,j) &
2028 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
2029 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
2030 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
2031 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j+1) ) ) &
2033 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2035 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2036 flux(
ke-2,i,j) = j33g * vel &
2037 * ( ( - 3.0_rp * val(
ke,i,j) &
2038 + 27.0_rp * val(
ke-1,i,j) &
2039 + 47.0_rp * val(
ke-2,i,j) &
2040 - 13.0_rp * val(
ke-3,i,j) &
2041 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
2042 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2043 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
2044 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
2045 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
2047 flux(
ke,i,j) = 0.0_rp
2058 k = iundef; i = iundef; j = iundef
2069 GSQRT, J13G, MAPF, &
2071 IIS, IIE, JJS, JJE )
2074 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2075 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2076 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2077 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2078 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2079 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
2080 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2081 real(rp),
intent(in) :: cdz (
ka)
2082 logical,
intent(in) :: twod
2083 integer,
intent(in) :: iis, iie, jjs, jje
2103 * 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) ) &
2105 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i-1,j)+mom(
k,i,j+1)+mom(
k,i-1,j+1) ) ) &
2107 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
2109 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
2110 vel = vel * j13g(
k,i,j)
2111 flux(
k,i,j) = vel / mapf(i,j,+2) &
2112 * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
2113 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
2114 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
2115 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
2116 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
2117 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
2131 flux(
ks-1,i,j) = 0.0_rp
2134 * 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) ) &
2136 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
2138 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
2140 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
2141 vel = vel * j13g(
ks,i,j)
2142 flux(
ks,i,j) = vel / mapf(i,j,+2) &
2143 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
2144 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2145 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
2146 * ( 0.5_rp - sign(0.5_rp,vel) ) )
2149 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
2151 * 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) ) ) &
2153 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
2155 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
2156 vel = vel * j13g(
ke-1,i,j)
2157 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
2158 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
2159 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2160 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
2161 * ( 0.5_rp - sign(0.5_rp,vel) ) )
2164 * 0.25_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i-1,j)+mom(
ks+2,i,j+1)+mom(
ks+2,i-1,j+1) ) &
2166 * 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) ) ) &
2168 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
2170 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
2171 vel = vel * j13g(
ks+1,i,j)
2172 flux(
ks+1,i,j) = vel / mapf(i,j,+2) &
2173 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
2174 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2175 + ( - 3.0_rp * val(
ks,i,j) &
2176 + 27.0_rp * val(
ks+1,i,j) &
2177 + 47.0_rp * val(
ks+2,i,j) &
2178 - 13.0_rp * val(
ks+3,i,j) &
2179 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
2180 * ( 0.5_rp - sign(0.5_rp,vel) ) )
2183 * 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) ) &
2185 * 0.25_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i-1,j)+mom(
ke-2,i,j+1)+mom(
ke-2,i-1,j+1) ) ) &
2187 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2189 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2190 vel = vel * j13g(
ke-2,i,j)
2191 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
2192 * ( ( - 3.0_rp * val(
ke,i,j) &
2193 + 27.0_rp * val(
ke-1,i,j) &
2194 + 47.0_rp * val(
ke-2,i,j) &
2195 - 13.0_rp * val(
ke-3,i,j) &
2196 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
2197 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2198 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
2199 * ( 0.5_rp - sign(0.5_rp,vel) ) )
2201 flux(
ke ,i,j) = 0.0_rp
2220 GSQRT, J23G, MAPF, &
2222 IIS, IIE, JJS, JJE )
2225 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2226 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2227 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2228 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2229 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2230 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
2231 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2232 real(rp),
intent(in) :: cdz (
ka)
2233 logical,
intent(in) :: twod
2234 integer,
intent(in) :: iis, iie, jjs, jje
2258 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
2260 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
2261 vel = vel * j23g(
k,i,j)
2262 flux(
k,i,j) = vel / mapf(i,j,+1) &
2263 * ( ( f51 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
2264 + f52 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
2265 + f53 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
2266 - ( f51 * ( val(
k+3,i,j)-val(
k-2,i,j) ) &
2267 + f54 * ( val(
k+2,i,j)-val(
k-1,i,j) ) &
2268 + f55 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
2282 flux(
ks-1,i,j) = 0.0_rp
2289 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
2291 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
2292 vel = vel * j23g(
ks,i,j)
2293 flux(
ks,i,j) = vel / mapf(i,j,+1) &
2294 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
2295 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2296 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
2297 * ( 0.5_rp - sign(0.5_rp,vel) ) )
2304 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
2306 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
2307 vel = vel * j23g(
ke-1,i,j)
2308 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
2309 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
2310 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2311 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
2312 * ( 0.5_rp - sign(0.5_rp,vel) ) )
2319 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
2321 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
2322 vel = vel * j23g(
ks+1,i,j)
2323 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
2324 * ( ( 2.0_rp * val(
ks+2,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks,i,j) ) / 6.0_rp &
2325 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2326 + ( - 3.0_rp * val(
ks,i,j) &
2327 + 27.0_rp * val(
ks+1,i,j) &
2328 + 47.0_rp * val(
ks+2,i,j) &
2329 - 13.0_rp * val(
ks+3,i,j) &
2330 + 2.0_rp * val(
ks+4,i,j) ) / 60.0_rp &
2331 * ( 0.5_rp - sign(0.5_rp,vel) ) )
2338 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2340 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2341 vel = vel * j23g(
ke-2,i,j)
2342 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
2343 * ( ( - 3.0_rp * val(
ke,i,j) &
2344 + 27.0_rp * val(
ke-1,i,j) &
2345 + 47.0_rp * val(
ke-2,i,j) &
2346 - 13.0_rp * val(
ke-3,i,j) &
2347 + 2.0_rp * val(
ke-4,i,j) ) / 60.0_rp &
2348 * ( 0.5_rp + sign(0.5_rp,vel) ) &
2349 + ( 2.0_rp * val(
ke-2,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke,i,j) ) / 6.0_rp &
2350 * ( 0.5_rp - sign(0.5_rp,vel) ) )
2352 flux(
ke ,i,j) = 0.0_rp
2374 IIS, IIE, JJS, JJE )
2377 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2378 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2379 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2380 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2381 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2382 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2383 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
2384 real(rp),
intent(in) :: cdz (
ka)
2385 logical,
intent(in) :: twod
2386 integer,
intent(in) :: iis, iie, jjs, jje
2402 call check( __line__, mom(
k,i ,j) )
2403 call check( __line__, mom(
k,i,j-1) )
2405 call check( __line__, val(
k,i,j) )
2406 call check( __line__, val(
k,i+1,j) )
2408 call check( __line__, val(
k,i-1,j) )
2409 call check( __line__, val(
k,i+2,j) )
2411 call check( __line__, val(
k,i-2,j) )
2412 call check( __line__, val(
k,i+3,j) )
2415 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
2416 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
2417 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
2418 * ( ( f51 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
2419 + f52 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
2420 + f53 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
2421 - ( f51 * ( val(
k,i+3,j)-val(
k,i-2,j) ) &
2422 + f54 * ( val(
k,i+2,j)-val(
k,i-1,j) ) &
2423 + f55 * ( val(
k,i+1,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
2424 + gsqrt(
k,i,j) * num_diff(
k,i,j)
2430 k = iundef; i = iundef; j = iundef
2446 IIS, IIE, JJS, JJE )
2449 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2450 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2451 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2452 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2453 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2454 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2455 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
2456 real(rp),
intent(in) :: cdz (
ka)
2457 logical,
intent(in) :: twod
2458 integer,
intent(in) :: iis, iie, jjs, jje
2476 call check( __line__, mom(
k,i ,j) )
2477 call check( __line__, mom(
k,i,j-1) )
2479 call check( __line__, val(
k,i,j-1) )
2480 call check( __line__, val(
k,i,j) )
2482 call check( __line__, val(
k,i,j-2) )
2483 call check( __line__, val(
k,i,j+1) )
2485 call check( __line__, val(
k,i,j-3) )
2486 call check( __line__, val(
k,i,j+2) )
2489 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
2491 flux(
k,i,j-1) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
2492 * ( ( f51 * ( val(
k,i,j+2)+val(
k,i,j-3) ) &
2493 + f52 * ( val(
k,i,j+1)+val(
k,i,j-2) ) &
2494 + f53 * ( val(
k,i,j)+val(
k,i,j-1) ) ) &
2495 - ( f51 * ( val(
k,i,j+2)-val(
k,i,j-3) ) &
2496 + f54 * ( val(
k,i,j+1)-val(
k,i,j-2) ) &
2497 + f55 * ( val(
k,i,j)-val(
k,i,j-1) ) ) * sign(1.0_rp,vel) ) &
2498 + gsqrt(
k,i,j) * num_diff(
k,i,j)
2504 k = iundef; i = iundef; j = iundef