75 #define F2H(k,p,q) (CDZ(k+p-1)*GSQRT(k+p-1,i,j)/(CDZ(k)*GSQRT(k,i,j)+CDZ(k+1)*GSQRT(k+1,i,j)))
77 #define F2H(k,p,q) 0.5_RP
84 real(RP),
parameter :: F2 = 0.5_rp
87 real(RP),
parameter :: F31 = -1.0_rp/12.0_rp
88 real(RP),
parameter :: F32 = 7.0_rp/12.0_rp
89 real(RP),
parameter :: F33 = 3.0_rp/12.0_rp
106 real(rp),
intent(out) :: valw (
ka)
107 real(rp),
intent(in) :: mflx (
ka)
108 real(rp),
intent(in) :: val (
ka)
109 real(rp),
intent(in) :: gsqrt(
ka)
110 real(rp),
intent(in) :: cdz (
ka)
117 call check( __line__, mflx(
k) )
119 call check( __line__, val(
k) )
120 call check( __line__, val(
k+1) )
122 call check( __line__, val(
k-1) )
123 call check( __line__, val(
k+2) )
126 valw(
k) = ( f31 * ( val(
k+2)+val(
k-1) ) + f32 * ( val(
k+1)+val(
k) ) ) &
127 - ( f31 * ( val(
k+2)-val(
k-1) ) + f33 * ( val(
k+1)-val(
k) ) ) * sign(1.0_rp,mflx(
k))
135 call check( __line__, mflx(
ks) )
136 call check( __line__, val(
ks ) )
137 call check( __line__, val(
ks+1) )
138 call check( __line__, mflx(
ke-1) )
139 call check( __line__, val(
ke ) )
140 call check( __line__, val(
ke-1) )
144 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) ) &
145 * ( 0.5_rp + sign(0.5_rp,mflx(
ks)) ) &
146 + ( 2.0_rp * val(
ks) + 5.0_rp * val(
ks+1) - val(
ks+2) ) / 6.0_rp &
147 * ( 0.5_rp - sign(0.5_rp,mflx(
ks)) )
148 valw(
ke-1) = ( 2.0_rp * val(
ke) + 5.0_rp * val(
ke-1) - val(
ke-2) ) / 6.0_rp &
149 * ( 0.5_rp + sign(0.5_rp,mflx(
ke-1)) ) &
150 + f2 * ( val(
ke)+val(
ke-1) ) &
151 * ( 0.5_rp - sign(0.5_rp,mflx(
ke-1)) )
169 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
170 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
171 real(rp),
intent(in) :: val (
ka,
ia,
ja)
172 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
173 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
174 real(rp),
intent(in) :: cdz (
ka)
175 integer,
intent(in) :: iis, iie, jjs, jje
192 call check( __line__, mflx(
k,i,j) )
194 call check( __line__, val(
k,i,j) )
195 call check( __line__, val(
k+1,i,j) )
197 call check( __line__, val(
k-1,i,j) )
198 call check( __line__, val(
k+2,i,j) )
203 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
204 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
205 + gsqrt(
k,i,j) * num_diff(
k,i,j)
212 k = iundef; i = iundef; j = iundef
221 call check( __line__, mflx(
ks,i,j) )
222 call check( __line__, val(
ks ,i,j) )
223 call check( __line__, val(
ks+1,i,j) )
224 call check( __line__, mflx(
ke-1,i,j) )
225 call check( __line__, val(
ke ,i,j) )
226 call check( __line__, val(
ke-1,i,j) )
229 flux(
ks-1,i,j) = 0.0_rp
233 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
234 * ( 0.5_rp + sign(0.5_rp,vel) ) &
235 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
236 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
237 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
239 flux(
ke-1,i,j) = vel &
240 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
241 * ( 0.5_rp + sign(0.5_rp,vel) ) &
242 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
243 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
244 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
246 flux(
ke ,i,j) = 0.0_rp
256 k = iundef; i = iundef; j = iundef
272 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
273 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
274 real(rp),
intent(in) :: val (
ka,
ia,
ja)
275 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
276 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
277 real(rp),
intent(in) :: cdz(
ka)
278 integer,
intent(in) :: iis, iie, jjs, jje
292 call check( __line__, mflx(
k,i,j) )
294 call check( __line__, val(
k,i,j) )
295 call check( __line__, val(
k,i+1,j) )
297 call check( __line__, val(
k,i-1,j) )
298 call check( __line__, val(
k,i+2,j) )
303 * ( ( f31 * ( val(
k,i+2,j)+val(
k,i-1,j) ) + f32 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
304 - ( f31 * ( val(
k,i+2,j)-val(
k,i-1,j) ) + f33 * ( val(
k,i+1,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
305 + gsqrt(
k,i,j) * num_diff(
k,i,j)
311 k = iundef; i = iundef; j = iundef
327 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
328 real(rp),
intent(in) :: mflx (
ka,
ia,
ja)
329 real(rp),
intent(in) :: val (
ka,
ia,
ja)
330 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
331 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
332 real(rp),
intent(in) :: cdz(
ka)
333 integer,
intent(in) :: iis, iie, jjs, jje
347 call check( __line__, mflx(
k,i,j) )
349 call check( __line__, val(
k,i,j) )
350 call check( __line__, val(
k,i,j+1) )
352 call check( __line__, val(
k,i,j-1) )
353 call check( __line__, val(
k,i,j+2) )
358 * ( ( f31 * ( val(
k,i,j+2)+val(
k,i,j-1) ) + f32 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
359 - ( f31 * ( val(
k,i,j+2)-val(
k,i,j-1) ) + f33 * ( val(
k,i,j+1)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
360 + gsqrt(
k,i,j) * num_diff(
k,i,j)
366 k = iundef; i = iundef; j = iundef
385 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
386 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
387 real(rp),
intent(in) :: val (
ka,
ia,
ja)
388 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
389 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
390 real(rp),
intent(in) :: j33g
391 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
392 real(rp),
intent(in) :: cdz (
ka)
393 real(rp),
intent(in) :: fdz (
ka-1)
394 real(rp),
intent(in) :: dtrk
395 integer,
intent(in) :: iis, iie, jjs, jje
414 call check( __line__, mom(
k-1,i,j) )
415 call check( __line__, mom(
k ,i,j) )
417 call check( __line__, val(
k-1,i,j) )
418 call check( __line__, val(
k,i,j) )
420 call check( __line__, val(
k-2,i,j) )
421 call check( __line__, val(
k+1,i,j) )
424 vel = ( 0.5_rp * ( mom(
k-1,i,j) &
427 flux(
k-1,i,j) = j33g * vel &
428 * ( ( f31 * ( val(
k+1,i,j)+val(
k-2,i,j) ) + f32 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
429 - ( f31 * ( val(
k+1,i,j)-val(
k-2,i,j) ) + f33 * ( val(
k,i,j)-val(
k-1,i,j) ) ) * sign(1.0_rp,vel) ) &
430 + gsqrt(
k,i,j) * num_diff(
k,i,j)
437 k = iundef; i = iundef; j = iundef
446 call check( __line__, val(
ks,i,j) )
447 call check( __line__, val(
ks+1,i,j) )
448 call check( __line__, val(
ks+2,i,j) )
455 flux(
ks-1,i,j) = 0.0_rp
457 vel = ( 0.5_rp * ( mom(
ks,i,j) &
458 + mom(
ks+1,i,j) ) ) &
460 flux(
ks,i,j) = j33g * vel &
461 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
462 * ( 0.5_rp + sign(0.5_rp,vel) ) &
463 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
464 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
465 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
469 flux(
ke-1,i,j) = 0.0_rp
470 flux(
ke ,i,j) = 0.0_rp
494 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
495 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
496 real(rp),
intent(in) :: val (
ka,
ia,
ja)
497 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
498 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
499 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
500 real(rp),
intent(in) :: mapf (
ia,
ja,2)
501 real(rp),
intent(in) :: cdz (
ka)
502 logical,
intent(in) :: twod
503 integer,
intent(in) :: iis, iie, jjs, jje
519 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
521 vel = vel * j13g(
k,i,j)
522 flux(
k-1,i,j) = vel / mapf(i,j,+2) &
523 * ( ( f31 * ( val(
k+1,i,j)+val(
k-2,i,j) ) + f32 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
524 - ( f31 * ( val(
k+1,i,j)-val(
k-2,i,j) ) + f33 * ( val(
k,i,j)-val(
k-1,i,j) ) ) * sign(1.0_rp,vel) )
538 flux(
ks-1,i,j) = 0.0_rp
541 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
542 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
545 vel = vel * j13g(
ks+1,i,j)
546 flux(
ks,i,j) = vel / mapf(i,j,+2) &
547 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
548 * ( 0.5_rp + sign(0.5_rp,vel) ) &
549 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
550 * ( 0.5_rp - sign(0.5_rp,vel) ) )
553 flux(
ke-1,i,j) = 0.0_rp
576 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
577 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
578 real(rp),
intent(in) :: val (
ka,
ia,
ja)
579 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
580 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
581 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
582 real(rp),
intent(in) :: mapf (
ia,
ja,2)
583 real(rp),
intent(in) :: cdz (
ka)
584 logical,
intent(in) :: twod
585 integer,
intent(in) :: iis, iie, jjs, jje
601 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
603 vel = vel * j23g(
k,i,j)
604 flux(
k-1,i,j) = vel / mapf(i,j,+1) &
605 * ( ( f31 * ( val(
k+1,i,j)+val(
k-2,i,j) ) + f32 * ( val(
k,i,j)+val(
k-1,i,j) ) ) &
606 - ( f31 * ( val(
k+1,i,j)-val(
k-2,i,j) ) + f33 * ( val(
k,i,j)-val(
k-1,i,j) ) ) * sign(1.0_rp,vel) )
620 flux(
ks-1,i,j) = 0.0_rp
623 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
624 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
627 vel = vel * j23g(
ks+1,i,j)
628 flux(
ks,i,j) = vel / mapf(i,j,+1) &
629 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
630 * ( 0.5_rp + sign(0.5_rp,vel) ) &
631 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
632 * ( 0.5_rp - sign(0.5_rp,vel) ) )
635 flux(
ke-1,i,j) = 0.0_rp
660 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
661 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
662 real(rp),
intent(in) :: val (
ka,
ia,
ja)
663 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
664 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
665 real(rp),
intent(in) :: mapf (
ia,
ja,2)
666 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
667 real(rp),
intent(in) :: cdz (
ka)
668 logical,
intent(in) :: twod
669 integer,
intent(in) :: iis, iie, jjs, jje
687 call check( __line__, mom(
k ,i,j) )
688 call check( __line__, mom(
k+1,i,j) )
690 call check( __line__, val(
k,i,j) )
691 call check( __line__, val(
k,i+1,j) )
693 call check( __line__, val(
k,i-1,j) )
694 call check( __line__, val(
k,i+2,j) )
702 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
704 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
705 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
706 * ( ( f31 * ( val(
k,i+2,j)+val(
k,i-1,j) ) + f32 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
707 - ( f31 * ( val(
k,i+2,j)-val(
k,i-1,j) ) + f33 * ( val(
k,i+1,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
708 + gsqrt(
k,i,j) * num_diff(
k,i,j)
715 k = iundef; i = iundef; j = iundef
722 flux(
ke,i,j) = 0.0_rp
732 k = iundef; i = iundef; j = iundef
749 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
750 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
751 real(rp),
intent(in) :: val (
ka,
ia,
ja)
752 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
753 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
754 real(rp),
intent(in) :: mapf (
ia,
ja,2)
755 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
756 real(rp),
intent(in) :: cdz (
ka)
757 logical,
intent(in) :: twod
758 integer,
intent(in) :: iis, iie, jjs, jje
776 call check( __line__, mom(
k ,i,j) )
777 call check( __line__, mom(
k+1,i,j) )
779 call check( __line__, val(
k,i,j) )
780 call check( __line__, val(
k,i,j+1) )
782 call check( __line__, val(
k,i,j-1) )
783 call check( __line__, val(
k,i,j+2) )
791 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
793 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
794 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
795 * ( ( f31 * ( val(
k,i,j+2)+val(
k,i,j-1) ) + f32 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
796 - ( f31 * ( val(
k,i,j+2)-val(
k,i,j-1) ) + f33 * ( val(
k,i,j+1)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
797 + gsqrt(
k,i,j) * num_diff(
k,i,j)
804 k = iundef; i = iundef; j = iundef
811 flux(
ke,i,j) = 0.0_rp
821 k = iundef; i = iundef; j = iundef
839 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
840 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
841 real(rp),
intent(in) :: val (
ka,
ia,
ja)
842 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
843 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
844 real(rp),
intent(in) :: j33g
845 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
846 real(rp),
intent(in) :: cdz (
ka)
847 logical,
intent(in) :: twod
848 integer,
intent(in) :: iis, iie, jjs, jje
869 call check( __line__, mom(
k,i,j) )
871 call check( __line__, val(
k,i,j) )
872 call check( __line__, val(
k+1,i,j) )
874 call check( __line__, val(
k-1,i,j) )
875 call check( __line__, val(
k+2,i,j) )
878 vel = ( mom(
k,i,j) ) &
883 flux(
k,i,j) = j33g * vel &
884 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
885 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
886 + gsqrt(
k,i,j) * num_diff(
k,i,j)
892 k = iundef; i = iundef; j = iundef
901 call check( __line__, mom(
ks,i ,j) )
902 call check( __line__, val(
ks+1,i,j) )
903 call check( __line__, val(
ks,i,j) )
909 flux(
ks-1,i,j) = 0.0_rp
911 vel = ( mom(
ks,i,j) ) &
916 flux(
ks,i,j) = j33g * vel &
917 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
918 * ( 0.5_rp + sign(0.5_rp,vel) ) &
919 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
920 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
921 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
922 vel = ( mom(
ke-1,i,j) ) &
927 flux(
ke-1,i,j) = j33g * vel &
928 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
929 * ( 0.5_rp + sign(0.5_rp,vel) ) &
930 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
931 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
932 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
934 flux(
ke,i,j) = 0.0_rp
948 call check( __line__, mom(
k,i,j) )
949 call check( __line__, mom(
k,i+1,j) )
951 call check( __line__, val(
k,i,j) )
952 call check( __line__, val(
k+1,i,j) )
954 call check( __line__, val(
k-1,i,j) )
955 call check( __line__, val(
k+2,i,j) )
958 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
960 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
962 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
963 flux(
k,i,j) = j33g * vel &
964 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
965 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
966 + gsqrt(
k,i,j) * num_diff(
k,i,j)
973 k = iundef; i = iundef; j = iundef
982 call check( __line__, mom(
ks,i ,j) )
983 call check( __line__, mom(
ks,i+1,j) )
984 call check( __line__, val(
ks+1,i,j) )
985 call check( __line__, val(
ks,i,j) )
991 flux(
ks-1,i,j) = 0.0_rp
993 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
995 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
997 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
998 flux(
ks,i,j) = j33g * vel &
999 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1000 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1001 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1002 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1003 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1004 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
1006 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1008 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1009 flux(
ke-1,i,j) = j33g * vel &
1010 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1011 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1012 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1013 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1014 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1016 flux(
ke,i,j) = 0.0_rp
1029 k = iundef; i = iundef; j = iundef
1040 GSQRT, J13G, MAPF, &
1042 IIS, IIE, JJS, JJE )
1045 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1046 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1047 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1048 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1049 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1050 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
1051 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1052 real(rp),
intent(in) :: cdz (
ka)
1053 logical,
intent(in) :: twod
1054 integer,
intent(in) :: iis, iie, jjs, jje
1078 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1080 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1081 vel = vel * j13g(
k,i,j)
1082 flux(
k,i,j) = vel / mapf(i,j,+2) &
1083 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1084 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
1098 flux(
ks-1,i,j) = 0.0_rp
1105 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1107 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1108 vel = vel * j13g(
ks,i,j)
1109 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1110 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1111 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1112 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1113 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1120 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1122 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1123 vel = vel * j13g(
ke-1,i,j)
1124 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1125 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1126 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1127 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1128 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1130 flux(
ke ,i,j) = 0.0_rp
1149 GSQRT, J23G, MAPF, &
1151 IIS, IIE, JJS, JJE )
1154 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1155 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1156 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1157 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1158 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1159 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
1160 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1161 real(rp),
intent(in) :: cdz (
ka)
1162 logical,
intent(in) :: twod
1163 integer,
intent(in) :: iis, iie, jjs, jje
1184 * 0.5_rp * ( mom(
k+1,i,j)+mom(
k+1,i,j-1) ) &
1186 * 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
1191 vel = vel * j23g(
k,i,j)
1192 flux(
k,i,j) = vel * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1193 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
1206 flux(
ks-1,i,j) = 0.0_rp
1209 * 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) &
1211 * 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) &
1216 vel = vel * j23g(
ks,i,j)
1217 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1218 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1219 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1220 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1221 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1224 * 0.5_rp * ( mom(
ke,i,j)+mom(
ke,i,j-1) ) &
1226 * 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
1231 vel = vel * j23g(
ke-1,i,j)
1232 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1233 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1234 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1235 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1236 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1238 flux(
ke ,i,j) = 0.0_rp
1252 * 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) ) &
1254 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i+1,j)+mom(
k,i,j-1)+mom(
k,i+1,j-1) ) ) &
1256 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i+1,j) ) &
1258 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i+1,j) ) )
1259 vel = vel * j23g(
k,i,j)
1260 flux(
k,i,j) = vel / mapf(i,j,+1) &
1261 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1262 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
1276 flux(
ks-1,i,j) = 0.0_rp
1279 * 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) ) &
1281 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
1283 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1285 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1286 vel = vel * j23g(
ks,i,j)
1287 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1288 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1289 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1290 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1291 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1294 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
1296 * 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) ) ) &
1298 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1300 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1301 vel = vel * j23g(
ke-1,i,j)
1302 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1303 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1304 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1305 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1306 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1308 flux(
ke ,i,j) = 0.0_rp
1332 IIS, IIE, JJS, JJE )
1335 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1336 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1337 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1338 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1339 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1340 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1341 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1342 real(rp),
intent(in) :: cdz (
ka)
1343 logical,
intent(in) :: twod
1344 integer,
intent(in) :: iis, iie, jjs, jje
1362 call check( __line__, mom(
k,i ,j) )
1363 call check( __line__, mom(
k,i-1,j) )
1365 call check( __line__, val(
k,i-1,j) )
1366 call check( __line__, val(
k,i,j) )
1368 call check( __line__, val(
k,i-2,j) )
1369 call check( __line__, val(
k,i+1,j) )
1372 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i-1,j) ) ) &
1374 flux(
k,i-1,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
1375 * ( ( f31 * ( val(
k,i+1,j)+val(
k,i-2,j) ) + f32 * ( val(
k,i,j)+val(
k,i-1,j) ) ) &
1376 - ( f31 * ( val(
k,i+1,j)-val(
k,i-2,j) ) + f33 * ( val(
k,i,j)-val(
k,i-1,j) ) ) * sign(1.0_rp,vel) ) &
1377 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1383 k = iundef; i = iundef; j = iundef
1399 IIS, IIE, JJS, JJE )
1402 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1403 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1404 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1405 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1406 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1407 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1408 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1409 real(rp),
intent(in) :: cdz (
ka)
1410 logical,
intent(in) :: twod
1411 integer,
intent(in) :: iis, iie, jjs, jje
1429 call check( __line__, mom(
k,i ,j) )
1431 call check( __line__, val(
k,i,j) )
1432 call check( __line__, val(
k,i,j+1) )
1434 call check( __line__, val(
k,i,j-1) )
1435 call check( __line__, val(
k,i,j+2) )
1438 vel = ( mom(
k,i,j) ) &
1439 / ( 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1440 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1441 * ( ( f31 * ( val(
k,i,j+2)+val(
k,i,j-1) ) + f32 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
1442 - ( f31 * ( val(
k,i,j+2)-val(
k,i,j-1) ) + f33 * ( val(
k,i,j+1)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1443 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1448 k = iundef; i = iundef; j = iundef
1462 call check( __line__, mom(
k,i ,j) )
1463 call check( __line__, mom(
k,i-1,j) )
1465 call check( __line__, val(
k,i,j) )
1466 call check( __line__, val(
k,i,j+1) )
1468 call check( __line__, val(
k,i,j-1) )
1469 call check( __line__, val(
k,i,j+2) )
1472 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i+1,j) ) ) &
1473 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
1474 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1475 * ( ( f31 * ( val(
k,i,j+2)+val(
k,i,j-1) ) + f32 * ( val(
k,i,j+1)+val(
k,i,j) ) ) &
1476 - ( f31 * ( val(
k,i,j+2)-val(
k,i,j-1) ) + f33 * ( val(
k,i,j+1)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1477 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1483 k = iundef; i = iundef; j = iundef
1503 IIS, IIE, JJS, JJE )
1506 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1507 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1508 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1509 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1510 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1511 real(rp),
intent(in) :: j33g
1512 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1513 real(rp),
intent(in) :: cdz (
ka)
1514 logical,
intent(in) :: twod
1515 integer,
intent(in) :: iis, iie, jjs, jje
1534 call check( __line__, mom(
k,i,j) )
1535 call check( __line__, mom(
k,i,j+1) )
1537 call check( __line__, val(
k,i,j) )
1538 call check( __line__, val(
k+1,i,j) )
1540 call check( __line__, val(
k-1,i,j) )
1541 call check( __line__, val(
k+2,i,j) )
1544 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
1546 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
1548 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1549 flux(
k,i,j) = j33g * vel &
1550 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1551 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1552 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1559 k = iundef; i = iundef; j = iundef
1568 call check( __line__, mom(
ks,i ,j) )
1569 call check( __line__, mom(
ks,i,j+1) )
1570 call check( __line__, val(
ks+1,i,j) )
1571 call check( __line__, val(
ks,i,j) )
1577 flux(
ks-1,i,j) = 0.0_rp
1579 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1581 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1583 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1584 flux(
ks,i,j) = j33g * vel &
1585 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1586 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1587 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1588 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1589 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1590 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1592 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1594 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1595 flux(
ke-1,i,j) = j33g * vel &
1596 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1597 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1598 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1599 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1600 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1602 flux(
ke,i,j) = 0.0_rp
1613 k = iundef; i = iundef; j = iundef
1624 GSQRT, J13G, MAPF, &
1626 IIS, IIE, JJS, JJE )
1629 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1630 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1631 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1632 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1633 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1634 real(rp),
intent(in) :: j13g (
ka,
ia,
ja)
1635 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1636 real(rp),
intent(in) :: cdz (
ka)
1637 logical,
intent(in) :: twod
1638 integer,
intent(in) :: iis, iie, jjs, jje
1658 * 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) ) &
1660 * 0.25_rp * ( mom(
k,i,j)+mom(
k,i-1,j)+mom(
k,i,j+1)+mom(
k,i-1,j+1) ) ) &
1662 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
1664 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1665 vel = vel * j13g(
k,i,j)
1666 flux(
k,i,j) = vel / mapf(i,j,+2) &
1667 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1668 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
1682 flux(
ks-1,i,j) = 0.0_rp
1685 * 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) ) &
1687 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
1689 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1691 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1692 vel = vel * j13g(
ks,i,j)
1693 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1694 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1695 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1696 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1697 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1700 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
1702 * 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) ) ) &
1704 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1706 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1707 vel = vel * j13g(
ke-1,i,j)
1708 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1709 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1710 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1711 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1712 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1714 flux(
ke ,i,j) = 0.0_rp
1733 GSQRT, J23G, MAPF, &
1735 IIS, IIE, JJS, JJE )
1738 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1739 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1740 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1741 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1742 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1743 real(rp),
intent(in) :: j23g (
ka,
ia,
ja)
1744 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1745 real(rp),
intent(in) :: cdz (
ka)
1746 logical,
intent(in) :: twod
1747 integer,
intent(in) :: iis, iie, jjs, jje
1771 * 0.5_rp * ( dens(
k+1,i,j)+dens(
k+1,i,j+1) ) &
1773 * 0.5_rp * ( dens(
k,i,j)+dens(
k,i,j+1) ) )
1774 vel = vel * j23g(
k,i,j)
1775 flux(
k,i,j) = vel / mapf(i,j,+1) &
1776 * ( ( f31 * ( val(
k+2,i,j)+val(
k-1,i,j) ) + f32 * ( val(
k+1,i,j)+val(
k,i,j) ) ) &
1777 - ( f31 * ( val(
k+2,i,j)-val(
k-1,i,j) ) + f33 * ( val(
k+1,i,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) )
1791 flux(
ks-1,i,j) = 0.0_rp
1798 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1800 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1801 vel = vel * j23g(
ks,i,j)
1802 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1803 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) &
1804 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1805 + ( 2.0_rp * val(
ks,i,j) + 5.0_rp * val(
ks+1,i,j) - val(
ks+2,i,j) ) / 6.0_rp &
1806 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1813 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1815 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1816 vel = vel * j23g(
ke-1,i,j)
1817 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1818 * ( ( 2.0_rp * val(
ke,i,j) + 5.0_rp * val(
ke-1,i,j) - val(
ke-2,i,j) ) / 6.0_rp &
1819 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1820 + f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) &
1821 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1823 flux(
ke ,i,j) = 0.0_rp
1845 IIS, IIE, JJS, JJE )
1848 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1849 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1850 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1851 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1852 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1853 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1854 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1855 real(rp),
intent(in) :: cdz (
ka)
1856 logical,
intent(in) :: twod
1857 integer,
intent(in) :: iis, iie, jjs, jje
1873 call check( __line__, mom(
k,i ,j) )
1874 call check( __line__, mom(
k,i,j-1) )
1876 call check( __line__, val(
k,i,j) )
1877 call check( __line__, val(
k,i+1,j) )
1879 call check( __line__, val(
k,i-1,j) )
1880 call check( __line__, val(
k,i+2,j) )
1883 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j+1) ) ) &
1884 / ( 0.25_rp * ( dens(
k,i,j)+dens(
k,i+1,j)+dens(
k,i,j+1)+dens(
k,i+1,j+1) ) )
1885 flux(
k,i,j) = gsqrt(
k,i,j) / mapf(i,j,+2) * vel &
1886 * ( ( f31 * ( val(
k,i+2,j)+val(
k,i-1,j) ) + f32 * ( val(
k,i+1,j)+val(
k,i,j) ) ) &
1887 - ( f31 * ( val(
k,i+2,j)-val(
k,i-1,j) ) + f33 * ( val(
k,i+1,j)-val(
k,i,j) ) ) * sign(1.0_rp,vel) ) &
1888 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1894 k = iundef; i = iundef; j = iundef
1910 IIS, IIE, JJS, JJE )
1913 real(rp),
intent(inout) :: flux (
ka,
ia,
ja)
1914 real(rp),
intent(in) :: mom (
ka,
ia,
ja)
1915 real(rp),
intent(in) :: val (
ka,
ia,
ja)
1916 real(rp),
intent(in) :: dens (
ka,
ia,
ja)
1917 real(rp),
intent(in) :: gsqrt (
ka,
ia,
ja)
1918 real(rp),
intent(in) :: mapf (
ia,
ja,2)
1919 real(rp),
intent(in) :: num_diff(
ka,
ia,
ja)
1920 real(rp),
intent(in) :: cdz (
ka)
1921 logical,
intent(in) :: twod
1922 integer,
intent(in) :: iis, iie, jjs, jje
1940 call check( __line__, mom(
k,i ,j) )
1941 call check( __line__, mom(
k,i,j-1) )
1943 call check( __line__, val(
k,i,j-1) )
1944 call check( __line__, val(
k,i,j) )
1946 call check( __line__, val(
k,i,j-2) )
1947 call check( __line__, val(
k,i,j+1) )
1950 vel = ( 0.5_rp * ( mom(
k,i,j)+mom(
k,i,j-1) ) ) &
1952 flux(
k,i,j-1) = gsqrt(
k,i,j) / mapf(i,j,+1) * vel &
1953 * ( ( f31 * ( val(
k,i,j+1)+val(
k,i,j-2) ) + f32 * ( val(
k,i,j)+val(
k,i,j-1) ) ) &
1954 - ( f31 * ( val(
k,i,j+1)-val(
k,i,j-2) ) + f33 * ( val(
k,i,j)-val(
k,i,j-1) ) ) * sign(1.0_rp,vel) ) &
1955 + gsqrt(
k,i,j) * num_diff(
k,i,j)
1961 k = iundef; i = iundef; j = iundef