18 #include "inc_openmp.h" 78 #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))) 80 #define F2H(k,p,q) 0.5_RP 87 real(RP),
parameter :: F2 = 0.5_rp
90 real(RP),
parameter :: F31 = -1.0_rp/12.0_rp
91 real(RP),
parameter :: F32 = 7.0_rp/12.0_rp
92 real(RP),
parameter :: F33 = 3.0_rp/12.0_rp
95 real(RP),
parameter :: F51 = 1.0_rp/60.0_rp
96 real(RP),
parameter :: F52 = -8.0_rp/60.0_rp
97 real(RP),
parameter :: F53 = 37.0_rp/60.0_rp
98 real(RP),
parameter :: F54 = -5.0_rp/60.0_rp
99 real(RP),
parameter :: F55 = 10.0_rp/60.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) )
136 valw(k) = ( f51 * ( val(k+3)+val(k-2) ) &
137 + f52 * ( val(k+2)+val(k-1) ) &
138 + f53 * ( val(k+1)+val(k) ) ) &
139 - ( f51 * ( val(k+3)-val(k-2) ) &
140 + f54 * ( val(k+2)-val(k-1) ) &
141 + f55 * ( val(k+1)-val(k) ) ) * sign(1.0_rp,mflx(k))
149 call check( __line__, mflx(
ks) )
150 call check( __line__, val(
ks ) )
151 call check( __line__, val(
ks+1) )
152 call check( __line__, mflx(
ke-1) )
153 call check( __line__, val(
ke ) )
154 call check( __line__, val(
ke-1) )
156 call check( __line__, mflx(
ks+1) )
157 call check( __line__, val(
ks+2 ) )
158 call check( __line__, val(
ks+3) )
159 call check( __line__, mflx(
ke-2) )
160 call check( __line__, val(
ke-2 ) )
161 call check( __line__, val(
ke-3) )
167 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) )
168 valw(
ke-1) = f2 * ( val(
ke)+val(
ke-1) )
170 valw(
ks+1) = ( f31 * ( val(
ks+3)+val(
ks) ) + f32 * ( val(
ks+2)+val(
ks+1) ) ) &
171 - ( f31 * ( val(
ks+3)-val(
ks) ) + f33 * ( val(
ks+2)-val(
ks+1) ) ) * sign(1.0_rp,mflx(
ks+1))
172 valw(
ke-2) = ( f31 * ( val(
ke)+val(
ke-3) ) + f32 * ( val(
ke-1)+val(
ke-2) ) ) &
173 - ( f31 * ( val(
ke)-val(
ke-3) ) + f33 * ( val(
ke-1)-val(
ke-2) ) ) * sign(1.0_rp,mflx(
ke-2))
189 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
190 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
191 real(RP),
intent(in) :: val (
ka,
ia,
ja)
192 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
193 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
194 real(RP),
intent(in) :: cdz (
ka)
195 integer,
intent(in) :: iis, iie, jjs, jje
208 call check( __line__, mflx(k,i,j) )
210 call check( __line__, val(k,i,j) )
211 call check( __line__, val(k+1,i,j) )
213 call check( __line__, val(k-1,i,j) )
214 call check( __line__, val(k+2,i,j) )
216 call check( __line__, val(k-2,i,j) )
217 call check( __line__, val(k+3,i,j) )
222 * ( ( f51 * ( val(k+3,i,j)+val(k-2,i,j) ) &
223 + f52 * ( val(k+2,i,j)+val(k-1,i,j) ) &
224 + f53 * ( val(k+1,i,j)+val(k,i,j) ) ) &
225 - ( f51 * ( val(k+3,i,j)-val(k-2,i,j) ) &
226 + f54 * ( val(k+2,i,j)-val(k-1,i,j) ) &
227 + f55 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
228 + gsqrt(k,i,j) * num_diff(k,i,j)
233 k = iundef; i = iundef; j = iundef
243 call check( __line__, mflx(
ks,i,j) )
244 call check( __line__, val(
ks ,i,j) )
245 call check( __line__, val(
ks+1,i,j) )
246 call check( __line__, mflx(
ke-1,i,j) )
247 call check( __line__, val(
ke ,i,j) )
248 call check( __line__, val(
ke-1,i,j) )
250 call check( __line__, mflx(
ks+1,i,j) )
251 call check( __line__, val(
ks+2 ,i,j) )
252 call check( __line__, val(
ks+3,i,j) )
253 call check( __line__, mflx(
ke-2,i,j) )
254 call check( __line__, val(
ke-2 ,i,j) )
255 call check( __line__, val(
ke-3,i,j) )
258 flux(
ks-1,i,j) = 0.0_rp
262 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
263 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
265 flux(
ke-1,i,j) = vel &
266 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
267 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
270 flux(
ks+1,i,j) = vel &
271 * ( ( f31 * ( val(
ks+3,i,j)+val(
ks,i,j) ) + f32 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) ) &
272 - ( f31 * ( val(
ks+3,i,j)-val(
ks,i,j) ) + f33 * ( val(
ks+2,i,j)-val(
ks+1,i,j) ) ) * sign(1.0_rp,vel) ) &
273 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
275 flux(
ke-2,i,j) = vel &
276 * ( ( f31 * ( val(
ke,i,j)+val(
ke-3,i,j) ) + f32 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) ) &
277 - ( f31 * ( val(
ke,i,j)-val(
ke-3,i,j) ) + f33 * ( val(
ke-1,i,j)-val(
ke-2,i,j) ) ) * sign(1.0_rp,vel) ) &
278 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
280 flux(
ke ,i,j) = 0.0_rp
284 k = iundef; i = iundef; j = iundef
300 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
301 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
302 real(RP),
intent(in) :: val (
ka,
ia,
ja)
303 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
304 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
305 real(RP),
intent(in) :: cdz(
ka)
306 integer,
intent(in) :: iis, iie, jjs, jje
319 call check( __line__, mflx(k,i,j) )
321 call check( __line__, val(k,i,j) )
322 call check( __line__, val(k,i+1,j) )
324 call check( __line__, val(k,i-1,j) )
325 call check( __line__, val(k,i+2,j) )
327 call check( __line__, val(k,i-2,j) )
328 call check( __line__, val(k,i+3,j) )
333 * ( ( f51 * ( val(k,i+3,j)+val(k,i-2,j) ) &
334 + f52 * ( val(k,i+2,j)+val(k,i-1,j) ) &
335 + f53 * ( val(k,i+1,j)+val(k,i,j) ) ) &
336 - ( f51 * ( val(k,i+3,j)-val(k,i-2,j) ) &
337 + f54 * ( val(k,i+2,j)-val(k,i-1,j) ) &
338 + f55 * ( val(k,i+1,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
339 + gsqrt(k,i,j) * num_diff(k,i,j)
344 k = iundef; i = iundef; j = iundef
360 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
361 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
362 real(RP),
intent(in) :: val (
ka,
ia,
ja)
363 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
364 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
365 real(RP),
intent(in) :: cdz(
ka)
366 integer,
intent(in) :: iis, iie, jjs, jje
379 call check( __line__, mflx(k,i,j) )
381 call check( __line__, val(k,i,j) )
382 call check( __line__, val(k,i,j+1) )
384 call check( __line__, val(k,i,j-1) )
385 call check( __line__, val(k,i,j+2) )
387 call check( __line__, val(k,i,j-2) )
388 call check( __line__, val(k,i,j+3) )
393 * ( ( f51 * ( val(k,i,j+3)+val(k,i,j-2) ) &
394 + f52 * ( val(k,i,j+2)+val(k,i,j-1) ) &
395 + f53 * ( val(k,i,j+1)+val(k,i,j) ) ) &
396 - ( f51 * ( val(k,i,j+3)-val(k,i,j-2) ) &
397 + f54 * ( val(k,i,j+2)-val(k,i,j-1) ) &
398 + f55 * ( val(k,i,j+1)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
399 + gsqrt(k,i,j) * num_diff(k,i,j)
404 k = iundef; i = iundef; j = iundef
423 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
424 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
425 real(RP),
intent(in) :: val (
ka,
ia,
ja)
426 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
427 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
428 real(RP),
intent(in) :: j33g
429 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
430 real(RP),
intent(in) :: cdz (
ka)
431 real(RP),
intent(in) :: fdz (
ka-1)
432 real(RP),
intent(in) :: dtrk
433 integer,
intent(in) :: iis, iie, jjs, jje
448 call check( __line__, mom(k-1,i,j) )
449 call check( __line__, mom(k ,i,j) )
451 call check( __line__, val(k-1,i,j) )
452 call check( __line__, val(k,i,j) )
454 call check( __line__, val(k-2,i,j) )
455 call check( __line__, val(k+1,i,j) )
457 call check( __line__, val(k-3,i,j) )
458 call check( __line__, val(k+2,i,j) )
461 vel = ( 0.5_rp * ( mom(k-1,i,j) &
464 flux(k-1,i,j) = j33g * vel &
465 * ( ( f51 * ( val(k+2,i,j)+val(k-3,i,j) ) &
466 + f52 * ( val(k+1,i,j)+val(k-2,i,j) ) &
467 + f53 * ( val(k,i,j)+val(k-1,i,j) ) ) &
468 - ( f51 * ( val(k+2,i,j)-val(k-3,i,j) ) &
469 + f54 * ( val(k+1,i,j)-val(k-2,i,j) ) &
470 + f55 * ( val(k,i,j)-val(k-1,i,j) ) ) * sign(1.0_rp,vel) ) &
471 + gsqrt(k,i,j) * num_diff(k,i,j)
476 k = iundef; i = iundef; j = iundef
486 call check( __line__, val(
ks ,i,j) )
487 call check( __line__, val(
ks+1,i,j) )
490 call check( __line__, val(
ke-2,i,j) )
491 call check( __line__, val(
ke-1,i,j) )
497 flux(
ks-1,i,j) = 0.0_rp
499 vel = ( 0.5_rp * ( mom(
ks,i,j) &
500 + mom(
ks+1,i,j) ) ) &
502 flux(
ks,i,j) = j33g * vel &
503 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
504 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
506 vel = ( 0.5_rp * ( mom(
ks+1,i,j) &
507 + mom(
ks+2,i,j) ) ) &
509 flux(
ks+1,i,j) = j33g * vel &
510 * ( ( f31 * ( val(
ks+3,i,j)+val(
ks,i,j) ) + f32 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) ) &
511 - ( f31 * ( val(
ks+3,i,j)-val(
ks,i,j) ) + f33 * ( val(
ks+2,i,j)-val(
ks+1,i,j) ) ) * sign(1.0_rp,vel) ) &
512 + gsqrt(
ks+2,i,j) * num_diff(
ks+2,i,j)
516 vel = ( 0.5_rp * ( mom(
ke-2,i,j) &
517 + mom(
ke-1,i,j) ) ) &
519 flux(
ke-2,i,j) = j33g * vel &
520 * ( ( f31 * ( val(
ke,i,j)+val(
ke-3,i,j) ) + f32 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) ) &
521 - ( f31 * ( val(
ke,i,j)-val(
ke-3,i,j) ) + f33 * ( val(
ke-1,i,j)-val(
ke-2,i,j) ) ) * sign(1.0_rp,vel) ) &
522 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
524 flux(
ke-1,i,j) = 0.0_rp
525 flux(
ke ,i,j) = 0.0_rp
543 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
544 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
545 real(RP),
intent(in) :: val (
ka,
ia,
ja)
546 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
547 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
548 real(RP),
intent(in) :: j13g (
ka,
ia,
ja)
549 real(RP),
intent(in) :: mapf (
ia,
ja,2)
550 real(RP),
intent(in) :: cdz (
ka)
551 integer,
intent(in) :: iis, iie, jjs, jje
563 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
565 flux(k-1,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
566 * ( ( f51 * ( val(k+2,i,j)+val(k-3,i,j) ) &
567 + f52 * ( val(k+1,i,j)+val(k-2,i,j) ) &
568 + f53 * ( val(k,i,j)+val(k-1,i,j) ) ) &
569 - ( f51 * ( val(k+2,i,j)-val(k-3,i,j) ) &
570 + f54 * ( val(k+1,i,j)-val(k-2,i,j) ) &
571 + f55 * ( val(k,i,j)-val(k-1,i,j) ) ) * sign(1.0_rp,vel) )
584 flux(
ks-1,i,j) = 0.0_rp
587 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
588 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
591 flux(
ks,i,j) = j13g(
ks+1,i,j) / mapf(i,j,+2) * vel &
592 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
595 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i-1,j) ) ) &
597 flux(
ke-2,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
598 * ( f2 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) )
600 flux(
ke-1,i,j) = 0.0_rp
617 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
618 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
619 real(RP),
intent(in) :: val (
ka,
ia,
ja)
620 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
621 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
622 real(RP),
intent(in) :: j23g (
ka,
ia,
ja)
623 real(RP),
intent(in) :: mapf (
ia,
ja,2)
624 real(RP),
intent(in) :: cdz (
ka)
625 integer,
intent(in) :: iis, iie, jjs, jje
637 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
639 flux(k-1,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
640 * ( ( f51 * ( val(k+2,i,j)+val(k-3,i,j) ) &
641 + f52 * ( val(k+1,i,j)+val(k-2,i,j) ) &
642 + f53 * ( val(k,i,j)+val(k-1,i,j) ) ) &
643 - ( f51 * ( val(k+2,i,j)-val(k-3,i,j) ) &
644 + f54 * ( val(k+1,i,j)-val(k-2,i,j) ) &
645 + f55 * ( val(k,i,j)-val(k-1,i,j) ) ) * sign(1.0_rp,vel) )
658 flux(
ks-1,i,j) = 0.0_rp
661 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
662 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
665 flux(
ks,i,j) = j23g(
ks+1,i,j) / mapf(i,j,+1) * vel &
666 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
669 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j-1) ) ) &
671 flux(
ke-2,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
672 * ( f2 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) )
674 flux(
ke-1,i,j) = 0.0_rp
693 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
694 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
695 real(RP),
intent(in) :: val (
ka,
ia,
ja)
696 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
697 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
698 real(RP),
intent(in) :: mapf (
ia,
ja,2)
699 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
700 real(RP),
intent(in) :: cdz (
ka)
701 integer,
intent(in) :: iis, iie, jjs, jje
715 call check( __line__, mom(k ,i,j) )
716 call check( __line__, mom(k+1,i,j) )
718 call check( __line__, val(k,i,j) )
719 call check( __line__, val(k,i+1,j) )
721 call check( __line__, val(k,i-1,j) )
722 call check( __line__, val(k,i+2,j) )
724 call check( __line__, val(k,i-2,j) )
725 call check( __line__, val(k,i+3,j) )
728 vel = ( f2h(k,1,i_uyz) &
733 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
735 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
736 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
737 * ( ( f51 * ( val(k,i+3,j)+val(k,i-2,j) ) &
738 + f52 * ( val(k,i+2,j)+val(k,i-1,j) ) &
739 + f53 * ( val(k,i+1,j)+val(k,i,j) ) ) &
740 - ( f51 * ( val(k,i+3,j)-val(k,i-2,j) ) &
741 + f54 * ( val(k,i+2,j)-val(k,i-1,j) ) &
742 + f55 * ( val(k,i+1,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
743 + gsqrt(k,i,j) * num_diff(k,i,j)
748 k = iundef; i = iundef; j = iundef
756 flux(
ke,i,j) = 0.0_rp
760 k = iundef; i = iundef; j = iundef
777 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
778 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
779 real(RP),
intent(in) :: val (
ka,
ia,
ja)
780 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
781 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
782 real(RP),
intent(in) :: mapf (
ia,
ja,2)
783 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
784 real(RP),
intent(in) :: cdz (
ka)
785 integer,
intent(in) :: iis, iie, jjs, jje
799 call check( __line__, mom(k ,i,j) )
800 call check( __line__, mom(k+1,i,j) )
802 call check( __line__, val(k,i,j) )
803 call check( __line__, val(k,i,j+1) )
805 call check( __line__, val(k,i,j-1) )
806 call check( __line__, val(k,i,j+2) )
808 call check( __line__, val(k,i,j-2) )
809 call check( __line__, val(k,i,j+3) )
812 vel = ( f2h(k,1,i_xvz) &
817 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
819 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
820 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
821 * ( ( f51 * ( val(k,i,j+3)+val(k,i,j-2) ) &
822 + f52 * ( val(k,i,j+2)+val(k,i,j-1) ) &
823 + f53 * ( val(k,i,j+1)+val(k,i,j) ) ) &
824 - ( f51 * ( val(k,i,j+3)-val(k,i,j-2) ) &
825 + f54 * ( val(k,i,j+2)-val(k,i,j-1) ) &
826 + f55 * ( val(k,i,j+1)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
827 + gsqrt(k,i,j) * num_diff(k,i,j)
832 k = iundef; i = iundef; j = iundef
840 flux(
ke,i,j) = 0.0_rp
844 k = iundef; i = iundef; j = iundef
862 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
863 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
864 real(RP),
intent(in) :: val (
ka,
ia,
ja)
865 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
866 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
867 real(RP),
intent(in) :: j33g
868 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
869 real(RP),
intent(in) :: cdz (
ka)
870 integer,
intent(in) :: iis, iie, jjs, jje
884 call check( __line__, mom(k,i,j) )
885 call check( __line__, mom(k,i+1,j) )
887 call check( __line__, val(k,i,j) )
888 call check( __line__, val(k+1,i,j) )
890 call check( __line__, val(k-1,i,j) )
891 call check( __line__, val(k+2,i,j) )
893 call check( __line__, val(k-2,i,j) )
894 call check( __line__, val(k+3,i,j) )
897 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
899 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
901 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
902 flux(k,i,j) = j33g * vel &
903 * ( ( f51 * ( val(k+3,i,j)+val(k-2,i,j) ) &
904 + f52 * ( val(k+2,i,j)+val(k-1,i,j) ) &
905 + f53 * ( val(k+1,i,j)+val(k,i,j) ) ) &
906 - ( f51 * ( val(k+3,i,j)-val(k-2,i,j) ) &
907 + f54 * ( val(k+2,i,j)-val(k-1,i,j) ) &
908 + f55 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
909 + gsqrt(k,i,j) * num_diff(k,i,j)
914 k = iundef; i = iundef; j = iundef
924 call check( __line__, mom(
ks,i ,j) )
925 call check( __line__, mom(
ks,i+1,j) )
926 call check( __line__, val(
ks+1,i,j) )
927 call check( __line__, val(
ks,i,j) )
929 call check( __line__, mom(
ks+1,i ,j) )
930 call check( __line__, mom(
ks+1,i+1,j) )
931 call check( __line__, val(
ks+3,i,j) )
932 call check( __line__, val(
ks+2,i,j) )
938 flux(
ks-1,i,j) = 0.0_rp
940 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
941 / ( f2h(
ks,1,i_uyz) &
942 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
944 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
945 flux(
ks,i,j) = j33g * vel &
946 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
947 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
948 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
949 / ( f2h(
ke-1,1,i_uyz) &
950 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
951 + f2h(
ke-1,2,i_uyz) &
952 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
953 flux(
ke-1,i,j) = j33g * vel &
954 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
955 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
957 vel = ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i+1,j) ) ) &
958 / ( f2h(
ks+1,1,i_uyz) &
959 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
960 + f2h(
ks+1,2,i_uyz) &
961 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
962 flux(
ks+1,i,j) = j33g * vel &
963 * ( ( f31 * ( val(
ks+3,i,j)+val(
ks,i,j) ) + f32 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) ) &
964 - ( f31 * ( val(
ks+3,i,j)-val(
ks,i,j) ) + f33 * ( val(
ks+2,i,j)-val(
ks+1,i,j) ) ) * sign(1.0_rp,vel) ) &
965 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
966 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i+1,j) ) ) &
967 / ( f2h(
ke-2,1,i_uyz) &
968 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
969 + f2h(
ke-2,2,i_uyz) &
970 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
971 flux(
ke-2,i,j) = j33g * vel &
972 * ( ( f31 * ( val(
ke,i,j)+val(
ke-3,i,j) ) + f32 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) ) &
973 - ( f31 * ( val(
ke,i,j)-val(
ke-3,i,j) ) + f33 * ( val(
ke-1,i,j)-val(
ke-2,i,j) ) ) * sign(1.0_rp,vel) ) &
974 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
976 flux(
ke,i,j) = 0.0_rp
980 k = iundef; i = iundef; j = iundef
996 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
997 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
998 real(RP),
intent(in) :: val (
ka,
ia,
ja)
999 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1000 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1001 real(RP),
intent(in) :: j13g (
ka,
ia,
ja)
1002 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1003 real(RP),
intent(in) :: cdz (
ka)
1004 integer,
intent(in) :: iis, iie, jjs, jje
1017 vel = ( f2h(k,1,i_uyz) &
1021 / ( f2h(k,1,i_uyz) &
1022 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
1024 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
1025 flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
1026 * ( ( f51 * ( val(k+3,i,j)+val(k-2,i,j) ) &
1027 + f52 * ( val(k+2,i,j)+val(k-1,i,j) ) &
1028 + f53 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1029 - ( f51 * ( val(k+3,i,j)-val(k-2,i,j) ) &
1030 + f54 * ( val(k+2,i,j)-val(k-1,i,j) ) &
1031 + f55 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) )
1045 flux(
ks-1,i,j) = 0.0_rp
1047 vel = ( f2h(
ks,1,i_uyz) &
1051 / ( f2h(
ks,1,i_uyz) &
1052 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1054 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1055 flux(
ks,i,j) = j13g(
ks,i,j) / mapf(i,j,+2) * vel &
1056 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1058 vel = ( f2h(
ke-1,1,i_uyz) &
1060 + f2h(
ke-1,2,i_uyz) &
1062 / ( f2h(
ke-1,1,i_uyz) &
1063 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1064 + f2h(
ke-1,2,i_uyz) &
1065 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1066 flux(
ke-1,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
1067 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1069 vel = ( f2h(
ks+1,1,i_uyz) &
1071 + f2h(
ks+1,2,i_uyz) &
1073 / ( f2h(
ks+1,1,i_uyz) &
1074 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1075 + f2h(
ks+1,2,i_uyz) &
1076 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1077 flux(
ks+1,i,j) = j13g(
ks+1,i,j) / mapf(i,j,+2) * vel &
1078 * ( ( f31 * ( val(
ks+3,i,j)+val(
ks,i,j) ) + f32 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) ) &
1079 - ( f31 * ( val(
ks+3,i,j)-val(
ks,i,j) ) + f33 * ( val(
ks+2,i,j)-val(
ks+1,i,j) ) ) * sign(1.0_rp,vel) )
1081 vel = ( f2h(
ke-2,1,i_uyz) &
1083 + f2h(
ke-2,2,i_uyz) &
1085 / ( f2h(
ke-2,1,i_uyz) &
1086 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1087 + f2h(
ke-2,2,i_uyz) &
1088 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1089 flux(
ke-2,i,j) = j13g(
ke-2,i,j) / mapf(i,j,+2) * vel &
1090 * ( ( f31 * ( val(
ke,i,j)+val(
ke-3,i,j) ) + f32 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) ) &
1091 - ( f31 * ( val(
ke,i,j)-val(
ke-3,i,j) ) + f33 * ( val(
ke-1,i,j)-val(
ke-2,i,j) ) ) * sign(1.0_rp,vel) )
1093 flux(
ke ,i,j) = 0.0_rp
1105 GSQRT, J23G, MAPF, &
1107 IIS, IIE, JJS, JJE )
1110 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1111 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1112 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1113 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1114 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1115 real(RP),
intent(in) :: j23g (
ka,
ia,
ja)
1116 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1117 real(RP),
intent(in) :: cdz (
ka)
1118 integer,
intent(in) :: iis, iie, jjs, jje
1131 vel = ( f2h(k,1,i_uyz) &
1132 * 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) ) &
1134 * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
1135 / ( f2h(k,1,i_uyz) &
1136 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
1138 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
1139 flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
1140 * ( ( f51 * ( val(k+3,i,j)+val(k-2,i,j) ) &
1141 + f52 * ( val(k+2,i,j)+val(k-1,i,j) ) &
1142 + f53 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1143 - ( f51 * ( val(k+3,i,j)-val(k-2,i,j) ) &
1144 + f54 * ( val(k+2,i,j)-val(k-1,i,j) ) &
1145 + f55 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) )
1159 flux(
ks-1,i,j) = 0.0_rp
1161 vel = ( f2h(
ks,1,i_uyz) &
1162 * 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) ) &
1164 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
1165 / ( f2h(
ks,1,i_uyz) &
1166 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1168 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1169 flux(
ks,i,j) = j23g(
ks,i,j) / mapf(i,j,+1) * vel &
1170 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1172 vel = ( f2h(
ke-1,1,i_uyz) &
1173 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
1174 + f2h(
ke-1,2,i_uyz) &
1175 * 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) ) ) &
1176 / ( f2h(
ke-1,1,i_uyz) &
1177 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1178 + f2h(
ke-1,2,i_uyz) &
1179 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1180 flux(
ke-1,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
1181 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1183 vel = ( f2h(
ks+1,1,i_uyz) &
1184 * 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) ) &
1185 + f2h(
ks+1,2,i_uyz) &
1186 * 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) ) ) &
1187 / ( f2h(
ks+1,1,i_uyz) &
1188 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i+1,j) ) &
1189 + f2h(
ks+1,2,i_uyz) &
1190 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) )
1191 flux(
ks+1,i,j) = j23g(
ks+1,i,j) / mapf(i,j,+1) * vel &
1192 * ( ( f31 * ( val(
ks+3,i,j)+val(
ks,i,j) ) + f32 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) ) &
1193 - ( f31 * ( val(
ks+3,i,j)-val(
ks,i,j) ) + f33 * ( val(
ks+2,i,j)-val(
ks+1,i,j) ) ) * sign(1.0_rp,vel) )
1195 vel = ( f2h(
ke-2,1,i_uyz) &
1196 * 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) ) &
1197 + f2h(
ke-2,2,i_uyz) &
1198 * 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) ) ) &
1199 / ( f2h(
ke-2,1,i_uyz) &
1200 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) &
1201 + f2h(
ke-2,2,i_uyz) &
1202 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i+1,j) ) )
1203 flux(
ke-2,i,j) = j23g(
ke-2,i,j) / mapf(i,j,+1) * vel &
1204 * ( ( f31 * ( val(
ke,i,j)+val(
ke-3,i,j) ) + f32 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) ) &
1205 - ( f31 * ( val(
ke,i,j)-val(
ke-3,i,j) ) + f33 * ( val(
ke-1,i,j)-val(
ke-2,i,j) ) ) * sign(1.0_rp,vel) )
1207 flux(
ke ,i,j) = 0.0_rp
1222 IIS, IIE, JJS, JJE )
1225 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1226 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1227 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1228 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1229 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1230 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1231 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1232 real(RP),
intent(in) :: cdz (
ka)
1233 integer,
intent(in) :: iis, iie, jjs, jje
1248 call check( __line__, mom(k,i ,j) )
1249 call check( __line__, mom(k,i-1,j) )
1251 call check( __line__, val(k,i-1,j) )
1252 call check( __line__, val(k,i,j) )
1254 call check( __line__, val(k,i-2,j) )
1255 call check( __line__, val(k,i+1,j) )
1257 call check( __line__, val(k,i-3,j) )
1258 call check( __line__, val(k,i+2,j) )
1261 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
1263 flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1264 * ( ( f51 * ( val(k,i+2,j)+val(k,i-3,j) ) &
1265 + f52 * ( val(k,i+1,j)+val(k,i-2,j) ) &
1266 + f53 * ( val(k,i,j)+val(k,i-1,j) ) ) &
1267 - ( f51 * ( val(k,i+2,j)-val(k,i-3,j) ) &
1268 + f54 * ( val(k,i+1,j)-val(k,i-2,j) ) &
1269 + f55 * ( val(k,i,j)-val(k,i-1,j) ) ) * sign(1.0_rp,vel) ) &
1270 + gsqrt(k,i,j) * num_diff(k,i,j)
1275 k = iundef; i = iundef; j = iundef
1289 IIS, IIE, JJS, JJE )
1292 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1293 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1294 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1295 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1296 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1297 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1298 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1299 real(RP),
intent(in) :: cdz (
ka)
1300 integer,
intent(in) :: iis, iie, jjs, jje
1313 call check( __line__, mom(k,i ,j) )
1314 call check( __line__, mom(k,i-1,j) )
1316 call check( __line__, val(k,i,j) )
1317 call check( __line__, val(k,i,j+1) )
1319 call check( __line__, val(k,i,j-1) )
1320 call check( __line__, val(k,i,j+2) )
1322 call check( __line__, val(k,i,j-2) )
1323 call check( __line__, val(k,i,j+3) )
1326 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
1327 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1328 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1329 * ( ( f51 * ( val(k,i,j+3)+val(k,i,j-2) ) &
1330 + f52 * ( val(k,i,j+2)+val(k,i,j-1) ) &
1331 + f53 * ( val(k,i,j+1)+val(k,i,j) ) ) &
1332 - ( f51 * ( val(k,i,j+3)-val(k,i,j-2) ) &
1333 + f54 * ( val(k,i,j+2)-val(k,i,j-1) ) &
1334 + f55 * ( val(k,i,j+1)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
1335 + gsqrt(k,i,j) * num_diff(k,i,j)
1340 k = iundef; i = iundef; j = iundef
1356 IIS, IIE, JJS, JJE )
1359 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1360 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1361 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1362 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1363 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1364 real(RP),
intent(in) :: j33g
1365 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1366 real(RP),
intent(in) :: cdz (
ka)
1367 integer,
intent(in) :: iis, iie, jjs, jje
1381 call check( __line__, mom(k,i,j) )
1382 call check( __line__, mom(k,i,j+1) )
1384 call check( __line__, val(k,i,j) )
1385 call check( __line__, val(k+1,i,j) )
1387 call check( __line__, val(k-1,i,j) )
1388 call check( __line__, val(k+2,i,j) )
1390 call check( __line__, val(k-2,i,j) )
1391 call check( __line__, val(k+3,i,j) )
1394 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1395 / ( f2h(k,1,i_xvz) &
1396 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1398 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1399 flux(k,i,j) = j33g * vel &
1400 * ( ( f51 * ( val(k+3,i,j)+val(k-2,i,j) ) &
1401 + f52 * ( val(k+2,i,j)+val(k-1,i,j) ) &
1402 + f53 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1403 - ( f51 * ( val(k+3,i,j)-val(k-2,i,j) ) &
1404 + f54 * ( val(k+2,i,j)-val(k-1,i,j) ) &
1405 + f55 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
1406 + gsqrt(k,i,j) * num_diff(k,i,j)
1411 k = iundef; i = iundef; j = iundef
1421 call check( __line__, mom(
ks,i ,j) )
1422 call check( __line__, mom(
ks,i,j+1) )
1423 call check( __line__, val(
ks+1,i,j) )
1424 call check( __line__, val(
ks,i,j) )
1426 call check( __line__, mom(
ks+1,i ,j) )
1427 call check( __line__, mom(
ks+1,i,j+1) )
1428 call check( __line__, val(
ks+3,i,j) )
1429 call check( __line__, val(
ks+2,i,j) )
1435 flux(
ks-1,i,j) = 0.0_rp
1437 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1438 / ( f2h(
ks,1,i_xvz) &
1439 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1441 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1442 flux(
ks,i,j) = j33g * vel &
1443 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1444 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1445 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1446 / ( f2h(
ke-1,1,i_xvz) &
1447 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1448 + f2h(
ke-1,2,i_xvz) &
1449 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1450 flux(
ke-1,i,j) = j33g * vel &
1451 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1452 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1454 vel = ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j+1) ) ) &
1455 / ( f2h(
ks+1,1,i_xvz) &
1456 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
1457 + f2h(
ks+1,2,i_xvz) &
1458 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
1459 flux(
ks+1,i,j) = j33g * vel &
1460 * ( ( f31 * ( val(
ks+3,i,j)+val(
ks,i,j) ) + f32 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) ) &
1461 - ( f31 * ( val(
ks+3,i,j)-val(
ks,i,j) ) + f33 * ( val(
ks+2,i,j)-val(
ks+1,i,j) ) ) * sign(1.0_rp,vel) ) &
1462 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
1463 vel = ( 0.5_rp * ( mom(
ke-2,i,j)+mom(
ke-2,i,j+1) ) ) &
1464 / ( f2h(
ke-2,1,i_xvz) &
1465 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
1466 + f2h(
ke-2,2,i_xvz) &
1467 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
1468 flux(
ke-2,i,j) = j33g * vel &
1469 * ( ( f31 * ( val(
ke,i,j)+val(
ke-3,i,j) ) + f32 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) ) &
1470 - ( f31 * ( val(
ke,i,j)-val(
ke-3,i,j) ) + f33 * ( val(
ke-1,i,j)-val(
ke-2,i,j) ) ) * sign(1.0_rp,vel) ) &
1471 + gsqrt(
ke-2,i,j) * num_diff(
ke-2,i,j)
1473 flux(
ke,i,j) = 0.0_rp
1477 k = iundef; i = iundef; j = iundef
1488 GSQRT, J13G, MAPF, &
1490 IIS, IIE, JJS, JJE )
1493 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1494 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1495 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1496 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1497 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1498 real(RP),
intent(in) :: j13g (
ka,
ia,
ja)
1499 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1500 real(RP),
intent(in) :: cdz (
ka)
1501 integer,
intent(in) :: iis, iie, jjs, jje
1514 vel = ( f2h(k,1,i_xvz) &
1515 * 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) ) &
1517 * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1518 / ( f2h(k,1,i_xvz) &
1519 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1521 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1522 flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
1523 * ( ( f51 * ( val(k+3,i,j)+val(k-2,i,j) ) &
1524 + f52 * ( val(k+2,i,j)+val(k-1,i,j) ) &
1525 + f53 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1526 - ( f51 * ( val(k+3,i,j)-val(k-2,i,j) ) &
1527 + f54 * ( val(k+2,i,j)-val(k-1,i,j) ) &
1528 + f55 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) )
1542 flux(
ks-1,i,j) = 0.0_rp
1544 vel = ( f2h(
ks,1,i_xvz) &
1545 * 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) ) &
1547 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
1548 / ( f2h(
ks,1,i_xvz) &
1549 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1551 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1552 flux(
ks,i,j) = j13g(
ks,i,j) / mapf(i,j,+2) * vel &
1553 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1555 vel = ( f2h(
ke-1,1,i_xvz) &
1556 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
1557 + f2h(
ke-1,2,i_xvz) &
1558 * 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) ) ) &
1559 / ( f2h(
ke-1,1,i_xvz) &
1560 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1561 + f2h(
ke-1,2,i_xvz) &
1562 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1563 flux(
ke-1,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
1564 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1566 vel = ( f2h(
ks+1,1,i_xvz) &
1567 * 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) ) &
1568 + f2h(
ks+1,2,i_xvz) &
1569 * 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) ) ) &
1570 / ( f2h(
ks+1,1,i_xvz) &
1571 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
1572 + f2h(
ks+1,2,i_xvz) &
1573 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
1574 flux(
ks+1,i,j) = j13g(
ks+1,i,j) / mapf(i,j,+2) * vel &
1575 * ( ( f31 * ( val(
ks+3,i,j)+val(
ks,i,j) ) + f32 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) ) &
1576 - ( f31 * ( val(
ks+3,i,j)-val(
ks,i,j) ) + f33 * ( val(
ks+2,i,j)-val(
ks+1,i,j) ) ) * sign(1.0_rp,vel) )
1578 vel = ( f2h(
ke-2,1,i_xvz) &
1579 * 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) ) &
1580 + f2h(
ke-2,2,i_xvz) &
1581 * 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) ) ) &
1582 / ( f2h(
ke-2,1,i_xvz) &
1583 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
1584 + f2h(
ke-2,2,i_xvz) &
1585 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
1586 flux(
ke-2,i,j) = j13g(
ke-2,i,j) / mapf(i,j,+2) * vel &
1587 * ( ( f31 * ( val(
ke,i,j)+val(
ke-3,i,j) ) + f32 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) ) &
1588 - ( f31 * ( val(
ke,i,j)-val(
ke-3,i,j) ) + f33 * ( val(
ke-1,i,j)-val(
ke-2,i,j) ) ) * sign(1.0_rp,vel) )
1590 flux(
ke ,i,j) = 0.0_rp
1602 GSQRT, J23G, MAPF, &
1604 IIS, IIE, JJS, JJE )
1607 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1608 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1609 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1610 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1611 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1612 real(RP),
intent(in) :: j23g (
ka,
ia,
ja)
1613 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1614 real(RP),
intent(in) :: cdz (
ka)
1615 integer,
intent(in) :: iis, iie, jjs, jje
1628 vel = ( f2h(k,1,i_xvz) &
1632 / ( f2h(k,1,i_xvz) &
1633 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1635 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1636 flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
1637 * ( ( f51 * ( val(k+3,i,j)+val(k-2,i,j) ) &
1638 + f52 * ( val(k+2,i,j)+val(k-1,i,j) ) &
1639 + f53 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1640 - ( f51 * ( val(k+3,i,j)-val(k-2,i,j) ) &
1641 + f54 * ( val(k+2,i,j)-val(k-1,i,j) ) &
1642 + f55 * ( val(k+1,i,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) )
1656 flux(
ks-1,i,j) = 0.0_rp
1658 vel = ( f2h(
ks,1,i_xvz) &
1662 / ( f2h(
ks,1,i_xvz) &
1663 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1665 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1666 flux(
ks,i,j) = j23g(
ks,i,j) / mapf(i,j,+1) * vel &
1667 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1669 vel = ( f2h(
ke-1,1,i_xvz) &
1671 + f2h(
ke-1,2,i_xvz) &
1673 / ( f2h(
ke-1,1,i_xvz) &
1674 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1675 + f2h(
ke-1,2,i_xvz) &
1676 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1677 flux(
ke-1,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
1678 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1680 vel = ( f2h(
ks+1,1,i_xvz) &
1682 + f2h(
ks+1,2,i_xvz) &
1684 / ( f2h(
ks+1,1,i_xvz) &
1685 * 0.5_rp * ( dens(
ks+2,i,j)+dens(
ks+2,i,j+1) ) &
1686 + f2h(
ks+1,2,i_xvz) &
1687 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) )
1688 flux(
ks+1,i,j) = j23g(
ks+1,i,j) / mapf(i,j,+1) * vel &
1689 * ( ( f31 * ( val(
ks+3,i,j)+val(
ks,i,j) ) + f32 * ( val(
ks+2,i,j)+val(
ks+1,i,j) ) ) &
1690 - ( f31 * ( val(
ks+3,i,j)-val(
ks,i,j) ) + f33 * ( val(
ks+2,i,j)-val(
ks+1,i,j) ) ) * sign(1.0_rp,vel) )
1692 vel = ( f2h(
ke-2,1,i_xvz) &
1694 + f2h(
ke-2,2,i_xvz) &
1696 / ( f2h(
ke-2,1,i_xvz) &
1697 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) &
1698 + f2h(
ke-2,2,i_xvz) &
1699 * 0.5_rp * ( dens(
ke-2,i,j)+dens(
ke-2,i,j+1) ) )
1700 flux(
ke-2,i,j) = j23g(
ke-2,i,j) / mapf(i,j,+1) * vel &
1701 * ( ( f31 * ( val(
ke,i,j)+val(
ke-3,i,j) ) + f32 * ( val(
ke-1,i,j)+val(
ke-2,i,j) ) ) &
1702 - ( f31 * ( val(
ke,i,j)-val(
ke-3,i,j) ) + f33 * ( val(
ke-1,i,j)-val(
ke-2,i,j) ) ) * sign(1.0_rp,vel) )
1704 flux(
ke ,i,j) = 0.0_rp
1719 IIS, IIE, JJS, JJE )
1722 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1723 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1724 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1725 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1726 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1727 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1728 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1729 real(RP),
intent(in) :: cdz (
ka)
1730 integer,
intent(in) :: iis, iie, jjs, jje
1743 call check( __line__, mom(k,i ,j) )
1744 call check( __line__, mom(k,i,j-1) )
1746 call check( __line__, val(k,i,j) )
1747 call check( __line__, val(k,i+1,j) )
1749 call check( __line__, val(k,i-1,j) )
1750 call check( __line__, val(k,i+2,j) )
1752 call check( __line__, val(k,i-2,j) )
1753 call check( __line__, val(k,i+3,j) )
1756 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1757 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1758 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1759 * ( ( f51 * ( val(k,i+3,j)+val(k,i-2,j) ) &
1760 + f52 * ( val(k,i+2,j)+val(k,i-1,j) ) &
1761 + f53 * ( val(k,i+1,j)+val(k,i,j) ) ) &
1762 - ( f51 * ( val(k,i+3,j)-val(k,i-2,j) ) &
1763 + f54 * ( val(k,i+2,j)-val(k,i-1,j) ) &
1764 + f55 * ( val(k,i+1,j)-val(k,i,j) ) ) * sign(1.0_rp,vel) ) &
1765 + gsqrt(k,i,j) * num_diff(k,i,j)
1770 k = iundef; i = iundef; j = iundef
1784 IIS, IIE, JJS, JJE )
1787 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1788 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1789 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1790 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1791 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1792 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1793 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1794 real(RP),
intent(in) :: cdz (
ka)
1795 integer,
intent(in) :: iis, iie, jjs, jje
1810 call check( __line__, mom(k,i ,j) )
1811 call check( __line__, mom(k,i,j-1) )
1813 call check( __line__, val(k,i,j-1) )
1814 call check( __line__, val(k,i,j) )
1816 call check( __line__, val(k,i,j-2) )
1817 call check( __line__, val(k,i,j+1) )
1819 call check( __line__, val(k,i,j-3) )
1820 call check( __line__, val(k,i,j+2) )
1823 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1825 flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1826 * ( ( f51 * ( val(k,i,j+2)+val(k,i,j-3) ) &
1827 + f52 * ( val(k,i,j+1)+val(k,i,j-2) ) &
1828 + f53 * ( val(k,i,j)+val(k,i,j-1) ) ) &
1829 - ( f51 * ( val(k,i,j+2)-val(k,i,j-3) ) &
1830 + f54 * ( val(k,i,j+1)-val(k,i,j-2) ) &
1831 + f55 * ( val(k,i,j)-val(k,i,j-1) ) ) * sign(1.0_rp,vel) ) &
1832 + gsqrt(k,i,j) * num_diff(k,i,j)
1837 k = iundef; i = iundef; j = iundef
subroutine, public atmos_dyn_fvm_fluxy_xyw_ud5(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYW
subroutine, public atmos_dyn_fvm_fluxj23_uyz_ud5(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at UYZ
subroutine, public atmos_dyn_fvm_fluxz_xvz_ud5(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XV
subroutine, public atmos_dyn_fvm_fluxj23_xvz_ud5(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at XVZ
integer, public ke
end point of inner domain: z, local
subroutine, public atmos_dyn_fvm_fluxj13_xyw_ud5(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at XYW
subroutine, public check(current_line, v)
Undefined value checker.
real(rp), public const_undef
subroutine, public atmos_dyn_fvm_fluxz_xyw_ud5(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, FDZ, dtrk, IIS, IIE, JJS, JJE)
calculation z-flux at XYW
module scale_atmos_dyn_fvm_flux_ud5
integer, public ia
of whole cells: x, local, with HALO
subroutine, public atmos_dyn_fvm_fluxj23_xyw_ud5(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at XYW
integer, public ka
of whole cells: z, local, with HALO
subroutine, public atmos_dyn_fvm_fluxx_xyw_ud5(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYW
subroutine, public atmos_dyn_fvm_fluxy_xvz_ud5(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XV
integer, parameter, public const_undef2
undefined value (INT2)
subroutine, public atmos_dyn_fvm_fluxj13_uyz_ud5(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at UYZ
subroutine, public atmos_dyn_fvm_fluxx_uyz_ud5(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at UY
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_dyn_fvm_fluxy_uyz_ud5(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at UY
subroutine, public atmos_dyn_fvm_fluxj13_xvz_ud5(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at XVZ
subroutine, public atmos_dyn_fvm_fluxz_uyz_ud5(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at UY
subroutine, public atmos_dyn_fvm_fluxz_xyz_ud5(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XYZ
subroutine, public atmos_dyn_fvm_fluxx_xvz_ud5(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XV
subroutine, public atmos_dyn_fvm_fluxx_xyz_ud5(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYZ
subroutine, public atmos_dyn_fvm_flux_valuew_z_ud5(valW, mflx, val, GSQRT, CDZ)
value at XYW
integer, public ja
of whole cells: y, local, with HALO
subroutine, public atmos_dyn_fvm_fluxy_xyz_ud5(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYZ