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 :: F41 = 7.0_rp/12.0_rp
88 real(RP),
parameter :: F42 = -1.0_rp/12.0_rp
91 real(RP),
parameter :: F61 = 37.0_rp/60.0_rp
92 real(RP),
parameter :: F62 = -8.0_rp/60.0_rp
93 real(RP),
parameter :: F63 = 1.0_rp/60.0_rp
96 real(RP),
parameter :: F81 = 533.0_rp/840.0_rp
97 real(RP),
parameter :: F82 = -139.0_rp/840.0_rp
98 real(RP),
parameter :: F83 = 29.0_rp/840.0_rp
99 real(RP),
parameter :: F84 = -3.0_rp/840.0_rp
113 real(rp),
intent(out) :: valw (
ka)
114 real(rp),
intent(in) :: mflx (
ka)
115 real(rp),
intent(in) :: val (
ka)
116 real(rp),
intent(in) :: gsqrt(
ka)
117 real(rp),
intent(in) :: cdz (
ka)
124 call check( __line__, mflx(
k) )
126 call check( __line__, val(
k) )
127 call check( __line__, val(
k+1) )
129 call check( __line__, val(
k-1) )
130 call check( __line__, val(
k+2) )
132 call check( __line__, val(
k-2) )
133 call check( __line__, val(
k+3) )
135 call check( __line__, val(
k-3) )
136 call check( __line__, val(
k+4) )
139 valw(
k) = f81 * ( val(
k+1)+val(
k) ) &
140 + f82 * ( val(
k+2)+val(
k-1) ) &
141 + f83 * ( val(
k+3)+val(
k-2) ) &
142 + f84 * ( val(
k+4)+val(
k-3) )
150 call check( __line__, mflx(
ks) )
151 call check( __line__, val(
ks ) )
152 call check( __line__, val(
ks+1) )
153 call check( __line__, mflx(
ke-1) )
154 call check( __line__, val(
ke ) )
155 call check( __line__, val(
ke-1) )
157 call check( __line__, mflx(
ks+1) )
158 call check( __line__, val(
ks+2 ) )
159 call check( __line__, val(
ks+3) )
160 call check( __line__, mflx(
ke-2) )
161 call check( __line__, val(
ke-2 ) )
162 call check( __line__, val(
ke-3) )
164 call check( __line__, mflx(
ks+2) )
165 call check( __line__, val(
ks+4 ) )
166 call check( __line__, val(
ks+5) )
167 call check( __line__, mflx(
ke-3) )
168 call check( __line__, val(
ke-4 ) )
169 call check( __line__, val(
ke-5) )
173 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) )
174 valw(
ke-1) = f2 * ( val(
ke)+val(
ke-1) )
176 valw(
ks+1) = f41 * ( val(
ks+2)+val(
ks+1) ) &
177 + f42 * ( val(
ks+3)+val(
ks) )
178 valw(
ke-2) = f41 * ( val(
ke-1)+val(
ke-2) ) &
179 + f42 * ( val(
ke)+val(
ke-3) )
181 valw(
ks+2) = f61 * ( val(
ks+3)+val(
ks+2) ) &
182 + f62 * ( val(
ks+4)+val(
ks+1) ) &
183 + f63 * ( val(
ks+5)+val(
ks) )
184 valw(
ke-3) = f61 * ( val(
ke-2)+val(
ke-3) ) &
185 + f62 * ( val(
ke-1)+val(
ke-4) ) &
186 + f63 * ( val(
ke)+val(
ke-5) )
204 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
205 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
206 real(rp),
intent(in) :: val (
ka,
ia,
ja)
207 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
208 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
209 real(rp),
intent(in) :: cdz (
ka)
210 integer,
intent(in) :: iis, iie, jjs, jje
224 call check( __line__, mflx(
k,i,j) )
226 call check( __line__, val(
k,i,j) )
227 call check( __line__, val(
k+1,i,j) )
229 call check( __line__, val(
k-1,i,j) )
230 call check( __line__, val(
k+2,i,j) )
232 call check( __line__, val(
k-2,i,j) )
233 call check( __line__, val(
k+3,i,j) )
235 call check( __line__, val(
k-3,i,j) )
236 call check( __line__, val(
k+4,i,j) )
241 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
242 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
243 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
244 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) ) &
245 + gsqrt(
k,i,j) * num_diff(
k,i,j)
251 k = iundef; i = iundef; j = iundef
259 call check( __line__, mflx(
ks,i,j) )
260 call check( __line__, val(
ks ,i,j) )
261 call check( __line__, val(
ks+1,i,j) )
262 call check( __line__, mflx(
ke-1,i,j) )
263 call check( __line__, val(
ke ,i,j) )
264 call check( __line__, val(
ke-1,i,j) )
266 call check( __line__, mflx(
ks+1,i,j) )
267 call check( __line__, val(
ks+2 ,i,j) )
268 call check( __line__, val(
ks+3,i,j) )
269 call check( __line__, mflx(
ke-2,i,j) )
270 call check( __line__, val(
ke-2 ,i,j) )
271 call check( __line__, val(
ke-3,i,j) )
273 call check( __line__, mflx(
ks+2,i,j) )
274 call check( __line__, val(
ks+4 ,i,j) )
275 call check( __line__, val(
ks+5,i,j) )
276 call check( __line__, mflx(
ke-3,i,j) )
277 call check( __line__, val(
ke-4 ,i,j) )
278 call check( __line__, val(
ke-5,i,j) )
281 flux(
ks-1,i,j) = 0.0_rp
285 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
286 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
288 flux(
ke-1,i,j) = vel &
289 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
290 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
293 flux(
ks+1,i,j) = vel &
294 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
295 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
296 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
298 flux(
ke-2,i,j) = vel &
299 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
300 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
301 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
304 flux(
ks+2,i,j) = vel &
305 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
306 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
307 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
308 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
310 flux(
ke-3,i,j) = vel &
311 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
312 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
313 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
314 + gsqrt(
ke-3,i,j) * num_diff(
ke-3,i,j)
316 flux(
ke ,i,j) = 0.0_rp
323 k = iundef; i = iundef; j = iundef
339 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
340 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
341 real(rp),
intent(in) :: val (
ka,
ia,
ja)
342 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
343 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
344 real(rp),
intent(in) :: cdz(
ka)
345 integer,
intent(in) :: iis, iie, jjs, jje
358 call check( __line__, mflx(
k,i,j) )
360 call check( __line__, val(
k,i,j) )
361 call check( __line__, val(
k,i+1,j) )
363 call check( __line__, val(
k,i-1,j) )
364 call check( __line__, val(
k,i+2,j) )
366 call check( __line__, val(
k,i-2,j) )
367 call check( __line__, val(
k,i+3,j) )
369 call check( __line__, val(
k,i-3,j) )
370 call check( __line__, val(
k,i+4,j) )
375 * ( f81 * ( val(
k,i+1,j)+val(
k,i,j) ) &
376 + f82 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
377 + f83 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
378 + f84 * ( val(
k,i+4,j)+val(
k,i-3,j) ) ) &
379 + gsqrt(
k,i,j) * num_diff(
k,i,j)
384 k = iundef; i = iundef; j = iundef
400 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
401 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
402 real(rp),
intent(in) :: val (
ka,
ia,
ja)
403 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
404 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
405 real(rp),
intent(in) :: cdz(
ka)
406 integer,
intent(in) :: iis, iie, jjs, jje
419 call check( __line__, mflx(
k,i,j) )
421 call check( __line__, val(
k,i,j) )
422 call check( __line__, val(
k,i,j+1) )
424 call check( __line__, val(
k,i,j-1) )
425 call check( __line__, val(
k,i,j+2) )
427 call check( __line__, val(
k,i,j-2) )
428 call check( __line__, val(
k,i,j+3) )
430 call check( __line__, val(
k,i,j-3) )
431 call check( __line__, val(
k,i,j+4) )
436 * ( f81 * ( val(
k,i,j+1)+val(
k,i,j) ) &
437 + f82 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
438 + f83 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
439 + f84 * ( val(
k,i,j+4)+val(
k,i,j-3) ) ) &
440 + gsqrt(
k,i,j) * num_diff(
k,i,j)
445 k = iundef; i = iundef; j = iundef
464 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
465 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
466 real(rp),
intent(in) :: val (
ka,
ia,
ja)
467 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
468 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
469 real(rp),
intent(in) :: j33g
470 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
471 real(rp),
intent(in) :: cdz (
ka)
472 real(rp),
intent(in) :: fdz (
ka-1)
473 real(rp),
intent(in) :: dtrk
474 integer,
intent(in) :: iis, iie, jjs, jje
490 call check( __line__, mom(
k-1,i,j) )
491 call check( __line__, mom(
k ,i,j) )
493 call check( __line__, val(
k-1,i,j) )
494 call check( __line__, val(
k,i,j) )
496 call check( __line__, val(
k-2,i,j) )
497 call check( __line__, val(
k+1,i,j) )
499 call check( __line__, val(
k-3,i,j) )
500 call check( __line__, val(
k+2,i,j) )
502 call check( __line__, val(
k-4,i,j) )
503 call check( __line__, val(
k+3,i,j) )
506 vel = ( 0.5_rp * ( mom(
k-1,i,j) &
509 flux(
k-1,i,j) = j33g * vel &
510 * ( f81 * ( val(
k,i,j)+val(
k-1,i,j) ) &
511 + f82 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
512 + f83 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
513 + f84 * ( val(
k+3,i,j)+val(
k-4,i,j) ) ) &
514 + gsqrt(
k,i,j) * num_diff(
k,i,j)
520 k = iundef; i = iundef; j = iundef
528 call check( __line__, val(
ks,i,j) )
529 call check( __line__, val(
ks+1,i,j) )
530 call check( __line__, val(
ks+2,i,j) )
531 call check( __line__, val(
ks+3,i,j) )
532 call check( __line__, val(
ks+4,i,j) )
533 call check( __line__, val(
ks+5,i,j) )
536 call check( __line__, val(
ke-5,i,j) )
537 call check( __line__, val(
ke-4,i,j) )
538 call check( __line__, val(
ke-3,i,j) )
539 call check( __line__, val(
ke-2,i,j) )
540 call check( __line__, val(
ke-1,i,j) )
546 flux(
ks-1,i,j) = 0.0_rp
548 vel = ( 0.5_rp * ( mom(
ks,i,j) &
549 + mom(
ks+1,i,j) ) ) &
551 flux(
ks,i,j) = j33g * vel &
552 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
553 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
555 vel = ( 0.5_rp * ( mom(
ks+1,i,j) &
556 + mom(
ks+2,i,j) ) ) &
558 flux(
ks+1,i,j) = j33g * vel &
559 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
560 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
561 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
563 vel = ( 0.5_rp * ( mom(
ks+2,i,j) &
564 + mom(
ks+3,i,j) ) ) &
566 flux(
ks+2,i,j) = j33g * vel &
567 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
568 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
569 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
570 + gsqrt(
ks+3,i,j) * num_diff(
ks+3,i,j)
574 vel = ( 0.5_rp * ( mom(
ke-3,i,j) &
575 + mom(
ke-2,i,j) ) ) &
577 flux(
ke-3,i,j) = j33g * vel &
578 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
579 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
580 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
581 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
583 vel = ( 0.5_rp * ( mom(
ke-2,i,j) &
584 + mom(
ke-1,i,j) ) ) &
586 flux(
ke-2,i,j) = j33g * vel &
587 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
588 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
589 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
591 flux(
ke-1,i,j) = 0.0_rp
592 flux(
ke ,i,j) = 0.0_rp
613 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
614 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
615 real(rp),
intent(in) :: val (
ka,
ia,
ja)
616 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
617 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
618 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
619 real(rp),
intent(in) :: mapf (
ia,
ja,2)
620 real(rp),
intent(in) :: cdz (
ka)
621 logical,
intent(in) :: twod
622 integer,
intent(in) :: iis, iie, jjs, jje
635 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
637 vel = vel * j13g(
k,i,j)
638 flux(
k-1,i,j) = vel / mapf(i,j,+2) &
639 * ( f81 * ( val(
k,i,j)+val(
k-1,i,j) ) &
640 + f82 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
641 + f83 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
642 + f84 * ( val(
k+3,i,j)+val(
k-4,i,j) ) )
654 flux(
ks-1,i,j) = 0.0_rp
657 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
658 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
661 vel = vel * j13g(
ks+1,i,j)
662 flux(
ks,i,j) = vel / mapf(i,j,+2) &
663 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
665 vel = ( 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i-1,j) ) ) &
667 vel = vel * j13g(
ks,i,j)
668 flux(
ks+1,i,j) = vel / mapf(i,j,+2) &
669 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
670 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
673 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i-1,j) ) ) &
675 vel = vel * j13g(
ke-1,i,j)
676 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
677 * ( f2 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) )
679 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i-1,j) ) ) &
681 vel = vel * j13g(
ke-2,i,j)
682 flux(
ke-3,i,j) = vel / mapf(i,j,+2) &
683 * ( f41 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
684 + f42 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) )
686 flux(
ke-1,i,j) = 0.0_rp
706 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
707 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
708 real(rp),
intent(in) :: val (
ka,
ia,
ja)
709 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
710 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
711 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
712 real(rp),
intent(in) :: mapf (
ia,
ja,2)
713 real(rp),
intent(in) :: cdz (
ka)
714 logical,
intent(in) :: twod
715 integer,
intent(in) :: iis, iie, jjs, jje
728 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
730 vel = vel * j23g(
k,i,j)
731 flux(
k-1,i,j) = vel / mapf(i,j,+1) &
732 * ( f81 * ( val(
k,i,j)+val(
k-1,i,j) ) &
733 + f82 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
734 + f83 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
735 + f84 * ( val(
k+3,i,j)+val(
k-4,i,j) ) )
747 flux(
ks-1,i,j) = 0.0_rp
750 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
751 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
754 vel = vel * j23g(
ks+1,i,j)
755 flux(
ks,i,j) = vel / mapf(i,j,+1) &
756 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
758 vel = ( 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j-1) ) ) &
760 vel = vel * j23g(
ks,i,j)
761 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
762 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
763 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
766 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
768 vel = vel * j23g(
ke-1,i,j)
769 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
770 * ( f2 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) )
772 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j-1) ) ) &
774 vel = vel * j23g(
ke-2,i,j)
775 flux(
ke-3,i,j) = vel / mapf(i,j,+1) &
776 * ( f41 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
777 + f42 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) )
779 flux(
ke-1,i,j) = 0.0_rp
801 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
802 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
803 real(rp),
intent(in) :: val (
ka,
ia,
ja)
804 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
805 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
806 real(rp),
intent(in) :: mapf (
ia,
ja,2)
807 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
808 real(rp),
intent(in) :: cdz (
ka)
809 logical,
intent(in) :: twod
810 integer,
intent(in) :: iis, iie, jjs, jje
825 call check( __line__, mom(
k ,i,j) )
826 call check( __line__, mom(
k+1,i,j) )
828 call check( __line__, val(
k,i,j) )
829 call check( __line__, val(
k,i+1,j) )
831 call check( __line__, val(
k,i-1,j) )
832 call check( __line__, val(
k,i+2,j) )
834 call check( __line__, val(
k,i-2,j) )
835 call check( __line__, val(
k,i+3,j) )
837 call check( __line__, val(
k,i-3,j) )
838 call check( __line__, val(
k,i+4,j) )
846 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
848 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
849 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
850 * ( f81 * ( val(
k,i+1,j)+val(
k,i,j) ) &
851 + f82 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
852 + f83 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
853 + f84 * ( val(
k,i+4,j)+val(
k,i-3,j) ) ) &
854 + gsqrt(
k,i,j) * num_diff(
k,i,j)
860 k = iundef; i = iundef; j = iundef
866 flux(
ke,i,j) = 0.0_rp
873 k = iundef; i = iundef; j = iundef
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) :: mapf (
ia,
ja,2)
896 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
897 real(rp),
intent(in) :: cdz (
ka)
898 logical,
intent(in) :: twod
899 integer,
intent(in) :: iis, iie, jjs, jje
914 call check( __line__, mom(
k ,i,j) )
915 call check( __line__, mom(
k+1,i,j) )
917 call check( __line__, val(
k,i,j) )
918 call check( __line__, val(
k,i,j+1) )
920 call check( __line__, val(
k,i,j-1) )
921 call check( __line__, val(
k,i,j+2) )
923 call check( __line__, val(
k,i,j-2) )
924 call check( __line__, val(
k,i,j+3) )
926 call check( __line__, val(
k,i,j-3) )
927 call check( __line__, val(
k,i,j+4) )
935 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
937 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
938 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
939 * ( f81 * ( val(
k,i,j+1)+val(
k,i,j) ) &
940 + f82 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
941 + f83 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
942 + f84 * ( val(
k,i,j+4)+val(
k,i,j-3) ) ) &
943 + gsqrt(
k,i,j) * num_diff(
k,i,j)
949 k = iundef; i = iundef; j = iundef
955 flux(
ke,i,j) = 0.0_rp
962 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) :: j33g
986 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
987 real(rp),
intent(in) :: cdz (
ka)
988 logical,
intent(in) :: twod
989 integer,
intent(in) :: iis, iie, jjs, jje
1006 call check( __line__, mom(
k,i,j) )
1008 call check( __line__, val(
k,i,j) )
1009 call check( __line__, val(
k+1,i,j) )
1011 call check( __line__, val(
k-1,i,j) )
1012 call check( __line__, val(
k+2,i,j) )
1014 call check( __line__, val(
k-2,i,j) )
1015 call check( __line__, val(
k+3,i,j) )
1017 call check( __line__, val(
k-3,i,j) )
1018 call check( __line__, val(
k+4,i,j) )
1022 vel = ( mom(
k,i,j) ) &
1027 flux(
k,i,j) = j33g * vel &
1028 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1029 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1030 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1031 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) ) &
1032 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1037 k = iundef; i = iundef; j = iundef
1044 call check( __line__, mom(
ks,i ,j) )
1045 call check( __line__, val(
ks+1,i,j) )
1046 call check( __line__, val(
ks,i,j) )
1048 call check( __line__, mom(
ks+1,i ,j) )
1049 call check( __line__, val(
ks+3,i,j) )
1050 call check( __line__, val(
ks+2,i,j) )
1052 call check( __line__, mom(
ks+2,i ,j) )
1053 call check( __line__, val(
ks+5,i,j) )
1054 call check( __line__, val(
ks+4,i,j) )
1061 flux(
ks-1,i,j) = 0.0_rp
1063 vel = ( mom(
ks,i,j) ) &
1068 flux(
ks,i,j) = j33g * vel &
1069 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1070 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1071 vel = ( mom(
ke-1,i,j) ) &
1076 flux(
ke-1,i,j) = j33g * vel &
1077 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1078 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1080 vel = ( mom(
ks+1,i,j) ) &
1085 flux(
ks+1,i,j) = j33g * vel &
1086 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1087 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
1088 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
1089 vel = ( mom(
ke-2,i,j) ) &
1094 flux(
ke-2,i,j) = j33g * vel &
1095 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1096 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
1097 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
1099 vel = ( mom(
ks+2,i,j) ) &
1104 flux(
ks+2,i,j) = j33g * vel &
1105 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1106 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1107 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
1108 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
1109 vel = ( mom(
ke-3,i,j) ) &
1114 flux(
ke-3,i,j) = j33g * vel &
1115 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1116 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1117 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
1118 + gsqrt(
ke-3,i,j) * num_diff(
ke-3,i,j)
1120 flux(
ke,i,j) = 0.0_rp
1132 call check( __line__, mom(
k,i,j) )
1133 call check( __line__, mom(
k,i+1,j) )
1135 call check( __line__, val(
k,i,j) )
1136 call check( __line__, val(
k+1,i,j) )
1138 call check( __line__, val(
k-1,i,j) )
1139 call check( __line__, val(
k+2,i,j) )
1141 call check( __line__, val(
k-2,i,j) )
1142 call check( __line__, val(
k+3,i,j) )
1144 call check( __line__, val(
k-3,i,j) )
1145 call check( __line__, val(
k+4,i,j) )
1148 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
1150 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1152 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1153 flux(
k,i,j) = j33g * vel &
1154 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1155 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1156 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1157 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) ) &
1158 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1164 k = iundef; i = iundef; j = iundef
1172 call check( __line__, mom(
ks,i ,j) )
1173 call check( __line__, mom(
ks,i+1,j) )
1174 call check( __line__, val(
ks+1,i,j) )
1175 call check( __line__, val(
ks,i,j) )
1177 call check( __line__, mom(
ks+1,i ,j) )
1178 call check( __line__, mom(
ks+1,i+1,j) )
1179 call check( __line__, val(
ks+3,i,j) )
1180 call check( __line__, val(
ks+2,i,j) )
1182 call check( __line__, mom(
ks+2,i ,j) )
1183 call check( __line__, mom(
ks+2,i+1,j) )
1184 call check( __line__, val(
ks+5,i,j) )
1185 call check( __line__, val(
ks+4,i,j) )
1191 flux(
ks-1,i,j) = 0.0_rp
1193 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
1195 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1197 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1198 flux(
ks,i,j) = j33g * vel &
1199 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1200 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1201 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
1203 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1205 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1206 flux(
ke-1,i,j) = j33g * vel &
1207 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1208 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1210 vel = ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i+1,j) ) ) &
1212 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1214 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1215 flux(
ks+1,i,j) = j33g * vel &
1216 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1217 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
1218 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
1219 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i+1,j) ) ) &
1221 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1223 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1224 flux(
ke-2,i,j) = j33g * vel &
1225 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1226 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
1227 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
1229 vel = ( 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i+1,j) ) ) &
1231 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i+1,j) ) &
1233 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) )
1234 flux(
ks+2,i,j) = j33g * vel &
1235 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1236 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1237 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
1238 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
1239 vel = ( 0.5_rp * ( mom(
ke-3,i,j)+mom(
ke-3,i+1,j) ) ) &
1241 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) &
1243 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i+1,j) ) )
1244 flux(
ke-3,i,j) = j33g * vel &
1245 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1246 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1247 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
1248 + gsqrt(
ke-3,i,j) * num_diff(
ke-3,i,j)
1250 flux(
ke,i,j) = 0.0_rp
1260 k = iundef; i = iundef; j = iundef
1271 GSQRT, J13G, MAPF, &
1273 IIS, IIE, JJS, JJE )
1276 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1277 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1278 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1279 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1280 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1281 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
1282 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1283 real(rp),
intent(in) :: cdz (
ka)
1284 logical,
intent(in) :: twod
1285 integer,
intent(in) :: iis, iie, jjs, jje
1306 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1308 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1309 vel = vel * j13g(
k,i,j)
1310 flux(
k,i,j) = vel / mapf(i,j,+2) &
1311 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1312 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1313 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1314 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
1326 flux(
ks-1,i,j) = 0.0_rp
1333 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1335 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1336 vel = vel * j13g(
ks,i,j)
1337 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1338 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1345 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1347 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1348 vel = vel * j13g(
ke-1,i,j)
1349 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1350 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1357 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1359 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1360 vel = vel * j13g(
ks+1,i,j)
1361 flux(
ks+1,i,j) = vel / mapf(i,j,+2) &
1362 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1363 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
1370 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1372 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1373 vel = vel * j13g(
ke-2,i,j)
1374 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
1375 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1376 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
1383 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i+1,j) ) &
1385 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) )
1386 vel = vel * j13g(
ks+2,i,j)
1387 flux(
ks+2,i,j) = vel / mapf(i,j,+2) &
1388 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1389 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1390 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
1397 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) &
1399 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i+1,j) ) )
1400 vel = vel * j13g(
ke-3,i,j)
1401 flux(
ke-3,i,j) = vel / mapf(i,j,+2) &
1402 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1403 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1404 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
1406 flux(
ke ,i,j) = 0.0_rp
1422 GSQRT, J23G, MAPF, &
1424 IIS, IIE, JJS, JJE )
1427 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1428 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1429 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1430 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1431 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1432 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
1433 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1434 real(rp),
intent(in) :: cdz (
ka)
1435 logical,
intent(in) :: twod
1436 integer,
intent(in) :: iis, iie, jjs, jje
1454 * 0.5_rp * ( mom(
k+1,i,j)+mom(
k+1,i,j-1) ) &
1456 * 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
1461 vel = vel * j23g(
k,i,j)
1462 flux(
k,i,j) = vel * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1463 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1464 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1465 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
1476 flux(
ks-1,i,j) = 0.0_rp
1479 * 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) &
1481 * 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) &
1486 vel = vel * j23g(
ks,i,j)
1487 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1488 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1491 * 0.5_rp * ( mom(
ke,i,j)+mom(
ke,i,j-1) ) &
1493 * 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
1498 vel = vel * j23g(
ke-1,i,j)
1499 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1500 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1503 * 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j-1) ) &
1505 * 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) &
1510 vel = vel * j23g(
ks+1,i,j)
1511 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
1512 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1513 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
1516 * 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) &
1518 * 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j-1) ) ) &
1523 vel = vel * j23g(
ke-2,i,j)
1524 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
1525 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1526 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
1529 * 0.5_rp * ( mom(
ks+3,i,j)+mom(
ks+3,i,j-1) ) &
1531 * 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j-1) ) ) &
1536 vel = vel * j23g(
ks+2,i,j)
1537 flux(
ks+2,i,j) = vel / mapf(i,j,+1) &
1538 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1539 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1540 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
1543 * 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j-1) ) &
1545 * 0.5_rp * ( mom(
ke-3,i,j)+mom(
ke-3,i,j-1) ) ) &
1550 vel = vel * j23g(
ke-3,i,j)
1551 flux(
ke-3,i,j) = vel / mapf(i,j,+1) &
1552 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1553 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1554 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
1556 flux(
ke ,i,j) = 0.0_rp
1568 * 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) ) &
1570 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i+1,j)+mom(
k,i,j-1)+mom(
k,i+1,j-1) ) ) &
1572 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1574 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1575 vel = vel * j23g(
k,i,j)
1576 flux(
k,i,j) = vel / mapf(i,j,+1) &
1577 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1578 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1579 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1580 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
1592 flux(
ks-1,i,j) = 0.0_rp
1595 * 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) ) &
1597 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
1599 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1601 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1602 vel = vel * j23g(
ks,i,j)
1603 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1604 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1607 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
1609 * 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) ) ) &
1611 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1613 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1614 vel = vel * j23g(
ke-1,i,j)
1615 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1616 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1619 * 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) ) &
1621 * 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) ) ) &
1623 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1625 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1626 vel = vel * j23g(
ks+1,i,j)
1627 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
1628 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1629 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
1632 * 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) ) &
1634 * 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) ) ) &
1636 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1638 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1639 vel = vel * j23g(
ke-2,i,j)
1640 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
1641 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1642 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
1645 * 0.25_rp * ( mom(
ks+3,i,j)+mom(
ks+3,i+1,j)+mom(
ks+3,i,j-1)+mom(
ks+3,i+1,j-1) ) &
1647 * 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) ) ) &
1649 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i+1,j) ) &
1651 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) )
1652 vel = vel * j23g(
ks+2,i,j)
1653 flux(
ks+2,i,j) = vel / mapf(i,j,+1) &
1654 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1655 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1656 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
1659 * 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) ) &
1661 * 0.25_rp * ( mom(
ke-3,i,j)+mom(
ke-3,i+1,j)+mom(
ke-3,i,j-1)+mom(
ke-3,i+1,j-1) ) ) &
1663 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) &
1665 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i+1,j) ) )
1666 vel = vel * j23g(
ke-3,i,j)
1667 flux(
ke-3,i,j) = vel / mapf(i,j,+1) &
1668 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1669 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1670 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
1672 flux(
ke ,i,j) = 0.0_rp
1693 IIS, IIE, JJS, JJE )
1696 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1697 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1698 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1699 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1700 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1701 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1702 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1703 real(rp),
intent(in) :: cdz (
ka)
1704 logical,
intent(in) :: twod
1705 integer,
intent(in) :: iis, iie, jjs, jje
1722 call check( __line__, mom(
k,i ,j) )
1723 call check( __line__, mom(
k,i-1,j) )
1725 call check( __line__, val(
k,i-1,j) )
1726 call check( __line__, val(
k,i,j) )
1728 call check( __line__, val(
k,i-2,j) )
1729 call check( __line__, val(
k,i+1,j) )
1731 call check( __line__, val(
k,i-3,j) )
1732 call check( __line__, val(
k,i+2,j) )
1734 call check( __line__, val(
k,i-4,j) )
1735 call check( __line__, val(
k,i+3,j) )
1738 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
1740 flux(
k,i-1,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
1741 * ( f81 * ( val(
k,i,j)+val(
k,i-1,j) ) &
1742 + f82 * ( val(
k,i+1,j)+val(
k,i-2,j) ) &
1743 + f83 * ( val(
k,i+2,j)+val(
k,i-3,j) ) &
1744 + f84 * ( val(
k,i+3,j)+val(
k,i-4,j) ) ) &
1745 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1750 k = iundef; i = iundef; j = iundef
1766 IIS, IIE, JJS, JJE )
1769 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1770 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1771 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1772 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1773 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1774 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1775 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1776 real(rp),
intent(in) :: cdz (
ka)
1777 logical,
intent(in) :: twod
1778 integer,
intent(in) :: iis, iie, jjs, jje
1795 call check( __line__, mom(
k,i ,j) )
1797 call check( __line__, val(
k,i,j) )
1798 call check( __line__, val(
k,i,j+1) )
1800 call check( __line__, val(
k,i,j-1) )
1801 call check( __line__, val(
k,i,j+2) )
1803 call check( __line__, val(
k,i,j-2) )
1804 call check( __line__, val(
k,i,j+3) )
1806 call check( __line__, val(
k,i,j-3) )
1807 call check( __line__, val(
k,i,j+4) )
1810 vel = ( mom(
k,i,j) ) &
1811 / ( 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1812 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1813 * ( f81 * ( val(
k,i,j+1)+val(
k,i,j) ) &
1814 + f82 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
1815 + f83 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
1816 + f84 * ( val(
k,i,j+4)+val(
k,i,j-3) ) ) &
1817 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1821 k = iundef; i = iundef; j = iundef
1834 call check( __line__, mom(
k,i ,j) )
1835 call check( __line__, mom(
k,i-1,j) )
1837 call check( __line__, val(
k,i,j) )
1838 call check( __line__, val(
k,i,j+1) )
1840 call check( __line__, val(
k,i,j-1) )
1841 call check( __line__, val(
k,i,j+2) )
1843 call check( __line__, val(
k,i,j-2) )
1844 call check( __line__, val(
k,i,j+3) )
1846 call check( __line__, val(
k,i,j-3) )
1847 call check( __line__, val(
k,i,j+4) )
1850 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
1851 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
1852 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1853 * ( f81 * ( val(
k,i,j+1)+val(
k,i,j) ) &
1854 + f82 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
1855 + f83 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
1856 + f84 * ( val(
k,i,j+4)+val(
k,i,j-3) ) ) &
1857 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1862 k = iundef; i = iundef; j = iundef
1882 IIS, IIE, JJS, JJE )
1885 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1886 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1887 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1888 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1889 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1890 real(rp),
intent(in) :: j33g
1891 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1892 real(rp),
intent(in) :: cdz (
ka)
1893 logical,
intent(in) :: twod
1894 integer,
intent(in) :: iis, iie, jjs, jje
1910 call check( __line__, mom(
k,i,j) )
1911 call check( __line__, mom(
k,i,j+1) )
1913 call check( __line__, val(
k,i,j) )
1914 call check( __line__, val(
k+1,i,j) )
1916 call check( __line__, val(
k-1,i,j) )
1917 call check( __line__, val(
k+2,i,j) )
1919 call check( __line__, val(
k-2,i,j) )
1920 call check( __line__, val(
k+3,i,j) )
1922 call check( __line__, val(
k-3,i,j) )
1923 call check( __line__, val(
k+4,i,j) )
1926 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
1928 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
1930 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1931 flux(
k,i,j) = j33g * vel &
1932 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1933 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1934 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1935 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) ) &
1936 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1942 k = iundef; i = iundef; j = iundef
1950 call check( __line__, mom(
ks,i ,j) )
1951 call check( __line__, mom(
ks,i,j+1) )
1952 call check( __line__, val(
ks+1,i,j) )
1953 call check( __line__, val(
ks,i,j) )
1955 call check( __line__, mom(
ks+1,i ,j) )
1956 call check( __line__, mom(
ks+1,i,j+1) )
1957 call check( __line__, val(
ks+3,i,j) )
1958 call check( __line__, val(
ks+2,i,j) )
1960 call check( __line__, mom(
ks+2,i ,j) )
1961 call check( __line__, mom(
ks+2,i,j+1) )
1962 call check( __line__, val(
ks+5,i,j) )
1963 call check( __line__, val(
ks+4,i,j) )
1969 flux(
ks-1,i,j) = 0.0_rp
1971 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1973 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1975 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1976 flux(
ks,i,j) = j33g * vel &
1977 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1978 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1979 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1981 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1983 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1984 flux(
ke-1,i,j) = j33g * vel &
1985 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1986 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1988 vel = ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j+1) ) ) &
1990 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
1992 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
1993 flux(
ks+1,i,j) = j33g * vel &
1994 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1995 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
1996 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
1997 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j+1) ) ) &
1999 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2001 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2002 flux(
ke-2,i,j) = j33g * vel &
2003 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
2004 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
2005 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
2007 vel = ( 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j+1) ) ) &
2009 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i,j+1) ) &
2011 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) )
2012 flux(
ks+2,i,j) = j33g * vel &
2013 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
2014 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
2015 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
2016 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
2017 vel = ( 0.5_rp * ( mom(
ke-3,i,j)+mom(
ke-3,i,j+1) ) ) &
2019 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) &
2021 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i,j+1) ) )
2022 flux(
ke-3,i,j) = j33g * vel &
2023 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
2024 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
2025 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
2026 + gsqrt(
ke-3,i,j) * num_diff(
ke-3,i,j)
2028 flux(
ke,i,j) = 0.0_rp
2036 k = iundef; i = iundef; j = iundef
2047 GSQRT, J13G, MAPF, &
2049 IIS, IIE, JJS, JJE )
2052 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2053 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2054 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2055 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2056 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2057 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
2058 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2059 real(rp),
intent(in) :: cdz (
ka)
2060 logical,
intent(in) :: twod
2061 integer,
intent(in) :: iis, iie, jjs, jje
2078 * 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) ) &
2080 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i-1,j)+mom(
k,i,j+1)+mom(
k,i-1,j+1) ) ) &
2082 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
2084 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
2085 vel = vel * j13g(
k,i,j)
2086 flux(
k,i,j) = vel / mapf(i,j,+2) &
2087 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
2088 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
2089 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
2090 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
2102 flux(
ks-1,i,j) = 0.0_rp
2105 * 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) ) &
2107 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
2109 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
2111 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
2112 vel = vel * j13g(
ks,i,j)
2113 flux(
ks,i,j) = vel / mapf(i,j,+2) &
2114 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
2117 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
2119 * 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) ) ) &
2121 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
2123 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
2124 vel = vel * j13g(
ke-1,i,j)
2125 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
2126 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
2129 * 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) ) &
2131 * 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) ) ) &
2133 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
2135 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
2136 vel = vel * j13g(
ks+1,i,j)
2137 flux(
ks+1,i,j) = vel / mapf(i,j,+2) &
2138 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
2139 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
2142 * 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) ) &
2144 * 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) ) ) &
2146 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2148 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2149 vel = vel * j13g(
ke-2,i,j)
2150 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
2151 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
2152 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
2155 * 0.25_rp * ( mom(
ks+3,i,j)+mom(
ks+3,i-1,j)+mom(
ks+3,i,j+1)+mom(
ks+3,i-1,j+1) ) &
2157 * 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) ) ) &
2159 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i,j+1) ) &
2161 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) )
2162 vel = vel * j13g(
ks+2,i,j)
2163 flux(
ks+2,i,j) = vel / mapf(i,j,+2) &
2164 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
2165 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
2166 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
2169 * 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) ) &
2171 * 0.25_rp * ( mom(
ke-3,i,j)+mom(
ke-3,i-1,j)+mom(
ke-3,i,j+1)+mom(
ke-3,i-1,j+1) ) ) &
2173 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) &
2175 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i,j+1) ) )
2176 vel = vel * j13g(
ke-3,i,j)
2177 flux(
ke-3,i,j) = vel / mapf(i,j,+2) &
2178 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
2179 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
2180 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
2182 flux(
ke ,i,j) = 0.0_rp
2198 GSQRT, J23G, MAPF, &
2200 IIS, IIE, JJS, JJE )
2203 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2204 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2205 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2206 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2207 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2208 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
2209 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2210 real(rp),
intent(in) :: cdz (
ka)
2211 logical,
intent(in) :: twod
2212 integer,
intent(in) :: iis, iie, jjs, jje
2233 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
2235 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
2236 vel = vel * j23g(
k,i,j)
2237 flux(
k,i,j) = vel / mapf(i,j,+1) &
2238 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
2239 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
2240 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
2241 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
2253 flux(
ks-1,i,j) = 0.0_rp
2260 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
2262 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
2263 vel = vel * j23g(
ks,i,j)
2264 flux(
ks,i,j) = vel / mapf(i,j,+1) &
2265 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
2272 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
2274 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
2275 vel = vel * j23g(
ke-1,i,j)
2276 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
2277 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
2284 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
2286 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
2287 vel = vel * j23g(
ks+1,i,j)
2288 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
2289 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
2290 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
2297 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2299 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2300 vel = vel * j23g(
ke-2,i,j)
2301 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
2302 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
2303 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
2310 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i,j+1) ) &
2312 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) )
2313 vel = vel * j23g(
ks+2,i,j)
2314 flux(
ks+2,i,j) = vel / mapf(i,j,+1) &
2315 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
2316 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
2317 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
2324 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) &
2326 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i,j+1) ) )
2327 vel = vel * j23g(
ke-3,i,j)
2328 flux(
ke-3,i,j) = vel / mapf(i,j,+1) &
2329 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
2330 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
2331 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
2333 flux(
ke ,i,j) = 0.0_rp
2352 IIS, IIE, JJS, JJE )
2355 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2356 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2357 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2358 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2359 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2360 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2361 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
2362 real(rp),
intent(in) :: cdz (
ka)
2363 logical,
intent(in) :: twod
2364 integer,
intent(in) :: iis, iie, jjs, jje
2379 call check( __line__, mom(
k,i ,j) )
2380 call check( __line__, mom(
k,i,j-1) )
2382 call check( __line__, val(
k,i,j) )
2383 call check( __line__, val(
k,i+1,j) )
2385 call check( __line__, val(
k,i-1,j) )
2386 call check( __line__, val(
k,i+2,j) )
2388 call check( __line__, val(
k,i-2,j) )
2389 call check( __line__, val(
k,i+3,j) )
2391 call check( __line__, val(
k,i-3,j) )
2392 call check( __line__, val(
k,i+4,j) )
2395 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
2396 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
2397 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
2398 * ( f81 * ( val(
k,i+1,j)+val(
k,i,j) ) &
2399 + f82 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
2400 + f83 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
2401 + f84 * ( val(
k,i+4,j)+val(
k,i-3,j) ) ) &
2402 + gsqrt(
k,i,j) * num_diff(
k,i,j)
2407 k = iundef; i = iundef; j = iundef
2423 IIS, IIE, JJS, JJE )
2426 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2427 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2428 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2429 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2430 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2431 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2432 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
2433 real(rp),
intent(in) :: cdz (
ka)
2434 logical,
intent(in) :: twod
2435 integer,
intent(in) :: iis, iie, jjs, jje
2452 call check( __line__, mom(
k,i ,j) )
2453 call check( __line__, mom(
k,i,j-1) )
2455 call check( __line__, val(
k,i,j-1) )
2456 call check( __line__, val(
k,i,j) )
2458 call check( __line__, val(
k,i,j-2) )
2459 call check( __line__, val(
k,i,j+1) )
2461 call check( __line__, val(
k,i,j-3) )
2462 call check( __line__, val(
k,i,j+2) )
2464 call check( __line__, val(
k,i,j-4) )
2465 call check( __line__, val(
k,i,j+3) )
2468 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
2470 flux(
k,i,j-1) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
2471 * ( f81 * ( val(
k,i,j)+val(
k,i,j-1) ) &
2472 + f82 * ( val(
k,i,j+1)+val(
k,i,j-2) ) &
2473 + f83 * ( val(
k,i,j+2)+val(
k,i,j-3) ) &
2474 + f84 * ( val(
k,i,j+3)+val(
k,i,j-4) ) ) &
2475 + gsqrt(
k,i,j) * num_diff(
k,i,j)
2480 k = iundef; i = iundef; j = iundef