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
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) )
147 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) )
148 valw(
ke-1) = f2 * ( val(
ke)+val(
ke-1) )
164 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
165 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
166 real(RP),
intent(in) :: val (
ka,
ia,
ja)
167 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
168 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
169 real(RP),
intent(in) :: cdz (
ka)
170 integer,
intent(in) :: iis, iie, jjs, jje
183 call check( __line__, mflx(k,i,j) )
185 call check( __line__, val(k,i,j) )
186 call check( __line__, val(k+1,i,j) )
188 call check( __line__, val(k-1,i,j) )
189 call check( __line__, val(k+2,i,j) )
194 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
195 - ( 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) ) &
196 + gsqrt(k,i,j) * num_diff(k,i,j)
201 k = iundef; i = iundef; j = iundef
211 call check( __line__, mflx(
ks,i,j) )
212 call check( __line__, val(
ks ,i,j) )
213 call check( __line__, val(
ks+1,i,j) )
214 call check( __line__, mflx(
ke-1,i,j) )
215 call check( __line__, val(
ke ,i,j) )
216 call check( __line__, val(
ke-1,i,j) )
219 flux(
ks-1,i,j) = 0.0_rp
223 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
224 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
226 flux(
ke-1,i,j) = vel &
227 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
228 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
230 flux(
ke ,i,j) = 0.0_rp
234 k = iundef; i = iundef; j = iundef
250 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
251 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
252 real(RP),
intent(in) :: val (
ka,
ia,
ja)
253 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
254 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
255 real(RP),
intent(in) :: cdz(
ka)
256 integer,
intent(in) :: iis, iie, jjs, jje
269 call check( __line__, mflx(k,i,j) )
271 call check( __line__, val(k,i,j) )
272 call check( __line__, val(k,i+1,j) )
274 call check( __line__, val(k,i-1,j) )
275 call check( __line__, val(k,i+2,j) )
280 * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
281 - ( 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) ) &
282 + gsqrt(k,i,j) * num_diff(k,i,j)
287 k = iundef; i = iundef; j = iundef
303 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
304 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
305 real(RP),
intent(in) :: val (
ka,
ia,
ja)
306 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
307 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
308 real(RP),
intent(in) :: cdz(
ka)
309 integer,
intent(in) :: iis, iie, jjs, jje
322 call check( __line__, mflx(k,i,j) )
324 call check( __line__, val(k,i,j) )
325 call check( __line__, val(k,i,j+1) )
327 call check( __line__, val(k,i,j-1) )
328 call check( __line__, val(k,i,j+2) )
333 * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
334 - ( 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) ) &
335 + gsqrt(k,i,j) * num_diff(k,i,j)
340 k = iundef; i = iundef; j = iundef
359 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
360 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
361 real(RP),
intent(in) :: val (
ka,
ia,
ja)
362 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
363 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
364 real(RP),
intent(in) :: j33g
365 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
366 real(RP),
intent(in) :: cdz (
ka)
367 real(RP),
intent(in) :: fdz (
ka-1)
368 real(RP),
intent(in) :: dtrk
369 integer,
intent(in) :: iis, iie, jjs, jje
384 call check( __line__, mom(k-1,i,j) )
385 call check( __line__, mom(k ,i,j) )
387 call check( __line__, val(k-1,i,j) )
388 call check( __line__, val(k,i,j) )
390 call check( __line__, val(k-2,i,j) )
391 call check( __line__, val(k+1,i,j) )
394 vel = ( 0.5_rp * ( mom(k-1,i,j) &
397 flux(k-1,i,j) = j33g * vel &
398 * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
399 - ( 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) ) &
400 + gsqrt(k,i,j) * num_diff(k,i,j)
405 k = iundef; i = iundef; j = iundef
415 call check( __line__, val(
ks ,i,j) )
416 call check( __line__, val(
ks+1,i,j) )
423 flux(
ks-1,i,j) = 0.0_rp
425 vel = ( 0.5_rp * ( mom(
ks,i,j) &
426 + mom(
ks+1,i,j) ) ) &
428 flux(
ks,i,j) = j33g * vel &
429 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
430 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
434 flux(
ke-1,i,j) = 0.0_rp
435 flux(
ke ,i,j) = 0.0_rp
453 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
454 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
455 real(RP),
intent(in) :: val (
ka,
ia,
ja)
456 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
457 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
458 real(RP),
intent(in) :: j13g (
ka,
ia,
ja)
459 real(RP),
intent(in) :: mapf (
ia,
ja,2)
460 real(RP),
intent(in) :: cdz (
ka)
461 integer,
intent(in) :: iis, iie, jjs, jje
473 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
475 flux(k-1,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
476 * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
477 - ( 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) )
490 flux(
ks-1,i,j) = 0.0_rp
493 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
494 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
497 flux(
ks,i,j) = j13g(
ks+1,i,j) / mapf(i,j,+2) * vel &
498 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
501 flux(
ke-1,i,j) = 0.0_rp
518 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
519 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
520 real(RP),
intent(in) :: val (
ka,
ia,
ja)
521 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
522 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
523 real(RP),
intent(in) :: j23g (
ka,
ia,
ja)
524 real(RP),
intent(in) :: mapf (
ia,
ja,2)
525 real(RP),
intent(in) :: cdz (
ka)
526 integer,
intent(in) :: iis, iie, jjs, jje
538 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
540 flux(k-1,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
541 * ( ( f31 * ( val(k+1,i,j)+val(k-2,i,j) ) + f32 * ( val(k,i,j)+val(k-1,i,j) ) ) &
542 - ( 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) )
555 flux(
ks-1,i,j) = 0.0_rp
558 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
559 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
562 flux(
ks,i,j) = j23g(
ks+1,i,j) / mapf(i,j,+1) * vel &
563 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
566 flux(
ke-1,i,j) = 0.0_rp
585 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
586 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
587 real(RP),
intent(in) :: val (
ka,
ia,
ja)
588 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
589 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
590 real(RP),
intent(in) :: mapf (
ia,
ja,2)
591 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
592 real(RP),
intent(in) :: cdz (
ka)
593 integer,
intent(in) :: iis, iie, jjs, jje
607 call check( __line__, mom(k ,i,j) )
608 call check( __line__, mom(k+1,i,j) )
610 call check( __line__, val(k,i,j) )
611 call check( __line__, val(k,i+1,j) )
613 call check( __line__, val(k,i-1,j) )
614 call check( __line__, val(k,i+2,j) )
617 vel = ( f2h(k,1,i_uyz) &
622 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
624 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
625 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
626 * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
627 - ( 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) ) &
628 + gsqrt(k,i,j) * num_diff(k,i,j)
633 k = iundef; i = iundef; j = iundef
641 flux(
ke,i,j) = 0.0_rp
645 k = iundef; i = iundef; j = iundef
662 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
663 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
664 real(RP),
intent(in) :: val (
ka,
ia,
ja)
665 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
666 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
667 real(RP),
intent(in) :: mapf (
ia,
ja,2)
668 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
669 real(RP),
intent(in) :: cdz (
ka)
670 integer,
intent(in) :: iis, iie, jjs, jje
684 call check( __line__, mom(k ,i,j) )
685 call check( __line__, mom(k+1,i,j) )
687 call check( __line__, val(k,i,j) )
688 call check( __line__, val(k,i,j+1) )
690 call check( __line__, val(k,i,j-1) )
691 call check( __line__, val(k,i,j+2) )
694 vel = ( f2h(k,1,i_xvz) &
699 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
701 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
702 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
703 * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
704 - ( 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) ) &
705 + gsqrt(k,i,j) * num_diff(k,i,j)
710 k = iundef; i = iundef; j = iundef
718 flux(
ke,i,j) = 0.0_rp
722 k = iundef; i = iundef; j = iundef
740 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
741 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
742 real(RP),
intent(in) :: val (
ka,
ia,
ja)
743 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
744 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
745 real(RP),
intent(in) :: j33g
746 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
747 real(RP),
intent(in) :: cdz (
ka)
748 integer,
intent(in) :: iis, iie, jjs, jje
762 call check( __line__, mom(k,i,j) )
763 call check( __line__, mom(k,i+1,j) )
765 call check( __line__, val(k,i,j) )
766 call check( __line__, val(k+1,i,j) )
768 call check( __line__, val(k-1,i,j) )
769 call check( __line__, val(k+2,i,j) )
772 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
774 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
776 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
777 flux(k,i,j) = j33g * vel &
778 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
779 - ( 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) ) &
780 + gsqrt(k,i,j) * num_diff(k,i,j)
785 k = iundef; i = iundef; j = iundef
795 call check( __line__, mom(
ks,i ,j) )
796 call check( __line__, mom(
ks,i+1,j) )
797 call check( __line__, val(
ks+1,i,j) )
798 call check( __line__, val(
ks,i,j) )
804 flux(
ks-1,i,j) = 0.0_rp
806 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
807 / ( f2h(
ks,1,i_uyz) &
808 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
810 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
811 flux(
ks,i,j) = j33g * vel &
812 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
813 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
814 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
815 / ( f2h(
ke-1,1,i_uyz) &
816 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
817 + f2h(
ke-1,2,i_uyz) &
818 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
819 flux(
ke-1,i,j) = j33g * vel &
820 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
821 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
823 flux(
ke,i,j) = 0.0_rp
827 k = iundef; i = iundef; j = iundef
843 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
844 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
845 real(RP),
intent(in) :: val (
ka,
ia,
ja)
846 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
847 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
848 real(RP),
intent(in) :: j13g (
ka,
ia,
ja)
849 real(RP),
intent(in) :: mapf (
ia,
ja,2)
850 real(RP),
intent(in) :: cdz (
ka)
851 integer,
intent(in) :: iis, iie, jjs, jje
864 vel = ( f2h(k,1,i_uyz) &
869 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
871 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
872 flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
873 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
874 - ( 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) )
888 flux(
ks-1,i,j) = 0.0_rp
890 vel = ( f2h(
ks,1,i_uyz) &
894 / ( f2h(
ks,1,i_uyz) &
895 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
897 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
898 flux(
ks,i,j) = j13g(
ks,i,j) / mapf(i,j,+2) * vel &
899 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
901 vel = ( f2h(
ke-1,1,i_uyz) &
903 + f2h(
ke-1,2,i_uyz) &
905 / ( f2h(
ke-1,1,i_uyz) &
906 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
907 + f2h(
ke-1,2,i_uyz) &
908 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
909 flux(
ke-1,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
910 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
912 flux(
ke ,i,j) = 0.0_rp
929 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
930 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
931 real(RP),
intent(in) :: val (
ka,
ia,
ja)
932 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
933 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
934 real(RP),
intent(in) :: j23g (
ka,
ia,
ja)
935 real(RP),
intent(in) :: mapf (
ia,
ja,2)
936 real(RP),
intent(in) :: cdz (
ka)
937 integer,
intent(in) :: iis, iie, jjs, jje
950 vel = ( f2h(k,1,i_uyz) &
951 * 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) ) &
953 * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
955 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
957 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
958 flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
959 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
960 - ( 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) )
974 flux(
ks-1,i,j) = 0.0_rp
976 vel = ( f2h(
ks,1,i_uyz) &
977 * 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) ) &
979 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
980 / ( f2h(
ks,1,i_uyz) &
981 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
983 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
984 flux(
ks,i,j) = j23g(
ks,i,j) / mapf(i,j,+1) * vel &
985 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
987 vel = ( f2h(
ke-1,1,i_uyz) &
988 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
989 + f2h(
ke-1,2,i_uyz) &
990 * 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) ) ) &
991 / ( f2h(
ke-1,1,i_uyz) &
992 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
993 + f2h(
ke-1,2,i_uyz) &
994 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
995 flux(
ke-1,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
996 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
998 flux(
ke ,i,j) = 0.0_rp
1013 IIS, IIE, JJS, JJE )
1016 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1017 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1018 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1019 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1020 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1021 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1022 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1023 real(RP),
intent(in) :: cdz (
ka)
1024 integer,
intent(in) :: iis, iie, jjs, jje
1039 call check( __line__, mom(k,i ,j) )
1040 call check( __line__, mom(k,i-1,j) )
1042 call check( __line__, val(k,i-1,j) )
1043 call check( __line__, val(k,i,j) )
1045 call check( __line__, val(k,i-2,j) )
1046 call check( __line__, val(k,i+1,j) )
1049 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
1051 flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1052 * ( ( f31 * ( val(k,i+1,j)+val(k,i-2,j) ) + f32 * ( val(k,i,j)+val(k,i-1,j) ) ) &
1053 - ( 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) ) &
1054 + gsqrt(k,i,j) * num_diff(k,i,j)
1059 k = iundef; i = iundef; j = iundef
1073 IIS, IIE, JJS, JJE )
1076 real(RP),
intent(inout) :: 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) :: mapf (
ia,
ja,2)
1082 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1083 real(RP),
intent(in) :: cdz (
ka)
1084 integer,
intent(in) :: iis, iie, jjs, jje
1097 call check( __line__, mom(k,i ,j) )
1098 call check( __line__, mom(k,i-1,j) )
1100 call check( __line__, val(k,i,j) )
1101 call check( __line__, val(k,i,j+1) )
1103 call check( __line__, val(k,i,j-1) )
1104 call check( __line__, val(k,i,j+2) )
1107 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
1108 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1109 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1110 * ( ( f31 * ( val(k,i,j+2)+val(k,i,j-1) ) + f32 * ( val(k,i,j+1)+val(k,i,j) ) ) &
1111 - ( 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) ) &
1112 + gsqrt(k,i,j) * num_diff(k,i,j)
1117 k = iundef; i = iundef; j = iundef
1133 IIS, IIE, JJS, JJE )
1136 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1137 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1138 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1139 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1140 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1141 real(RP),
intent(in) :: j33g
1142 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1143 real(RP),
intent(in) :: cdz (
ka)
1144 integer,
intent(in) :: iis, iie, jjs, jje
1158 call check( __line__, mom(k,i,j) )
1159 call check( __line__, mom(k,i,j+1) )
1161 call check( __line__, val(k,i,j) )
1162 call check( __line__, val(k+1,i,j) )
1164 call check( __line__, val(k-1,i,j) )
1165 call check( __line__, val(k+2,i,j) )
1168 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1169 / ( f2h(k,1,i_xvz) &
1170 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1172 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1173 flux(k,i,j) = j33g * vel &
1174 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1175 - ( 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) ) &
1176 + gsqrt(k,i,j) * num_diff(k,i,j)
1181 k = iundef; i = iundef; j = iundef
1191 call check( __line__, mom(
ks,i ,j) )
1192 call check( __line__, mom(
ks,i,j+1) )
1193 call check( __line__, val(
ks+1,i,j) )
1194 call check( __line__, val(
ks,i,j) )
1200 flux(
ks-1,i,j) = 0.0_rp
1202 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1203 / ( f2h(
ks,1,i_xvz) &
1204 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1206 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1207 flux(
ks,i,j) = j33g * vel &
1208 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1209 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1210 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1211 / ( f2h(
ke-1,1,i_xvz) &
1212 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1213 + f2h(
ke-1,2,i_xvz) &
1214 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1215 flux(
ke-1,i,j) = j33g * vel &
1216 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1217 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1219 flux(
ke,i,j) = 0.0_rp
1223 k = iundef; i = iundef; j = iundef
1234 GSQRT, J13G, MAPF, &
1236 IIS, IIE, JJS, JJE )
1239 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1240 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1241 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1242 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1243 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1244 real(RP),
intent(in) :: j13g (
ka,
ia,
ja)
1245 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1246 real(RP),
intent(in) :: cdz (
ka)
1247 integer,
intent(in) :: iis, iie, jjs, jje
1260 vel = ( f2h(k,1,i_xvz) &
1261 * 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) ) &
1263 * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1264 / ( f2h(k,1,i_xvz) &
1265 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1267 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1268 flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
1269 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1270 - ( 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) )
1284 flux(
ks-1,i,j) = 0.0_rp
1286 vel = ( f2h(
ks,1,i_xvz) &
1287 * 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) ) &
1289 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
1290 / ( f2h(
ks,1,i_xvz) &
1291 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1293 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1294 flux(
ks,i,j) = j13g(
ks,i,j) / mapf(i,j,+2) * vel &
1295 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1297 vel = ( f2h(
ke-1,1,i_xvz) &
1298 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
1299 + f2h(
ke-1,2,i_xvz) &
1300 * 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) ) ) &
1301 / ( f2h(
ke-1,1,i_xvz) &
1302 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1303 + f2h(
ke-1,2,i_xvz) &
1304 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1305 flux(
ke-1,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
1306 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1308 flux(
ke ,i,j) = 0.0_rp
1320 GSQRT, J23G, MAPF, &
1322 IIS, IIE, JJS, JJE )
1325 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1326 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1327 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1328 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1329 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1330 real(RP),
intent(in) :: j23g (
ka,
ia,
ja)
1331 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1332 real(RP),
intent(in) :: cdz (
ka)
1333 integer,
intent(in) :: iis, iie, jjs, jje
1346 vel = ( f2h(k,1,i_xvz) &
1350 / ( f2h(k,1,i_xvz) &
1351 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1353 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1354 flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
1355 * ( ( f31 * ( val(k+2,i,j)+val(k-1,i,j) ) + f32 * ( val(k+1,i,j)+val(k,i,j) ) ) &
1356 - ( 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) )
1370 flux(
ks-1,i,j) = 0.0_rp
1372 vel = ( f2h(
ks,1,i_xvz) &
1376 / ( f2h(
ks,1,i_xvz) &
1377 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1379 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1380 flux(
ks,i,j) = j23g(
ks,i,j) / mapf(i,j,+1) * vel &
1381 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1383 vel = ( f2h(
ke-1,1,i_xvz) &
1385 + f2h(
ke-1,2,i_xvz) &
1387 / ( f2h(
ke-1,1,i_xvz) &
1388 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1389 + f2h(
ke-1,2,i_xvz) &
1390 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1391 flux(
ke-1,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
1392 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1394 flux(
ke ,i,j) = 0.0_rp
1409 IIS, IIE, JJS, JJE )
1412 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1413 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1414 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1415 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1416 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1417 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1418 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1419 real(RP),
intent(in) :: cdz (
ka)
1420 integer,
intent(in) :: iis, iie, jjs, jje
1433 call check( __line__, mom(k,i ,j) )
1434 call check( __line__, mom(k,i,j-1) )
1436 call check( __line__, val(k,i,j) )
1437 call check( __line__, val(k,i+1,j) )
1439 call check( __line__, val(k,i-1,j) )
1440 call check( __line__, val(k,i+2,j) )
1443 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1444 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1445 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1446 * ( ( f31 * ( val(k,i+2,j)+val(k,i-1,j) ) + f32 * ( val(k,i+1,j)+val(k,i,j) ) ) &
1447 - ( 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) ) &
1448 + gsqrt(k,i,j) * num_diff(k,i,j)
1453 k = iundef; i = iundef; j = iundef
1467 IIS, IIE, JJS, JJE )
1470 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1471 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1472 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1473 real(RP),
intent(in) :: dens (
ka,
ia,
ja)
1474 real(RP),
intent(in) :: gsqrt (
ka,
ia,
ja)
1475 real(RP),
intent(in) :: mapf (
ia,
ja,2)
1476 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1477 real(RP),
intent(in) :: cdz (
ka)
1478 integer,
intent(in) :: iis, iie, jjs, jje
1493 call check( __line__, mom(k,i ,j) )
1494 call check( __line__, mom(k,i,j-1) )
1496 call check( __line__, val(k,i,j-1) )
1497 call check( __line__, val(k,i,j) )
1499 call check( __line__, val(k,i,j-2) )
1500 call check( __line__, val(k,i,j+1) )
1503 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1505 flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1506 * ( ( f31 * ( val(k,i,j+1)+val(k,i,j-2) ) + f32 * ( val(k,i,j)+val(k,i,j-1) ) ) &
1507 - ( 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) ) &
1508 + gsqrt(k,i,j) * num_diff(k,i,j)
1513 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 whole cells: x, 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 whole cells: z, 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 whole cells: y, local, with HALO