77 #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))) 79 #define F2H(k,p,q) 0.5_RP 86 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
107 real(RP),
intent(out) :: valW (
ka)
108 real(RP),
intent(in) :: mflx (
ka)
109 real(RP),
intent(in) :: val (
ka)
110 real(RP),
intent(in) :: GSQRT(
ka)
111 real(RP),
intent(in) :: CDZ (
ka)
118 call check( __line__, mflx(k) )
120 call check( __line__, val(k) )
121 call check( __line__, val(k+1) )
123 call check( __line__, val(k-1) )
124 call check( __line__, val(k+2) )
127 valw(k) = ( f31 * ( val(k+2)+val(k-1) ) + f32 * ( val(k+1)+val(k) ) ) &
128 - ( f31 * ( val(k+2)-val(k-1) ) + f33 * ( val(k+1)-val(k) ) ) * sign(1.0_rp,mflx(k))
136 call check( __line__, mflx(
ks) )
137 call check( __line__, val(
ks ) )
138 call check( __line__, val(
ks+1) )
139 call check( __line__, mflx(
ke-1) )
140 call check( __line__, val(
ke ) )
141 call check( __line__, val(
ke-1) )
145 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) )
146 valw(
ke-1) = f2 * ( val(
ke)+val(
ke-1) )
163 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
164 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
165 real(RP),
intent(in) :: val (
ka,
ia,
ja)
166 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
168 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
170 real(RP),
intent(in) :: CDZ (
ka)
171 integer,
intent(in) :: IIS, IIE, JJS, JJE
182 call check( __line__, mflx(k,i,j) )
184 call check( __line__, val(k,i,j) )
185 call check( __line__, val(k+1,i,j) )
187 call check( __line__, val(k-1,i,j) )
188 call check( __line__, val(k+2,i,j) )
193 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
194 - ( 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) ) &
195 + gsqrt(k,i,j) * num_diff(k,i,j)
200 k = iundef; i = iundef; j = iundef
208 call check( __line__, mflx(
ks,i,j) )
209 call check( __line__, val(
ks ,i,j) )
210 call check( __line__, val(
ks+1,i,j) )
211 call check( __line__, mflx(
ke-1,i,j) )
212 call check( __line__, val(
ke ,i,j) )
213 call check( __line__, val(
ke-1,i,j) )
216 flux(
ks-1,i,j) = 0.0_rp
220 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
221 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
223 flux(
ke-1,i,j) = vel &
224 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
225 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
227 flux(
ke ,i,j) = 0.0_rp
231 k = iundef; i = iundef; j = iundef
249 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
250 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
251 real(RP),
intent(in) :: val (
ka,
ia,
ja)
252 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
254 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
256 real(RP),
intent(in) :: CDZ(
ka)
257 integer,
intent(in) :: IIS, IIE, JJS, JJE
268 call check( __line__, mflx(k,i,j) )
270 call check( __line__, val(k,i,j) )
271 call check( __line__, val(k,i+1,j) )
273 call check( __line__, val(k,i-1,j) )
274 call check( __line__, val(k,i+2,j) )
279 * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
280 - ( 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) ) &
281 + gsqrt(k,i,j) * num_diff(k,i,j)
286 k = iundef; i = iundef; j = iundef
304 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
305 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
306 real(RP),
intent(in) :: val (
ka,
ia,
ja)
307 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
309 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
311 real(RP),
intent(in) :: CDZ(
ka)
312 integer,
intent(in) :: IIS, IIE, JJS, JJE
323 call check( __line__, mflx(k,i,j) )
325 call check( __line__, val(k,i,j) )
326 call check( __line__, val(k,i,j+1) )
328 call check( __line__, val(k,i,j-1) )
329 call check( __line__, val(k,i,j+2) )
334 * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
335 - ( 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) ) &
336 + gsqrt(k,i,j) * num_diff(k,i,j)
341 k = iundef; i = iundef; j = iundef
362 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
363 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
364 real(RP),
intent(in) :: val (
ka,
ia,
ja)
365 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
366 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
367 real(RP),
intent(in) :: J33G
369 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
371 real(RP),
intent(in) :: CDZ (
ka)
372 real(RP),
intent(in) :: FDZ (
ka-1)
373 real(RP),
intent(in) :: dtrk
374 integer,
intent(in) :: IIS, IIE, JJS, JJE
388 call check( __line__, mom(k-1,i,j) )
389 call check( __line__, mom(k ,i,j) )
391 call check( __line__, val(k-1,i,j) )
392 call check( __line__, val(k,i,j) )
394 call check( __line__, val(k-2,i,j) )
395 call check( __line__, val(k+1,i,j) )
398 vel = ( 0.5_rp * ( mom(k-1,i,j) &
401 flux(k-1,i,j) = j33g * vel &
402 * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
403 - ( 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) ) &
404 + gsqrt(k,i,j) * num_diff(k,i,j)
409 k = iundef; i = iundef; j = iundef
418 flux(
ks-1,i,j) = 0.0_rp
422 sw = sign( 1.0_rp, mom(
ks,i,j) )
423 flux(
ks ,i,j) = sw * min( sw*flux(
ks,i,j), sw*val(
ks,i,j)*gsqrt(
ks,i,j)*fdz(
ks)/dtrk )
426 flux(
ke-1,i,j) = 0.0_rp
427 flux(
ke ,i,j) = 0.0_rp
445 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
446 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
447 real(RP),
intent(in) :: val (
ka,
ia,
ja)
448 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
449 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
450 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
451 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
452 real(RP),
intent(in) :: CDZ (
ka)
453 integer,
intent(in) :: IIS, IIE, JJS, JJE
463 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
465 flux(k-1,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
466 * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
467 - ( 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) )
475 flux(
ks-1,i,j) = 0.0_rp
477 flux(
ke-1,i,j) = 0.0_rp
494 real(RP),
intent(out) :: 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) :: J23G (
ka,
ia,
ja)
500 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
501 real(RP),
intent(in) :: CDZ (
ka)
502 integer,
intent(in) :: IIS, IIE, JJS, JJE
512 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
514 flux(k-1,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
515 * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
516 - ( 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) )
524 flux(
ks-1,i,j) = 0.0_rp
526 flux(
ke-1,i,j) = 0.0_rp
547 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
548 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
549 real(RP),
intent(in) :: val (
ka,
ia,
ja)
550 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
551 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
552 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
554 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
556 real(RP),
intent(in) :: CDZ (
ka)
557 integer,
intent(in) :: IIS, IIE, JJS, JJE
568 call check( __line__, mom(k ,i,j) )
569 call check( __line__, mom(k+1,i,j) )
571 call check( __line__, val(k,i,j) )
572 call check( __line__, val(k,i+1,j) )
574 call check( __line__, val(k,i-1,j) )
575 call check( __line__, val(k,i+2,j) )
578 vel = ( f2h(k,1,i_uyz) &
583 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
585 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
586 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
587 * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
588 - ( 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) ) &
589 + gsqrt(k,i,j) * num_diff(k,i,j)
594 k = iundef; i = iundef; j = iundef
600 flux(
ke,i,j) = 0.0_rp
604 k = iundef; i = iundef; j = iundef
623 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
624 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
625 real(RP),
intent(in) :: val (
ka,
ia,
ja)
626 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
627 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
628 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
630 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
632 real(RP),
intent(in) :: CDZ (
ka)
633 integer,
intent(in) :: IIS, IIE, JJS, JJE
644 call check( __line__, mom(k ,i,j) )
645 call check( __line__, mom(k+1,i,j) )
647 call check( __line__, val(k,i,j) )
648 call check( __line__, val(k,i,j+1) )
650 call check( __line__, val(k,i,j-1) )
651 call check( __line__, val(k,i,j+2) )
654 vel = ( f2h(k,1,i_xvz) &
659 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
661 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
662 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
663 * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
664 - ( 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) ) &
665 + gsqrt(k,i,j) * num_diff(k,i,j)
670 k = iundef; i = iundef; j = iundef
676 flux(
ke,i,j) = 0.0_rp
680 k = iundef; i = iundef; j = iundef
700 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
701 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
702 real(RP),
intent(in) :: val (
ka,
ia,
ja)
703 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
704 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
705 real(RP),
intent(in) :: J33G
707 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
709 real(RP),
intent(in) :: CDZ (
ka)
710 integer,
intent(in) :: IIS, IIE, JJS, JJE
721 call check( __line__, mom(k,i,j) )
722 call check( __line__, mom(k,i+1,j) )
724 call check( __line__, val(k,i,j) )
725 call check( __line__, val(k+1,i,j) )
727 call check( __line__, val(k-1,i,j) )
728 call check( __line__, val(k+2,i,j) )
731 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
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) = j33g * vel &
737 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
738 - ( 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) ) &
739 + gsqrt(k,i,j) * num_diff(k,i,j)
744 k = iundef; i = iundef; j = iundef
752 call check( __line__, mom(
ks,i ,j) )
753 call check( __line__, mom(
ks,i+1,j) )
754 call check( __line__, val(
ks+1,i,j) )
755 call check( __line__, val(
ks,i,j) )
758 flux(
ks-1,i,j) = 0.0_rp
760 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
761 / ( f2h(
ks,1,i_xyz) &
762 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
764 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
765 flux(
ks,i,j) = j33g * vel &
766 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
767 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
768 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
769 / ( f2h(
ke-1,1,i_xyz) &
770 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
771 + f2h(
ke-1,2,i_xyz) &
772 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
773 flux(
ke-1,i,j) = j33g * vel &
774 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
775 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
777 flux(
ke,i,j) = 0.0_rp
781 k = iundef; i = iundef; j = iundef
797 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
798 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
799 real(RP),
intent(in) :: val (
ka,
ia,
ja)
800 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
801 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
802 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
803 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
804 real(RP),
intent(in) :: CDZ (
ka)
805 integer,
intent(in) :: IIS, IIE, JJS, JJE
815 vel = ( f2h(k,1,i_uyz) &
820 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
822 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
823 flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
824 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
825 - ( 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) )
833 flux(
ks-1,i,j) = 0.0_rp
835 vel = ( f2h(
ks,1,i_uyz) &
839 / ( f2h(
ks,1,i_xyz) &
840 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
842 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
843 flux(
ks,i,j) = j13g(
ks,i,j) / mapf(i,j,+2) * vel &
844 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
845 vel = ( f2h(
ke-1,1,i_uyz) &
847 + f2h(
ke-1,2,i_uyz) &
849 / ( f2h(
ke-1,1,i_xyz) &
850 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
851 + f2h(
ke-1,2,i_xyz) &
852 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
853 flux(
ke-1,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
854 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
856 flux(
ke ,i,j) = 0.0_rp
873 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
874 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
875 real(RP),
intent(in) :: val (
ka,
ia,
ja)
876 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
877 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
878 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
879 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
880 real(RP),
intent(in) :: CDZ (
ka)
881 integer,
intent(in) :: IIS, IIE, JJS, JJE
891 vel = ( f2h(k,1,i_xvz) &
892 * 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) ) &
894 * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
896 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
898 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
899 flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
900 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
901 - ( 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) )
909 flux(
ks-1,i,j) = 0.0_rp
911 vel = ( f2h(
ks,1,i_xvz) &
912 * 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) ) &
914 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
915 / ( f2h(
ks,1,i_xyz) &
916 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
918 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
919 flux(
ks,i,j) = j23g(
ks,i,j) / mapf(i,j,+1) * vel &
920 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
921 vel = ( f2h(
ke-1,1,i_xvz) &
922 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
923 + f2h(
ke-1,2,i_xvz) &
924 * 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) ) ) &
925 / ( f2h(
ke-1,1,i_xyz) &
926 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
927 + f2h(
ke-1,2,i_xyz) &
928 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
929 flux(
ke-1,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
930 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
932 flux(
ke ,i,j) = 0.0_rp
952 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
953 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
954 real(RP),
intent(in) :: val (
ka,
ia,
ja)
955 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
956 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
957 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
959 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
961 real(RP),
intent(in) :: CDZ (
ka)
962 integer,
intent(in) :: IIS, IIE, JJS, JJE
975 call check( __line__, mom(k,i ,j) )
976 call check( __line__, mom(k,i-1,j) )
978 call check( __line__, val(k,i-1,j) )
979 call check( __line__, val(k,i,j) )
981 call check( __line__, val(k,i-2,j) )
982 call check( __line__, val(k,i+1,j) )
985 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
987 flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
988 * ( ( f31 * ( val(k,i+1,j)+val(k,i-2,j) ) + f32 * ( val(k,i,j)+val(k,i-1,j) ) ) &
989 - ( 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) ) &
990 + gsqrt(k,i,j) * num_diff(k,i,j)
995 k = iundef; i = iundef; j = iundef
1011 IIS, IIE, JJS, JJE )
1014 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1015 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1016 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1017 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1018 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1019 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1021 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1023 real(RP),
intent(in) :: CDZ (
ka)
1024 integer,
intent(in) :: IIS, IIE, JJS, JJE
1035 call check( __line__, mom(k,i ,j) )
1036 call check( __line__, mom(k,i-1,j) )
1038 call check( __line__, val(k,i,j) )
1039 call check( __line__, val(k,i,j+1) )
1041 call check( __line__, val(k,i,j-1) )
1042 call check( __line__, val(k,i,j+2) )
1045 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
1046 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1047 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1048 * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
1049 - ( 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) ) &
1050 + gsqrt(k,i,j) * num_diff(k,i,j)
1055 k = iundef; i = iundef; j = iundef
1073 IIS, IIE, JJS, JJE )
1076 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1077 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1078 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1079 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1080 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1081 real(RP),
intent(in) :: J33G
1083 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1085 real(RP),
intent(in) :: CDZ (
ka)
1086 integer,
intent(in) :: IIS, IIE, JJS, JJE
1097 call check( __line__, mom(k,i,j) )
1098 call check( __line__, mom(k,i,j+1) )
1100 call check( __line__, val(k,i,j) )
1101 call check( __line__, val(k+1,i,j) )
1103 call check( __line__, val(k-1,i,j) )
1104 call check( __line__, val(k+2,i,j) )
1107 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1108 / ( f2h(k,1,i_xyz) &
1109 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1111 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1112 flux(k,i,j) = j33g * vel &
1113 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1114 - ( 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) ) &
1115 + gsqrt(k,i,j) * num_diff(k,i,j)
1120 k = iundef; i = iundef; j = iundef
1128 call check( __line__, mom(
ks,i ,j) )
1129 call check( __line__, mom(
ks,i,j+1) )
1130 call check( __line__, val(
ks+1,i,j) )
1131 call check( __line__, val(
ks,i,j) )
1134 flux(
ks-1,i,j) = 0.0_rp
1136 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1137 / ( f2h(
ks,1,i_xyz) &
1138 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1140 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1141 flux(
ks,i,j) = j33g * vel &
1142 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1143 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1144 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1145 / ( f2h(
ke-1,1,i_xyz) &
1146 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1147 + f2h(
ke-1,2,i_xyz) &
1148 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1149 flux(
ke-1,i,j) = j33g * vel &
1150 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1151 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1153 flux(
ke,i,j) = 0.0_rp
1157 k = iundef; i = iundef; j = iundef
1168 GSQRT, J13G, MAPF, &
1170 IIS, IIE, JJS, JJE )
1173 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1174 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1175 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1176 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1177 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1178 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
1179 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1180 real(RP),
intent(in) :: CDZ (
ka)
1181 integer,
intent(in) :: IIS, IIE, JJS, JJE
1191 vel = ( f2h(k,1,i_uyz) &
1192 * 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) ) &
1194 * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1195 / ( f2h(k,1,i_xyz) &
1196 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1198 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1199 flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
1200 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1201 - ( 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) )
1209 flux(
ks-1,i,j) = 0.0_rp
1211 vel = ( f2h(
ks,1,i_uyz) &
1212 * 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) ) &
1214 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
1215 / ( f2h(
ks,1,i_xyz) &
1216 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1218 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1219 flux(
ks,i,j) = j13g(
ks,i,j) / mapf(i,j,+2) * vel &
1220 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1221 vel = ( f2h(
ke-1,1,i_uyz) &
1222 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
1223 + f2h(
ke-1,2,i_uyz) &
1224 * 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) ) ) &
1225 / ( f2h(
ke-1,1,i_xyz) &
1226 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1227 + f2h(
ke-1,2,i_xyz) &
1228 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1229 flux(
ke-1,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
1230 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1232 flux(
ke ,i,j) = 0.0_rp
1244 GSQRT, J23G, MAPF, &
1246 IIS, IIE, JJS, JJE )
1249 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1250 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1251 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1252 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1253 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1254 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
1255 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1256 real(RP),
intent(in) :: CDZ (
ka)
1257 integer,
intent(in) :: IIS, IIE, JJS, JJE
1267 vel = ( f2h(k,1,i_xvz) &
1271 / ( f2h(k,1,i_xyz) &
1272 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1274 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1275 flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
1276 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1277 - ( 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) )
1285 flux(
ks-1,i,j) = 0.0_rp
1287 vel = ( f2h(
ks,1,i_xvz) &
1291 / ( f2h(
ks,1,i_xyz) &
1292 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1294 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1295 flux(
ks,i,j) = j23g(
ks,i,j) / mapf(i,j,+1) * vel &
1296 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1297 vel = ( f2h(
ke-1,1,i_xvz) &
1299 + f2h(
ke-1,2,i_xvz) &
1301 / ( f2h(
ke-1,1,i_xyz) &
1302 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1303 + f2h(
ke-1,2,i_xyz) &
1304 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1305 flux(
ke-1,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
1306 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1308 flux(
ke ,i,j) = 0.0_rp
1325 IIS, IIE, JJS, JJE )
1328 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1329 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1330 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1331 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1332 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1333 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1335 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1337 real(RP),
intent(in) :: CDZ (
ka)
1338 integer,
intent(in) :: IIS, IIE, JJS, JJE
1349 call check( __line__, mom(k,i ,j) )
1350 call check( __line__, mom(k,i,j-1) )
1352 call check( __line__, val(k,i,j) )
1353 call check( __line__, val(k,i+1,j) )
1355 call check( __line__, val(k,i-1,j) )
1356 call check( __line__, val(k,i+2,j) )
1359 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1360 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1361 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1362 * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
1363 - ( 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) ) &
1364 + gsqrt(k,i,j) * num_diff(k,i,j)
1369 k = iundef; i = iundef; j = iundef
1385 IIS, IIE, JJS, JJE )
1388 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1389 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1390 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1391 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1392 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1393 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1395 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1397 real(RP),
intent(in) :: CDZ (
ka)
1398 integer,
intent(in) :: IIS, IIE, JJS, JJE
1411 call check( __line__, mom(k,i ,j) )
1412 call check( __line__, mom(k,i,j-1) )
1414 call check( __line__, val(k,i,j-1) )
1415 call check( __line__, val(k,i,j) )
1417 call check( __line__, val(k,i,j-2) )
1418 call check( __line__, val(k,i,j+1) )
1421 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1423 flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1424 * ( ( f31 * ( val(k,i,j+1)+val(k,i,j-2) ) + f32 * ( val(k,i,j)+val(k,i,j-1) ) ) &
1425 - ( 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) ) &
1426 + gsqrt(k,i,j) * num_diff(k,i,j)
1431 k = iundef; i = iundef; j = iundef
subroutine, public atmos_dyn_fvm_fluxj13_xvz_ud3(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at XVZ
subroutine, public atmos_dyn_fvm_fluxj23_uyz_ud3(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at UYZ
subroutine, public atmos_dyn_fvm_fluxz_xyz_ud3(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XYZ
subroutine, public atmos_dyn_fvm_flux_valuew_z_ud3(valW, mflx, val, GSQRT, CDZ)
value at XYW
integer, public ke
end point of inner domain: z, local
subroutine, public check(current_line, v)
Undefined value checker.
subroutine, public atmos_dyn_fvm_fluxx_xyw_ud3(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYW
real(rp), public const_undef
integer, public ia
of x whole cells (local, with HALO)
subroutine, public atmos_dyn_fvm_fluxj23_xvz_ud3(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at XVZ
subroutine, public atmos_dyn_fvm_fluxx_xvz_ud3(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XV
integer, public ka
of z whole cells (local, with HALO)
subroutine, public atmos_dyn_fvm_fluxz_xvz_ud3(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XV
subroutine, public atmos_dyn_fvm_fluxx_xyz_ud3(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYZ
subroutine, public atmos_dyn_fvm_fluxy_xyw_ud3(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYW
integer, parameter, public const_undef2
undefined value (INT2)
subroutine, public atmos_dyn_fvm_fluxy_xyz_ud3(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYZ
subroutine, public atmos_dyn_fvm_fluxj23_xyw_ud3(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at XYW
subroutine, public atmos_dyn_fvm_fluxy_xvz_ud3(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XV
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_dyn_fvm_fluxy_uyz_ud3(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at UY
subroutine, public atmos_dyn_fvm_fluxz_uyz_ud3(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at UY
subroutine, public atmos_dyn_fvm_fluxj13_xyw_ud3(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at XYW
subroutine, public atmos_dyn_fvm_fluxx_uyz_ud3(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at UY
subroutine, public atmos_dyn_fvm_fluxj13_uyz_ud3(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at UYZ
subroutine, public atmos_dyn_fvm_fluxz_xyw_ud3(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_ud3
integer, public ja
of y whole cells (local, with HALO)