210 real(RP),
intent(out) :: DENS_RK(KA,IA,JA)
211 real(RP),
intent(out) :: MOMZ_RK(KA,IA,JA)
212 real(RP),
intent(out) :: MOMX_RK(KA,IA,JA)
213 real(RP),
intent(out) :: MOMY_RK(KA,IA,JA)
214 real(RP),
intent(out) :: RHOT_RK(KA,IA,JA)
216 real(RP),
intent(out) :: PROG_RK(KA,IA,JA,VA)
218 real(RP),
intent(inout) :: mflx_hi(KA,IA,JA,3)
219 real(RP),
intent(out) :: tflx_hi(KA,IA,JA,3)
221 real(RP),
intent(in),
target :: DENS0(KA,IA,JA)
222 real(RP),
intent(in),
target :: MOMZ0(KA,IA,JA)
223 real(RP),
intent(in),
target :: MOMX0(KA,IA,JA)
224 real(RP),
intent(in),
target :: MOMY0(KA,IA,JA)
225 real(RP),
intent(in),
target :: RHOT0(KA,IA,JA)
227 real(RP),
intent(in) :: DENS(KA,IA,JA)
228 real(RP),
intent(in) :: MOMZ(KA,IA,JA)
229 real(RP),
intent(in) :: MOMX(KA,IA,JA)
230 real(RP),
intent(in) :: MOMY(KA,IA,JA)
231 real(RP),
intent(in) :: RHOT(KA,IA,JA)
233 real(RP),
intent(in) :: DENS_t(KA,IA,JA)
234 real(RP),
intent(in) :: MOMZ_t(KA,IA,JA)
235 real(RP),
intent(in) :: MOMX_t(KA,IA,JA)
236 real(RP),
intent(in) :: MOMY_t(KA,IA,JA)
237 real(RP),
intent(in) :: RHOT_t(KA,IA,JA)
239 real(RP),
intent(in) :: PROG0(KA,IA,JA,VA)
240 real(RP),
intent(in) :: PROG (KA,IA,JA,VA)
242 real(RP),
intent(in) :: DPRES0(KA,IA,JA)
243 real(RP),
intent(in) :: RT2P(KA,IA,JA)
244 real(RP),
intent(in) :: CORIOLI(IA,JA)
245 real(RP),
intent(in) :: num_diff(KA,IA,JA,5,3)
246 real(RP),
intent(in) :: wdamp_coef(KA)
247 real(RP),
intent(in) :: divdmp_coef
248 real(RP),
intent(in) :: DDIV(KA,IA,JA)
250 logical,
intent(in) :: FLAG_FCT_MOMENTUM
251 logical,
intent(in) :: FLAG_FCT_T
252 logical,
intent(in) :: FLAG_FCT_ALONG_STREAM
254 real(RP),
intent(in) :: CDZ(KA)
255 real(RP),
intent(in) :: FDZ(KA-1)
256 real(RP),
intent(in) :: FDX(IA-1)
257 real(RP),
intent(in) :: FDY(JA-1)
258 real(RP),
intent(in) :: RCDZ(KA)
259 real(RP),
intent(in) :: RCDX(IA)
260 real(RP),
intent(in) :: RCDY(JA)
261 real(RP),
intent(in) :: RFDZ(KA-1)
262 real(RP),
intent(in) :: RFDX(IA-1)
263 real(RP),
intent(in) :: RFDY(JA-1)
265 real(RP),
intent(in) :: PHI (KA,IA,JA)
266 real(RP),
intent(in) :: GSQRT (KA,IA,JA,7)
267 real(RP),
intent(in) :: J13G (KA,IA,JA,7)
268 real(RP),
intent(in) :: J23G (KA,IA,JA,7)
269 real(RP),
intent(in) :: J33G
270 real(RP),
intent(in) :: MAPF (IA,JA,2,4)
271 real(RP),
intent(in) :: REF_dens(KA,IA,JA)
272 real(RP),
intent(in) :: REF_rhot(KA,IA,JA)
274 logical,
intent(in) :: BND_W
275 logical,
intent(in) :: BND_E
276 logical,
intent(in) :: BND_S
277 logical,
intent(in) :: BND_N
278 logical,
intent(in) :: TwoD
280 real(RP),
intent(in) :: dtrk
281 logical,
intent(in) :: last
285 real(RP) :: POTT(KA,IA,JA)
286 real(RP) :: DDENS(KA,IA,JA)
287 real(RP) :: DPRES(KA,IA,JA)
288 real(RP) :: DPRES_N(KA,IA,JA)
290 real(RP) :: Sr(KA,IA,JA)
291 real(RP) :: Sw(KA,IA,JA)
292 real(RP) :: Su(KA,IA,JA)
293 real(RP) :: Sv(KA,IA,JA)
294 real(RP) :: St(KA,IA,JA)
295 real(RP) :: RCs2T(KA,IA,JA)
296 real(RP) :: B(KA,IA,JA)
300 real(RP) :: qflx_hi (KA,IA,JA,3)
301 real(RP) :: qflx_J13(KA,IA,JA)
302 real(RP) :: qflx_J23(KA,IA,JA)
303 real(RP) :: mflx_hi2(KA,IA,JA,3)
306 real(RP) :: M(7,KA,IA,JA)
307 real(RP) :: r(KA,IA,JA)
308 real(RP) :: p(KA,IA,JA)
310 real(RP) :: zero(KA,IA,JA)
314 integer :: IIS, IIE, JJS, JJE
323 qflx_j13(:,:,:) = undef
324 qflx_j23(:,:,:) = undef
325 mflx_hi2(:,:,:,:) = undef
339 #if defined DEBUG || defined QUICKDEBUG
340 dens_rk( 1:
ks-1,:,:) = undef
341 dens_rk(
ke+1:
ka ,:,:) = undef
342 momz_rk( 1:
ks-1,:,:) = undef
343 momz_rk(
ke+1:
ka ,:,:) = undef
344 momx_rk( 1:
ks-1,:,:) = undef
345 momx_rk(
ke+1:
ka ,:,:) = undef
346 momy_rk( 1:
ks-1,:,:) = undef
347 momy_rk(
ke+1:
ka ,:,:) = undef
348 rhot_rk( 1:
ks-1,:,:) = undef
349 rhot_rk(
ke+1:
ka ,:,:) = undef
350 prog_rk( 1:
ks-1,:,:,:) = undef
351 prog_rk(
ke+1:
ka ,:,:,:) = undef
363 do i = max(iis-1,1), min(iie+1,
ia)
366 call check( __line__, dpres0(k,i,j) )
367 call check( __line__, rt2p(k,i,j) )
368 call check( __line__, rhot(k,i,j) )
369 call check( __line__, ref_rhot(k,i,j) )
371 dpres(k,i,j) = dpres0(k,i,j) + rt2p(k,i,j) * ( rhot(k,i,j) - ref_rhot(k,i,j) )
373 dpres(
ks-1,i,j) = dpres0(
ks-1,i,j) - dens(
ks,i,j) * ( phi(
ks-1,i,j) - phi(
ks+1,i,j) )
374 dpres(
ke+1,i,j) = dpres0(
ke+1,i,j) - dens(
ke,i,j) * ( phi(
ke+1,i,j) - phi(
ke-1,i,j) )
383 call check( __line__, dens(k,i,j) )
384 call check( __line__, ref_dens(k,i,j) )
386 ddens(k,i,j) = dens(k,i,j) - ref_dens(k,i,j)
396 call check( __line__, rhot(k,i,j) )
397 call check( __line__, dens(k,i,j) )
399 pott(k,i,j) = rhot(k,i,j) / dens(k,i,j)
404 k = iundef; i = iundef; j = iundef
412 call check( __line__, rt2p(k,i,j) )
414 rcs2t(k,i,j) = 1.0_rp / rt2p(k,i,j)
419 k = iundef; i = iundef; j = iundef
430 call check( __line__, momx(k+1,
is,j) )
431 call check( __line__, momx(k ,
is,j) )
432 call check( __line__, momy(k+1,
is,j) )
433 call check( __line__, momy(k+1,
is,j-1) )
434 call check( __line__, momy(k ,
is,j) )
435 call check( __line__, momy(k ,
is,j-1) )
437 call check( __line__, gsqrt(k,
is,j,
i_xyw) )
439 mflx_hi2(k,
is,j,
zdir) = j23g(k,
is,j,
i_xyw) * 0.25_rp * ( momy(k+1,
is,j)+momy(k+1,
is,j-1) &
440 + momy(k ,
is,j)+momy(k ,
is,j-1) ) &
450 call check( __line__, momx(k+1,i ,j) )
451 call check( __line__, momx(k+1,i-1,j) )
452 call check( __line__, momx(k ,i ,j) )
453 call check( __line__, momx(k ,i+1,j) )
454 call check( __line__, momy(k+1,i,j) )
455 call check( __line__, momy(k+1,i,j-1) )
456 call check( __line__, momy(k ,i,j) )
457 call check( __line__, momy(k ,i,j-1) )
458 call check( __line__, num_diff(k,i,j,
i_dens,
zdir) )
459 call check( __line__, gsqrt(k,i,j,
i_xyw) )
461 mflx_hi2(k,i,j,
zdir) = j13g(k,i,j,
i_xyw) * 0.25_rp * ( momx(k+1,i,j)+momx(k+1,i-1,j) &
462 + momx(k ,i,j)+momx(k ,i-1,j) ) &
463 + j23g(k,i,j,
i_xyw) * 0.25_rp * ( momy(k+1,i,j)+momy(k+1,i,j-1) &
464 + momy(k ,i,j)+momy(k ,i,j-1) ) &
471 k = iundef; i = iundef; j = iundef
477 mflx_hi2(
ks-1,i,j,
zdir) = 0.0_rp
478 mflx_hi2(
ke ,i,j,
zdir) = 0.0_rp
483 if ( .not. twod )
then
489 call check( __line__, gsqrt(k,i,j,
i_uyz) )
490 call check( __line__, num_diff(k,i,j,
i_dens,
xdir) )
492 mflx_hi2(k,i,j,
xdir) = gsqrt(k,i,j,
i_uyz) * num_diff(k,i,j,
i_dens,
xdir)
498 k = iundef; i = iundef; j = iundef
506 call check( __line__, gsqrt(k,i,j,
i_xvz) )
507 call check( __line__, num_diff(k,i,j,
i_dens,
ydir) )
509 mflx_hi2(k,i,j,
ydir) = gsqrt(k,i,j,
i_xvz) * num_diff(k,i,j,
i_dens,
ydir)
514 k = iundef; i = iundef; j = iundef
523 gsqrt(:,:,:,
i_xyz), j33g, &
530 gsqrt(:,:,:,
i_xyz), j13g(:,:,:,
i_xyz), mapf(:,:,:,
i_xy), &
535 gsqrt(:,:,:,
i_xyz), j23g(:,:,:,
i_xyz), mapf(:,:,:,
i_xy), &
561 call check( __line__, qflx_hi(k ,
is,j ,
zdir) )
562 call check( __line__, qflx_hi(k-1,
is,j ,
zdir) )
563 call check( __line__, qflx_j23(k ,
is,j ) )
564 call check( __line__, qflx_j23(k-1,
is,j ) )
565 call check( __line__, qflx_hi(k ,
is,j ,
ydir) )
566 call check( __line__, qflx_hi(k ,
is,j-1,
ydir) )
567 call check( __line__, ddiv(k ,
is,j) )
568 call check( __line__, ddiv(k+1,
is,j) )
569 call check( __line__, momz0(k,
is,j) )
570 call check( __line__, momz_t(k,
is,j) )
574 + qflx_j23(k,
is,j) - qflx_j23(k-1,
is,j ) ) * rfdz(k) &
575 + ( qflx_hi(k,
is,j,
ydir) - qflx_hi(k ,
is,j-1,
ydir) ) * rcdy(j) &
577 - wdamp_coef(k) * momz0(k,
is,j) &
578 + divdmp_coef * rdt * ( ddiv(k+1,
is,j)-ddiv(k,
is,j) ) * fdz(k) &
588 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
589 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
590 call check( __line__, qflx_j13(k ,i ,j ) )
591 call check( __line__, qflx_j13(k-1,i ,j ) )
592 call check( __line__, qflx_j23(k ,i ,j ) )
593 call check( __line__, qflx_j23(k-1,i ,j ) )
594 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
595 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
596 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
597 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
598 call check( __line__, ddiv(k ,i,j) )
599 call check( __line__, ddiv(k+1,i,j) )
600 call check( __line__, momz0(k,i,j) )
601 call check( __line__, momz_t(k,i,j) )
604 - ( ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) &
605 + qflx_j13(k,i,j) - qflx_j13(k-1,i ,j ) &
606 + qflx_j23(k,i,j) - qflx_j23(k-1,i ,j ) ) * rfdz(k) &
607 + ( qflx_hi(k,i,j,
xdir) - qflx_hi(k ,i-1,j ,
xdir) ) * rcdx(i) &
608 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k ,i ,j-1,
ydir) ) * rcdy(j) &
609 ) / gsqrt(k,i,j,
i_xyw) &
610 - wdamp_coef(k) * momz0(k,i,j) &
611 + divdmp_coef * rdt * ( ddiv(k+1,i,j)-ddiv(k,i,j) ) * fdz(k) &
618 k = iundef; i = iundef; j = iundef
623 sw(
ks-1,i,j) = 0.0_rp
628 k = iundef; i = iundef; j = iundef
637 gsqrt(:,:,:,
i_uyw), j33g, &
644 gsqrt(:,:,:,
i_uyz), j13g(:,:,:,
i_uyw), mapf(:,:,:,
i_uy), &
649 gsqrt(:,:,:,
i_uyz), j23g(:,:,:,
i_uyw), mapf(:,:,:,
i_uy), &
677 call check( __line__, qflx_hi(k ,
is,j ,
zdir) )
678 call check( __line__, qflx_hi(k-1,
is,j ,
zdir) )
679 call check( __line__, qflx_hi(k ,
is,j ,
ydir) )
680 call check( __line__, qflx_hi(k ,
is,j-1,
ydir) )
681 call check( __line__, corioli(
is,j) )
682 call check( __line__, momy(k,
is,j ) )
683 call check( __line__, momy(k,
is,j-1) )
684 call check( __line__, momx0(k,
is,j) )
688 + qflx_j23(k,
is,j) - qflx_j23(k-1,
is,j) ) * rcdz(k) &
689 + ( qflx_hi(k,
is,j,
ydir) - qflx_hi(k ,
is,j-1,
ydir) ) * rcdy(j) ) &
691 + 0.5_rp * corioli(
is,j) * ( momy(k,
is,j)+momy(k,
is,j-1) ) &
701 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
702 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
703 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
704 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
705 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
706 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
707 call check( __line__, dpres(k+1,i+1,j) )
708 call check( __line__, dpres(k+1,i ,j) )
709 call check( __line__, dpres(k-1,i+1,j) )
710 call check( __line__, dpres(k-1,i ,j) )
711 call check( __line__, corioli(i ,j) )
712 call check( __line__, corioli(i+1,j) )
713 call check( __line__, momy(k,i ,j ) )
714 call check( __line__, momy(k,i+1,j ) )
715 call check( __line__, momy(k,i ,j-1) )
716 call check( __line__, momy(k,i+1,j-1) )
717 call check( __line__, ddiv(k,i+1,j) )
718 call check( __line__, ddiv(k,i ,j) )
719 call check( __line__, momx0(k,i,j) )
722 - ( ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) &
723 + qflx_j13(k,i,j) - qflx_j13(k-1,i ,j) &
724 + qflx_j23(k,i,j) - qflx_j23(k-1,i ,j) ) * rcdz(k) &
725 + ( qflx_hi(k,i,j,
xdir) - qflx_hi(k ,i-1,j ,
xdir) ) * rfdx(i) &
726 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k ,i ,j-1,
ydir) ) * rcdy(j) ) &
727 - ( j13g(k+1,i,j,
i_uyz) * ( dpres(k+1,i+1,j)+dpres(k+1,i,j) ) &
728 - j13g(k-1,i,j,
i_uyz) * ( dpres(k-1,i+1,j)+dpres(k-1,i,j) ) ) &
729 * 0.5_rp / ( fdz(k+1)+fdz(k) ) &
730 ) / gsqrt(k,i,j,
i_uyz) &
731 + 0.125_rp * ( corioli(i,j)+corioli(i+1,j) ) &
732 * ( momy(k,i,j)+momy(k,i+1,j)+momy(k,i,j-1)+momy(k,i+1,j-1) ) &
733 + divdmp_coef * rdt * ( ddiv(k,i+1,j)-ddiv(k,i,j) ) * fdx(i) &
740 k = iundef; i = iundef; j = iundef
748 gsqrt(:,:,:,
i_xvw), j33g, &
755 gsqrt(:,:,:,
i_xvz), j13g(:,:,:,
i_xvw), mapf(:,:,:,
i_xv), &
760 gsqrt(:,:,:,
i_xvz), j23g(:,:,:,
i_xvw), mapf(:,:,:,
i_xv), &
788 call check( __line__, qflx_hi(k ,
is,j ,
zdir) )
789 call check( __line__, qflx_hi(k-1,
is,j ,
zdir) )
790 call check( __line__, qflx_hi(k ,
is,j ,
ydir) )
791 call check( __line__, qflx_hi(k ,
is,j-1,
ydir) )
792 call check( __line__, dpres(k+1,
is,j ) )
793 call check( __line__, dpres(k+1,
is,j+1) )
794 call check( __line__, dpres(k-1,
is,j ) )
795 call check( __line__, dpres(k-1,
is,j+1) )
796 call check( __line__, corioli(
is,j ) )
797 call check( __line__, corioli(
is,j+1) )
798 call check( __line__, momx(k,
is,j ) )
799 call check( __line__, momx(k,
is,j+1) )
800 call check( __line__, ddiv(k,
is,j+1) )
801 call check( __line__, ddiv(k,
is,j ) )
802 call check( __line__, momy_t(k,
is,j) )
805 ( - ( ( qflx_hi(k,
is,j,
zdir) - qflx_hi(k-1,
is,j ,
zdir) &
806 + qflx_j23(k,
is,j) - qflx_j23(k-1,
is,j ) ) * rcdz(k) &
807 + ( qflx_hi(k,
is,j,
ydir) - qflx_hi(k ,
is,j-1,
ydir) ) * rfdy(j) ) &
808 - ( j23g(k+1,
is,j,
i_xvz) * ( dpres(k+1,
is,j+1)+dpres(k+1,
is,j) ) &
809 - j23g(k-1,
is,j,
i_xvz) * ( dpres(k-1,
is,j+1)+dpres(k-1,
is,j) ) ) &
810 * 0.5_rp / ( fdz(k+1)+fdz(k) ) &
812 - 0.25_rp * ( corioli(
is,j+1)+corioli(
is,j) ) &
813 * ( momx(k,
is,j+1)+momx(k,
is,j) ) &
814 + divdmp_coef * rdt * ( ddiv(k,
is,j+1)-ddiv(k,
is,j) ) * fdy(j) &
824 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
825 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
826 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
827 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
828 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
829 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
830 call check( __line__, dpres(k+1,i,j ) )
831 call check( __line__, dpres(k+1,i,j+1) )
832 call check( __line__, dpres(k-1,i,j ) )
833 call check( __line__, dpres(k-1,i,j+1) )
834 call check( __line__, corioli(i,j ) )
835 call check( __line__, corioli(i,j+1) )
836 call check( __line__, momx(k,i ,j ) )
837 call check( __line__, momx(k,i ,j+1) )
838 call check( __line__, momx(k,i-1,j ) )
839 call check( __line__, momx(k,i-1,j+1) )
840 call check( __line__, ddiv(k,i,j+1) )
841 call check( __line__, ddiv(k,i,j ) )
842 call check( __line__, momy_t(k,i,j) )
845 ( - ( ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) &
846 + qflx_j13(k,i,j) - qflx_j13(k-1,i ,j ) &
847 + qflx_j23(k,i,j) - qflx_j23(k-1,i ,j ) ) * rcdz(k) &
848 + ( qflx_hi(k,i,j,
xdir) - qflx_hi(k ,i-1,j ,
xdir) ) * rcdx(i) &
849 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k ,i ,j-1,
ydir) ) * rfdy(j) ) &
850 - ( j23g(k+1,i,j,
i_xvz) * ( dpres(k+1,i,j+1)+dpres(k+1,i,j) ) &
851 - j23g(k-1,i,j,
i_xvz) * ( dpres(k-1,i,j+1)+dpres(k-1,i,j) ) ) &
852 * 0.5_rp / ( fdz(k+1)+fdz(k) ) &
853 ) / gsqrt(k,i,j,
i_xvz) &
854 - 0.125_rp * ( corioli(i ,j+1)+corioli(i ,j) ) &
855 * ( momx(k,i,j+1)+momx(k,i,j)+momx(k,i-1,j+1)+momx(k,i-1,j) ) &
856 + divdmp_coef * rdt * ( ddiv(k,i,j+1)-ddiv(k,i,j) ) * fdy(j) &
863 k = iundef; i = iundef; j = iundef
871 mflx_hi2(:,:,:,
zdir), pott, gsqrt(:,:,:,
i_xyw), &
879 mflx_hi2(:,:,:,
xdir), pott, gsqrt(:,:,:,
i_uyz), &
886 mflx_hi2(:,:,:,
ydir), pott, gsqrt(:,:,:,
i_xvz), &
896 call check( __line__, tflx_hi(k ,
is,j ,
zdir) )
897 call check( __line__, tflx_hi(k-1,
is,j ,
zdir) )
898 call check( __line__, tflx_hi(k ,
is,j ,
ydir) )
899 call check( __line__, tflx_hi(k ,
is,j-1,
ydir) )
900 call check( __line__, rhot_t(k,
is,j) )
903 - ( ( tflx_hi(k,
is,j,
zdir) - tflx_hi(k-1,
is,j ,
zdir) ) * rcdz(k) &
904 + ( tflx_hi(k,
is,j,
ydir) - tflx_hi(k ,
is,j-1,
ydir) ) * rcdy(j) &
915 call check( __line__, tflx_hi(k ,i ,j ,
zdir) )
916 call check( __line__, tflx_hi(k-1,i ,j ,
zdir) )
917 call check( __line__, tflx_hi(k ,i ,j ,
xdir) )
918 call check( __line__, tflx_hi(k ,i-1,j ,
xdir) )
919 call check( __line__, tflx_hi(k ,i ,j ,
ydir) )
920 call check( __line__, tflx_hi(k ,i ,j-1,
ydir) )
921 call check( __line__, rhot_t(k,i,j) )
924 - ( ( tflx_hi(k,i,j,
zdir) - tflx_hi(k-1,i ,j ,
zdir) ) * rcdz(k) &
925 + ( tflx_hi(k,i,j,
xdir) - tflx_hi(k ,i-1,j ,
xdir) ) * rcdx(i) &
926 + ( tflx_hi(k,i,j,
ydir) - tflx_hi(k ,i ,j-1,
ydir) ) * rcdy(j) &
927 ) / gsqrt(k,i,j,
i_xyz) &
934 k = iundef; i = iundef; j = iundef
947 call comm_vars8( su, 1 )
948 call comm_vars8( sv, 2 )
949 call comm_wait ( su, 1 )
950 call comm_wait ( sv, 2 )
964 call check( __line__, momz(k-1,i,j) )
965 call check( __line__, momz(k ,i,j) )
966 call check( __line__, momx(k,i ,j) )
967 call check( __line__, momy(k,i,j-1) )
968 call check( __line__, momy(k,i,j ) )
969 call check( __line__, pott(k-2,i,j) )
970 call check( __line__, pott(k-1,i,j) )
971 call check( __line__, pott(k ,i,j) )
972 call check( __line__, pott(k+1,i,j) )
973 call check( __line__, pott(k+2,i,j) )
974 call check( __line__, pott(k,i ,j) )
975 call check( __line__, pott(k,i,j-2) )
976 call check( __line__, pott(k,i,j-1) )
977 call check( __line__, pott(k,i,j ) )
978 call check( __line__, pott(k,i,j+1) )
979 call check( __line__, pott(k,i,j+2) )
980 call check( __line__, sw(k-1,i,j) )
981 call check( __line__, sw(k ,i,j) )
982 call check( __line__, su(k,i-1,j) )
983 call check( __line__, su(k,i ,j) )
984 call check( __line__, sv(k,i,j-1) )
985 call check( __line__, sv(k,i,j ) )
986 call check( __line__, gsqrt(k,i ,j,
i_uyz) )
987 call check( __line__, gsqrt(k,i,j-1,
i_xvz) )
988 call check( __line__, gsqrt(k,i,j ,
i_xvz) )
989 call check( __line__, gsqrt(k,i,j,
i_xyz) )
990 call check( __line__, st(k,i,j) )
991 call check( __line__, dpres(k-1,i,j) )
992 call check( __line__, dpres(k ,i,j) )
993 call check( __line__, dpres(k+1,i,j) )
994 call check( __line__, rt2p(k-1,i,j) )
995 call check( __line__, rt2p(k ,i,j) )
996 call check( __line__, rt2p(k+1,i,j) )
997 call check( __line__, rhot(k-1,i,j) )
998 call check( __line__, rhot(k+1,i,j) )
999 call check( __line__, ddens(k-1,i,j) )
1000 call check( __line__, ddens(k+1,i,j) )
1003 ( j33g * ( momz(k ,i,j) + dtrk*sw(k ,i,j) ) &
1004 * ( fact_n*(pott(k+1,i,j)+pott(k ,i,j)) &
1005 + fact_f*(pott(k+2,i,j)+pott(k-1,i,j)) ) &
1006 - j33g * ( momz(k-1,i,j) + dtrk*sw(k-1,i,j) ) &
1007 * ( fact_n*(pott(k ,i,j)+pott(k-1,i,j)) &
1008 + fact_f*(pott(k+1,i,j)+pott(k-2,i,j)) ) ) * rcdz(k) &
1009 + ( gsqrt(k,i,j ,
i_xvz) * ( momy(k,i,j ) + dtrk*sv(k,i,j ) ) &
1010 * ( fact_n*(pott(k,i,j+1)+pott(k,i,j )) &
1011 + fact_f*(pott(k,i,j+2)+pott(k,i,j-1)) ) &
1012 - gsqrt(k,i,j-1,
i_xvz) * ( momy(k,i,j-1) + dtrk*sv(k,i,j-1) ) &
1013 * ( fact_n*(pott(k,i,j )+pott(k,i,j-1)) &
1014 + fact_f*(pott(k,i,j+1)+pott(k,i,j-2)) ) ) * rcdy(j) &
1015 + gsqrt(k,i,j,
i_xyz) * ( st(k,i,j) - dpres(k,i,j) * rcs2t(k,i,j) * rdt ) &
1017 + grav * j33g * ( ( dpres(k+1,i,j)*rcs2t(k+1,i,j) &
1018 - dpres(k-1,i,j)*rcs2t(k-1,i,j) ) &
1019 - ( rhot(k+1,i,j)*ddens(k+1,i,j)/dens(k+1,i,j) &
1020 - rhot(k-1,i,j)*ddens(k-1,i,j)/dens(k-1,i,j) ) &
1021 ) / ( fdz(k) + fdz(k-1) )
1025 k = iundef; i = iundef; j = iundef
1030 call check( __line__, momz(
ks,i,j) )
1031 call check( __line__, momx(
ks,i,j) )
1032 call check( __line__, momy(
ks,i,j) )
1033 call check( __line__, sw(
ks,i,j) )
1034 call check( __line__, su(
ks,i-1,j) )
1035 call check( __line__, su(
ks,i ,j) )
1036 call check( __line__, sv(
ks,i,j-1) )
1037 call check( __line__, sv(
ks,i,j ) )
1038 call check( __line__, st(
ks,i,j) )
1039 call check( __line__, pott(
ks ,i,j) )
1040 call check( __line__, pott(
ks+1,i,j) )
1041 call check( __line__, pott(
ks,i ,j) )
1042 call check( __line__, pott(
ks,i,j-2) )
1043 call check( __line__, pott(
ks,i,j-1) )
1044 call check( __line__, pott(
ks,i,j ) )
1045 call check( __line__, pott(
ks,i,j+1) )
1046 call check( __line__, pott(
ks,i,j+2) )
1047 call check( __line__, gsqrt(
ks,i,j,
i_uyz) )
1048 call check( __line__, gsqrt(
ks,i,j,
i_xvz) )
1049 call check( __line__, gsqrt(
ks,i,j,
i_xyz) )
1050 call check( __line__, dpres(
ks ,i,j) )
1051 call check( __line__, dpres(
ks+1,i,j) )
1052 call check( __line__, rt2p(
ks ,i,j) )
1053 call check( __line__, rt2p(
ks+1,i,j) )
1054 call check( __line__, rhot(
ks+1,i,j) )
1055 call check( __line__, ddens(
ks+1,i,j) )
1058 ( j33g * ( momz(
ks ,i,j) + dtrk*sw(
ks ,i,j) ) &
1059 * 0.5_rp*(pott(
ks+1,i,j)+pott(
ks ,i,j)) ) * rcdz(
ks) &
1060 + ( gsqrt(
ks,i,j ,
i_xvz) * ( momy(
ks,i,j ) + dtrk*sv(
ks,i,j ) ) &
1061 * ( fact_n*(pott(
ks,i,j+1)+pott(
ks,i,j )) &
1062 + fact_f*(pott(
ks,i,j+2)+pott(
ks,i,j-1)) ) &
1063 - gsqrt(
ks,i,j-1,
i_xvz) * ( momy(
ks,i,j-1) + dtrk*sv(
ks,i,j-1) ) &
1064 * ( fact_n*(pott(
ks,i,j )+pott(
ks,i,j-1)) &
1065 + fact_f*(pott(
ks,i,j+1)+pott(
ks,i,j-2)) ) ) * rcdy(j) &
1066 + gsqrt(
ks,i,j,
i_xyz) * ( st(
ks,i,j) - dpres(
ks,i,j) * rcs2t(
ks,i,j) * rdt ) &
1068 + grav * j33g * 0.5_rp * ( ( dpres(
ks,i,j)+dpres(
ks+1,i,j) ) * rcs2t(
ks,i,j) &
1069 - ( ddens(
ks,i,j)+ddens(
ks+1,i,j) ) * pott(
ks,i,j) ) * rcdz(
ks)
1071 call check( __line__, momz(
ks ,i,j) )
1072 call check( __line__, momz(
ks+1,i,j) )
1073 call check( __line__, momx(
ks+1,i,j) )
1074 call check( __line__, momy(
ks+1,i,j-1) )
1075 call check( __line__, momy(
ks+1,i,j ) )
1076 call check( __line__, pott(
ks ,i,j) )
1077 call check( __line__, pott(
ks+1 ,i,j) )
1078 call check( __line__, pott(
ks+1+1,i,j) )
1079 call check( __line__, pott(
ks+1+2,i,j) )
1080 call check( __line__, pott(
ks+1,i,j) )
1081 call check( __line__, pott(
ks+1,i,j-2) )
1082 call check( __line__, pott(
ks+1,i,j-1) )
1083 call check( __line__, pott(
ks+1,i,j ) )
1084 call check( __line__, pott(
ks+1,i,j+1) )
1085 call check( __line__, pott(
ks+1,i,j+2) )
1086 call check( __line__, sw(
ks ,i,j) )
1087 call check( __line__, sw(
ks+1,i,j) )
1088 call check( __line__, su(
ks+1,i,j) )
1089 call check( __line__, sv(
ks+1,i,j-1) )
1090 call check( __line__, sv(
ks+1,i,j ) )
1091 call check( __line__, gsqrt(
ks+1,i,j,
i_uyz) )
1092 call check( __line__, gsqrt(
ks+1,i,j-1,
i_xvz) )
1093 call check( __line__, gsqrt(
ks+1,i,j ,
i_xvz) )
1094 call check( __line__, gsqrt(
ks+1,i,j,
i_xyz) )
1095 call check( __line__, st(
ks+1,i,j) )
1096 call check( __line__, dpres(
ks ,i,j) )
1097 call check( __line__, dpres(
ks+1,i,j) )
1098 call check( __line__, dpres(
ks+2,i,j) )
1099 call check( __line__, rt2p(
ks ,i,j) )
1100 call check( __line__, rt2p(
ks+1,i,j) )
1101 call check( __line__, rt2p(
ks+2,i,j) )
1102 call check( __line__, rhot(
ks ,i,j) )
1103 call check( __line__, rhot(
ks+2,i,j) )
1104 call check( __line__, ddens(
ks ,i,j) )
1105 call check( __line__, ddens(
ks+2,i,j) )
1108 ( j33g * ( momz(
ks+1,i,j) + dtrk*sw(
ks+1,i,j) ) &
1109 * ( fact_n*(pott(
ks+2,i,j)+pott(
ks+1,i,j)) &
1110 + fact_f*(pott(
ks+3,i,j)+pott(
ks ,i,j)) ) &
1111 - j33g * ( momz(
ks+1-1,i,j) + dtrk*sw(
ks+1-1,i,j) ) &
1112 * ( 0.5_rp*(pott(
ks+1,i,j)+pott(
ks,i,j)) ) ) * rcdz(
ks+1) &
1113 + ( gsqrt(
ks+1,i,j ,
i_xvz) * ( momy(
ks+1,i,j ) + dtrk*sv(
ks+1,i,j ) ) &
1114 * ( fact_n*(pott(
ks+1,i,j+1)+pott(
ks+1,i,j )) &
1115 + fact_f*(pott(
ks+1,i,j+2)+pott(
ks+1,i,j-1)) ) &
1116 - gsqrt(
ks+1,i,j-1,
i_xvz) * ( momy(
ks+1,i,j-1) + dtrk*sv(
ks+1,i,j-1) ) &
1117 * ( fact_n*(pott(
ks+1,i,j )+pott(
ks+1,i,j-1)) &
1118 + fact_f*(pott(
ks+1,i,j+1)+pott(
ks+1,i,j-2)) ) ) * rcdy(j) &
1119 + gsqrt(
ks+1,i,j,
i_xyz) * ( st(
ks+1,i,j) - dpres(
ks+1,i,j) * rcs2t(
ks+1,i,j) * rdt ) &
1121 + grav * j33g * ( ( dpres(
ks+2,i,j)*rcs2t(
ks+2,i,j) &
1122 - dpres(
ks ,i,j)*rcs2t(
ks ,i,j) ) &
1123 - ( rhot(
ks+2,i,j)*ddens(
ks+2,i,j)/dens(
ks+2,i,j) &
1124 - rhot(
ks ,i,j)*ddens(
ks ,i,j)/dens(
ks ,i,j) ) &
1125 ) / ( fdz(
ks+1) + fdz(
ks) )
1127 call check( __line__, momz(
ke-2,i,j) )
1128 call check( __line__, momz(
ke-1,i,j) )
1129 call check( __line__, momx(
ke-1,i,j) )
1130 call check( __line__, momy(
ke-1,i,j-1) )
1131 call check( __line__, momy(
ke-1,i,j ) )
1132 call check( __line__, pott(
ke-3,i,j) )
1133 call check( __line__, pott(
ke-2,i,j) )
1134 call check( __line__, pott(
ke-1,i,j) )
1135 call check( __line__, pott(
ke ,i,j) )
1136 call check( __line__, pott(
ke-1,i ,j) )
1137 call check( __line__, pott(
ke-1,i,j-2) )
1138 call check( __line__, pott(
ke-1,i,j-1) )
1139 call check( __line__, pott(
ke-1,i,j ) )
1140 call check( __line__, pott(
ke-1,i,j+1) )
1141 call check( __line__, pott(
ke-1,i,j+2) )
1142 call check( __line__, sw(
ke-2,i,j) )
1143 call check( __line__, sw(
ke-1,i,j) )
1144 call check( __line__, su(
ke-1,i,j) )
1145 call check( __line__, sv(
ke-1,i,j-1) )
1146 call check( __line__, sv(
ke-1,i,j ) )
1147 call check( __line__, gsqrt(
ke-1,i,j,
i_uyz) )
1148 call check( __line__, gsqrt(
ke-1,i,j-1,
i_xvz) )
1149 call check( __line__, gsqrt(
ke-1,i,j ,
i_xvz) )
1150 call check( __line__, gsqrt(
ke-1,i,j,
i_xyz) )
1151 call check( __line__, st(
ke-1,i,j) )
1152 call check( __line__, dpres(
ke-2,i,j) )
1153 call check( __line__, dpres(
ke-1,i,j) )
1154 call check( __line__, dpres(
ke ,i,j) )
1155 call check( __line__, rt2p(
ke-2,i,j) )
1156 call check( __line__, rt2p(
ke-1,i,j) )
1157 call check( __line__, rt2p(
ke ,i,j) )
1158 call check( __line__, rhot(
ke-2,i,j) )
1159 call check( __line__, rhot(
ke,i,j) )
1160 call check( __line__, ddens(
ke-2,i,j) )
1161 call check( __line__, ddens(
ke,i,j) )
1164 ( j33g * ( momz(
ke-1,i,j) + dtrk*sw(
ke-1,i,j) ) &
1165 * ( 0.5_rp*(pott(
ke ,i,j)+pott(
ke-1,i,j)) ) &
1166 - j33g * ( momz(
ke-2,i,j) + dtrk*sw(
ke-2,i,j) ) &
1167 * ( fact_n*(pott(
ke-1,i,j)+pott(
ke-2,i,j)) &
1168 + fact_f*(pott(
ke ,i,j)+pott(
ke-3,i,j)) ) ) * rcdz(
ke-1) &
1169 + ( gsqrt(
ke-1,i,j ,
i_xvz) * ( momy(
ke-1,i,j ) + dtrk*sv(
ke-1,i,j ) ) &
1170 * ( fact_n*(pott(
ke-1,i,j+1)+pott(
ke-1,i,j )) &
1171 + fact_f*(pott(
ke-1,i,j+2)+pott(
ke-1,i,j-1)) ) &
1172 - gsqrt(
ke-1,i,j-1,
i_xvz) * ( momy(
ke-1,i,j-1) + dtrk*sv(
ke-1,i,j-1) ) &
1173 * ( fact_n*(pott(
ke-1,i,j )+pott(
ke-1,i,j-1)) &
1174 + fact_f*(pott(
ke-1,i,j+1)+pott(
ke-1,i,j-2)) ) ) * rcdy(j) &
1175 + gsqrt(
ke-1,i,j,
i_xyz) * ( st(
ke-1,i,j) - dpres(
ke-1,i,j) * rcs2t(
ke-1,i,j) * rdt ) &
1177 + grav * j33g * ( ( dpres(
ke ,i,j)*rcs2t(
ke ,i,j) &
1178 - dpres(
ke-2,i,j)*rcs2t(
ke-2,i,j) ) &
1179 - ( rhot(
ke ,i,j)*ddens(
ke ,i,j)/dens(
ke ,i,j) &
1180 - rhot(
ke-2,i,j)*ddens(
ke-2,i,j)/dens(
ke-2,i,j) )&
1181 ) / ( fdz(
ke-1) + fdz(
ke-1-1) )
1183 call check( __line__, momz(
ke-1,i,j) )
1184 call check( __line__, momx(
ke,i,j) )
1185 call check( __line__, momy(
ke,i,j-1) )
1186 call check( __line__, momy(
ke,i,j ) )
1187 call check( __line__, sw(
ke-1,i,j) )
1188 call check( __line__, su(
ke,i,j) )
1189 call check( __line__, sv(
ke,i,j-1) )
1190 call check( __line__, sv(
ke,i,j ) )
1191 call check( __line__, pott(
ke-1,i,j) )
1192 call check( __line__, pott(
ke ,i,j) )
1193 call check( __line__, pott(
ke,i,j) )
1194 call check( __line__, pott(
ke,i,j-2) )
1195 call check( __line__, pott(
ke,i,j-1) )
1196 call check( __line__, pott(
ke,i,j ) )
1197 call check( __line__, pott(
ke,i,j+1) )
1198 call check( __line__, pott(
ke,i,j+2) )
1199 call check( __line__, gsqrt(
ke,i,j,
i_uyz) )
1200 call check( __line__, gsqrt(
ke,i,j-1,
i_xvz) )
1201 call check( __line__, gsqrt(
ke,i,j ,
i_xvz) )
1202 call check( __line__, gsqrt(
ke,i,j,
i_xyz) )
1203 call check( __line__, st(
ke,i,j) )
1204 call check( __line__, dpres(
ke-1,i,j) )
1205 call check( __line__, dpres(
ke ,i,j) )
1206 call check( __line__, rt2p(
ke-1,i,j) )
1207 call check( __line__, rt2p(
ke ,i,j) )
1208 call check( __line__, rhot(
ke-1,i,j) )
1209 call check( __line__, ddens(
ke-1,i,j) )
1213 - j33g * ( momz(
ke-1,i,j) + dtrk*sw(
ke-1,i,j) ) &
1214 * 0.5_rp*(pott(
ke ,i,j)+pott(
ke-1,i,j)) ) * rcdz(
ke) &
1215 + ( gsqrt(
ke,i,j ,
i_xvz) * ( momy(
ke,i,j ) + dtrk*sv(
ke,i,j ) ) &
1216 * ( fact_n*(pott(
ke,i,j+1)+pott(
ke,i,j )) &
1217 + fact_f*(pott(
ke,i,j+2)+pott(
ke,i,j-1)) ) &
1218 - gsqrt(
ke,i,j-1,
i_xvz) * ( momy(
ke,i,j-1) + dtrk*sv(
ke,i,j-1) ) &
1219 * ( fact_n*(pott(
ke,i,j )+pott(
ke,i,j-1)) &
1220 + fact_f*(pott(
ke,i,j+1)+pott(
ke,i,j-2)) ) ) * rcdy(j) &
1221 + gsqrt(
ke,i,j,
i_xyz) * ( st(
ke,i,j) - dpres(
ke,i,j) * rcs2t(
ke,i,j) * rdt ) &
1223 + grav * j33g * 0.5_rp * ( - ( dpres(
ke,i,j)+dpres(
ke-1,i,j) ) * rcs2t(
ke,i,j) &
1224 + ( ddens(
ke,i,j)+ddens(
ke-1,i,j) ) * pott(
ke,i,j) ) * rcdz(
ke)
1228 k = iundef; i = iundef; j = iundef
1239 call check( __line__, momz(k-1,i,j) )
1240 call check( __line__, momz(k ,i,j) )
1241 call check( __line__, momx(k,i-1,j) )
1242 call check( __line__, momx(k,i ,j) )
1243 call check( __line__, momy(k,i,j-1) )
1244 call check( __line__, momy(k,i,j ) )
1245 call check( __line__, pott(k-2,i,j) )
1246 call check( __line__, pott(k-1,i,j) )
1247 call check( __line__, pott(k ,i,j) )
1248 call check( __line__, pott(k+1,i,j) )
1249 call check( __line__, pott(k+2,i,j) )
1250 call check( __line__, pott(k,i-2,j) )
1251 call check( __line__, pott(k,i-1,j) )
1252 call check( __line__, pott(k,i ,j) )
1253 call check( __line__, pott(k,i+1,j) )
1254 call check( __line__, pott(k,i+2,j) )
1255 call check( __line__, pott(k,i,j-2) )
1256 call check( __line__, pott(k,i,j-1) )
1257 call check( __line__, pott(k,i,j ) )
1258 call check( __line__, pott(k,i,j+1) )
1259 call check( __line__, pott(k,i,j+2) )
1260 call check( __line__, sw(k-1,i,j) )
1261 call check( __line__, sw(k ,i,j) )
1262 call check( __line__, su(k,i-1,j) )
1263 call check( __line__, su(k,i ,j) )
1264 call check( __line__, sv(k,i,j-1) )
1265 call check( __line__, sv(k,i,j ) )
1266 call check( __line__, gsqrt(k,i ,j,
i_uyz) )
1267 call check( __line__, gsqrt(k,i-1,j,
i_uyz) )
1268 call check( __line__, gsqrt(k,i,j-1,
i_xvz) )
1269 call check( __line__, gsqrt(k,i,j ,
i_xvz) )
1270 call check( __line__, gsqrt(k,i,j,
i_xyz) )
1271 call check( __line__, st(k,i,j) )
1272 call check( __line__, dpres(k-1,i,j) )
1273 call check( __line__, dpres(k ,i,j) )
1274 call check( __line__, dpres(k+1,i,j) )
1275 call check( __line__, rt2p(k-1,i,j) )
1276 call check( __line__, rt2p(k ,i,j) )
1277 call check( __line__, rt2p(k+1,i,j) )
1278 call check( __line__, rhot(k-1,i,j) )
1279 call check( __line__, rhot(k+1,i,j) )
1280 call check( __line__, ddens(k-1,i,j) )
1281 call check( __line__, ddens(k+1,i,j) )
1284 ( j33g * ( momz(k ,i,j) + dtrk*sw(k ,i,j) ) &
1285 * ( fact_n*(pott(k+1,i,j)+pott(k ,i,j)) &
1286 + fact_f*(pott(k+2,i,j)+pott(k-1,i,j)) ) &
1287 - j33g * ( momz(k-1,i,j) + dtrk*sw(k-1,i,j) ) &
1288 * ( fact_n*(pott(k ,i,j)+pott(k-1,i,j)) &
1289 + fact_f*(pott(k+1,i,j)+pott(k-2,i,j)) ) ) * rcdz(k) &
1290 + ( gsqrt(k,i ,j,
i_uyz) * ( momx(k,i ,j) + dtrk*su(k,i ,j) ) &
1291 * ( fact_n*(pott(k,i+1,j)+pott(k,i ,j)) &
1292 + fact_f*(pott(k,i+2,j)+pott(k,i-1,j)) ) &
1293 - gsqrt(k,i-1,j,
i_uyz) * ( momx(k,i-1,j) + dtrk*su(k,i-1,j) ) &
1294 * ( fact_n*(pott(k,i ,j)+pott(k,i-1,j)) &
1295 + fact_f*(pott(k,i+1,j)+pott(k,i-2,j)) ) ) * rcdx(i) &
1296 + ( gsqrt(k,i,j ,
i_xvz) * ( momy(k,i,j ) + dtrk*sv(k,i,j ) ) &
1297 * ( fact_n*(pott(k,i,j+1)+pott(k,i,j )) &
1298 + fact_f*(pott(k,i,j+2)+pott(k,i,j-1)) ) &
1299 - gsqrt(k,i,j-1,
i_xvz) * ( momy(k,i,j-1) + dtrk*sv(k,i,j-1) ) &
1300 * ( fact_n*(pott(k,i,j )+pott(k,i,j-1)) &
1301 + fact_f*(pott(k,i,j+1)+pott(k,i,j-2)) ) ) * rcdy(j) &
1302 + gsqrt(k,i,j,
i_xyz) * ( st(k,i,j) - dpres(k,i,j) * rcs2t(k,i,j) * rdt ) &
1304 + grav * j33g * ( ( dpres(k+1,i,j)*rcs2t(k+1,i,j) &
1305 - dpres(k-1,i,j)*rcs2t(k-1,i,j) ) &
1306 - ( rhot(k+1,i,j)*ddens(k+1,i,j)/dens(k+1,i,j) &
1307 - rhot(k-1,i,j)*ddens(k-1,i,j)/dens(k-1,i,j) ) &
1308 ) / ( fdz(k) + fdz(k-1) )
1313 k = iundef; i = iundef; j = iundef
1318 call check( __line__, momz(
ks,i,j) )
1319 call check( __line__, momx(
ks,i,j) )
1320 call check( __line__, momy(
ks,i,j) )
1321 call check( __line__, sw(
ks,i,j) )
1322 call check( __line__, su(
ks,i-1,j) )
1323 call check( __line__, su(
ks,i ,j) )
1324 call check( __line__, sv(
ks,i,j-1) )
1325 call check( __line__, sv(
ks,i,j ) )
1326 call check( __line__, st(
ks,i,j) )
1327 call check( __line__, pott(
ks ,i,j) )
1328 call check( __line__, pott(
ks+1,i,j) )
1329 call check( __line__, pott(
ks,i-2,j) )
1330 call check( __line__, pott(
ks,i-1,j) )
1331 call check( __line__, pott(
ks,i ,j) )
1332 call check( __line__, pott(
ks,i+1,j) )
1333 call check( __line__, pott(
ks,i+2,j) )
1334 call check( __line__, pott(
ks,i,j-2) )
1335 call check( __line__, pott(
ks,i,j-1) )
1336 call check( __line__, pott(
ks,i,j ) )
1337 call check( __line__, pott(
ks,i,j+1) )
1338 call check( __line__, pott(
ks,i,j+2) )
1339 call check( __line__, gsqrt(
ks,i,j,
i_uyz) )
1340 call check( __line__, gsqrt(
ks,i,j,
i_xvz) )
1341 call check( __line__, gsqrt(
ks,i,j,
i_xyz) )
1342 call check( __line__, dpres(
ks ,i,j) )
1343 call check( __line__, dpres(
ks+1,i,j) )
1344 call check( __line__, rt2p(
ks ,i,j) )
1345 call check( __line__, rt2p(
ks+1,i,j) )
1346 call check( __line__, rhot(
ks+1,i,j) )
1347 call check( __line__, ddens(
ks+1,i,j) )
1350 ( j33g * ( momz(
ks ,i,j) + dtrk*sw(
ks ,i,j) ) &
1351 * 0.5_rp*(pott(
ks+1,i,j)+pott(
ks ,i,j)) ) * rcdz(
ks) &
1352 + ( gsqrt(
ks,i ,j,
i_uyz) * ( momx(
ks,i ,j) + dtrk*su(
ks,i ,j) ) &
1353 * ( fact_n*(pott(
ks,i+1,j)+pott(
ks,i ,j)) &
1354 + fact_f*(pott(
ks,i+2,j)+pott(
ks,i-1,j)) ) &
1355 - gsqrt(
ks,i-1,j,
i_uyz) * ( momx(
ks,i-1,j) + dtrk*su(
ks,i-1,j) ) &
1356 * ( fact_n*(pott(
ks,i ,j)+pott(
ks,i-1,j)) &
1357 + fact_f*(pott(
ks,i+1,j)+pott(
ks,i-2,j)) ) ) * rcdx(i) &
1358 + ( gsqrt(
ks,i,j ,
i_xvz) * ( momy(
ks,i,j ) + dtrk*sv(
ks,i,j ) ) &
1359 * ( fact_n*(pott(
ks,i,j+1)+pott(
ks,i,j )) &
1360 + fact_f*(pott(
ks,i,j+2)+pott(
ks,i,j-1)) ) &
1361 - gsqrt(
ks,i,j-1,
i_xvz) * ( momy(
ks,i,j-1) + dtrk*sv(
ks,i,j-1) ) &
1362 * ( fact_n*(pott(
ks,i,j )+pott(
ks,i,j-1)) &
1363 + fact_f*(pott(
ks,i,j+1)+pott(
ks,i,j-2)) ) ) * rcdy(j) &
1364 + gsqrt(
ks,i,j,
i_xyz) * ( st(
ks,i,j) - dpres(
ks,i,j) * rcs2t(
ks,i,j) * rdt ) &
1366 + grav * j33g * 0.5_rp * ( ( dpres(
ks,i,j)+dpres(
ks+1,i,j) ) * rcs2t(
ks,i,j) &
1367 - ( ddens(
ks,i,j)+ddens(
ks+1,i,j) ) * pott(
ks,i,j) ) * rcdz(
ks)
1369 call check( __line__, momz(
ks ,i,j) )
1370 call check( __line__, momz(
ks+1 ,i,j) )
1371 call check( __line__, momx(
ks+1,i-1,j) )
1372 call check( __line__, momx(
ks+1,i ,j) )
1373 call check( __line__, momy(
ks+1,i,j-1) )
1374 call check( __line__, momy(
ks+1,i,j ) )
1375 call check( __line__, pott(
ks ,i,j) )
1376 call check( __line__, pott(
ks+1 ,i,j) )
1377 call check( __line__, pott(
ks+1+1,i,j) )
1378 call check( __line__, pott(
ks+1+2,i,j) )
1379 call check( __line__, pott(
ks+1,i-2,j) )
1380 call check( __line__, pott(
ks+1,i-1,j) )
1381 call check( __line__, pott(
ks+1,i ,j) )
1382 call check( __line__, pott(
ks+1,i+1,j) )
1383 call check( __line__, pott(
ks+1,i+2,j) )
1384 call check( __line__, pott(
ks+1,i,j-2) )
1385 call check( __line__, pott(
ks+1,i,j-1) )
1386 call check( __line__, pott(
ks+1,i,j ) )
1387 call check( __line__, pott(
ks+1,i,j+1) )
1388 call check( __line__, pott(
ks+1,i,j+2) )
1389 call check( __line__, sw(
ks ,i,j) )
1390 call check( __line__, sw(
ks+1,i,j) )
1391 call check( __line__, su(
ks+1,i-1,j) )
1392 call check( __line__, su(
ks+1,i ,j) )
1393 call check( __line__, sv(
ks+1,i,j-1) )
1394 call check( __line__, sv(
ks+1,i,j ) )
1395 call check( __line__, gsqrt(
ks+1,i ,j,
i_uyz) )
1396 call check( __line__, gsqrt(
ks+1,i-1,j,
i_uyz) )
1397 call check( __line__, gsqrt(
ks+1,i,j-1,
i_xvz) )
1398 call check( __line__, gsqrt(
ks+1,i,j ,
i_xvz) )
1399 call check( __line__, gsqrt(
ks+1,i,j,
i_xyz) )
1400 call check( __line__, st(
ks+1,i,j) )
1401 call check( __line__, dpres(
ks ,i,j) )
1402 call check( __line__, dpres(
ks+1,i,j) )
1403 call check( __line__, dpres(
ks+2,i,j) )
1404 call check( __line__, rt2p(
ks ,i,j) )
1405 call check( __line__, rt2p(
ks+1,i,j) )
1406 call check( __line__, rt2p(
ks+2,i,j) )
1407 call check( __line__, rhot(
ks ,i,j) )
1408 call check( __line__, rhot(
ks+2,i,j) )
1409 call check( __line__, ddens(
ks ,i,j) )
1410 call check( __line__, ddens(
ks+2,i,j) )
1413 ( j33g * ( momz(
ks+1,i,j) + dtrk*sw(
ks+1,i,j) ) &
1414 * ( fact_n*(pott(
ks+2,i,j)+pott(
ks+1,i,j)) &
1415 + fact_f*(pott(
ks+3,i,j)+pott(
ks ,i,j)) ) &
1416 - j33g * ( momz(
ks+1-1,i,j) + dtrk*sw(
ks+1-1,i,j) ) &
1417 * ( 0.5_rp*(pott(
ks+1,i,j)+pott(
ks,i,j)) ) ) * rcdz(
ks+1) &
1418 + ( gsqrt(
ks+1,i ,j,
i_uyz) * ( momx(
ks+1,i ,j) + dtrk*su(
ks+1,i ,j) ) &
1419 * ( fact_n*(pott(
ks+1,i+1,j)+pott(
ks+1,i ,j)) &
1420 + fact_f*(pott(
ks+1,i+2,j)+pott(
ks+1,i-1,j)) ) &
1421 - gsqrt(
ks+1,i-1,j,
i_uyz) * ( momx(
ks+1,i-1,j) + dtrk*su(
ks+1,i-1,j) ) &
1422 * ( fact_n*(pott(
ks+1,i ,j)+pott(
ks+1,i-1,j)) &
1423 + fact_f*(pott(
ks+1,i+1,j)+pott(
ks+1,i-2,j)) ) ) * rcdx(i) &
1424 + ( gsqrt(
ks+1,i,j ,
i_xvz) * ( momy(
ks+1,i,j ) + dtrk*sv(
ks+1,i,j ) ) &
1425 * ( fact_n*(pott(
ks+1,i,j+1)+pott(
ks+1,i,j )) &
1426 + fact_f*(pott(
ks+1,i,j+2)+pott(
ks+1,i,j-1)) ) &
1427 - gsqrt(
ks+1,i,j-1,
i_xvz) * ( momy(
ks+1,i,j-1) + dtrk*sv(
ks+1,i,j-1) ) &
1428 * ( fact_n*(pott(
ks+1,i,j )+pott(
ks+1,i,j-1)) &
1429 + fact_f*(pott(
ks+1,i,j+1)+pott(
ks+1,i,j-2)) ) ) * rcdy(j) &
1430 + gsqrt(
ks+1,i,j,
i_xyz) * ( st(
ks+1,i,j) - dpres(
ks+1,i,j) * rcs2t(
ks+1,i,j) * rdt ) &
1432 + grav * j33g * ( ( dpres(
ks+2,i,j)*rcs2t(
ks+2,i,j) &
1433 - dpres(
ks ,i,j)*rcs2t(
ks ,i,j) ) &
1434 - ( rhot(
ks+2,i,j)*ddens(
ks+2,i,j)/dens(
ks+2,i,j) &
1435 - rhot(
ks ,i,j)*ddens(
ks ,i,j)/dens(
ks ,i,j) ) &
1436 ) / ( fdz(
ks+1) + fdz(
ks) )
1438 call check( __line__, momz(
ke-2,i,j) )
1439 call check( __line__, momz(
ke-1,i,j) )
1440 call check( __line__, momx(
ke-1,i-1,j) )
1441 call check( __line__, momx(
ke-1,i ,j) )
1442 call check( __line__, momy(
ke-1,i,j-1) )
1443 call check( __line__, momy(
ke-1,i,j ) )
1444 call check( __line__, pott(
ke-3,i,j) )
1445 call check( __line__, pott(
ke-2,i,j) )
1446 call check( __line__, pott(
ke-1,i,j) )
1447 call check( __line__, pott(
ke ,i,j) )
1448 call check( __line__, pott(
ke-1,i-2,j) )
1449 call check( __line__, pott(
ke-1,i-1,j) )
1450 call check( __line__, pott(
ke-1,i ,j) )
1451 call check( __line__, pott(
ke-1,i+1,j) )
1452 call check( __line__, pott(
ke-1,i+2,j) )
1453 call check( __line__, pott(
ke-1,i,j-2) )
1454 call check( __line__, pott(
ke-1,i,j-1) )
1455 call check( __line__, pott(
ke-1,i,j ) )
1456 call check( __line__, pott(
ke-1,i,j+1) )
1457 call check( __line__, pott(
ke-1,i,j+2) )
1458 call check( __line__, sw(
ke-2,i,j) )
1459 call check( __line__, sw(
ke-1,i,j) )
1460 call check( __line__, su(
ke-1,i-1,j) )
1461 call check( __line__, su(
ke-1,i ,j) )
1462 call check( __line__, sv(
ke-1,i,j-1) )
1463 call check( __line__, sv(
ke-1,i,j ) )
1464 call check( __line__, gsqrt(
ke-1,i ,j,
i_uyz) )
1465 call check( __line__, gsqrt(
ke-1,i-1,j,
i_uyz) )
1466 call check( __line__, gsqrt(
ke-1,i,j-1,
i_xvz) )
1467 call check( __line__, gsqrt(
ke-1,i,j ,
i_xvz) )
1468 call check( __line__, gsqrt(
ke-1,i,j,
i_xyz) )
1469 call check( __line__, st(
ke-1,i,j) )
1470 call check( __line__, dpres(
ke-2,i,j) )
1471 call check( __line__, dpres(
ke-1,i,j) )
1472 call check( __line__, dpres(
ke ,i,j) )
1473 call check( __line__, rt2p(
ke-2,i,j) )
1474 call check( __line__, rt2p(
ke-1,i,j) )
1475 call check( __line__, rt2p(
ke ,i,j) )
1476 call check( __line__, rhot(
ke-2,i,j) )
1477 call check( __line__, rhot(
ke,i,j) )
1478 call check( __line__, ddens(
ke-2,i,j) )
1479 call check( __line__, ddens(
ke,i,j) )
1482 ( j33g * ( momz(
ke-1,i,j) + dtrk*sw(
ke-1,i,j) ) &
1483 * ( 0.5_rp*(pott(
ke ,i,j)+pott(
ke-1,i,j)) ) &
1484 - j33g * ( momz(
ke-2,i,j) + dtrk*sw(
ke-2,i,j) ) &
1485 * ( fact_n*(pott(
ke-1,i,j)+pott(
ke-2,i,j)) &
1486 + fact_f*(pott(
ke ,i,j)+pott(
ke-3,i,j)) ) ) * rcdz(
ke-1) &
1487 + ( gsqrt(
ke-1,i ,j,
i_uyz) * ( momx(
ke-1,i ,j) + dtrk*su(
ke-1,i ,j) ) &
1488 * ( fact_n*(pott(
ke-1,i+1,j)+pott(
ke-1,i ,j)) &
1489 + fact_f*(pott(
ke-1,i+2,j)+pott(
ke-1,i-1,j)) ) &
1490 - gsqrt(
ke-1,i-1,j,
i_uyz) * ( momx(
ke-1,i-1,j) + dtrk*su(
ke-1,i-1,j) ) &
1491 * ( fact_n*(pott(
ke-1,i ,j)+pott(
ke-1,i-1,j)) &
1492 + fact_f*(pott(
ke-1,i+1,j)+pott(
ke-1,i-2,j)) ) ) * rcdx(i) &
1493 + ( gsqrt(
ke-1,i,j ,
i_xvz) * ( momy(
ke-1,i,j ) + dtrk*sv(
ke-1,i,j ) ) &
1494 * ( fact_n*(pott(
ke-1,i,j+1)+pott(
ke-1,i,j )) &
1495 + fact_f*(pott(
ke-1,i,j+2)+pott(
ke-1,i,j-1)) ) &
1496 - gsqrt(
ke-1,i,j-1,
i_xvz) * ( momy(
ke-1,i,j-1) + dtrk*sv(
ke-1,i,j-1) ) &
1497 * ( fact_n*(pott(
ke-1,i,j )+pott(
ke-1,i,j-1)) &
1498 + fact_f*(pott(
ke-1,i,j+1)+pott(
ke-1,i,j-2)) ) ) * rcdy(j) &
1499 + gsqrt(
ke-1,i,j,
i_xyz) * ( st(
ke-1,i,j) - dpres(
ke-1,i,j) * rcs2t(
ke-1,i,j) * rdt ) &
1501 + grav * j33g * ( ( dpres(
ke ,i,j)*rcs2t(
ke ,i,j) &
1502 - dpres(
ke-2,i,j)*rcs2t(
ke-2,i,j) ) &
1503 - ( rhot(
ke ,i,j)*ddens(
ke ,i,j)/dens(
ke ,i,j) &
1504 - rhot(
ke-2,i,j)*ddens(
ke-2,i,j)/dens(
ke-2,i,j) )&
1505 ) / ( fdz(
ke-1) + fdz(
ke-1-1) )
1507 call check( __line__, momz(
ke-1,i,j) )
1508 call check( __line__, momx(
ke,i-1,j) )
1509 call check( __line__, momx(
ke,i ,j) )
1510 call check( __line__, momy(
ke,i,j-1) )
1511 call check( __line__, momy(
ke,i,j ) )
1512 call check( __line__, sw(
ke-1,i,j) )
1513 call check( __line__, su(
ke,i-1,j) )
1514 call check( __line__, su(
ke,i ,j) )
1515 call check( __line__, sv(
ke,i,j-1) )
1516 call check( __line__, sv(
ke,i,j ) )
1517 call check( __line__, gsqrt(
ke,i-1,j,
i_uyz) )
1518 call check( __line__, pott(
ke-1,i,j) )
1519 call check( __line__, pott(
ke ,i,j) )
1520 call check( __line__, pott(
ke,i-2,j) )
1521 call check( __line__, pott(
ke,i-1,j) )
1522 call check( __line__, pott(
ke,i ,j) )
1523 call check( __line__, pott(
ke,i+1,j) )
1524 call check( __line__, pott(
ke,i+2,j) )
1525 call check( __line__, pott(
ke,i,j-2) )
1526 call check( __line__, pott(
ke,i,j-1) )
1527 call check( __line__, pott(
ke,i,j ) )
1528 call check( __line__, pott(
ke,i,j+1) )
1529 call check( __line__, pott(
ke,i,j+2) )
1530 call check( __line__, gsqrt(
ke,i-1,j,
i_uyz) )
1531 call check( __line__, gsqrt(
ke,i ,j,
i_uyz) )
1532 call check( __line__, gsqrt(
ke,i,j-1,
i_xvz) )
1533 call check( __line__, gsqrt(
ke,i,j ,
i_xvz) )
1534 call check( __line__, gsqrt(
ke,i,j,
i_xyz) )
1535 call check( __line__, st(
ke,i,j) )
1536 call check( __line__, dpres(
ke-1,i,j) )
1537 call check( __line__, dpres(
ke ,i,j) )
1538 call check( __line__, rt2p(
ke-1,i,j) )
1539 call check( __line__, rt2p(
ke ,i,j) )
1540 call check( __line__, rhot(
ke-1,i,j) )
1541 call check( __line__, ddens(
ke-1,i,j) )
1545 - j33g * ( momz(
ke-1,i,j) + dtrk*sw(
ke-1,i,j) ) &
1546 * 0.5_rp*(pott(
ke ,i,j)+pott(
ke-1,i,j)) ) * rcdz(
ke) &
1547 + ( gsqrt(
ke,i ,j,
i_uyz) * ( momx(
ke,i ,j) + dtrk*su(
ke,i ,j) ) &
1548 * ( fact_n*(pott(
ke,i+1,j)+pott(
ke,i ,j)) &
1549 + fact_f*(pott(
ke,i+2,j)+pott(
ke,i-1,j)) ) &
1550 - gsqrt(
ke,i-1,j,
i_uyz) * ( momx(
ke,i-1,j) + dtrk*su(
ke,i-1,j) ) &
1551 * ( fact_n*(pott(
ke,i ,j)+pott(
ke,i-1,j)) &
1552 + fact_f*(pott(
ke,i+1,j)+pott(
ke,i-2,j)) ) ) * rcdx(i) &
1553 + ( gsqrt(
ke,i,j ,
i_xvz) * ( momy(
ke,i,j ) + dtrk*sv(
ke,i,j ) ) &
1554 * ( fact_n*(pott(
ke,i,j+1)+pott(
ke,i,j )) &
1555 + fact_f*(pott(
ke,i,j+2)+pott(
ke,i,j-1)) ) &
1556 - gsqrt(
ke,i,j-1,
i_xvz) * ( momy(
ke,i,j-1) + dtrk*sv(
ke,i,j-1) ) &
1557 * ( fact_n*(pott(
ke,i,j )+pott(
ke,i,j-1)) &
1558 + fact_f*(pott(
ke,i,j+1)+pott(
ke,i,j-2)) ) ) * rcdy(j) &
1559 + gsqrt(
ke,i,j,
i_xyz) * ( st(
ke,i,j) - dpres(
ke,i,j) * rcs2t(
ke,i,j) * rdt ) &
1561 + grav * j33g * 0.5_rp * ( - ( dpres(
ke,i,j)+dpres(
ke-1,i,j) ) * rcs2t(
ke,i,j) &
1562 + ( ddens(
ke,i,j)+ddens(
ke-1,i,j) ) * pott(
ke,i,j) ) * rcdz(
ke)
1566 k = iundef; i = iundef; j = iundef
1573 pott, rcs2t, grav, &
1575 rcdz, rfdz, rcdx, rfdx, rcdy,rfdy, fdz, &
1580 iis, iie, jjs, jje )
1585 call solve_bicgstab( &
1591 call comm_vars8( dpres_n, 1 )
1592 call comm_wait ( dpres_n, 1 )
1595 call check_solver( dpres_n, m, b, twod )
1600 call solve_multigrid
1617 call check( __line__, dpres_n(k+1,i,j) )
1618 call check( __line__, dpres_n(k ,i,j) )
1619 call check( __line__, dpres(k+1,i,j) )
1620 call check( __line__, dpres(k ,i,j) )
1621 call check( __line__, ddens(k+1,i,j) )
1622 call check( __line__, ddens(k ,i,j) )
1623 call check( __line__, ref_dens(k+1,i,j) )
1624 call check( __line__, ref_dens(k,i,j) )
1625 call check( __line__, momz0(k,i,j) )
1628 - j33g * ( dpres_n(k+1,i,j) - dpres_n(k,i,j) ) * rfdz(k) &
1629 ) / gsqrt(k,i,j,
i_uyz) &
1631 * ( ddens(k+1,i,j) &
1632 + ( dpres_n(k+1,i,j) - dpres(k+1,i,j) ) &
1633 / ( pott(k+1,i,j) * rt2p(k+1,i,j) ) &
1635 + ( dpres_n(k ,i,j) - dpres(k ,i,j) ) &
1636 / ( pott(k ,i,j) * rt2p(k ,i,j) ) ) &
1638 momz_rk(k,i,j) = momz0(k,i,j) + duvw
1639 mflx_hi(k,i,j,
zdir) = j33g * ( momz(k,i,j) + duvw )
1644 k = iundef; i = iundef; j = iundef
1648 mflx_hi(
ks-1,i,j,
zdir) = 0.0_rp
1649 mflx_hi(
ke ,i,j,
zdir) = 0.0_rp
1653 k = iundef; i = iundef; j = iundef
1665 call check( __line__, su(k,
is,j) )
1666 call check( __line__, momx0(k,
is,j) )
1668 duvw = dtrk * su(k,
is,j)
1670 momx_rk(k,
is,j) = momx0(k,
is,j) + duvw
1679 call check( __line__, dpres_n(k,i+1,j) )
1680 call check( __line__, dpres_n(k,i ,j) )
1681 call check( __line__, gsqrt(k,i+1,j,
i_xyz) )
1682 call check( __line__, gsqrt(k,i ,j,
i_xyz) )
1683 call check( __line__, gsqrt(k,i,j,
i_uyz) )
1684 call check( __line__, su(k,i,j) )
1685 call check( __line__, momx0(k,i,j) )
1688 - ( gsqrt(k,i+1,j,
i_xyz) * dpres_n(k,i+1,j) &
1689 - gsqrt(k,i ,j,
i_xyz) * dpres_n(k,i ,j) ) * rfdx(i) &
1690 ) / gsqrt(k,i,j,
i_uyz) &
1693 momx_rk(k,i,j) = momx0(k,i,j) + duvw
1694 mflx_hi(k,i,j,
xdir) = gsqrt(k,i,j,
i_uyz) * ( momx(k,i,j) + duvw )
1700 k = iundef; i = iundef; j = iundef
1711 call check( __line__, dpres_n(k,i,j ) )
1712 call check( __line__, dpres_n(k,i,j+1) )
1713 call check( __line__, gsqrt(k,i,j ,
i_xyz) )
1714 call check( __line__, gsqrt(k,i,j+1,
i_xyz) )
1715 call check( __line__, gsqrt(k,i,j,
i_xvz) )
1716 call check( __line__, sv(k,i,j) )
1717 call check( __line__, momy0(k,i,j) )
1720 - ( gsqrt(k,i,j+1,
i_xyz) * dpres_n(k,i,j+1) &
1721 - gsqrt(k,i,j ,
i_xyz) * dpres_n(k,i,j ) ) * rfdy(j) &
1722 ) / gsqrt(k,i,j,
i_xvz) &
1724 momy_rk(k,i,j) = momy0(k,i,j) + duvw
1725 mflx_hi(k,i,j,
ydir) = gsqrt(k,i,j,
i_xvz) * ( momy(k,i,j) + duvw )
1730 k = iundef; i = iundef; j = iundef
1742 call check( __line__, mflx_hi(k,i,j,
zdir) )
1743 call check( __line__, pott(k,i-1,j) )
1744 call check( __line__, pott(k,i ,j) )
1745 call check( __line__, pott(k,i+1,j) )
1746 call check( __line__, pott(k,i+1,j) )
1747 call check( __line__, num_diff(k,i,j,
i_rhot,
xdir) )
1749 tflx_hi(k,i,j,
zdir) = mflx_hi(k,i,j,
zdir) &
1750 * ( fact_n * ( pott(k+1,i,j) + pott(k ,i,j) ) &
1751 + fact_f * ( pott(k+2,i,j) + pott(k-1,i,j) ) )
1756 k = iundef; i = iundef; j = iundef
1761 tflx_hi(
ks-1,i,j,
zdir) = 0.0_rp
1762 tflx_hi(
ks ,i,j,
zdir) = mflx_hi(
ks ,i,j,
zdir) * 0.5_rp * ( pott(
ks+1,i,j) + pott(
ks ,i,j) )
1763 tflx_hi(
ke-1,i,j,
zdir) = mflx_hi(
ke-1,i,j,
zdir) * 0.5_rp * ( pott(
ke ,i,j) + pott(
ke-1,i,j) )
1764 tflx_hi(
ke ,i,j,
zdir) = 0.0_rp
1768 k = iundef; i = iundef; j = iundef
1771 if ( .not. twod )
then
1777 call check( __line__, mflx_hi(k,i,j,
xdir) )
1778 call check( __line__, pott(k,i-1,j) )
1779 call check( __line__, pott(k,i ,j) )
1780 call check( __line__, pott(k,i+1,j) )
1781 call check( __line__, pott(k,i+1,j) )
1782 call check( __line__, num_diff(k,i,j,
i_rhot,
xdir) )
1784 tflx_hi(k,i,j,
xdir) = mflx_hi(k,i,j,
xdir) &
1785 * ( fact_n * ( pott(k,i+1,j)+pott(k,i ,j) ) &
1786 + fact_f * ( pott(k,i+2,j)+pott(k,i-1,j) ) )
1792 k = iundef; i = iundef; j = iundef
1800 call check( __line__, mflx_hi(k,i,j,
ydir) )
1801 call check( __line__, pott(k,i,j-1) )
1802 call check( __line__, pott(k,i,j ) )
1803 call check( __line__, pott(k,i,j+1) )
1804 call check( __line__, pott(k,i,j+2) )
1805 call check( __line__, num_diff(k,i,j,
i_rhot,
ydir) )
1807 tflx_hi(k,i,j,
ydir) = mflx_hi(k,i,j,
ydir) &
1808 * ( fact_n * ( pott(k,i,j+1)+pott(k,i,j ) ) &
1809 + fact_f * ( pott(k,i,j+2)+pott(k,i,j-1) ) )
1814 k = iundef; i = iundef; j = iundef
1822 rhot_rk(k,
is,j) = rhot0(k,
is,j) &
1823 + dtrk * ( - ( ( tflx_hi(k,
is,j,
zdir) - tflx_hi(k-1,
is,j ,
zdir) ) * rcdz(k) &
1824 + ( tflx_hi(k,
is,j,
ydir) - tflx_hi(k ,
is,j-1,
ydir) ) * rcdy(j) ) &
1834 rhot_rk(k,i,j) = rhot0(k,i,j) &
1835 + dtrk * ( - ( ( tflx_hi(k,i,j,
zdir) - tflx_hi(k-1,i ,j ,
zdir) ) * rcdz(k) &
1836 + ( tflx_hi(k,i,j,
xdir) - tflx_hi(k ,i-1,j ,
xdir) ) * rcdx(i) &
1837 + ( tflx_hi(k,i,j,
ydir) - tflx_hi(k ,i ,j-1,
ydir) ) * rcdy(j) ) &
1838 / gsqrt(k,i,j,
i_xyz) &
1852 mflx_hi(k,i,j,
zdir) = mflx_hi(k,i,j,
zdir) + mflx_hi2(k,i,j,
zdir)
1856 if ( .not. twod )
then
1861 mflx_hi(k,i,j,
xdir) = mflx_hi(k,i,j,
xdir) + mflx_hi2(k,i,j,
xdir)
1870 mflx_hi(k,i,j,
ydir) = mflx_hi(k,i,j,
ydir) + mflx_hi2(k,i,j,
ydir)
1881 call check( __line__, dens0(k,
is,j) )
1882 call check( __line__, mflx_hi(k ,
is,j ,
zdir) )
1883 call check( __line__, mflx_hi(k-1,
is,j ,
zdir) )
1884 call check( __line__, mflx_hi(k ,
is,j ,
ydir) )
1885 call check( __line__, mflx_hi(k ,
is,j-1,
ydir) )
1886 call check( __line__, dens_t(k,
is,j) )
1888 dens_rk(k,
is,j) = dens0(k,
is,j) &
1889 + dtrk * ( - ( ( mflx_hi(k,
is,j,
zdir)-mflx_hi(k-1,
is,j,
zdir) ) * rcdz(k) &
1890 + ( mflx_hi(k,
is,j,
ydir)-mflx_hi(k ,
is,j-1,
ydir) ) * rcdy(j) ) &
1901 call check( __line__, dens0(k,i,j) )
1902 call check( __line__, mflx_hi(k ,i ,j ,
zdir) )
1903 call check( __line__, mflx_hi(k-1,i ,j ,
zdir) )
1904 call check( __line__, mflx_hi(k ,i ,j ,
xdir) )
1905 call check( __line__, mflx_hi(k ,i-1,j ,
xdir) )
1906 call check( __line__, mflx_hi(k ,i ,j ,
ydir) )
1907 call check( __line__, mflx_hi(k ,i ,j-1,
ydir) )
1908 call check( __line__, dens_t(k,i,j) )
1910 dens_rk(k,i,j) = dens0(k,i,j) &
1911 + dtrk * ( - ( ( mflx_hi(k,i,j,
zdir)-mflx_hi(k-1,i ,j,
zdir) ) * rcdz(k) &
1912 + ( mflx_hi(k,i,j,
xdir)-mflx_hi(k ,i-1,j,
xdir) ) * rcdx(i) &
1913 + ( mflx_hi(k,i,j,
ydir)-mflx_hi(k ,i, j-1,
ydir) ) * rcdy(j) ) &
1914 / gsqrt(k,i,j,
i_xyz) &
1921 k = iundef; i = iundef; j = iundef
1927 dpres_n, dpres, rhot_rk, rhot, dens_rk, dens, b,&