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
104 real(RP),
intent(out) :: valW (
ka)
105 real(RP),
intent(in) :: mflx (
ka)
106 real(RP),
intent(in) :: val (
ka)
107 real(RP),
intent(in) :: GSQRT(
ka)
108 real(RP),
intent(in) :: CDZ (
ka)
115 call check( __line__, mflx(k) )
117 call check( __line__, val(k) )
118 call check( __line__, val(k+1) )
120 call check( __line__, val(k-1) )
121 call check( __line__, val(k+2) )
125 + 0.5_rp * phi(val(k+1),val(k),val(k-1)) * ( val(k)-val(k-1) ) ) &
126 * ( 0.5_rp + sign(0.5_rp,mflx(k)) ) &
128 + 0.5_rp * phi(val(k),val(k+1),val(k+2)) * ( val(k+1)-val(k+2) ) ) &
129 * ( 0.5_rp - sign(0.5_rp,mflx(k)) )
137 call check( __line__, mflx(
ks) )
138 call check( __line__, val(
ks ) )
139 call check( __line__, val(
ks+1) )
140 call check( __line__, mflx(
ke-1) )
141 call check( __line__, val(
ke ) )
142 call check( __line__, val(
ke-1) )
147 * ( 0.5_rp + sign(0.5_rp,mflx(
ks)) ) &
149 + 0.5_rp * phi(val(
ks),val(
ks+1),val(
ks+2)) * ( val(
ks+1)-val(
ks+2) ) ) &
150 * ( 0.5_rp - sign(0.5_rp,mflx(
ks)) )
151 valw(
ke-1) = ( val(
ke-1) &
152 + 0.5_rp * phi(val(
ke-2),val(
ke-1),val(
ke)) * ( val(
ke-1)-val(
ke) ) ) &
153 * ( 0.5_rp + sign(0.5_rp,mflx(
ke-1)) ) &
155 * ( 0.5_rp - sign(0.5_rp,mflx(
ke-1)) )
173 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
174 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
175 real(RP),
intent(in) :: val (
ka,
ia,
ja)
176 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
177 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
178 real(RP),
intent(in) :: CDZ (
ka)
179 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) )
204 + 0.5_rp * phi(val(k+1,i,j),val(k,i,j),val(k-1,i,j)) * ( val(k,i,j)-val(k-1,i,j) ) ) &
205 * ( 0.5_rp + sign(0.5_rp,vel) ) &
207 + 0.5_rp * phi(val(k,i,j),val(k+1,i,j),val(k+2,i,j)) * ( val(k+1,i,j)-val(k+2,i,j) ) ) &
208 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
209 + gsqrt(k,i,j) * num_diff(k,i,j)
214 k = iundef; i = iundef; j = iundef
224 call check( __line__, mflx(
ks,i,j) )
225 call check( __line__, val(
ks ,i,j) )
226 call check( __line__, val(
ks+1,i,j) )
227 call check( __line__, mflx(
ke-1,i,j) )
228 call check( __line__, val(
ke ,i,j) )
229 call check( __line__, val(
ke-1,i,j) )
232 flux(
ks-1,i,j) = 0.0_rp
237 * ( 0.5_rp + sign(0.5_rp,vel) ) &
239 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
240 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
241 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
243 flux(
ke-1,i,j) = vel &
244 * ( ( val(
ke-1,i,j) &
245 + 0.5_rp * phi(val(
ke-2,i,j),val(
ke-1,i,j),val(
ke,i,j)) * ( val(
ke-1,i,j)-val(
ke,i,j) ) ) &
246 * ( 0.5_rp + sign(0.5_rp,vel) ) &
248 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
249 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
251 flux(
ke ,i,j) = 0.0_rp
255 k = iundef; i = iundef; j = iundef
271 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
272 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
273 real(RP),
intent(in) :: val (
ka,
ia,
ja)
274 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
275 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
276 real(RP),
intent(in) :: CDZ(
ka)
277 integer,
intent(in) :: IIS, IIE, JJS, JJE
290 call check( __line__, mflx(k,i,j) )
292 call check( __line__, val(k,i,j) )
293 call check( __line__, val(k,i+1,j) )
295 call check( __line__, val(k,i-1,j) )
296 call check( __line__, val(k,i+2,j) )
302 + 0.5_rp * phi(val(k,i+1,j),val(k,i,j),val(k,i-1,j)) * ( val(k,i,j)-val(k,i-1,j) ) ) &
303 * ( 0.5_rp + sign(0.5_rp,vel) ) &
305 + 0.5_rp * phi(val(k,i,j),val(k,i+1,j),val(k,i+2,j)) * ( val(k,i+1,j)-val(k,i+2,j) ) ) &
306 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
307 + gsqrt(k,i,j) * num_diff(k,i,j)
312 k = iundef; i = iundef; j = iundef
328 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
329 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
330 real(RP),
intent(in) :: val (
ka,
ia,
ja)
331 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
332 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
333 real(RP),
intent(in) :: CDZ(
ka)
334 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) )
359 + 0.5_rp * phi(val(k,i,j+1),val(k,i,j),val(k,i,j-1)) * ( val(k,i,j)-val(k,i,j-1) ) ) &
360 * ( 0.5_rp + sign(0.5_rp,vel) ) &
362 + 0.5_rp * phi(val(k,i,j),val(k,i,j+1),val(k,i,j+2)) * ( val(k,i,j+1)-val(k,i,j+2) ) ) &
363 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
364 + gsqrt(k,i,j) * num_diff(k,i,j)
369 k = iundef; i = iundef; j = iundef
388 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
389 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
390 real(RP),
intent(in) :: val (
ka,
ia,
ja)
391 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
392 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
393 real(RP),
intent(in) :: J33G
394 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
395 real(RP),
intent(in) :: CDZ (
ka)
396 real(RP),
intent(in) :: FDZ (
ka-1)
397 real(RP),
intent(in) :: dtrk
398 integer,
intent(in) :: IIS, IIE, JJS, JJE
413 call check( __line__, mom(k-1,i,j) )
414 call check( __line__, mom(k ,i,j) )
416 call check( __line__, val(k-1,i,j) )
417 call check( __line__, val(k,i,j) )
419 call check( __line__, val(k-2,i,j) )
420 call check( __line__, val(k+1,i,j) )
423 vel = ( 0.5_rp * ( mom(k-1,i,j) &
426 flux(k-1,i,j) = j33g * vel &
428 + 0.5_rp * phi(val(k,i,j),val(k-1,i,j),val(k-2,i,j)) * ( val(k-1,i,j)-val(k-2,i,j) ) ) &
429 * ( 0.5_rp + sign(0.5_rp,vel) ) &
431 + 0.5_rp * phi(val(k-1,i,j),val(k,i,j),val(k+1,i,j)) * ( val(k,i,j)-val(k+1,i,j) ) ) &
432 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
433 + gsqrt(k,i,j) * num_diff(k,i,j)
438 k = iundef; i = iundef; j = iundef
448 call check( __line__, val(
ks ,i,j) )
449 call check( __line__, val(
ks+1,i,j) )
456 flux(
ks-1,i,j) = 0.0_rp
458 vel = ( 0.5_rp * ( mom(
ks,i,j) &
459 + mom(
ks+1,i,j) ) ) &
461 flux(
ks,i,j) = j33g * vel &
463 * ( 0.5_rp + sign(0.5_rp,vel) ) &
465 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
466 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
467 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
471 flux(
ke-1,i,j) = 0.0_rp
472 flux(
ke ,i,j) = 0.0_rp
490 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
491 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
492 real(RP),
intent(in) :: val (
ka,
ia,
ja)
493 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
494 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
495 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
496 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
497 real(RP),
intent(in) :: CDZ (
ka)
498 integer,
intent(in) :: IIS, IIE, JJS, JJE
510 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
512 vel = vel * j13g(k,i,j)
513 flux(k-1,i,j) = vel / mapf(i,j,+2) &
515 + 0.5_rp * phi(val(k,i,j),val(k-1,i,j),val(k-2,i,j)) * ( val(k-1,i,j)-val(k-2,i,j) ) ) &
516 * ( 0.5_rp + sign(0.5_rp,vel) ) &
518 + 0.5_rp * phi(val(k-1,i,j),val(k,i,j),val(k+1,i,j)) * ( val(k,i,j)-val(k+1,i,j) ) ) &
519 * ( 0.5_rp - sign(0.5_rp,vel) ) )
532 flux(
ks-1,i,j) = 0.0_rp
535 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
536 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
539 vel = vel * j13g(
ks+1,i,j)
540 flux(
ks,i,j) = vel / mapf(i,j,+2) &
542 * ( 0.5_rp + sign(0.5_rp,vel) ) &
544 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
545 * ( 0.5_rp - sign(0.5_rp,vel) ) )
548 flux(
ke-1,i,j) = 0.0_rp
565 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
566 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
567 real(RP),
intent(in) :: val (
ka,
ia,
ja)
568 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
569 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
570 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
571 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
572 real(RP),
intent(in) :: CDZ (
ka)
573 integer,
intent(in) :: IIS, IIE, JJS, JJE
585 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
587 vel = vel * j23g(k,i,j)
588 flux(k-1,i,j) = vel / mapf(i,j,+1) &
590 + 0.5_rp * phi(val(k,i,j),val(k-1,i,j),val(k-2,i,j)) * ( val(k-1,i,j)-val(k-2,i,j) ) ) &
591 * ( 0.5_rp + sign(0.5_rp,vel) ) &
593 + 0.5_rp * phi(val(k-1,i,j),val(k,i,j),val(k+1,i,j)) * ( val(k,i,j)-val(k+1,i,j) ) ) &
594 * ( 0.5_rp - sign(0.5_rp,vel) ) )
607 flux(
ks-1,i,j) = 0.0_rp
610 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
611 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
614 vel = vel * j23g(
ks+1,i,j)
615 flux(
ks,i,j) = vel / mapf(i,j,+1) &
617 * ( 0.5_rp + sign(0.5_rp,vel) ) &
619 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
620 * ( 0.5_rp - sign(0.5_rp,vel) ) )
623 flux(
ke-1,i,j) = 0.0_rp
642 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
643 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
644 real(RP),
intent(in) :: val (
ka,
ia,
ja)
645 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
646 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
647 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
648 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
649 real(RP),
intent(in) :: CDZ (
ka)
650 integer,
intent(in) :: IIS, IIE, JJS, JJE
664 call check( __line__, mom(k ,i,j) )
665 call check( __line__, mom(k+1,i,j) )
667 call check( __line__, val(k,i,j) )
668 call check( __line__, val(k,i+1,j) )
670 call check( __line__, val(k,i-1,j) )
671 call check( __line__, val(k,i+2,j) )
674 vel = ( f2h(k,1,
i_uyz) &
679 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
681 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
682 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
684 + 0.5_rp * phi(val(k,i+1,j),val(k,i,j),val(k,i-1,j)) * ( val(k,i,j)-val(k,i-1,j) ) ) &
685 * ( 0.5_rp + sign(0.5_rp,vel) ) &
687 + 0.5_rp * phi(val(k,i,j),val(k,i+1,j),val(k,i+2,j)) * ( val(k,i+1,j)-val(k,i+2,j) ) ) &
688 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
689 + gsqrt(k,i,j) * num_diff(k,i,j)
694 k = iundef; i = iundef; j = iundef
702 flux(
ke,i,j) = 0.0_rp
706 k = iundef; i = iundef; j = iundef
723 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
724 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
725 real(RP),
intent(in) :: val (
ka,
ia,
ja)
726 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
727 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
728 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
729 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
730 real(RP),
intent(in) :: CDZ (
ka)
731 integer,
intent(in) :: IIS, IIE, JJS, JJE
745 call check( __line__, mom(k ,i,j) )
746 call check( __line__, mom(k+1,i,j) )
748 call check( __line__, val(k,i,j) )
749 call check( __line__, val(k,i,j+1) )
751 call check( __line__, val(k,i,j-1) )
752 call check( __line__, val(k,i,j+2) )
755 vel = ( f2h(k,1,
i_xvz) &
760 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
762 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
763 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
765 + 0.5_rp * phi(val(k,i,j+1),val(k,i,j),val(k,i,j-1)) * ( val(k,i,j)-val(k,i,j-1) ) ) &
766 * ( 0.5_rp + sign(0.5_rp,vel) ) &
768 + 0.5_rp * phi(val(k,i,j),val(k,i,j+1),val(k,i,j+2)) * ( val(k,i,j+1)-val(k,i,j+2) ) ) &
769 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
770 + gsqrt(k,i,j) * num_diff(k,i,j)
775 k = iundef; i = iundef; j = iundef
783 flux(
ke,i,j) = 0.0_rp
787 k = iundef; i = iundef; j = iundef
805 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
806 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
807 real(RP),
intent(in) :: val (
ka,
ia,
ja)
808 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
809 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
810 real(RP),
intent(in) :: J33G
811 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
812 real(RP),
intent(in) :: CDZ (
ka)
813 integer,
intent(in) :: IIS, IIE, JJS, JJE
827 call check( __line__, mom(k,i,j) )
828 call check( __line__, mom(k,i+1,j) )
830 call check( __line__, val(k,i,j) )
831 call check( __line__, val(k+1,i,j) )
833 call check( __line__, val(k-1,i,j) )
834 call check( __line__, val(k+2,i,j) )
837 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
839 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
841 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
842 flux(k,i,j) = j33g * vel &
844 + 0.5_rp * phi(val(k+1,i,j),val(k,i,j),val(k-1,i,j)) * ( val(k,i,j)-val(k-1,i,j) ) ) &
845 * ( 0.5_rp + sign(0.5_rp,vel) ) &
847 + 0.5_rp * phi(val(k,i,j),val(k+1,i,j),val(k+2,i,j)) * ( val(k+1,i,j)-val(k+2,i,j) ) ) &
848 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
849 + gsqrt(k,i,j) * num_diff(k,i,j)
854 k = iundef; i = iundef; j = iundef
864 call check( __line__, mom(
ks,i ,j) )
865 call check( __line__, mom(
ks,i+1,j) )
866 call check( __line__, val(
ks+1,i,j) )
867 call check( __line__, val(
ks,i,j) )
873 flux(
ks-1,i,j) = 0.0_rp
875 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
877 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
879 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
880 flux(
ks,i,j) = j33g * vel &
882 * ( 0.5_rp + sign(0.5_rp,vel) ) &
884 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
885 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
886 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
887 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
889 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
891 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
892 flux(
ke-1,i,j) = j33g * vel &
893 * ( ( val(
ke-1,i,j) &
894 + 0.5_rp * phi(val(
ke-2,i,j),val(
ke-1,i,j),val(
ke,i,j)) * ( val(
ke-1,i,j)-val(
ke,i,j) ) ) &
895 * ( 0.5_rp + sign(0.5_rp,vel) ) &
897 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
898 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
900 flux(
ke,i,j) = 0.0_rp
904 k = iundef; i = iundef; j = iundef
920 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
921 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
922 real(RP),
intent(in) :: val (
ka,
ia,
ja)
923 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
924 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
925 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
926 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
927 real(RP),
intent(in) :: CDZ (
ka)
928 integer,
intent(in) :: IIS, IIE, JJS, JJE
941 vel = ( f2h(k,1,
i_uyz) &
946 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
948 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
949 vel = vel * j13g(k,i,j)
950 flux(k,i,j) = vel / mapf(i,j,+2) &
952 + 0.5_rp * phi(val(k+1,i,j),val(k,i,j),val(k-1,i,j)) * ( val(k,i,j)-val(k-1,i,j) ) ) &
953 * ( 0.5_rp + sign(0.5_rp,vel) ) &
955 + 0.5_rp * phi(val(k,i,j),val(k+1,i,j),val(k+2,i,j)) * ( val(k+1,i,j)-val(k+2,i,j) ) ) &
956 * ( 0.5_rp - sign(0.5_rp,vel) ) )
970 flux(
ks-1,i,j) = 0.0_rp
977 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
979 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
980 vel = vel * j13g(
ks,i,j)
981 flux(
ks,i,j) = vel / mapf(i,j,+2) &
983 * ( 0.5_rp + sign(0.5_rp,vel) ) &
985 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
986 * ( 0.5_rp - sign(0.5_rp,vel) ) )
993 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
995 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
996 vel = vel * j13g(
ke-1,i,j)
997 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
998 * ( ( val(
ke-1,i,j) &
999 + 0.5_rp * phi(val(
ke-2,i,j),val(
ke-1,i,j),val(
ke,i,j)) * ( val(
ke-1,i,j)-val(
ke,i,j) ) ) &
1000 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1002 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1004 flux(
ke ,i,j) = 0.0_rp
1016 GSQRT, J23G, MAPF, &
1018 IIS, IIE, JJS, JJE )
1021 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1022 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1023 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1024 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1025 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1026 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
1027 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1028 real(RP),
intent(in) :: CDZ (
ka)
1029 integer,
intent(in) :: IIS, IIE, JJS, JJE
1042 vel = ( f2h(k,1,
i_uyz) &
1043 * 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) ) &
1045 * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
1046 / ( f2h(k,1,
i_uyz) &
1047 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
1049 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
1050 vel = vel * j23g(k,i,j)
1051 flux(k,i,j) = vel / mapf(i,j,+1) &
1053 + 0.5_rp * phi(val(k+1,i,j),val(k,i,j),val(k-1,i,j)) * ( val(k,i,j)-val(k-1,i,j) ) ) &
1054 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1056 + 0.5_rp * phi(val(k,i,j),val(k+1,i,j),val(k+2,i,j)) * ( val(k+1,i,j)-val(k+2,i,j) ) ) &
1057 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1071 flux(
ks-1,i,j) = 0.0_rp
1074 * 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) ) &
1076 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
1078 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
1080 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
1081 vel = vel * j23g(
ks,i,j)
1082 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1084 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1086 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
1087 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1090 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
1092 * 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) ) ) &
1094 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
1096 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1097 vel = vel * j23g(
ke-1,i,j)
1098 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1099 * ( ( val(
ke-1,i,j) &
1100 + 0.5_rp * phi(val(
ke-2,i,j),val(
ke-1,i,j),val(
ke,i,j)) * ( val(
ke-1,i,j)-val(
ke,i,j) ) ) &
1101 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1103 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1105 flux(
ke ,i,j) = 0.0_rp
1120 IIS, IIE, JJS, JJE )
1123 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1124 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1125 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1126 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1127 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1128 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1129 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1130 real(RP),
intent(in) :: CDZ (
ka)
1131 integer,
intent(in) :: IIS, IIE, JJS, JJE
1146 call check( __line__, mom(k,i ,j) )
1147 call check( __line__, mom(k,i-1,j) )
1149 call check( __line__, val(k,i-1,j) )
1150 call check( __line__, val(k,i,j) )
1152 call check( __line__, val(k,i-2,j) )
1153 call check( __line__, val(k,i+1,j) )
1156 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
1158 flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1159 * ( ( val(k,i-1,j) &
1160 + 0.5_rp * phi(val(k,i,j),val(k,i-1,j),val(k,i-2,j)) * ( val(k,i-1,j)-val(k,i-2,j) ) ) &
1161 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1163 + 0.5_rp * phi(val(k,i-1,j),val(k,i,j),val(k,i+1,j)) * ( val(k,i,j)-val(k,i+1,j) ) ) &
1164 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1165 + gsqrt(k,i,j) * num_diff(k,i,j)
1170 k = iundef; i = iundef; j = iundef
1184 IIS, IIE, JJS, JJE )
1187 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1188 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1189 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1190 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1191 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1192 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1193 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1194 real(RP),
intent(in) :: CDZ (
ka)
1195 integer,
intent(in) :: IIS, IIE, JJS, JJE
1208 call check( __line__, mom(k,i ,j) )
1209 call check( __line__, mom(k,i-1,j) )
1211 call check( __line__, val(k,i,j) )
1212 call check( __line__, val(k,i,j+1) )
1214 call check( __line__, val(k,i,j-1) )
1215 call check( __line__, val(k,i,j+2) )
1218 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
1219 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1220 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1222 + 0.5_rp * phi(val(k,i,j+1),val(k,i,j),val(k,i,j-1)) * ( val(k,i,j)-val(k,i,j-1) ) ) &
1223 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1225 + 0.5_rp * phi(val(k,i,j),val(k,i,j+1),val(k,i,j+2)) * ( val(k,i,j+1)-val(k,i,j+2) ) ) &
1226 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1227 + gsqrt(k,i,j) * num_diff(k,i,j)
1232 k = iundef; i = iundef; j = iundef
1248 IIS, IIE, JJS, JJE )
1251 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1252 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1253 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1254 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1255 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1256 real(RP),
intent(in) :: J33G
1257 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1258 real(RP),
intent(in) :: CDZ (
ka)
1259 integer,
intent(in) :: IIS, IIE, JJS, JJE
1273 call check( __line__, mom(k,i,j) )
1274 call check( __line__, mom(k,i,j+1) )
1276 call check( __line__, val(k,i,j) )
1277 call check( __line__, val(k+1,i,j) )
1279 call check( __line__, val(k-1,i,j) )
1280 call check( __line__, val(k+2,i,j) )
1283 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1284 / ( f2h(k,1,
i_xvz) &
1285 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1287 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1288 flux(k,i,j) = j33g * vel &
1290 + 0.5_rp * phi(val(k+1,i,j),val(k,i,j),val(k-1,i,j)) * ( val(k,i,j)-val(k-1,i,j) ) ) &
1291 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1293 + 0.5_rp * phi(val(k,i,j),val(k+1,i,j),val(k+2,i,j)) * ( val(k+1,i,j)-val(k+2,i,j) ) ) &
1294 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1295 + gsqrt(k,i,j) * num_diff(k,i,j)
1300 k = iundef; i = iundef; j = iundef
1310 call check( __line__, mom(
ks,i ,j) )
1311 call check( __line__, mom(
ks,i,j+1) )
1312 call check( __line__, val(
ks+1,i,j) )
1313 call check( __line__, val(
ks,i,j) )
1319 flux(
ks-1,i,j) = 0.0_rp
1321 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1323 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1325 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1326 flux(
ks,i,j) = j33g * vel &
1328 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1330 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
1331 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1332 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1333 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1335 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1337 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1338 flux(
ke-1,i,j) = j33g * vel &
1339 * ( ( val(
ke-1,i,j) &
1340 + 0.5_rp * phi(val(
ke-2,i,j),val(
ke-1,i,j),val(
ke,i,j)) * ( val(
ke-1,i,j)-val(
ke,i,j) ) ) &
1341 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1343 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1344 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1346 flux(
ke,i,j) = 0.0_rp
1350 k = iundef; i = iundef; j = iundef
1361 GSQRT, J13G, MAPF, &
1363 IIS, IIE, JJS, JJE )
1366 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1367 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1368 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1369 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1370 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1371 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
1372 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1373 real(RP),
intent(in) :: CDZ (
ka)
1374 integer,
intent(in) :: IIS, IIE, JJS, JJE
1387 vel = ( f2h(k,1,
i_xvz) &
1388 * 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) ) &
1390 * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1391 / ( f2h(k,1,
i_xvz) &
1392 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1394 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1395 vel = vel * j13g(k,i,j)
1396 flux(k,i,j) = vel / mapf(i,j,+2) &
1398 + 0.5_rp * phi(val(k+1,i,j),val(k,i,j),val(k-1,i,j)) * ( val(k,i,j)-val(k-1,i,j) ) ) &
1399 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1401 + 0.5_rp * phi(val(k,i,j),val(k+1,i,j),val(k+2,i,j)) * ( val(k+1,i,j)-val(k+2,i,j) ) ) &
1402 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1416 flux(
ks-1,i,j) = 0.0_rp
1419 * 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) ) &
1421 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
1423 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1425 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1426 vel = vel * j13g(
ks,i,j)
1427 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1429 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1431 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
1432 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1435 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
1437 * 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) ) ) &
1439 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1441 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1442 vel = vel * j13g(
ke-1,i,j)
1443 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1444 * ( ( val(
ke-1,i,j) &
1445 + 0.5_rp * phi(val(
ke-2,i,j),val(
ke-1,i,j),val(
ke,i,j)) * ( val(
ke-1,i,j)-val(
ke,i,j) ) ) &
1446 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1448 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1450 flux(
ke ,i,j) = 0.0_rp
1462 GSQRT, J23G, MAPF, &
1464 IIS, IIE, JJS, JJE )
1467 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1468 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1469 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1470 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1471 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1472 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
1473 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1474 real(RP),
intent(in) :: CDZ (
ka)
1475 integer,
intent(in) :: IIS, IIE, JJS, JJE
1488 vel = ( f2h(k,1,
i_xvz) &
1492 / ( f2h(k,1,
i_xvz) &
1493 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1495 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1496 vel = vel * j23g(k,i,j)
1497 flux(k,i,j) = vel / mapf(i,j,+1) &
1499 + 0.5_rp * phi(val(k+1,i,j),val(k,i,j),val(k-1,i,j)) * ( val(k,i,j)-val(k-1,i,j) ) ) &
1500 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1502 + 0.5_rp * phi(val(k,i,j),val(k+1,i,j),val(k+2,i,j)) * ( val(k+1,i,j)-val(k+2,i,j) ) ) &
1503 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1517 flux(
ks-1,i,j) = 0.0_rp
1524 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1526 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1527 vel = vel * j23g(
ks,i,j)
1528 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1530 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1532 + 0.5_rp * phi(val(
ks,i,j),val(
ks+1,i,j),val(
ks+2,i,j)) * ( val(
ks+1,i,j)-val(
ks+2,i,j) ) ) &
1533 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1540 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1542 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1543 vel = vel * j23g(
ke-1,i,j)
1544 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1545 * ( ( val(
ke-1,i,j) &
1546 + 0.5_rp * phi(val(
ke-2,i,j),val(
ke-1,i,j),val(
ke,i,j)) * ( val(
ke-1,i,j)-val(
ke,i,j) ) ) &
1547 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1549 * ( 0.5_rp - sign(0.5_rp,vel) ) )
1551 flux(
ke ,i,j) = 0.0_rp
1566 IIS, IIE, JJS, JJE )
1569 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1570 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1571 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1572 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1573 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1574 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1575 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1576 real(RP),
intent(in) :: CDZ (
ka)
1577 integer,
intent(in) :: IIS, IIE, JJS, JJE
1590 call check( __line__, mom(k,i ,j) )
1591 call check( __line__, mom(k,i,j-1) )
1593 call check( __line__, val(k,i,j) )
1594 call check( __line__, val(k,i+1,j) )
1596 call check( __line__, val(k,i-1,j) )
1597 call check( __line__, val(k,i+2,j) )
1600 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1601 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1602 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1604 + 0.5_rp * phi(val(k,i+1,j),val(k,i,j),val(k,i-1,j)) * ( val(k,i,j)-val(k,i-1,j) ) ) &
1605 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1607 + 0.5_rp * phi(val(k,i,j),val(k,i+1,j),val(k,i+2,j)) * ( val(k,i+1,j)-val(k,i+2,j) ) ) &
1608 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1609 + gsqrt(k,i,j) * num_diff(k,i,j)
1614 k = iundef; i = iundef; j = iundef
1628 IIS, IIE, JJS, JJE )
1631 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1632 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1633 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1634 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1635 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1636 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1637 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1638 real(RP),
intent(in) :: CDZ (
ka)
1639 integer,
intent(in) :: IIS, IIE, JJS, JJE
1654 call check( __line__, mom(k,i ,j) )
1655 call check( __line__, mom(k,i,j-1) )
1657 call check( __line__, val(k,i,j-1) )
1658 call check( __line__, val(k,i,j) )
1660 call check( __line__, val(k,i,j-2) )
1661 call check( __line__, val(k,i,j+1) )
1664 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1666 flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1667 * ( ( val(k,i,j-1) &
1668 + 0.5_rp * phi(val(k,i,j),val(k,i,j-1),val(k,i,j-2)) * ( val(k,i,j-1)-val(k,i,j-2) ) ) &
1669 * ( 0.5_rp + sign(0.5_rp,vel) ) &
1671 + 0.5_rp * phi(val(k,i,j-1),val(k,i,j),val(k,i,j+1)) * ( val(k,i,j)-val(k,i,j+1) ) ) &
1672 * ( 0.5_rp - sign(0.5_rp,vel) ) ) &
1673 + gsqrt(k,i,j) * num_diff(k,i,j)
1678 k = iundef; i = iundef; j = iundef
1690 function phi(v1, v2, v3)
1696 real(RP),
intent(in) :: v1
1697 real(RP),
intent(in) :: v2
1698 real(RP),
intent(in) :: v3
1701 real(RP) :: zerosw1, zerosw2
1704 zerosw1 = eps - sign(eps, abs(v1-v2)-eps)
1705 zerosw2 = eps - sign(eps, abs(v2-v3)-eps)
1706 r2 = 2.0_rp * (v1-v2+zerosw1*zerosw2) / (v2-v3+zerosw2)
1708 phi = max(0.0_rp, min(r2, min((1.0_rp+r2)/3.0_rp, 2.0_rp) ) )
subroutine, public atmos_dyn_fvm_fluxx_xvz_ud3koren1993(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XV
subroutine, public atmos_dyn_fvm_flux_valuew_z_ud3koren1993(valW, mflx, val, GSQRT, CDZ)
value at XYW
subroutine, public atmos_dyn_fvm_fluxy_xyz_ud3koren1993(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYZ
subroutine, public atmos_dyn_fvm_fluxz_uyz_ud3koren1993(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at UY
integer, public ia
of whole cells: x, local, with HALO
subroutine, public atmos_dyn_fvm_fluxy_xvz_ud3koren1993(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XV
integer, public ja
of whole cells: y, local, with HALO
subroutine, public atmos_dyn_fvm_fluxx_xyz_ud3koren1993(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYZ
subroutine, public check(current_line, v)
Undefined value checker.
real(rp), public const_undef
subroutine, public atmos_dyn_fvm_fluxj13_uyz_ud3koren1993(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at UYZ
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
subroutine, public atmos_dyn_fvm_fluxz_xyz_ud3koren1993(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XYZ
subroutine, public atmos_dyn_fvm_fluxj13_xyw_ud3koren1993(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at XYW
integer, parameter, public const_undef2
undefined value (INT2)
subroutine, public atmos_dyn_fvm_fluxj23_uyz_ud3koren1993(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at UYZ
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_dyn_fvm_fluxj23_xyw_ud3koren1993(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at XYW
subroutine, public atmos_dyn_fvm_fluxx_uyz_ud3koren1993(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at UY
subroutine, public atmos_dyn_fvm_fluxj23_xvz_ud3koren1993(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at XVZ
subroutine, public atmos_dyn_fvm_fluxj13_xvz_ud3koren1993(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at XVZ
subroutine, public atmos_dyn_fvm_fluxy_uyz_ud3koren1993(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at UY
real(rp), public const_eps
small number
module scale_atmos_dyn_fvm_flux_ud3Koren1993
integer, public ka
of whole cells: z, local, with HALO
subroutine, public atmos_dyn_fvm_fluxz_xyw_ud3koren1993(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, FDZ, dtrk, IIS, IIE, JJS, JJE)
calculation z-flux at XYW
subroutine, public atmos_dyn_fvm_fluxx_xyw_ud3koren1993(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYW
subroutine, public atmos_dyn_fvm_fluxz_xvz_ud3koren1993(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XV
subroutine, public atmos_dyn_fvm_fluxy_xyw_ud3koren1993(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYW