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 :: f41 = 7.0_rp/12.0_rp
91 real(RP),
parameter :: f42 = -1.0_rp/12.0_rp
106 real(RP),
intent(out) :: valW (
ka)
107 real(RP),
intent(in) :: mflx (
ka)
108 real(RP),
intent(in) :: val (
ka)
109 real(RP),
intent(in) :: GSQRT(
ka)
110 real(RP),
intent(in) :: CDZ (
ka)
117 call check( __line__, mflx(k) )
119 call check( __line__, val(k) )
120 call check( __line__, val(k+1) )
122 call check( __line__, val(k-1) )
123 call check( __line__, val(k+2) )
126 valw(k) = f41 * ( val(k+1)+val(k) ) &
127 + f42 * ( val(k+2)+val(k-1) )
135 call check( __line__, mflx(
ks) )
136 call check( __line__, val(
ks ) )
137 call check( __line__, val(
ks+1) )
138 call check( __line__, mflx(
ke-1) )
139 call check( __line__, val(
ke ) )
140 call check( __line__, val(
ke-1) )
144 valw(
ks) = f2 * ( val(
ks+1)+val(
ks) )
145 valw(
ke-1) = f2 * ( val(
ke)+val(
ke-1) )
162 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
163 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
164 real(RP),
intent(in) :: val (
ka,
ia,
ja)
165 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
167 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
169 real(RP),
intent(in) :: CDZ (
ka)
170 integer,
intent(in) :: IIS, IIE, JJS, JJE
181 call check( __line__, mflx(k,i,j) )
183 call check( __line__, val(k,i,j) )
184 call check( __line__, val(k+1,i,j) )
186 call check( __line__, val(k-1,i,j) )
187 call check( __line__, val(k+2,i,j) )
192 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
193 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) ) &
194 + gsqrt(k,i,j) * num_diff(k,i,j)
199 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
248 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
249 real(RP),
intent(in) :: mflx (
ka,
ia,
ja)
250 real(RP),
intent(in) :: val (
ka,
ia,
ja)
251 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
253 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
255 real(RP),
intent(in) :: CDZ(
ka)
256 integer,
intent(in) :: IIS, IIE, JJS, JJE
267 call check( __line__, mflx(k,i,j) )
269 call check( __line__, val(k,i,j) )
270 call check( __line__, val(k,i+1,j) )
272 call check( __line__, val(k,i-1,j) )
273 call check( __line__, val(k,i+2,j) )
278 * ( f41 * ( val(k,i+1,j)+val(k,i,j) ) &
279 + f42 * ( val(k,i+2,j)+val(k,i-1,j) ) ) &
280 + gsqrt(k,i,j) * num_diff(k,i,j)
285 k = iundef; i = iundef; j = iundef
303 real(RP),
intent(out) :: 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)
308 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
310 real(RP),
intent(in) :: CDZ(
ka)
311 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 * ( f41 * ( val(k,i,j+1)+val(k,i,j) ) &
334 + f42 * ( val(k,i,j+2)+val(k,i,j-1) ) ) &
335 + gsqrt(k,i,j) * num_diff(k,i,j)
340 k = iundef; i = iundef; j = iundef
361 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
362 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
363 real(RP),
intent(in) :: val (
ka,
ia,
ja)
364 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
365 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
366 real(RP),
intent(in) :: J33G
368 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
370 real(RP),
intent(in) :: CDZ (
ka)
371 real(RP),
intent(in) :: FDZ (
ka-1)
372 real(RP),
intent(in) :: dtrk
373 integer,
intent(in) :: IIS, IIE, JJS, JJE
387 call check( __line__, mom(k-1,i,j) )
388 call check( __line__, mom(k ,i,j) )
390 call check( __line__, val(k-1,i,j) )
391 call check( __line__, val(k,i,j) )
393 call check( __line__, val(k-2,i,j) )
394 call check( __line__, val(k+1,i,j) )
397 vel = ( 0.5_rp * ( mom(k-1,i,j) &
400 flux(k-1,i,j) = j33g * vel &
401 * ( f41 * ( val(k,i,j)+val(k-1,i,j) ) &
402 + f42 * ( val(k+1,i,j)+val(k-2,i,j) ) ) &
403 + gsqrt(k,i,j) * num_diff(k,i,j)
408 k = iundef; i = iundef; j = iundef
417 flux(
ks-1,i,j) = 0.0_rp
421 sw = sign( 1.0_rp, mom(
ks,i,j) )
422 flux(
ks ,i,j) = sw * min( sw*flux(
ks,i,j), sw*val(
ks,i,j)*gsqrt(
ks,i,j)*fdz(
ks)/dtrk )
425 flux(
ke-1,i,j) = 0.0_rp
426 flux(
ke ,i,j) = 0.0_rp
444 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
445 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
446 real(RP),
intent(in) :: val (
ka,
ia,
ja)
447 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
448 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
449 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
450 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
451 real(RP),
intent(in) :: CDZ (
ka)
452 integer,
intent(in) :: IIS, IIE, JJS, JJE
462 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
464 flux(k-1,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
465 * ( f41 * ( val(k,i,j)+val(k-1,i,j) ) &
466 + f42 * ( val(k+1,i,j)+val(k-2,i,j) ) )
474 flux(
ks-1,i,j) = 0.0_rp
476 flux(
ke-1,i,j) = 0.0_rp
493 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
494 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
495 real(RP),
intent(in) :: val (
ka,
ia,
ja)
496 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
497 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
498 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
499 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
500 real(RP),
intent(in) :: CDZ (
ka)
501 integer,
intent(in) :: IIS, IIE, JJS, JJE
511 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
513 flux(k-1,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
514 * ( f41 * ( val(k,i,j)+val(k-1,i,j) ) &
515 + f42 * ( val(k+1,i,j)+val(k-2,i,j) ) )
523 flux(
ks-1,i,j) = 0.0_rp
525 flux(
ke-1,i,j) = 0.0_rp
546 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
547 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
548 real(RP),
intent(in) :: val (
ka,
ia,
ja)
549 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
550 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
551 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
553 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
555 real(RP),
intent(in) :: CDZ (
ka)
556 integer,
intent(in) :: IIS, IIE, JJS, JJE
567 call check( __line__, mom(k ,i,j) )
568 call check( __line__, mom(k+1,i,j) )
570 call check( __line__, val(k,i,j) )
571 call check( __line__, val(k,i+1,j) )
573 call check( __line__, val(k,i-1,j) )
574 call check( __line__, val(k,i+2,j) )
577 vel = ( f2h(k,1,i_uyz) &
582 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
584 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
585 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
586 * ( f41 * ( val(k,i+1,j)+val(k,i,j) ) &
587 + f42 * ( val(k,i+2,j)+val(k,i-1,j) ) ) &
588 + gsqrt(k,i,j) * num_diff(k,i,j)
593 k = iundef; i = iundef; j = iundef
599 flux(
ke,i,j) = 0.0_rp
603 k = iundef; i = iundef; j = iundef
622 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
623 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
624 real(RP),
intent(in) :: val (
ka,
ia,
ja)
625 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
626 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
627 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
629 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
631 real(RP),
intent(in) :: CDZ (
ka)
632 integer,
intent(in) :: IIS, IIE, JJS, JJE
643 call check( __line__, mom(k ,i,j) )
644 call check( __line__, mom(k+1,i,j) )
646 call check( __line__, val(k,i,j) )
647 call check( __line__, val(k,i,j+1) )
649 call check( __line__, val(k,i,j-1) )
650 call check( __line__, val(k,i,j+2) )
653 vel = ( f2h(k,1,i_xvz) &
658 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
660 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
661 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
662 * ( f41 * ( val(k,i,j+1)+val(k,i,j) ) &
663 + f42 * ( val(k,i,j+2)+val(k,i,j-1) ) ) &
664 + gsqrt(k,i,j) * num_diff(k,i,j)
669 k = iundef; i = iundef; j = iundef
675 flux(
ke,i,j) = 0.0_rp
679 k = iundef; i = iundef; j = iundef
699 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
700 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
701 real(RP),
intent(in) :: val (
ka,
ia,
ja)
702 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
703 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
704 real(RP),
intent(in) :: J33G
706 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
708 real(RP),
intent(in) :: CDZ (
ka)
709 integer,
intent(in) :: IIS, IIE, JJS, JJE
720 call check( __line__, mom(k,i,j) )
721 call check( __line__, mom(k,i+1,j) )
723 call check( __line__, val(k,i,j) )
724 call check( __line__, val(k+1,i,j) )
726 call check( __line__, val(k-1,i,j) )
727 call check( __line__, val(k+2,i,j) )
730 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
732 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
734 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
735 flux(k,i,j) = j33g * vel &
736 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
737 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) ) &
738 + gsqrt(k,i,j) * num_diff(k,i,j)
743 k = iundef; i = iundef; j = iundef
751 call check( __line__, mom(
ks,i ,j) )
752 call check( __line__, mom(
ks,i+1,j) )
753 call check( __line__, val(
ks+1,i,j) )
754 call check( __line__, val(
ks,i,j) )
757 flux(
ks-1,i,j) = 0.0_rp
759 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j) ) ) &
760 / ( f2h(
ks,1,i_xyz) &
761 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
763 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
764 flux(
ks,i,j) = j33g * vel &
765 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
766 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
767 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i+1,j) ) ) &
768 / ( f2h(
ke-1,1,i_xyz) &
769 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
770 + f2h(
ke-1,2,i_xyz) &
771 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
772 flux(
ke-1,i,j) = j33g * vel &
773 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
774 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
776 flux(
ke,i,j) = 0.0_rp
780 k = iundef; i = iundef; j = iundef
796 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
797 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
798 real(RP),
intent(in) :: val (
ka,
ia,
ja)
799 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
800 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
801 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
802 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
803 real(RP),
intent(in) :: CDZ (
ka)
804 integer,
intent(in) :: IIS, IIE, JJS, JJE
814 vel = ( f2h(k,1,i_uyz) &
819 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
821 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
822 flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
823 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
824 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) )
832 flux(
ks-1,i,j) = 0.0_rp
834 vel = ( f2h(
ks,1,i_uyz) &
838 / ( f2h(
ks,1,i_xyz) &
839 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
841 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
842 flux(
ks,i,j) = j13g(
ks,i,j) / mapf(i,j,+2) * vel &
843 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
844 vel = ( f2h(
ke-1,1,i_uyz) &
846 + f2h(
ke-1,2,i_uyz) &
848 / ( f2h(
ke-1,1,i_xyz) &
849 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
850 + f2h(
ke-1,2,i_xyz) &
851 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
852 flux(
ke-1,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
853 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
855 flux(
ke ,i,j) = 0.0_rp
872 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
873 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
874 real(RP),
intent(in) :: val (
ka,
ia,
ja)
875 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
876 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
877 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
878 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
879 real(RP),
intent(in) :: CDZ (
ka)
880 integer,
intent(in) :: IIS, IIE, JJS, JJE
890 vel = ( f2h(k,1,i_xvz) &
891 * 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) ) &
893 * 0.25_rp * ( mom(k,i,j)+mom(k,i+1,j)+mom(k,i,j-1)+mom(k,i+1,j-1) ) ) &
895 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i+1,j) ) &
897 * 0.5_rp * ( dens(k,i,j)+dens(k,i+1,j) ) )
898 flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
899 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
900 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) )
908 flux(
ks-1,i,j) = 0.0_rp
910 vel = ( f2h(
ks,1,i_xvz) &
911 * 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) ) &
913 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i+1,j)+mom(
ks,i,j-1)+mom(
ks,i+1,j-1) ) ) &
914 / ( f2h(
ks,1,i_xyz) &
915 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i+1,j) ) &
917 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i+1,j) ) )
918 flux(
ks,i,j) = j23g(
ks,i,j) / mapf(i,j,+1) * vel &
919 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
920 vel = ( f2h(
ke-1,1,i_xvz) &
921 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i+1,j)+mom(
ke,i,j-1)+mom(
ke,i+1,j-1) ) &
922 + f2h(
ke-1,2,i_xvz) &
923 * 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) ) ) &
924 / ( f2h(
ke-1,1,i_xyz) &
925 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i+1,j) ) &
926 + f2h(
ke-1,2,i_xyz) &
927 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i+1,j) ) )
928 flux(
ke-1,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
929 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
931 flux(
ke ,i,j) = 0.0_rp
951 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
952 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
953 real(RP),
intent(in) :: val (
ka,
ia,
ja)
954 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
955 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
956 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
958 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
960 real(RP),
intent(in) :: CDZ (
ka)
961 integer,
intent(in) :: IIS, IIE, JJS, JJE
974 call check( __line__, mom(k,i ,j) )
975 call check( __line__, mom(k,i-1,j) )
977 call check( __line__, val(k,i-1,j) )
978 call check( __line__, val(k,i,j) )
980 call check( __line__, val(k,i-2,j) )
981 call check( __line__, val(k,i+1,j) )
984 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i-1,j) ) ) &
986 flux(k,i-1,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
987 * ( f41 * ( val(k,i,j)+val(k,i-1,j) ) &
988 + f42 * ( val(k,i+1,j)+val(k,i-2,j) ) ) &
989 + gsqrt(k,i,j) * num_diff(k,i,j)
994 k = iundef; i = iundef; j = iundef
1010 IIS, IIE, JJS, JJE )
1013 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1014 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1015 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1016 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1017 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1018 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1020 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1022 real(RP),
intent(in) :: CDZ (
ka)
1023 integer,
intent(in) :: IIS, IIE, JJS, JJE
1034 call check( __line__, mom(k,i ,j) )
1035 call check( __line__, mom(k,i-1,j) )
1037 call check( __line__, val(k,i,j) )
1038 call check( __line__, val(k,i,j+1) )
1040 call check( __line__, val(k,i,j-1) )
1041 call check( __line__, val(k,i,j+2) )
1044 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i+1,j) ) ) &
1045 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1046 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1047 * ( f41 * ( val(k,i,j+1)+val(k,i,j) ) &
1048 + f42 * ( val(k,i,j+2)+val(k,i,j-1) ) ) &
1049 + gsqrt(k,i,j) * num_diff(k,i,j)
1054 k = iundef; i = iundef; j = iundef
1072 IIS, IIE, JJS, JJE )
1075 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1076 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1077 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1078 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1079 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1080 real(RP),
intent(in) :: J33G
1082 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1084 real(RP),
intent(in) :: CDZ (
ka)
1085 integer,
intent(in) :: IIS, IIE, JJS, JJE
1096 call check( __line__, mom(k,i,j) )
1097 call check( __line__, mom(k,i,j+1) )
1099 call check( __line__, val(k,i,j) )
1100 call check( __line__, val(k+1,i,j) )
1102 call check( __line__, val(k-1,i,j) )
1103 call check( __line__, val(k+2,i,j) )
1106 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1107 / ( f2h(k,1,i_xyz) &
1108 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1110 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1111 flux(k,i,j) = j33g * vel &
1112 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
1113 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) ) &
1114 + gsqrt(k,i,j) * num_diff(k,i,j)
1119 k = iundef; i = iundef; j = iundef
1127 call check( __line__, mom(
ks,i ,j) )
1128 call check( __line__, mom(
ks,i,j+1) )
1129 call check( __line__, val(
ks+1,i,j) )
1130 call check( __line__, val(
ks,i,j) )
1133 flux(
ks-1,i,j) = 0.0_rp
1135 vel = ( 0.5_rp * ( mom(
ks,i,j)+mom(
ks,i,j+1) ) ) &
1136 / ( f2h(
ks,1,i_xyz) &
1137 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1139 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1140 flux(
ks,i,j) = j33g * vel &
1141 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) ) &
1142 + gsqrt(
ks,i,j) * num_diff(
ks,i,j)
1143 vel = ( 0.5_rp * ( mom(
ke-1,i,j)+mom(
ke-1,i,j+1) ) ) &
1144 / ( f2h(
ke-1,1,i_xyz) &
1145 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1146 + f2h(
ke-1,2,i_xyz) &
1147 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1148 flux(
ke-1,i,j) = j33g * vel &
1149 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) ) &
1150 + gsqrt(
ke-1,i,j) * num_diff(
ke-1,i,j)
1152 flux(
ke,i,j) = 0.0_rp
1156 k = iundef; i = iundef; j = iundef
1167 GSQRT, J13G, MAPF, &
1169 IIS, IIE, JJS, JJE )
1172 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1173 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1174 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1175 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1176 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1177 real(RP),
intent(in) :: J13G (
ka,
ia,
ja)
1178 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1179 real(RP),
intent(in) :: CDZ (
ka)
1180 integer,
intent(in) :: IIS, IIE, JJS, JJE
1190 vel = ( f2h(k,1,i_uyz) &
1191 * 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) ) &
1193 * 0.25_rp * ( mom(k,i,j)+mom(k,i-1,j)+mom(k,i,j+1)+mom(k,i-1,j+1) ) ) &
1194 / ( f2h(k,1,i_xyz) &
1195 * 0.5_rp * ( dens(k+1,i,j)+dens(k+1,i,j+1) ) &
1197 * 0.5_rp * ( dens(k,i,j)+dens(k,i,j+1) ) )
1198 flux(k,i,j) = j13g(k,i,j) / mapf(i,j,+2) * vel &
1199 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
1200 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) )
1208 flux(
ks-1,i,j) = 0.0_rp
1210 vel = ( f2h(
ks,1,i_uyz) &
1211 * 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) ) &
1213 * 0.25_rp * ( mom(
ks,i,j)+mom(
ks,i-1,j)+mom(
ks,i,j+1)+mom(
ks,i-1,j+1) ) ) &
1214 / ( f2h(
ks,1,i_xyz) &
1215 * 0.5_rp * ( dens(
ks+1,i,j)+dens(
ks+1,i,j+1) ) &
1217 * 0.5_rp * ( dens(
ks,i,j)+dens(
ks,i,j+1) ) )
1218 flux(
ks,i,j) = j13g(
ks,i,j) / mapf(i,j,+2) * vel &
1219 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1220 vel = ( f2h(
ke-1,1,i_uyz) &
1221 * 0.25_rp * ( mom(
ke,i,j)+mom(
ke,i-1,j)+mom(
ke,i,j+1)+mom(
ke,i-1,j+1) ) &
1222 + f2h(
ke-1,2,i_uyz) &
1223 * 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) ) ) &
1224 / ( f2h(
ke-1,1,i_xyz) &
1225 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1226 + f2h(
ke-1,2,i_xyz) &
1227 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1228 flux(
ke-1,i,j) = j13g(
ke-1,i,j) / mapf(i,j,+2) * vel &
1229 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1231 flux(
ke ,i,j) = 0.0_rp
1243 GSQRT, J23G, MAPF, &
1245 IIS, IIE, JJS, JJE )
1248 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1249 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1250 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1251 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1252 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1253 real(RP),
intent(in) :: J23G (
ka,
ia,
ja)
1254 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1255 real(RP),
intent(in) :: CDZ (
ka)
1256 integer,
intent(in) :: IIS, IIE, JJS, JJE
1266 vel = ( f2h(k,1,i_xvz) &
1270 / ( f2h(k,1,i_xyz) &
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 flux(k,i,j) = j23g(k,i,j) / mapf(i,j,+1) * vel &
1275 * ( f41 * ( val(k+1,i,j)+val(k,i,j) ) &
1276 + f42 * ( val(k+2,i,j)+val(k-1,i,j) ) )
1284 flux(
ks-1,i,j) = 0.0_rp
1286 vel = ( f2h(
ks,1,i_xvz) &
1290 / ( f2h(
ks,1,i_xyz) &
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) = j23g(
ks,i,j) / mapf(i,j,+1) * vel &
1295 * ( f2 * ( val(
ks+1,i,j)+val(
ks,i,j) ) )
1296 vel = ( f2h(
ke-1,1,i_xvz) &
1298 + f2h(
ke-1,2,i_xvz) &
1300 / ( f2h(
ke-1,1,i_xyz) &
1301 * 0.5_rp * ( dens(
ke,i,j)+dens(
ke,i,j+1) ) &
1302 + f2h(
ke-1,2,i_xyz) &
1303 * 0.5_rp * ( dens(
ke-1,i,j)+dens(
ke-1,i,j+1) ) )
1304 flux(
ke-1,i,j) = j23g(
ke-1,i,j) / mapf(i,j,+1) * vel &
1305 * ( f2 * ( val(
ke,i,j)+val(
ke-1,i,j) ) )
1307 flux(
ke ,i,j) = 0.0_rp
1324 IIS, IIE, JJS, JJE )
1327 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1328 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1329 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1330 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1331 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1332 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1334 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1336 real(RP),
intent(in) :: CDZ (
ka)
1337 integer,
intent(in) :: IIS, IIE, JJS, JJE
1348 call check( __line__, mom(k,i ,j) )
1349 call check( __line__, mom(k,i,j-1) )
1351 call check( __line__, val(k,i,j) )
1352 call check( __line__, val(k,i+1,j) )
1354 call check( __line__, val(k,i-1,j) )
1355 call check( __line__, val(k,i+2,j) )
1358 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j+1) ) ) &
1359 / ( 0.25_rp * ( dens(k,i,j)+dens(k,i+1,j)+dens(k,i,j+1)+dens(k,i+1,j+1) ) )
1360 flux(k,i,j) = gsqrt(k,i,j) / mapf(i,j,+2) * vel &
1361 * ( f41 * ( val(k,i+1,j)+val(k,i,j) ) &
1362 + f42 * ( val(k,i+2,j)+val(k,i-1,j) ) ) &
1363 + gsqrt(k,i,j) * num_diff(k,i,j)
1368 k = iundef; i = iundef; j = iundef
1384 IIS, IIE, JJS, JJE )
1387 real(RP),
intent(out) :: flux (
ka,
ia,
ja)
1388 real(RP),
intent(in) :: mom (
ka,
ia,
ja)
1389 real(RP),
intent(in) :: val (
ka,
ia,
ja)
1390 real(RP),
intent(in) :: DENS (
ka,
ia,
ja)
1391 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja)
1392 real(RP),
intent(in) :: MAPF (
ia,
ja,2)
1394 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja)
1396 real(RP),
intent(in) :: CDZ (
ka)
1397 integer,
intent(in) :: IIS, IIE, JJS, JJE
1410 call check( __line__, mom(k,i ,j) )
1411 call check( __line__, mom(k,i,j-1) )
1413 call check( __line__, val(k,i,j-1) )
1414 call check( __line__, val(k,i,j) )
1416 call check( __line__, val(k,i,j-2) )
1417 call check( __line__, val(k,i,j+1) )
1420 vel = ( 0.5_rp * ( mom(k,i,j)+mom(k,i,j-1) ) ) &
1422 flux(k,i,j-1) = gsqrt(k,i,j) / mapf(i,j,+1) * vel &
1423 * ( f41 * ( val(k,i,j)+val(k,i,j-1) ) &
1424 + f42 * ( val(k,i,j+1)+val(k,i,j-2) ) ) &
1425 + gsqrt(k,i,j) * num_diff(k,i,j)
1430 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 ke
end point of inner domain: z, local
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
integer, public ia
of x whole cells (local, with HALO)
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
integer, public ka
of z whole cells (local, with HALO)
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)
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
integer, public ks
start point of inner domain: z, local
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
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
integer, public ja
of y whole cells (local, with HALO)