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
114 real(rp),
intent(out) :: valw (
ka)
115 real(rp),
intent(in) :: mflx (
ka)
116 real(rp),
intent(in) :: val (
ka)
117 real(rp),
intent(in) :: gsqrt(
ka)
118 real(rp),
intent(in) :: cdz (
ka)
125 call check( __line__, mflx(
k) )
127 call check( __line__, val(
k) )
128 call check( __line__, val(
k+1) )
130 call check( __line__, val(
k-1) )
131 call check( __line__, val(
k+2) )
133 call check( __line__, val(
k-2) )
134 call check( __line__, val(
k+3) )
136 call check( __line__, val(
k-3) )
137 call check( __line__, val(
k+4) )
140 valw(
k) = f81 * ( val(
k+1)+val(
k) ) &
141 + f82 * ( val(
k+2)+val(
k-1) ) &
142 + f83 * ( val(
k+3)+val(
k-2) ) &
143 + f84 * ( val(
k+4)+val(
k-3) )
151 call check( __line__, mflx(
ks) )
152 call check( __line__, val(
ks ) )
153 call check( __line__, val(
ks+1) )
154 call check( __line__, mflx(
ke-1) )
155 call check( __line__, val(
ke ) )
156 call check( __line__, val(
ke-1) )
158 call check( __line__, mflx(
ks+1) )
159 call check( __line__, val(
ks+2 ) )
160 call check( __line__, val(
ks+3) )
161 call check( __line__, mflx(
ke-2) )
162 call check( __line__, val(
ke-2 ) )
163 call check( __line__, val(
ke-3) )
165 call check( __line__, mflx(
ks+2) )
166 call check( __line__, val(
ks+4 ) )
167 call check( __line__, val(
ks+5) )
168 call check( __line__, mflx(
ke-3) )
169 call check( __line__, val(
ke-4 ) )
170 call check( __line__, val(
ke-5) )
174 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) )
175 valw(
ke-1) = f2 * ( val(
ke)+val(
ke-1) )
177 valw(
ks+1) = f41 * ( val(
ks+2)+val(
ks+1) ) &
178 + f42 * ( val(
ks+3)+val(
ks) )
179 valw(
ke-2) = f41 * ( val(
ke-1)+val(
ke-2) ) &
180 + f42 * ( val(
ke)+val(
ke-3) )
182 valw(
ks+2) = f61 * ( val(
ks+3)+val(
ks+2) ) &
183 + f62 * ( val(
ks+4)+val(
ks+1) ) &
184 + f63 * ( val(
ks+5)+val(
ks) )
185 valw(
ke-3) = f61 * ( val(
ke-2)+val(
ke-3) ) &
186 + f62 * ( val(
ke-1)+val(
ke-4) ) &
187 + f63 * ( val(
ke)+val(
ke-5) )
205 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
206 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
207 real(rp),
intent(in) :: val (
ka,
ia,
ja)
208 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
209 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
210 real(rp),
intent(in) :: cdz (
ka)
211 integer,
intent(in) :: iis, iie, jjs, jje
228 call check( __line__, mflx(
k,i,j) )
230 call check( __line__, val(
k,i,j) )
231 call check( __line__, val(
k+1,i,j) )
233 call check( __line__, val(
k-1,i,j) )
234 call check( __line__, val(
k+2,i,j) )
236 call check( __line__, val(
k-2,i,j) )
237 call check( __line__, val(
k+3,i,j) )
239 call check( __line__, val(
k-3,i,j) )
240 call check( __line__, val(
k+4,i,j) )
245 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
246 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
247 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
248 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) ) &
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) )
279 call check( __line__, mflx(
ks+2,i,j) )
280 call check( __line__, val(
ks+4 ,i,j) )
281 call check( __line__, val(
ks+5,i,j) )
282 call check( __line__, mflx(
ke-3,i,j) )
283 call check( __line__, val(
ke-4 ,i,j) )
284 call check( __line__, val(
ke-5,i,j) )
287 flux(
ks-1,i,j) = 0.0_rp
291 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
292 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
294 flux(
ke-1,i,j) = vel &
295 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
296 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
299 flux(
ks+1,i,j) = vel &
300 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
301 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
302 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
304 flux(
ke-2,i,j) = vel &
305 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
306 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
307 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
310 flux(
ks+2,i,j) = vel &
311 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
312 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
313 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
314 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
316 flux(
ke-3,i,j) = vel &
317 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
318 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
319 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
320 + gsqrt(
ke-3,i,j) * num_diff(
ke-3,i,j)
322 flux(
ke ,i,j) = 0.0_rp
332 k = iundef; i = iundef; j = iundef
348 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
349 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
350 real(rp),
intent(in) :: val (
ka,
ia,
ja)
351 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
352 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
353 real(rp),
intent(in) :: cdz(
ka)
354 integer,
intent(in) :: iis, iie, jjs, jje
368 call check( __line__, mflx(
k,i,j) )
370 call check( __line__, val(
k,i,j) )
371 call check( __line__, val(
k,i+1,j) )
373 call check( __line__, val(
k,i-1,j) )
374 call check( __line__, val(
k,i+2,j) )
376 call check( __line__, val(
k,i-2,j) )
377 call check( __line__, val(
k,i+3,j) )
379 call check( __line__, val(
k,i-3,j) )
380 call check( __line__, val(
k,i+4,j) )
385 * ( f81 * ( val(
k,i+1,j)+val(
k,i,j) ) &
386 + f82 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
387 + f83 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
388 + f84 * ( val(
k,i+4,j)+val(
k,i-3,j) ) ) &
389 + gsqrt(
k,i,j) * num_diff(
k,i,j)
395 k = iundef; i = iundef; j = iundef
411 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
412 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
413 real(rp),
intent(in) :: val (
ka,
ia,
ja)
414 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
415 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
416 real(rp),
intent(in) :: cdz(
ka)
417 integer,
intent(in) :: iis, iie, jjs, jje
431 call check( __line__, mflx(
k,i,j) )
433 call check( __line__, val(
k,i,j) )
434 call check( __line__, val(
k,i,j+1) )
436 call check( __line__, val(
k,i,j-1) )
437 call check( __line__, val(
k,i,j+2) )
439 call check( __line__, val(
k,i,j-2) )
440 call check( __line__, val(
k,i,j+3) )
442 call check( __line__, val(
k,i,j-3) )
443 call check( __line__, val(
k,i,j+4) )
448 * ( f81 * ( val(
k,i,j+1)+val(
k,i,j) ) &
449 + f82 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
450 + f83 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
451 + f84 * ( val(
k,i,j+4)+val(
k,i,j-3) ) ) &
452 + gsqrt(
k,i,j) * num_diff(
k,i,j)
458 k = iundef; i = iundef; j = iundef
477 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
478 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
479 real(rp),
intent(in) :: val (
ka,
ia,
ja)
480 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
481 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
482 real(rp),
intent(in) :: j33g
483 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
484 real(rp),
intent(in) :: cdz (
ka)
485 real(rp),
intent(in) :: fdz (
ka-1)
486 real(rp),
intent(in) :: dtrk
487 integer,
intent(in) :: iis, iie, jjs, jje
506 call check( __line__, mom(
k-1,i,j) )
507 call check( __line__, mom(
k ,i,j) )
509 call check( __line__, val(
k-1,i,j) )
510 call check( __line__, val(
k,i,j) )
512 call check( __line__, val(
k-2,i,j) )
513 call check( __line__, val(
k+1,i,j) )
515 call check( __line__, val(
k-3,i,j) )
516 call check( __line__, val(
k+2,i,j) )
518 call check( __line__, val(
k-4,i,j) )
519 call check( __line__, val(
k+3,i,j) )
522 vel = ( 0.5_rp * ( mom(
k-1,i,j) &
525 flux(
k-1,i,j) = j33g * vel &
526 * ( f81 * ( val(
k,i,j)+val(
k-1,i,j) ) &
527 + f82 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
528 + f83 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
529 + f84 * ( val(
k+3,i,j)+val(
k-4,i,j) ) ) &
530 + gsqrt(
k,i,j) * num_diff(
k,i,j)
537 k = iundef; i = iundef; j = iundef
546 call check( __line__, val(
ks,i,j) )
547 call check( __line__, val(
ks+1,i,j) )
548 call check( __line__, val(
ks+2,i,j) )
549 call check( __line__, val(
ks+3,i,j) )
550 call check( __line__, val(
ks+4,i,j) )
551 call check( __line__, val(
ks+5,i,j) )
554 call check( __line__, val(
ke-5,i,j) )
555 call check( __line__, val(
ke-4,i,j) )
556 call check( __line__, val(
ke-3,i,j) )
557 call check( __line__, val(
ke-2,i,j) )
558 call check( __line__, val(
ke-1,i,j) )
564 flux(
ks-1,i,j) = 0.0_rp
566 vel = ( 0.5_rp * ( mom(
ks,i,j) &
567 + mom(
ks+1,i,j) ) ) &
569 flux(
ks,i,j) = j33g * vel &
570 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
571 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
573 vel = ( 0.5_rp * ( mom(
ks+1,i,j) &
574 + mom(
ks+2,i,j) ) ) &
576 flux(
ks+1,i,j) = j33g * vel &
577 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
578 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
579 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
581 vel = ( 0.5_rp * ( mom(
ks+2,i,j) &
582 + mom(
ks+3,i,j) ) ) &
584 flux(
ks+2,i,j) = j33g * vel &
585 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
586 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
587 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
588 + gsqrt(
ks+3,i,j) * num_diff(
ks+3,i,j)
592 vel = ( 0.5_rp * ( mom(
ke-3,i,j) &
593 + mom(
ke-2,i,j) ) ) &
595 flux(
ke-3,i,j) = j33g * vel &
596 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
597 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
598 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
599 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
601 vel = ( 0.5_rp * ( mom(
ke-2,i,j) &
602 + mom(
ke-1,i,j) ) ) &
604 flux(
ke-2,i,j) = j33g * vel &
605 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
606 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
607 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
609 flux(
ke-1,i,j) = 0.0_rp
610 flux(
ke ,i,j) = 0.0_rp
634 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
635 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
636 real(rp),
intent(in) :: val (
ka,
ia,
ja)
637 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
638 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
639 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
640 real(rp),
intent(in) :: mapf (
ia,
ja,2)
641 real(rp),
intent(in) :: cdz (
ka)
642 logical,
intent(in) :: twod
643 integer,
intent(in) :: iis, iie, jjs, jje
659 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
661 vel = vel * j13g(
k,i,j)
662 flux(
k-1,i,j) = vel / mapf(i,j,+2) &
663 * ( f81 * ( val(
k,i,j)+val(
k-1,i,j) ) &
664 + f82 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
665 + f83 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
666 + f84 * ( val(
k+3,i,j)+val(
k-4,i,j) ) )
680 flux(
ks-1,i,j) = 0.0_rp
683 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
684 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
687 vel = vel * j13g(
ks+1,i,j)
688 flux(
ks,i,j) = vel / mapf(i,j,+2) &
689 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
691 vel = ( 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i-1,j) ) ) &
693 vel = vel * j13g(
ks,i,j)
694 flux(
ks+1,i,j) = vel / mapf(i,j,+2) &
695 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
696 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
699 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i-1,j) ) ) &
701 vel = vel * j13g(
ke-1,i,j)
702 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
703 * ( f2 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) )
705 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i-1,j) ) ) &
707 vel = vel * j13g(
ke-2,i,j)
708 flux(
ke-3,i,j) = vel / mapf(i,j,+2) &
709 * ( f41 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
710 + f42 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) )
712 flux(
ke-1,i,j) = 0.0_rp
735 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
736 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
737 real(rp),
intent(in) :: val (
ka,
ia,
ja)
738 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
739 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
740 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
741 real(rp),
intent(in) :: mapf (
ia,
ja,2)
742 real(rp),
intent(in) :: cdz (
ka)
743 logical,
intent(in) :: twod
744 integer,
intent(in) :: iis, iie, jjs, jje
760 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
762 vel = vel * j23g(
k,i,j)
763 flux(
k-1,i,j) = vel / mapf(i,j,+1) &
764 * ( f81 * ( val(
k,i,j)+val(
k-1,i,j) ) &
765 + f82 * ( val(
k+1,i,j)+val(
k-2,i,j) ) &
766 + f83 * ( val(
k+2,i,j)+val(
k-3,i,j) ) &
767 + f84 * ( val(
k+3,i,j)+val(
k-4,i,j) ) )
781 flux(
ks-1,i,j) = 0.0_rp
784 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
785 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
788 vel = vel * j23g(
ks+1,i,j)
789 flux(
ks,i,j) = vel / mapf(i,j,+1) &
790 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
792 vel = ( 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j-1) ) ) &
794 vel = vel * j23g(
ks,i,j)
795 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
796 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
797 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
800 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
802 vel = vel * j23g(
ke-1,i,j)
803 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
804 * ( f2 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) )
806 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j-1) ) ) &
808 vel = vel * j23g(
ke-2,i,j)
809 flux(
ke-3,i,j) = vel / mapf(i,j,+1) &
810 * ( f41 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
811 + f42 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) )
813 flux(
ke-1,i,j) = 0.0_rp
838 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
839 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
840 real(rp),
intent(in) :: val (
ka,
ia,
ja)
841 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
842 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
843 real(rp),
intent(in) :: mapf (
ia,
ja,2)
844 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
845 real(rp),
intent(in) :: cdz (
ka)
846 logical,
intent(in) :: twod
847 integer,
intent(in) :: iis, iie, jjs, jje
865 call check( __line__, mom(
k ,i,j) )
866 call check( __line__, mom(
k+1,i,j) )
868 call check( __line__, val(
k,i,j) )
869 call check( __line__, val(
k,i+1,j) )
871 call check( __line__, val(
k,i-1,j) )
872 call check( __line__, val(
k,i+2,j) )
874 call check( __line__, val(
k,i-2,j) )
875 call check( __line__, val(
k,i+3,j) )
877 call check( __line__, val(
k,i-3,j) )
878 call check( __line__, val(
k,i+4,j) )
886 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
888 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
889 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
890 * ( f81 * ( val(
k,i+1,j)+val(
k,i,j) ) &
891 + f82 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
892 + f83 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
893 + f84 * ( val(
k,i+4,j)+val(
k,i-3,j) ) ) &
894 + gsqrt(
k,i,j) * num_diff(
k,i,j)
901 k = iundef; i = iundef; j = iundef
908 flux(
ke,i,j) = 0.0_rp
918 k = iundef; i = iundef; j = iundef
935 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
936 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
937 real(rp),
intent(in) :: val (
ka,
ia,
ja)
938 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
939 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
940 real(rp),
intent(in) :: mapf (
ia,
ja,2)
941 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
942 real(rp),
intent(in) :: cdz (
ka)
943 logical,
intent(in) :: twod
944 integer,
intent(in) :: iis, iie, jjs, jje
962 call check( __line__, mom(
k ,i,j) )
963 call check( __line__, mom(
k+1,i,j) )
965 call check( __line__, val(
k,i,j) )
966 call check( __line__, val(
k,i,j+1) )
968 call check( __line__, val(
k,i,j-1) )
969 call check( __line__, val(
k,i,j+2) )
971 call check( __line__, val(
k,i,j-2) )
972 call check( __line__, val(
k,i,j+3) )
974 call check( __line__, val(
k,i,j-3) )
975 call check( __line__, val(
k,i,j+4) )
983 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
985 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
986 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
987 * ( f81 * ( val(
k,i,j+1)+val(
k,i,j) ) &
988 + f82 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
989 + f83 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
990 + f84 * ( val(
k,i,j+4)+val(
k,i,j-3) ) ) &
991 + gsqrt(
k,i,j) * num_diff(
k,i,j)
998 k = iundef; i = iundef; j = iundef
1005 flux(
ke,i,j) = 0.0_rp
1015 k = iundef; i = iundef; j = iundef
1030 IIS, IIE, JJS, JJE )
1033 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1034 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1035 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1036 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1037 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1038 real(rp),
intent(in) :: j33g
1039 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1040 real(rp),
intent(in) :: cdz (
ka)
1041 logical,
intent(in) :: twod
1042 integer,
intent(in) :: iis, iie, jjs, jje
1063 call check( __line__, mom(
k,i,j) )
1065 call check( __line__, val(
k,i,j) )
1066 call check( __line__, val(
k+1,i,j) )
1068 call check( __line__, val(
k-1,i,j) )
1069 call check( __line__, val(
k+2,i,j) )
1071 call check( __line__, val(
k-2,i,j) )
1072 call check( __line__, val(
k+3,i,j) )
1074 call check( __line__, val(
k-3,i,j) )
1075 call check( __line__, val(
k+4,i,j) )
1078 vel = ( mom(
k,i,j) ) &
1083 flux(
k,i,j) = j33g * vel &
1084 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1085 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1086 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1087 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) ) &
1088 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1094 k = iundef; i = iundef; j = iundef
1103 call check( __line__, mom(
ks,i ,j) )
1104 call check( __line__, val(
ks+1,i,j) )
1105 call check( __line__, val(
ks,i,j) )
1107 call check( __line__, mom(
ks+1,i ,j) )
1108 call check( __line__, val(
ks+3,i,j) )
1109 call check( __line__, val(
ks+2,i,j) )
1111 call check( __line__, mom(
ks+2,i ,j) )
1112 call check( __line__, val(
ks+5,i,j) )
1113 call check( __line__, val(
ks+4,i,j) )
1119 flux(
ks-1,i,j) = 0.0_rp
1121 vel = ( mom(
ks,i,j) ) &
1126 flux(
ks,i,j) = j33g * vel &
1127 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1128 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1129 vel = ( mom(
ke-1,i,j) ) &
1134 flux(
ke-1,i,j) = j33g * vel &
1135 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1136 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1138 vel = ( mom(
ks+1,i,j) ) &
1143 flux(
ks+1,i,j) = j33g * vel &
1144 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1145 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
1146 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
1147 vel = ( mom(
ke-2,i,j) ) &
1152 flux(
ke-2,i,j) = j33g * vel &
1153 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1154 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
1155 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
1157 vel = ( mom(
ks+2,i,j) ) &
1162 flux(
ks+2,i,j) = j33g * vel &
1163 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1164 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1165 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
1166 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
1167 vel = ( mom(
ke-3,i,j) ) &
1172 flux(
ke-3,i,j) = j33g * vel &
1173 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1174 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1175 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
1176 + gsqrt(
ke-3,i,j) * num_diff(
ke-3,i,j)
1178 flux(
ke,i,j) = 0.0_rp
1192 call check( __line__, mom(
k,i,j) )
1193 call check( __line__, mom(
k,i+1,j) )
1195 call check( __line__, val(
k,i,j) )
1196 call check( __line__, val(
k+1,i,j) )
1198 call check( __line__, val(
k-1,i,j) )
1199 call check( __line__, val(
k+2,i,j) )
1201 call check( __line__, val(
k-2,i,j) )
1202 call check( __line__, val(
k+3,i,j) )
1204 call check( __line__, val(
k-3,i,j) )
1205 call check( __line__, val(
k+4,i,j) )
1208 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
1210 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1212 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1213 flux(
k,i,j) = j33g * vel &
1214 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1215 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1216 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1217 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) ) &
1218 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1225 k = iundef; i = iundef; j = iundef
1234 call check( __line__, mom(
ks,i ,j) )
1235 call check( __line__, mom(
ks,i+1,j) )
1236 call check( __line__, val(
ks+1,i,j) )
1237 call check( __line__, val(
ks,i,j) )
1239 call check( __line__, mom(
ks+1,i ,j) )
1240 call check( __line__, mom(
ks+1,i+1,j) )
1241 call check( __line__, val(
ks+3,i,j) )
1242 call check( __line__, val(
ks+2,i,j) )
1244 call check( __line__, mom(
ks+2,i ,j) )
1245 call check( __line__, mom(
ks+2,i+1,j) )
1246 call check( __line__, val(
ks+5,i,j) )
1247 call check( __line__, val(
ks+4,i,j) )
1253 flux(
ks-1,i,j) = 0.0_rp
1255 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
1257 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1259 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1260 flux(
ks,i,j) = j33g * vel &
1261 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1262 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1263 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
1265 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1267 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1268 flux(
ke-1,i,j) = j33g * vel &
1269 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1270 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1272 vel = ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i+1,j) ) ) &
1274 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1276 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1277 flux(
ks+1,i,j) = j33g * vel &
1278 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1279 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
1280 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
1281 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i+1,j) ) ) &
1283 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1285 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1286 flux(
ke-2,i,j) = j33g * vel &
1287 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1288 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
1289 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
1291 vel = ( 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i+1,j) ) ) &
1293 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i+1,j) ) &
1295 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) )
1296 flux(
ks+2,i,j) = j33g * vel &
1297 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1298 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1299 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
1300 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
1301 vel = ( 0.5_rp * ( mom(
ke-3,i,j)+mom(
ke-3,i+1,j) ) ) &
1303 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) &
1305 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i+1,j) ) )
1306 flux(
ke-3,i,j) = j33g * vel &
1307 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1308 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1309 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
1310 + gsqrt(
ke-3,i,j) * num_diff(
ke-3,i,j)
1312 flux(
ke,i,j) = 0.0_rp
1325 k = iundef; i = iundef; j = iundef
1336 GSQRT, J13G, MAPF, &
1338 IIS, IIE, JJS, JJE )
1341 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1342 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1343 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1344 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1345 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1346 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
1347 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1348 real(rp),
intent(in) :: cdz (
ka)
1349 logical,
intent(in) :: twod
1350 integer,
intent(in) :: iis, iie, jjs, jje
1374 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1376 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1377 vel = vel * j13g(
k,i,j)
1378 flux(
k,i,j) = vel / mapf(i,j,+2) &
1379 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1380 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1381 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1382 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
1396 flux(
ks-1,i,j) = 0.0_rp
1403 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1405 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1406 vel = vel * j13g(
ks,i,j)
1407 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1408 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1415 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1417 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1418 vel = vel * j13g(
ke-1,i,j)
1419 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1420 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1427 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1429 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1430 vel = vel * j13g(
ks+1,i,j)
1431 flux(
ks+1,i,j) = vel / mapf(i,j,+2) &
1432 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1433 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
1440 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1442 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1443 vel = vel * j13g(
ke-2,i,j)
1444 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
1445 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1446 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
1453 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i+1,j) ) &
1455 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) )
1456 vel = vel * j13g(
ks+2,i,j)
1457 flux(
ks+2,i,j) = vel / mapf(i,j,+2) &
1458 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1459 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1460 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
1467 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) &
1469 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i+1,j) ) )
1470 vel = vel * j13g(
ke-3,i,j)
1471 flux(
ke-3,i,j) = vel / mapf(i,j,+2) &
1472 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1473 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1474 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
1476 flux(
ke ,i,j) = 0.0_rp
1495 GSQRT, J23G, MAPF, &
1497 IIS, IIE, JJS, JJE )
1500 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1501 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1502 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1503 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1504 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1505 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
1506 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1507 real(rp),
intent(in) :: cdz (
ka)
1508 logical,
intent(in) :: twod
1509 integer,
intent(in) :: iis, iie, jjs, jje
1530 * 0.5_rp * ( mom(
k+1,i,j)+mom(
k+1,i,j-1) ) &
1532 * 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
1537 vel = vel * j23g(
k,i,j)
1538 flux(
k,i,j) = vel * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1539 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1540 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1541 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
1554 flux(
ks-1,i,j) = 0.0_rp
1557 * 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) &
1559 * 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) &
1564 vel = vel * j23g(
ks,i,j)
1565 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1566 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1569 * 0.5_rp * ( mom(
ke,i,j)+mom(
ke,i,j-1) ) &
1571 * 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
1576 vel = vel * j23g(
ke-1,i,j)
1577 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1578 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1581 * 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j-1) ) &
1583 * 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) &
1588 vel = vel * j23g(
ks+1,i,j)
1589 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
1590 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1591 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
1594 * 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) &
1596 * 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j-1) ) ) &
1601 vel = vel * j23g(
ke-2,i,j)
1602 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
1603 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1604 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
1607 * 0.5_rp * ( mom(
ks+3,i,j)+mom(
ks+3,i,j-1) ) &
1609 * 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j-1) ) ) &
1614 vel = vel * j23g(
ks+2,i,j)
1615 flux(
ks+2,i,j) = vel / mapf(i,j,+1) &
1616 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1617 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1618 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
1621 * 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j-1) ) &
1623 * 0.5_rp * ( mom(
ke-3,i,j)+mom(
ke-3,i,j-1) ) ) &
1628 vel = vel * j23g(
ke-3,i,j)
1629 flux(
ke-3,i,j) = vel / mapf(i,j,+1) &
1630 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1631 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1632 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
1634 flux(
ke ,i,j) = 0.0_rp
1648 * 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) ) &
1650 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i+1,j)+mom(
k,i,j-1)+mom(
k,i+1,j-1) ) ) &
1652 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1654 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1655 vel = vel * j23g(
k,i,j)
1656 flux(
k,i,j) = vel / mapf(i,j,+1) &
1657 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
1658 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
1659 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
1660 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
1674 flux(
ks-1,i,j) = 0.0_rp
1677 * 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) ) &
1679 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
1681 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1683 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1684 vel = vel * j23g(
ks,i,j)
1685 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1686 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1689 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
1691 * 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) ) ) &
1693 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1695 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1696 vel = vel * j23g(
ke-1,i,j)
1697 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1698 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1701 * 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) ) &
1703 * 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) ) ) &
1705 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1707 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1708 vel = vel * j23g(
ks+1,i,j)
1709 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
1710 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
1711 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
1714 * 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) ) &
1716 * 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) ) ) &
1718 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1720 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1721 vel = vel * j23g(
ke-2,i,j)
1722 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
1723 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
1724 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
1727 * 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) ) &
1729 * 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) ) ) &
1731 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i+1,j) ) &
1733 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) )
1734 vel = vel * j23g(
ks+2,i,j)
1735 flux(
ks+2,i,j) = vel / mapf(i,j,+1) &
1736 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
1737 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
1738 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
1741 * 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) ) &
1743 * 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) ) ) &
1745 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) &
1747 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i+1,j) ) )
1748 vel = vel * j23g(
ke-3,i,j)
1749 flux(
ke-3,i,j) = vel / mapf(i,j,+1) &
1750 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
1751 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
1752 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
1754 flux(
ke ,i,j) = 0.0_rp
1778 IIS, IIE, JJS, JJE )
1781 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1782 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1783 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1784 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1785 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1786 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1787 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1788 real(rp),
intent(in) :: cdz (
ka)
1789 logical,
intent(in) :: twod
1790 integer,
intent(in) :: iis, iie, jjs, jje
1808 call check( __line__, mom(
k,i ,j) )
1809 call check( __line__, mom(
k,i-1,j) )
1811 call check( __line__, val(
k,i-1,j) )
1812 call check( __line__, val(
k,i,j) )
1814 call check( __line__, val(
k,i-2,j) )
1815 call check( __line__, val(
k,i+1,j) )
1817 call check( __line__, val(
k,i-3,j) )
1818 call check( __line__, val(
k,i+2,j) )
1820 call check( __line__, val(
k,i-4,j) )
1821 call check( __line__, val(
k,i+3,j) )
1824 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
1826 flux(
k,i-1,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
1827 * ( f81 * ( val(
k,i,j)+val(
k,i-1,j) ) &
1828 + f82 * ( val(
k,i+1,j)+val(
k,i-2,j) ) &
1829 + f83 * ( val(
k,i+2,j)+val(
k,i-3,j) ) &
1830 + f84 * ( val(
k,i+3,j)+val(
k,i-4,j) ) ) &
1831 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1837 k = iundef; i = iundef; j = iundef
1853 IIS, IIE, JJS, JJE )
1856 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1857 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1858 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1859 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1860 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1861 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1862 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1863 real(rp),
intent(in) :: cdz (
ka)
1864 logical,
intent(in) :: twod
1865 integer,
intent(in) :: iis, iie, jjs, jje
1883 call check( __line__, mom(
k,i ,j) )
1885 call check( __line__, val(
k,i,j) )
1886 call check( __line__, val(
k,i,j+1) )
1888 call check( __line__, val(
k,i,j-1) )
1889 call check( __line__, val(
k,i,j+2) )
1891 call check( __line__, val(
k,i,j-2) )
1892 call check( __line__, val(
k,i,j+3) )
1894 call check( __line__, val(
k,i,j-3) )
1895 call check( __line__, val(
k,i,j+4) )
1898 vel = ( mom(
k,i,j) ) &
1899 / ( 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1900 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1901 * ( f81 * ( val(
k,i,j+1)+val(
k,i,j) ) &
1902 + f82 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
1903 + f83 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
1904 + f84 * ( val(
k,i,j+4)+val(
k,i,j-3) ) ) &
1905 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1910 k = iundef; i = iundef; j = iundef
1924 call check( __line__, mom(
k,i ,j) )
1925 call check( __line__, mom(
k,i-1,j) )
1927 call check( __line__, val(
k,i,j) )
1928 call check( __line__, val(
k,i,j+1) )
1930 call check( __line__, val(
k,i,j-1) )
1931 call check( __line__, val(
k,i,j+2) )
1933 call check( __line__, val(
k,i,j-2) )
1934 call check( __line__, val(
k,i,j+3) )
1936 call check( __line__, val(
k,i,j-3) )
1937 call check( __line__, val(
k,i,j+4) )
1940 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
1941 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
1942 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1943 * ( f81 * ( val(
k,i,j+1)+val(
k,i,j) ) &
1944 + f82 * ( val(
k,i,j+2)+val(
k,i,j-1) ) &
1945 + f83 * ( val(
k,i,j+3)+val(
k,i,j-2) ) &
1946 + f84 * ( val(
k,i,j+4)+val(
k,i,j-3) ) ) &
1947 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1953 k = iundef; i = iundef; j = iundef
1973 IIS, IIE, JJS, JJE )
1976 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1977 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1978 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1979 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1980 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1981 real(rp),
intent(in) :: j33g
1982 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1983 real(rp),
intent(in) :: cdz (
ka)
1984 logical,
intent(in) :: twod
1985 integer,
intent(in) :: iis, iie, jjs, jje
2004 call check( __line__, mom(
k,i,j) )
2005 call check( __line__, mom(
k,i,j+1) )
2007 call check( __line__, val(
k,i,j) )
2008 call check( __line__, val(
k+1,i,j) )
2010 call check( __line__, val(
k-1,i,j) )
2011 call check( __line__, val(
k+2,i,j) )
2013 call check( __line__, val(
k-2,i,j) )
2014 call check( __line__, val(
k+3,i,j) )
2016 call check( __line__, val(
k-3,i,j) )
2017 call check( __line__, val(
k+4,i,j) )
2020 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
2022 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
2024 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
2025 flux(
k,i,j) = j33g * vel &
2026 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
2027 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
2028 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
2029 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) ) &
2030 + gsqrt(
k,i,j) * num_diff(
k,i,j)
2037 k = iundef; i = iundef; j = iundef
2046 call check( __line__, mom(
ks,i ,j) )
2047 call check( __line__, mom(
ks,i,j+1) )
2048 call check( __line__, val(
ks+1,i,j) )
2049 call check( __line__, val(
ks,i,j) )
2051 call check( __line__, mom(
ks+1,i ,j) )
2052 call check( __line__, mom(
ks+1,i,j+1) )
2053 call check( __line__, val(
ks+3,i,j) )
2054 call check( __line__, val(
ks+2,i,j) )
2056 call check( __line__, mom(
ks+2,i ,j) )
2057 call check( __line__, mom(
ks+2,i,j+1) )
2058 call check( __line__, val(
ks+5,i,j) )
2059 call check( __line__, val(
ks+4,i,j) )
2065 flux(
ks-1,i,j) = 0.0_rp
2067 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
2069 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
2071 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
2072 flux(
ks,i,j) = j33g * vel &
2073 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
2074 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
2075 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
2077 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
2079 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
2080 flux(
ke-1,i,j) = j33g * vel &
2081 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
2082 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
2084 vel = ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j+1) ) ) &
2086 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
2088 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
2089 flux(
ks+1,i,j) = j33g * vel &
2090 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
2091 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) ) &
2092 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
2093 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j+1) ) ) &
2095 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2097 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2098 flux(
ke-2,i,j) = j33g * vel &
2099 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
2100 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) ) &
2101 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
2103 vel = ( 0.5_rp * ( mom(
ks+2,i,j)+mom(
ks+2,i,j+1) ) ) &
2105 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i,j+1) ) &
2107 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) )
2108 flux(
ks+2,i,j) = j33g * vel &
2109 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
2110 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
2111 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) ) &
2112 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
2113 vel = ( 0.5_rp * ( mom(
ke-3,i,j)+mom(
ke-3,i,j+1) ) ) &
2115 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) &
2117 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i,j+1) ) )
2118 flux(
ke-3,i,j) = j33g * vel &
2119 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
2120 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
2121 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) ) &
2122 + gsqrt(
ke-3,i,j) * num_diff(
ke-3,i,j)
2124 flux(
ke,i,j) = 0.0_rp
2135 k = iundef; i = iundef; j = iundef
2146 GSQRT, J13G, MAPF, &
2148 IIS, IIE, JJS, JJE )
2151 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2152 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2153 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2154 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2155 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2156 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
2157 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2158 real(rp),
intent(in) :: cdz (
ka)
2159 logical,
intent(in) :: twod
2160 integer,
intent(in) :: iis, iie, jjs, jje
2180 * 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) ) &
2182 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i-1,j)+mom(
k,i,j+1)+mom(
k,i-1,j+1) ) ) &
2184 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
2186 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
2187 vel = vel * j13g(
k,i,j)
2188 flux(
k,i,j) = vel / mapf(i,j,+2) &
2189 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
2190 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
2191 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
2192 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
2206 flux(
ks-1,i,j) = 0.0_rp
2209 * 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) ) &
2211 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
2213 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
2215 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
2216 vel = vel * j13g(
ks,i,j)
2217 flux(
ks,i,j) = vel / mapf(i,j,+2) &
2218 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
2221 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
2223 * 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) ) ) &
2225 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
2227 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
2228 vel = vel * j13g(
ke-1,i,j)
2229 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
2230 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
2233 * 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) ) &
2235 * 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) ) ) &
2237 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
2239 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
2240 vel = vel * j13g(
ks+1,i,j)
2241 flux(
ks+1,i,j) = vel / mapf(i,j,+2) &
2242 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
2243 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
2246 * 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) ) &
2248 * 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) ) ) &
2250 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2252 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2253 vel = vel * j13g(
ke-2,i,j)
2254 flux(
ke-2,i,j) = vel / mapf(i,j,+2) &
2255 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
2256 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
2259 * 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) ) &
2261 * 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) ) ) &
2263 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i,j+1) ) &
2265 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) )
2266 vel = vel * j13g(
ks+2,i,j)
2267 flux(
ks+2,i,j) = vel / mapf(i,j,+2) &
2268 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
2269 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
2270 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
2273 * 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) ) &
2275 * 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) ) ) &
2277 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) &
2279 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i,j+1) ) )
2280 vel = vel * j13g(
ke-3,i,j)
2281 flux(
ke-3,i,j) = vel / mapf(i,j,+2) &
2282 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
2283 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
2284 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
2286 flux(
ke ,i,j) = 0.0_rp
2305 GSQRT, J23G, MAPF, &
2307 IIS, IIE, JJS, JJE )
2310 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2311 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2312 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2313 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2314 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2315 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
2316 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2317 real(rp),
intent(in) :: cdz (
ka)
2318 logical,
intent(in) :: twod
2319 integer,
intent(in) :: iis, iie, jjs, jje
2343 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
2345 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
2346 vel = vel * j23g(
k,i,j)
2347 flux(
k,i,j) = vel / mapf(i,j,+1) &
2348 * ( f81 * ( val(
k+1,i,j)+val(
k,i,j) ) &
2349 + f82 * ( val(
k+2,i,j)+val(
k-1,i,j) ) &
2350 + f83 * ( val(
k+3,i,j)+val(
k-2,i,j) ) &
2351 + f84 * ( val(
k+4,i,j)+val(
k-3,i,j) ) )
2365 flux(
ks-1,i,j) = 0.0_rp
2372 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
2374 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
2375 vel = vel * j23g(
ks,i,j)
2376 flux(
ks,i,j) = vel / mapf(i,j,+1) &
2377 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
2384 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
2386 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
2387 vel = vel * j23g(
ke-1,i,j)
2388 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
2389 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
2396 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
2398 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
2399 vel = vel * j23g(
ks+1,i,j)
2400 flux(
ks+1,i,j) = vel / mapf(i,j,+1) &
2401 * ( f41 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) &
2402 + f42 * ( val(
ks+3,i,j)+val(
ks,i,j) ) )
2409 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
2411 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
2412 vel = vel * j23g(
ke-2,i,j)
2413 flux(
ke-2,i,j) = vel / mapf(i,j,+1) &
2414 * ( f41 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) &
2415 + f42 * ( val(
ke,i,j)+val(
ke-3,i,j) ) )
2422 * 0.5_rp * ( dens(
ks+3,i,j)+dens(
ks+3,i,j+1) ) &
2424 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) )
2425 vel = vel * j23g(
ks+2,i,j)
2426 flux(
ks+2,i,j) = vel / mapf(i,j,+1) &
2427 * ( f61 * ( val(
ks+3,i,j)+val(
ks+2,i,j) ) &
2428 + f62 * ( val(
ks+4,i,j)+val(
ks+1,i,j) ) &
2429 + f63 * ( val(
ks+5,i,j)+val(
ks,i,j) ) )
2436 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) &
2438 * 0.5_rp * ( dens(
ke-3,i,j)+dens(
ke-3,i,j+1) ) )
2439 vel = vel * j23g(
ke-3,i,j)
2440 flux(
ke-3,i,j) = vel / mapf(i,j,+1) &
2441 * ( f61 * ( val(
ke-2,i,j)+val(
ke-3,i,j) ) &
2442 + f62 * ( val(
ke-1,i,j)+val(
ke-4,i,j) ) &
2443 + f63 * ( val(
ke,i,j)+val(
ke-5,i,j) ) )
2445 flux(
ke ,i,j) = 0.0_rp
2467 IIS, IIE, JJS, JJE )
2470 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2471 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2472 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2473 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2474 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2475 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2476 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
2477 real(rp),
intent(in) :: cdz (
ka)
2478 logical,
intent(in) :: twod
2479 integer,
intent(in) :: iis, iie, jjs, jje
2495 call check( __line__, mom(
k,i ,j) )
2496 call check( __line__, mom(
k,i,j-1) )
2498 call check( __line__, val(
k,i,j) )
2499 call check( __line__, val(
k,i+1,j) )
2501 call check( __line__, val(
k,i-1,j) )
2502 call check( __line__, val(
k,i+2,j) )
2504 call check( __line__, val(
k,i-2,j) )
2505 call check( __line__, val(
k,i+3,j) )
2507 call check( __line__, val(
k,i-3,j) )
2508 call check( __line__, val(
k,i+4,j) )
2511 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
2512 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
2513 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
2514 * ( f81 * ( val(
k,i+1,j)+val(
k,i,j) ) &
2515 + f82 * ( val(
k,i+2,j)+val(
k,i-1,j) ) &
2516 + f83 * ( val(
k,i+3,j)+val(
k,i-2,j) ) &
2517 + f84 * ( val(
k,i+4,j)+val(
k,i-3,j) ) ) &
2518 + gsqrt(
k,i,j) * num_diff(
k,i,j)
2524 k = iundef; i = iundef; j = iundef
2540 IIS, IIE, JJS, JJE )
2543 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
2544 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
2545 real(rp),
intent(in) :: val (
ka,
ia,
ja)
2546 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
2547 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
2548 real(rp),
intent(in) :: mapf (
ia,
ja,2)
2549 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
2550 real(rp),
intent(in) :: cdz (
ka)
2551 logical,
intent(in) :: twod
2552 integer,
intent(in) :: iis, iie, jjs, jje
2570 call check( __line__, mom(
k,i ,j) )
2571 call check( __line__, mom(
k,i,j-1) )
2573 call check( __line__, val(
k,i,j-1) )
2574 call check( __line__, val(
k,i,j) )
2576 call check( __line__, val(
k,i,j-2) )
2577 call check( __line__, val(
k,i,j+1) )
2579 call check( __line__, val(
k,i,j-3) )
2580 call check( __line__, val(
k,i,j+2) )
2582 call check( __line__, val(
k,i,j-4) )
2583 call check( __line__, val(
k,i,j+3) )
2586 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
2588 flux(
k,i,j-1) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
2589 * ( f81 * ( val(
k,i,j)+val(
k,i,j-1) ) &
2590 + f82 * ( val(
k,i,j+1)+val(
k,i,j-2) ) &
2591 + f83 * ( val(
k,i,j+2)+val(
k,i,j-3) ) &
2592 + f84 * ( val(
k,i,j+3)+val(
k,i,j-4) ) ) &
2593 + gsqrt(
k,i,j) * num_diff(
k,i,j)
2599 k = iundef; i = iundef; j = iundef