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 :: f41 = 7.0_rp/12.0_rp
88 real(RP),
parameter :: f42 = -1.0_rp/12.0_rp
103 real(RP),
intent(out) :: valW (
ka)
104 real(RP),
intent(in) :: mflx (
ka)
105 real(RP),
intent(in) :: val (
ka)
106 real(RP),
intent(in) :: GSQRT(
ka)
107 real(RP),
intent(in) :: CDZ (
ka)
114 call check( __line__, mflx(k) )
116 call check( __line__, val(k) )
117 call check( __line__, val(k+1) )
119 call check( __line__, val(k-1) )
120 call check( __line__, val(k+2) )
123 valw(k) = f41 * ( val(k+1)+val(k) ) &
124 + f42 * ( val(k+2)+val(k-1) )
132 call check( __line__, mflx(
ks) )
133 call check( __line__, val(
ks ) )
134 call check( __line__, val(
ks+1) )
135 call check( __line__, mflx(
ke-1) )
136 call check( __line__, val(
ke ) )
137 call check( __line__, val(
ke-1) )
141 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) )
142 valw(
ke-1) = f2 * ( val(
ke)+val(
ke-1) )
160 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
161 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
162 real(RP),
intent(in) :: val (
ka,
ia,
ja)
163 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
164 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
165 real(RP),
intent(in) :: CDZ (
ka)
166 integer,
intent(in) :: IIS, IIE, JJS, JJE
179 call check( __line__, mflx(k,i,j) )
181 call check( __line__, val(k,i,j) )
182 call check( __line__, val(k+1,i,j) )
184 call check( __line__, val(k-1,i,j) )
185 call check( __line__, val(k+2,i,j) )
190 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
191 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) ) &
192 + gsqrt(k,i,j) * num_diff(k,i,j)
197 k = iundef; i = iundef; j = iundef
207 call check( __line__, mflx(
ks,i,j) )
208 call check( __line__, val(
ks ,i,j) )
209 call check( __line__, val(
ks+1,i,j) )
210 call check( __line__, mflx(
ke-1,i,j) )
211 call check( __line__, val(
ke ,i,j) )
212 call check( __line__, val(
ke-1,i,j) )
215 flux(
ks-1,i,j) = 0.0_rp
219 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
220 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
222 flux(
ke-1,i,j) = vel &
223 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
224 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
226 flux(
ke ,i,j) = 0.0_rp
230 k = iundef; i = iundef; j = iundef
246 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
247 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
248 real(RP),
intent(in) :: val (
ka,
ia,
ja)
249 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
250 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
251 real(RP),
intent(in) :: CDZ(
ka)
252 integer,
intent(in) :: IIS, IIE, JJS, JJE
265 call check( __line__, mflx(k,i,j) )
267 call check( __line__, val(k,i,j) )
268 call check( __line__, val(k,i+1,j) )
270 call check( __line__, val(k,i-1,j) )
271 call check( __line__, val(k,i+2,j) )
276 * ( f41 * ( val(k,i+1,j)+val(k,i,j) ) &
277 + f42 * ( val(k,i+2,j)+val(k,i-1,j) ) ) &
278 + gsqrt(k,i,j) * num_diff(k,i,j)
283 k = iundef; i = iundef; j = iundef
299 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
300 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
301 real(RP),
intent(in) :: val (
ka,
ia,
ja)
302 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
303 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
304 real(RP),
intent(in) :: CDZ(
ka)
305 integer,
intent(in) :: IIS, IIE, JJS, JJE
318 call check( __line__, mflx(k,i,j) )
320 call check( __line__, val(k,i,j) )
321 call check( __line__, val(k,i,j+1) )
323 call check( __line__, val(k,i,j-1) )
324 call check( __line__, val(k,i,j+2) )
329 * ( f41 * ( val(k,i,j+1)+val(k,i,j) ) &
330 + f42 * ( val(k,i,j+2)+val(k,i,j-1) ) ) &
331 + gsqrt(k,i,j) * num_diff(k,i,j)
336 k = iundef; i = iundef; j = iundef
355 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
356 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
357 real(RP),
intent(in) :: val (
ka,
ia,
ja)
358 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
359 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
360 real(RP),
intent(in) :: J33G
361 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
362 real(RP),
intent(in) :: CDZ (
ka)
363 real(RP),
intent(in) :: FDZ (
ka-1)
364 real(RP),
intent(in) :: dtrk
365 integer,
intent(in) :: IIS, IIE, JJS, JJE
380 call check( __line__, mom(k-1,i,j) )
381 call check( __line__, mom(k ,i,j) )
383 call check( __line__, val(k-1,i,j) )
384 call check( __line__, val(k,i,j) )
386 call check( __line__, val(k-2,i,j) )
387 call check( __line__, val(k+1,i,j) )
390 vel = ( 0.5_rp * ( mom(k-1,i,j) &
393 flux(k-1,i,j) = j33g * vel &
394 * ( f41 * ( val(k,i,j)+val(k-1,i,j) ) &
395 + f42 * ( val(k+1,i,j)+val(k-2,i,j) ) ) &
396 + gsqrt(k,i,j) * num_diff(k,i,j)
401 k = iundef; i = iundef; j = iundef
411 call check( __line__, val(
ks ,i,j) )
412 call check( __line__, val(
ks+1,i,j) )
419 flux(
ks-1,i,j) = 0.0_rp
421 vel = ( 0.5_rp * ( mom(
ks,i,j) &
422 + mom(
ks+1,i,j) ) ) &
424 flux(
ks,i,j) = j33g * vel &
425 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
426 + gsqrt(
ks+1,i,j) * num_diff(
ks+1,i,j)
430 flux(
ke-1,i,j) = 0.0_rp
431 flux(
ke ,i,j) = 0.0_rp
449 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
450 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
451 real(RP),
intent(in) :: val (
ka,
ia,
ja)
452 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
453 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
454 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
455 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
456 real(RP),
intent(in) :: CDZ (
ka)
457 integer,
intent(in) :: IIS, IIE, JJS, JJE
469 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
471 vel = vel * j13g(k,i,j)
472 flux(k-1,i,j) = vel / mapf(i,j,+2) &
473 * ( f41 * ( val(k,i,j)+val(k-1,i,j) ) &
474 + f42 * ( val(k+1,i,j)+val(k-2,i,j) ) )
487 flux(
ks-1,i,j) = 0.0_rp
490 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i-1,j) ) ) / dens(
ks+1,i,j) &
491 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j) ) ) / dens(
ks ,i,j) ) * 0.5_rp
494 vel = vel * j13g(
ks+1,i,j)
495 flux(
ks,i,j) = vel / mapf(i,j,+2) &
496 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
499 flux(
ke-1,i,j) = 0.0_rp
516 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
517 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
518 real(RP),
intent(in) :: val (
ka,
ia,
ja)
519 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
520 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
521 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
522 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
523 real(RP),
intent(in) :: CDZ (
ka)
524 integer,
intent(in) :: IIS, IIE, JJS, JJE
536 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
538 vel = vel * j23g(k,i,j)
539 flux(k-1,i,j) = vel / mapf(i,j,+1) &
540 * ( f41 * ( val(k,i,j)+val(k-1,i,j) ) &
541 + f42 * ( val(k+1,i,j)+val(k-2,i,j) ) )
554 flux(
ks-1,i,j) = 0.0_rp
557 vel = ( ( 0.5_rp * ( mom(
ks+1,i,j)+mom(
ks+1,i,j-1) ) ) / dens(
ks+1,i,j) &
558 + ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j-1) ) ) / dens(
ks ,i,j) ) * 0.5_rp
561 vel = vel * j23g(
ks+1,i,j)
562 flux(
ks,i,j) = vel / mapf(i,j,+1) &
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 * ( f41 * ( val(k,i+1,j)+val(k,i,j) ) &
627 + f42 * ( val(k,i+2,j)+val(k,i-1,j) ) ) &
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 * ( f41 * ( val(k,i,j+1)+val(k,i,j) ) &
704 + f42 * ( val(k,i,j+2)+val(k,i,j-1) ) ) &
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 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
779 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) ) &
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) ) ) &
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) ) ) &
816 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
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 vel = vel * j13g(k,i,j)
873 flux(k,i,j) = vel / mapf(i,j,+2) &
874 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
875 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) )
889 flux(
ks-1,i,j) = 0.0_rp
896 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
898 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
899 vel = vel * j13g(
ks,i,j)
900 flux(
ks,i,j) = vel / mapf(i,j,+2) &
901 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
908 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
910 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
911 vel = vel * j13g(
ke-1,i,j)
912 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
913 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
915 flux(
ke ,i,j) = 0.0_rp
932 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
933 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
934 real(RP),
intent(in) :: val (
ka,
ia,
ja)
935 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
936 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
937 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
938 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
939 real(RP),
intent(in) :: CDZ (
ka)
940 integer,
intent(in) :: IIS, IIE, JJS, JJE
953 vel = ( f2h(k,1,
i_uyz) &
954 * 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) ) &
956 * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
958 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
960 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
961 vel = vel * j23g(k,i,j)
962 flux(k,i,j) = vel / mapf(i,j,+1) &
963 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
964 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) )
978 flux(
ks-1,i,j) = 0.0_rp
981 * 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) ) &
983 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
985 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
987 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
988 vel = vel * j23g(
ks,i,j)
989 flux(
ks,i,j) = vel / mapf(i,j,+1) &
990 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
993 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
995 * 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) ) ) &
997 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
999 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
1000 vel = vel * j23g(
ke-1,i,j)
1001 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1002 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1004 flux(
ke ,i,j) = 0.0_rp
1019 IIS, IIE, JJS, JJE )
1022 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1023 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1024 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1025 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1026 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1027 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1028 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1029 real(RP),
intent(in) :: CDZ (
ka)
1030 integer,
intent(in) :: IIS, IIE, JJS, JJE
1045 call check( __line__, mom(k,i ,j) )
1046 call check( __line__, mom(k,i-1,j) )
1048 call check( __line__, val(k,i-1,j) )
1049 call check( __line__, val(k,i,j) )
1051 call check( __line__, val(k,i-2,j) )
1052 call check( __line__, val(k,i+1,j) )
1055 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
1057 flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1058 * ( f41 * ( val(k,i,j)+val(k,i-1,j) ) &
1059 + f42 * ( val(k,i+1,j)+val(k,i-2,j) ) ) &
1060 + gsqrt(k,i,j) * num_diff(k,i,j)
1065 k = iundef; i = iundef; j = iundef
1079 IIS, IIE, JJS, JJE )
1082 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1083 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1084 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1085 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1086 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1087 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1088 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1089 real(RP),
intent(in) :: CDZ (
ka)
1090 integer,
intent(in) :: IIS, IIE, JJS, JJE
1103 call check( __line__, mom(k,i ,j) )
1104 call check( __line__, mom(k,i-1,j) )
1106 call check( __line__, val(k,i,j) )
1107 call check( __line__, val(k,i,j+1) )
1109 call check( __line__, val(k,i,j-1) )
1110 call check( __line__, val(k,i,j+2) )
1113 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
1114 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1115 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1116 * ( f41 * ( val(k,i,j+1)+val(k,i,j) ) &
1117 + f42 * ( val(k,i,j+2)+val(k,i,j-1) ) ) &
1118 + gsqrt(k,i,j) * num_diff(k,i,j)
1123 k = iundef; i = iundef; j = iundef
1139 IIS, IIE, JJS, JJE )
1142 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1143 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1144 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1145 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1146 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1147 real(RP),
intent(in) :: J33G
1148 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1149 real(RP),
intent(in) :: CDZ (
ka)
1150 integer,
intent(in) :: IIS, IIE, JJS, JJE
1164 call check( __line__, mom(k,i,j) )
1165 call check( __line__, mom(k,i,j+1) )
1167 call check( __line__, val(k,i,j) )
1168 call check( __line__, val(k+1,i,j) )
1170 call check( __line__, val(k-1,i,j) )
1171 call check( __line__, val(k+2,i,j) )
1174 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1175 / ( f2h(k,1,
i_xvz) &
1176 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1178 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1179 flux(k,i,j) = j33g * vel &
1180 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
1181 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) ) &
1182 + gsqrt(k,i,j) * num_diff(k,i,j)
1187 k = iundef; i = iundef; j = iundef
1197 call check( __line__, mom(
ks,i ,j) )
1198 call check( __line__, mom(
ks,i,j+1) )
1199 call check( __line__, val(
ks+1,i,j) )
1200 call check( __line__, val(
ks,i,j) )
1206 flux(
ks-1,i,j) = 0.0_rp
1208 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1210 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1212 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1213 flux(
ks,i,j) = j33g * vel &
1214 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1215 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1216 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1218 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1220 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1221 flux(
ke-1,i,j) = j33g * vel &
1222 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1223 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1225 flux(
ke,i,j) = 0.0_rp
1229 k = iundef; i = iundef; j = iundef
1240 GSQRT, J13G, MAPF, &
1242 IIS, IIE, JJS, JJE )
1245 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1246 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1247 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1248 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1249 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1250 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
1251 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1252 real(RP),
intent(in) :: CDZ (
ka)
1253 integer,
intent(in) :: IIS, IIE, JJS, JJE
1266 vel = ( f2h(k,1,
i_xvz) &
1267 * 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) ) &
1269 * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1270 / ( f2h(k,1,
i_xvz) &
1271 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1273 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1274 vel = vel * j13g(k,i,j)
1275 flux(k,i,j) = vel / mapf(i,j,+2) &
1276 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
1277 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) )
1291 flux(
ks-1,i,j) = 0.0_rp
1294 * 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) ) &
1296 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
1298 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1300 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1301 vel = vel * j13g(
ks,i,j)
1302 flux(
ks,i,j) = vel / mapf(i,j,+2) &
1303 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1306 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
1308 * 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) ) ) &
1310 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1312 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1313 vel = vel * j13g(
ke-1,i,j)
1314 flux(
ke-1,i,j) = vel / mapf(i,j,+2) &
1315 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1317 flux(
ke ,i,j) = 0.0_rp
1329 GSQRT, J23G, MAPF, &
1331 IIS, IIE, JJS, JJE )
1334 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1335 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1336 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1337 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1338 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1339 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
1340 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1341 real(RP),
intent(in) :: CDZ (
ka)
1342 integer,
intent(in) :: IIS, IIE, JJS, JJE
1355 vel = ( f2h(k,1,
i_xvz) &
1359 / ( f2h(k,1,
i_xvz) &
1360 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1362 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1363 vel = vel * j23g(k,i,j)
1364 flux(k,i,j) = vel / mapf(i,j,+1) &
1365 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
1366 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) )
1380 flux(
ks-1,i,j) = 0.0_rp
1387 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1389 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1390 vel = vel * j23g(
ks,i,j)
1391 flux(
ks,i,j) = vel / mapf(i,j,+1) &
1392 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1399 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1401 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1402 vel = vel * j23g(
ke-1,i,j)
1403 flux(
ke-1,i,j) = vel / mapf(i,j,+1) &
1404 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1406 flux(
ke ,i,j) = 0.0_rp
1421 IIS, IIE, JJS, JJE )
1424 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1425 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1426 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1427 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1428 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1429 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1430 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1431 real(RP),
intent(in) :: CDZ (
ka)
1432 integer,
intent(in) :: IIS, IIE, JJS, JJE
1445 call check( __line__, mom(k,i ,j) )
1446 call check( __line__, mom(k,i,j-1) )
1448 call check( __line__, val(k,i,j) )
1449 call check( __line__, val(k,i+1,j) )
1451 call check( __line__, val(k,i-1,j) )
1452 call check( __line__, val(k,i+2,j) )
1455 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1456 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1457 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1458 * ( f41 * ( val(k,i+1,j)+val(k,i,j) ) &
1459 + f42 * ( val(k,i+2,j)+val(k,i-1,j) ) ) &
1460 + gsqrt(k,i,j) * num_diff(k,i,j)
1465 k = iundef; i = iundef; j = iundef
1479 IIS, IIE, JJS, JJE )
1482 real(RP),
intent(inout) :: flux (
ka,
ia,
ja)
1483 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1484 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1485 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1486 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1487 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1488 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1489 real(RP),
intent(in) :: CDZ (
ka)
1490 integer,
intent(in) :: IIS, IIE, JJS, JJE
1505 call check( __line__, mom(k,i ,j) )
1506 call check( __line__, mom(k,i,j-1) )
1508 call check( __line__, val(k,i,j-1) )
1509 call check( __line__, val(k,i,j) )
1511 call check( __line__, val(k,i,j-2) )
1512 call check( __line__, val(k,i,j+1) )
1515 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1517 flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1518 * ( f41 * ( val(k,i,j)+val(k,i,j-1) ) &
1519 + f42 * ( val(k,i,j+1)+val(k,i,j-2) ) ) &
1520 + gsqrt(k,i,j) * num_diff(k,i,j)
1525 k = iundef; i = iundef; j = iundef
subroutine, public atmos_dyn_fvm_fluxy_xyw_cd4(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYW
subroutine, public atmos_dyn_fvm_fluxj13_xyw_cd4(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at XYW
module scale_atmos_dyn_fvm_flux_cd4
integer, public ia
of whole cells: x, local, with HALO
integer, public ja
of whole cells: y, local, with HALO
subroutine, public check(current_line, v)
Undefined value checker.
subroutine, public atmos_dyn_fvm_fluxy_uyz_cd4(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at UY
subroutine, public atmos_dyn_fvm_fluxz_xyw_cd4(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_xvz_cd4(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XV
real(rp), public const_undef
subroutine, public atmos_dyn_fvm_fluxj23_uyz_cd4(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at UYZ
subroutine, public atmos_dyn_fvm_fluxj23_xvz_cd4(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at XVZ
subroutine, public atmos_dyn_fvm_fluxz_xyz_cd4(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XYZ
subroutine, public atmos_dyn_fvm_fluxj23_xyw_cd4(flux, mom, val, DENS, GSQRT, J23G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J23-flux at XYW
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
subroutine, public atmos_dyn_fvm_fluxx_uyz_cd4(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at UY
integer, parameter, public const_undef2
undefined value (INT2)
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_dyn_fvm_fluxz_uyz_cd4(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at UY
subroutine, public atmos_dyn_fvm_fluxx_xyz_cd4(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYZ
subroutine, public atmos_dyn_fvm_fluxj13_xvz_cd4(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at XVZ
subroutine, public atmos_dyn_fvm_fluxj13_uyz_cd4(flux, mom, val, DENS, GSQRT, J13G, MAPF, CDZ, IIS, IIE, JJS, JJE)
calculation J13-flux at UYZ
subroutine, public atmos_dyn_fvm_fluxx_xyw_cd4(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation X-flux at XYW
real(rp), public const_eps
small number
integer, public ka
of whole cells: z, local, with HALO
subroutine, public atmos_dyn_fvm_fluxy_xvz_cd4(flux, mom, val, DENS, GSQRT, MAPF, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XV
subroutine, public atmos_dyn_fvm_fluxy_xyz_cd4(flux, mflx, val, GSQRT, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation Y-flux at XYZ
subroutine, public atmos_dyn_fvm_fluxz_xvz_cd4(flux, mom, val, DENS, GSQRT, J33G, num_diff, CDZ, IIS, IIE, JJS, JJE)
calculation z-flux at XV
subroutine, public atmos_dyn_fvm_flux_valuew_z_cd4(valW, mflx, val, GSQRT, CDZ)
value at XYW