175 real(RP),
intent(out) :: DENS_RK (KA,IA,JA)
176 real(RP),
intent(out) :: MOMZ_RK (KA,IA,JA)
177 real(RP),
intent(out) :: MOMX_RK (KA,IA,JA)
178 real(RP),
intent(out) :: MOMY_RK (KA,IA,JA)
179 real(RP),
intent(out) :: RHOT_RK (KA,IA,JA)
180 real(RP),
intent(out) :: PROG_RK (KA,IA,JA,VA)
182 real(RP),
intent(inout) :: mflx_hi (KA,IA,JA,3)
183 real(RP),
intent(out) :: tflx_hi (KA,IA,JA,3)
185 real(RP),
intent(in),
target :: DENS0 (KA,IA,JA)
186 real(RP),
intent(in),
target :: MOMZ0 (KA,IA,JA)
187 real(RP),
intent(in),
target :: MOMX0 (KA,IA,JA)
188 real(RP),
intent(in),
target :: MOMY0 (KA,IA,JA)
189 real(RP),
intent(in),
target :: RHOT0 (KA,IA,JA)
190 real(RP),
intent(in) :: PROG0 (KA,IA,JA,VA)
192 real(RP),
intent(in) :: DENS (KA,IA,JA)
193 real(RP),
intent(in) :: MOMZ (KA,IA,JA)
194 real(RP),
intent(in) :: MOMX (KA,IA,JA)
195 real(RP),
intent(in) :: MOMY (KA,IA,JA)
196 real(RP),
intent(in) :: RHOT (KA,IA,JA)
197 real(RP),
intent(in) :: PROG (KA,IA,JA,VA)
199 real(RP),
intent(in) :: DENS_t (KA,IA,JA)
200 real(RP),
intent(in) :: MOMZ_t (KA,IA,JA)
201 real(RP),
intent(in) :: MOMX_t (KA,IA,JA)
202 real(RP),
intent(in) :: MOMY_t (KA,IA,JA)
203 real(RP),
intent(in) :: RHOT_t (KA,IA,JA)
205 real(RP),
intent(in) :: DPRES0 (KA,IA,JA)
206 real(RP),
intent(in) :: RT2P (KA,IA,JA)
207 real(RP),
intent(in) :: CORIOLI ( IA,JA)
208 real(RP),
intent(in) :: num_diff(KA,IA,JA,5,3)
209 real(RP),
intent(in) :: wdamp_coef(KA)
210 real(RP),
intent(in) :: divdmp_coef
211 real(RP),
intent(in) :: DDIV (KA,IA,JA)
213 logical,
intent(in) :: FLAG_FCT_MOMENTUM
214 logical,
intent(in) :: FLAG_FCT_T
215 logical,
intent(in) :: FLAG_FCT_ALONG_STREAM
217 real(RP),
intent(in) :: CDZ (KA)
218 real(RP),
intent(in) :: FDZ (KA-1)
219 real(RP),
intent(in) :: FDX (IA-1)
220 real(RP),
intent(in) :: FDY (JA-1)
221 real(RP),
intent(in) :: RCDZ(KA)
222 real(RP),
intent(in) :: RCDX(IA)
223 real(RP),
intent(in) :: RCDY(JA)
224 real(RP),
intent(in) :: RFDZ(KA-1)
225 real(RP),
intent(in) :: RFDX(IA-1)
226 real(RP),
intent(in) :: RFDY(JA-1)
228 real(RP),
intent(in) :: PHI (KA,IA,JA)
229 real(RP),
intent(in) :: GSQRT (KA,IA,JA,7)
230 real(RP),
intent(in) :: J13G (KA,IA,JA,7)
231 real(RP),
intent(in) :: J23G (KA,IA,JA,7)
232 real(RP),
intent(in) :: J33G
233 real(RP),
intent(in) :: MAPF (IA,JA,2,4)
234 real(RP),
intent(in) :: REF_dens(KA,IA,JA)
235 real(RP),
intent(in) :: REF_rhot(KA,IA,JA)
237 logical,
intent(in) :: BND_W
238 logical,
intent(in) :: BND_E
239 logical,
intent(in) :: BND_S
240 logical,
intent(in) :: BND_N
241 logical,
intent(in) :: TwoD
243 real(RP),
intent(in) :: dtrk
244 logical,
intent(in) :: last
247 real(RP) :: VELZ (KA,IA,JA)
248 real(RP) :: VELX (KA,IA,JA)
249 real(RP) :: VELY (KA,IA,JA)
250 real(RP) :: POTT (KA,IA,JA)
251 real(RP) :: DPRES(KA,IA,JA)
253 real(RP) :: qflx_J13(KA,IA,JA)
254 real(RP) :: qflx_J23(KA,IA,JA)
255 real(RP) :: pgf (KA,IA,JA)
256 real(RP) :: buoy (KA,IA,JA)
257 real(RP) :: cor (KA,IA,JA)
260 real(RP) :: qflx_hi (KA,IA,JA,3)
262 real(RP) :: qflx_lo (KA,IA,JA,3)
263 real(RP) :: qflx_anti(KA,IA,JA,3)
264 real(RP) :: tflx_lo (KA,IA,JA,3)
265 real(RP) :: tflx_anti(KA,IA,JA,3)
266 real(RP) :: DENS0_uvw(KA,IA,JA)
267 real(RP) :: DENS_uvw (KA,IA,JA)
274 real(RP) :: advch_t(KA,IA,JA,5)
275 real(RP) :: advcv_t(KA,IA,JA,5)
276 real(RP) :: wdmp_t(KA,IA,JA)
277 real(RP) :: ddiv_t(KA,IA,JA,3)
278 real(RP) :: pg_t(KA,IA,JA,3)
279 real(RP) :: cf_t(KA,IA,JA,2)
285 integer :: IFS_OFF, JFS_OFF
298 qflx_lo(:,:,:,:) = undef
299 qflx_anti(:,:,:,:) = undef
300 tflx_lo(:,:,:,:) = undef
301 tflx_anti(:,:,:,:) = undef
305 #if defined DEBUG || defined QUICKDEBUG
306 dens_rk( 1:
ks-1,:,:) = undef
307 dens_rk(
ke+1:
ka ,:,:) = undef
308 momz_rk( 1:
ks-1,:,:) = undef
309 momz_rk(
ke+1:
ka ,:,:) = undef
310 momx_rk( 1:
ks-1,:,:) = undef
311 momx_rk(
ke+1:
ka ,:,:) = undef
312 momy_rk( 1:
ks-1,:,:) = undef
313 momy_rk(
ke+1:
ka ,:,:) = undef
314 rhot_rk( 1:
ks-1,:,:) = undef
315 rhot_rk(
ke+1:
ka ,:,:) = undef
316 prog_rk( 1:
ks-1,:,:,:) = undef
317 prog_rk(
ke+1:
ka ,:,:,:) = undef
333 if ( bnd_w ) ifs_off = 0
334 if ( bnd_s ) jfs_off = 0
348 do i = max(iis-1,1), min(iie+1,
ia)
351 call check( __line__, dpres0(k,i,j) )
352 call check( __line__, rt2p(k,i,j) )
353 call check( __line__, rhot(k,i,j) )
354 call check( __line__, ref_rhot(k,i,j) )
356 dpres(k,i,j) = dpres0(k,i,j) + rt2p(k,i,j) * ( rhot(k,i,j) - ref_rhot(k,i,j) )
358 dpres(
ks-1,i,j) = dpres0(
ks-1,i,j) - dens(
ks,i,j) * ( phi(
ks-1,i,j) - phi(
ks+1,i,j) )
359 dpres(
ke+1,i,j) = dpres0(
ke+1,i,j) - dens(
ke,i,j) * ( phi(
ke+1,i,j) - phi(
ke-1,i,j) )
364 k = iundef; i = iundef; j = iundef
371 call check( __line__, rhot(k,i,j) )
372 call check( __line__, dens(k,i,j) )
374 pott(k,i,j) = rhot(k,i,j) / dens(k,i,j)
382 k = iundef; i = iundef; j = iundef
389 if ( flag_fct_momentum )
then
393 do i = max(
is-1,1), min(
ie+2,
ia)
396 call check( __line__, momz0(k,i,j) )
397 call check( __line__, dens0(k ,i,j) )
398 call check( __line__, dens0(k+1,i,j) )
400 velz(k,i,j) = 2.0_rp * momz0(k,i,j) / ( dens0(k+1,i,j)+dens0(k,i,j) )
405 k = iundef; i = iundef; j = iundef
409 do i = max(
is-1,1), min(
ie+2,
ia)
410 velz(
ke,i,j) = 0.0_rp
414 k = iundef; i = iundef; j = iundef
422 call check( __line__, momx0(k,
is,j) )
423 call check( __line__, dens0(k,
is,j) )
425 velx(k,
is,j) = momx0(k,
is,j) / dens0(k,
is,j)
434 call check( __line__, momx0(k,i,j) )
435 call check( __line__, dens0(k,i ,j) )
436 call check( __line__, dens0(k,i+1,j) )
438 velx(k,i,j) = 2.0_rp * momx0(k,i,j) / ( dens0(k,i+1,j)+dens0(k,i,j) )
444 k = iundef; i = iundef; j = iundef
449 do i = max(
is-1,1), min(
ie+2,
ia)
452 call check( __line__, momy0(k,i,j) )
453 call check( __line__, dens0(k,i,j ) )
454 call check( __line__, dens0(k,i,j+1) )
456 vely(k,i,j) = 2.0_rp * momy0(k,i,j) / ( dens0(k,i,j+1)+dens0(k,i,j) )
461 k = iundef; i = iundef; j = iundef
463 call comm_vars8( velz(:,:,:), 4 )
464 call comm_vars8( velx(:,:,:), 5 )
465 call comm_vars8( vely(:,:,:), 6 )
490 call check( __line__, momz(k+1,i,j) )
491 call check( __line__, momz(k ,i,j) )
492 call check( __line__, momz(k-1,i,j) )
493 call check( __line__, num_diff(k,i,j,
i_dens,
zdir) )
495 mflx_hi(k,i,j,
zdir) = j33g * momz(k,i,j) / ( mapf(i,j,1,
i_xy)*mapf(i,j,2,
i_xy) ) &
496 + j23g(k,i,j,
i_xyw) * 0.25_rp * ( momy(k+1,i,j)+momy(k+1,i,j-1) &
497 + momy(k ,i,j)+momy(k ,i,j-1) ) &
499 + gsqrt(k,i,j,
i_xyw) * num_diff(k,i,j,
i_dens,
zdir) / ( mapf(i,j,1,
i_xy)*mapf(i,j,2,
i_xy) )
510 call check( __line__, momz(k+1,i,j) )
511 call check( __line__, momz(k ,i,j) )
512 call check( __line__, momz(k-1,i,j) )
513 call check( __line__, num_diff(k,i,j,
i_dens,
zdir) )
515 mflx_hi(k,i,j,
zdir) = j33g * momz(k,i,j) / ( mapf(i,j,1,
i_xy)*mapf(i,j,2,
i_xy) ) &
516 + j13g(k,i,j,
i_xyw) * 0.25_rp * ( momx(k+1,i,j)+momx(k+1,i-1,j) &
517 + momx(k ,i,j)+momx(k ,i-1,j) ) &
519 + j23g(k,i,j,
i_xyw) * 0.25_rp * ( momy(k+1,i,j)+momy(k+1,i,j-1) &
520 + momy(k ,i,j)+momy(k ,i,j-1) ) &
522 + gsqrt(k,i,j,
i_xyw) * num_diff(k,i,j,
i_dens,
zdir) / ( mapf(i,j,1,
i_xy)*mapf(i,j,2,
i_xy) )
529 k = iundef; i = iundef; j = iundef
535 mflx_hi(
ks-1,i,j,
zdir) = 0.0_rp
536 mflx_hi(
ke ,i,j,
zdir) = 0.0_rp
541 k = iundef; i = iundef; j = iundef
546 if ( .not. twod )
then
549 do i = iis-ifs_off, min(iie,
ieh)
552 call check( __line__, momx(k,i+1,j) )
553 call check( __line__, momx(k,i ,j) )
554 call check( __line__, momx(k,i-1,j) )
555 call check( __line__, num_diff(k,i,j,
i_dens,
xdir) )
557 mflx_hi(k,i,j,
xdir) = gsqrt(k,i,j,
i_uyz) / mapf(i,j,2,
i_uy) &
558 * ( momx(k,i,j) + num_diff(k,i,j,
i_dens,
xdir) )
565 k = iundef; i = iundef; j = iundef
571 do j = jjs-jfs_off, min(jje,
jeh)
575 call check( __line__, momy(k,i,j+1) )
576 call check( __line__, momy(k,i,j ) )
577 call check( __line__, momy(k,i,j-1) )
578 call check( __line__, num_diff(k,i,j,
i_dens,
ydir) )
580 mflx_hi(k,i,j,
ydir) = gsqrt(k,i,j,
i_xvz) / mapf(i,j,1,
i_xv) &
581 * ( momy(k,i,j) + num_diff(k,i,j,
i_dens,
ydir) )
588 k = iundef; i = iundef; j = iundef
598 call check( __line__, dens0(k,
is,j) )
599 call check( __line__, mflx_hi(k ,
is,j ,
zdir) )
600 call check( __line__, mflx_hi(k-1,
is,j ,
zdir) )
601 call check( __line__, mflx_hi(k ,
is,j ,
ydir) )
602 call check( __line__, mflx_hi(k ,
is,j-1,
ydir) )
603 call check( __line__, dens_t(k,
is,j) )
605 advcv = - ( mflx_hi(k,
is,j,
zdir)-mflx_hi(k-1,
is,j,
zdir) ) * rcdz(k)
606 advch = - ( mflx_hi(k,
is,j,
ydir)-mflx_hi(k ,
is,j-1,
ydir) ) * rcdy(j)
607 dens_rk(k,
is,j) = dens0(k,
is,j) &
608 + dtrk * ( ( advcv + advch ) * mapf(
is,j,2,
i_xy) / gsqrt(k,
is,j,
i_xyz) &
625 call check( __line__, dens0(k,i,j) )
626 call check( __line__, mflx_hi(k ,i ,j ,
zdir) )
627 call check( __line__, mflx_hi(k-1,i ,j ,
zdir) )
628 call check( __line__, mflx_hi(k ,i ,j ,
xdir) )
629 call check( __line__, mflx_hi(k ,i-1,j ,
xdir) )
630 call check( __line__, mflx_hi(k ,i ,j ,
ydir) )
631 call check( __line__, mflx_hi(k ,i ,j-1,
ydir) )
632 call check( __line__, dens_t(k,i,j) )
634 advcv = - ( mflx_hi(k,i,j,
zdir)-mflx_hi(k-1,i, j,
zdir) ) * rcdz(k)
635 advch = - ( mflx_hi(k,i,j,
xdir)-mflx_hi(k ,i-1,j,
xdir) ) * rcdx(i) &
636 - ( mflx_hi(k,i,j,
ydir)-mflx_hi(k ,i, j-1,
ydir) ) * rcdy(j)
637 dens_rk(k,i,j) = dens0(k,i,j) &
638 + dtrk * ( ( advcv + advch ) * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) / gsqrt(k,i,j,
i_xyz) &
642 advcv_t(k,i,j,
i_dens) = advcv * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) / gsqrt(k,i,j,
i_xyz)
643 advch_t(k,i,j,
i_dens) = advch * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) / gsqrt(k,i,j,
i_xyz)
655 k = iundef; i = iundef; j = iundef
668 gsqrt(:,:,:,
i_xyz), j33g, &
675 gsqrt(:,:,:,
i_xyz), j13g(:,:,:,
i_xyz), mapf(:,:,:,
i_xy), &
680 gsqrt(:,:,:,
i_xyz), j23g(:,:,:,
i_xyz), mapf(:,:,:,
i_xy), &
710 pgf(k,i,j) = j33g * ( dpres(k+1,i,j)-dpres(k,i,j) ) * rfdz(k)
723 buoy(k,i,j) = grav * gsqrt(k,i,j,
i_xyw) &
724 * 0.5_rp * ( ( dens(k+1,i,j)-ref_dens(k+1,i,j) ) &
725 + ( dens(k ,i,j)-ref_dens(k ,i,j) ) )
738 call check( __line__, qflx_hi(k ,
is,j ,
zdir) )
739 call check( __line__, qflx_hi(k-1,
is,j ,
zdir) )
740 call check( __line__, qflx_hi(k ,
is,j ,
ydir) )
741 call check( __line__, qflx_hi(k ,
is,j-1,
ydir) )
742 call check( __line__, ddiv(k ,
is,j) )
743 call check( __line__, ddiv(k+1,
is,j) )
744 call check( __line__, momz0(k,
is,j) )
745 call check( __line__, momz_t(k,
is,j) )
747 advcv = - ( qflx_hi(k,
is,j,
zdir) - qflx_hi(k-1,
is,j ,
zdir) &
748 + qflx_j23(k,
is,j) - qflx_j23(k-1,
is,j) ) * rfdz(k)
749 advch = - ( qflx_hi(k,
is,j,
ydir) - qflx_hi(k,
is,j-1,
ydir) ) * rcdy(j) &
751 wdamp = - wdamp_coef(k) * momz0(k,
is,j)
752 div = divdmp_coef / dtrk * fdz(k) * ( ddiv(k+1,
is,j)-ddiv(k,
is,j) )
753 momz_rk(k,
is,j) = momz0(k,
is,j) &
754 + dtrk * ( ( advcv + advch &
765 pg_t(k,
is,j,1) = ( - pgf(k,
is,j) - buoy(k,
is,j) ) / gsqrt(k,
is,j,
i_xyw)
766 wdmp_t(k,
is,j) = wdamp
767 ddiv_t(k,
is,j,1) = div
779 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
780 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
781 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
782 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
783 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
784 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
785 call check( __line__, ddiv(k ,i,j) )
786 call check( __line__, ddiv(k+1,i,j) )
787 call check( __line__, momz0(k,i,j) )
788 call check( __line__, momz_t(k,i,j) )
790 advcv = - ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) &
791 + qflx_j13(k,i,j) - qflx_j13(k-1,i,j) &
792 + qflx_j23(k,i,j) - qflx_j23(k-1,i,j) ) * rfdz(k)
793 advch = - ( ( qflx_hi(k,i,j,
xdir) - qflx_hi(k,i-1,j,
xdir) ) * rcdx(i) &
794 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k,i,j-1,
ydir) ) * rcdy(j) ) &
795 * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy)
796 wdamp = - wdamp_coef(k) * momz0(k,i,j)
797 div = divdmp_coef / dtrk * fdz(k) * ( ddiv(k+1,i,j)-ddiv(k,i,j) )
798 momz_rk(k,i,j) = momz0(k,i,j) &
799 + dtrk * ( ( advcv + advch &
802 ) / gsqrt(k,i,j,
i_xyw) &
810 pg_t(k,i,j,1) = ( - pgf(k,i,j) - buoy(k,i,j) ) / gsqrt(k,i,j,
i_xyw)
811 wdmp_t(k,i,j) = wdamp
812 ddiv_t(k,i,j,1) = div
821 k = iundef; i = iundef; j = iundef
827 momz_rk(
ks-1,i,j) = 0.0_rp
828 momz_rk(
ke ,i,j) = 0.0_rp
833 pg_t(
ke,i,j,1) = 0.0_rp
834 wdmp_t(
ke,i,j) = 0.0_rp
835 ddiv_t(
ke,i,j,1) = 0.0_rp
844 k = iundef; i = iundef; j = iundef
848 if ( flag_fct_momentum )
then
855 gsqrt(:,:,:,
i_xyz), j33g, &
858 iis-1, iie+1, jjs-1, jje+1 )
866 iis-1, iie+1, jjs-1, jje+1 )
873 iis-1, iie+1, jjs-1, jje+1 )
879 if ( flag_fct_momentum )
then
881 call comm_vars8( dens_rk, 1 )
882 call comm_wait ( dens_rk, 1, .false. )
887 qflx_hi(k,i,j,
zdir) = qflx_hi(k,i,j,
zdir) / ( mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) ) &
888 + qflx_j13(k,i,j) + qflx_j23(k,i,j)
896 dens0_uvw(k,i,j) = 0.5_rp * ( dens0(k,i,j) + dens0(k+1,i,j) )
897 dens_uvw(k,i,j) = 0.5_rp * ( dens_rk(k,i,j) + dens_rk(k+1,i,j) )
904 dens_uvw(
ke,i,j) = dens_uvw(
ke-1,i,j)
905 dens0_uvw(
ke,i,j) = dens0_uvw(
ke-1,i,j)
909 call comm_wait ( velz(:,:,:), 4 )
912 velz, dens0_uvw, dens_uvw, &
916 gsqrt(:,:,:,
i_xyw), &
919 flag_fct_along_stream )
931 momz_rk(k,
is,j) = momz_rk(k,
is,j) &
932 + dtrk * ( ( qflx_anti(k,
is,j,
zdir) - qflx_anti(k-1,
is,j ,
zdir) ) * rfdz(k) &
933 + ( qflx_anti(k,
is,j,
ydir) - qflx_anti(k ,
is,j-1,
ydir) ) * rcdy(j) &
943 momz_rk(k,i,j) = momz_rk(k,i,j) &
944 + dtrk * ( ( qflx_anti(k,i,j,
zdir) - qflx_anti(k-1,i ,j ,
zdir) ) * rfdz(k) &
945 + ( ( qflx_anti(k,i,j,
xdir) - qflx_anti(k ,i-1,j ,
xdir) ) * rcdx(i) &
946 + ( qflx_anti(k,i,j,
ydir) - qflx_anti(k ,i ,j-1,
ydir) ) * rcdy(j) ) &
947 * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) ) &
960 qflx_hi(:,:,:,:) = undef
978 gsqrt(:,:,:,
i_uyw), j33g, &
985 gsqrt(:,:,:,
i_uyz), j13g(:,:,:,
i_uyw), mapf(:,:,:,
i_uy), &
990 gsqrt(:,:,:,
i_uyz), j23g(:,:,:,
i_uyw), mapf(:,:,:,
i_uy), &
1002 iis, iie, jjs, jje )
1010 iis, iie, jjs, jje )
1017 if ( .not. twod )
then
1022 pgf(k,i,j) = ( ( gsqrt(k,i+1,j,
i_xyz) * dpres(k,i+1,j) &
1023 - gsqrt(k,i ,j,
i_xyz) * dpres(k,i ,j) &
1025 + ( j13g(k ,i,j,
i_uyw) &
1026 * 0.5_rp * ( f2h(k,1,
i_uyz) * ( dpres(k+1,i+1,j)+dpres(k+1,i,j) ) &
1027 + f2h(k,2,
i_uyz) * ( dpres(k ,i+1,j)+dpres(k ,i,j) ) ) &
1028 - j13g(k-1,i,j,
i_uyw) &
1029 * 0.5_rp * ( f2h(k,1,
i_uyz) * ( dpres(k ,i+1,j)+dpres(k ,i,j) ) &
1030 + f2h(k,2,
i_uyz) * ( dpres(k-1,i+1,j)+dpres(k-1,i,j) ) ) &
1046 call check( __line__, momy(k,
is,j ) )
1047 call check( __line__, momy(k,
is,j-1) )
1049 cor(k,
is,j) = 0.5_rp * corioli(
is,j) * ( momy(k,
is,j) + momy(k,
is,j-1) )
1059 call check( __line__, momy(k,i ,j ) )
1060 call check( __line__, momy(k,i+1,j ) )
1061 call check( __line__, momy(k,i ,j-1) )
1062 call check( __line__, momy(k,i+1,j-1) )
1064 cor(k,i,j) = 0.125_rp * ( corioli( i+1,j )+corioli( i,j ) ) &
1065 * ( momy(k,i+1,j )+momy(k,i,j ) &
1066 + momy(k,i+1,j-1)+momy(k,i,j-1) ) &
1067 + 0.25_rp * mapf(i,j,1,
i_uy) * mapf(i,j,2,
i_uy) &
1068 * ( momy(k,i,j) + momy(k,i,j-1) + momy(k,i+1,j) + momy(k,i+1,j-1) ) &
1069 * ( ( momy(k,i,j) + momy(k,i,j-1) + momy(k,i+1,j) + momy(k,i+1,j-1) ) * 0.25_rp &
1070 * ( 1.0_rp/mapf(i+1,j,2,
i_xy) - 1.0_rp/mapf(i,j,2,
i_xy) ) * rfdx(i) &
1072 * ( 1.0_rp/mapf(i,j,1,
i_uv) - 1.0_rp/mapf(i,j-1,1,
i_uv) ) * rcdy(j) ) &
1073 * 2.0_rp / ( dens(k,i+1,j) + dens(k,i,j) )
1087 call check( __line__, qflx_hi(k ,
is,j ,
zdir) )
1088 call check( __line__, qflx_hi(k-1,
is,j ,
zdir) )
1089 call check( __line__, qflx_hi(k ,
is,j ,
ydir) )
1090 call check( __line__, qflx_hi(k ,
is,j-1,
ydir) )
1091 call check( __line__, momx0(k,
is,j) )
1094 advcv = - ( qflx_hi(k,
is,j,
zdir) - qflx_hi(k-1,
is,j ,
zdir) &
1095 + qflx_j23(k,
is,j) - qflx_j23(k-1,
is,j) ) * rcdz(k)
1096 advch = - ( qflx_hi(k,
is,j,
ydir) - qflx_hi(k ,
is,j-1,
ydir) ) * rcdy(j) &
1098 momx_rk(k,
is,j) = momx0(k,
is,j) &
1099 + dtrk * ( ( advcv + advch &
1108 pg_t(k,
is,j,2) = 0.0_rp
1109 cf_t(k,
is,j,1) = cor(k,i,j)
1110 ddiv_t(k,
is,j,2) = 0.0_rp
1119 do i = iis, min(iie,
ieh)
1122 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
1123 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
1124 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
1125 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
1126 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
1127 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
1128 call check( __line__, ddiv(k,i+1,j) )
1129 call check( __line__, ddiv(k,i ,j) )
1130 call check( __line__, momx0(k,i,j) )
1133 advcv = - ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) &
1134 + qflx_j13(k,i,j) - qflx_j13(k-1,i,j) &
1135 + qflx_j23(k,i,j) - qflx_j23(k-1,i,j) ) * rcdz(k)
1136 advch = - ( ( qflx_hi(k,i,j,
xdir) - qflx_hi(k ,i-1,j ,
xdir) ) * rfdx(i) &
1137 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k ,i ,j-1,
ydir) ) * rcdy(j) ) &
1138 * mapf(i,j,1,
i_uy) * mapf(i,j,2,
i_uy)
1139 div = divdmp_coef / dtrk * fdx(i) * ( ddiv(k,i+1,j)-ddiv(k,i,j) )
1140 momx_rk(k,i,j) = momx0(k,i,j) &
1141 + dtrk * ( ( advcv + advch &
1143 ) / gsqrt(k,i,j,
i_uyz) &
1149 advcv_t(k,i,j,
i_momx) = advcv / gsqrt(k,i,j,
i_uyz)
1150 advch_t(k,i,j,
i_momx) = advch / gsqrt(k,i,j,
i_uyz)
1151 pg_t(k,i,j,2) = - pgf(k,i,j) / gsqrt(k,i,j,
i_uyz)
1152 cf_t(k,i,j,1) = cor(k,i,j)
1153 ddiv_t(k,i,j,2) = div
1164 k = iundef; i = iundef; j = iundef
1168 if ( flag_fct_momentum )
then
1171 momz, momx0, dens, &
1172 gsqrt(:,:,:,
i_uyw), j33g, &
1175 iis-1, iie+1, jjs-1, jje+1 )
1180 momx, momx0, dens, &
1184 iis-1, iie+1, jjs-1, jje+1 )
1187 momy, momx0, dens, &
1191 iis-1, iie+1, jjs-1, jje+1 )
1197 if ( flag_fct_momentum )
then
1203 qflx_hi(k,i,j,
zdir) = qflx_hi(k,i,j,
zdir) / ( mapf(i,j,1,
i_uy) * mapf(i,j,2,
i_uy) )&
1204 + qflx_j13(k,i,j) + qflx_j23(k,i,j)
1213 dens0_uvw(k,
is,j) = dens0(k,
is,j)
1214 dens_uvw(k,
is,j) = dens_rk(k,
is,j)
1222 dens0_uvw(k,i,j) = 0.5_rp * ( dens0(k,i,j) + dens0(k,i+1,j) )
1223 dens_uvw(k,i,j) = 0.5_rp * ( dens_rk(k,i,j) + dens_rk(k,i+1,j) )
1229 call comm_wait ( velx(:,:,:), 5 )
1232 velx, dens0_uvw, dens_uvw, &
1236 gsqrt(:,:,:,
i_uyz), &
1239 flag_fct_along_stream )
1252 call check( __line__, momx_rk(k,
is,j) )
1253 call check( __line__, qflx_anti(k ,
is,j ,
zdir) )
1254 call check( __line__, qflx_anti(k-1,
is,j ,
zdir) )
1255 call check( __line__, qflx_anti(k ,
is,j ,
ydir) )
1256 call check( __line__, qflx_anti(k ,
is,j-1,
ydir) )
1258 momx_rk(k,
is,j) = momx_rk(k,
is,j) &
1259 + dtrk * ( ( ( qflx_anti(k,
is,j,
zdir) - qflx_anti(k-1,
is,j ,
zdir) ) * rcdz(k) &
1260 + ( qflx_anti(k,
is,j,
ydir) - qflx_anti(k ,
is,j-1,
ydir) ) * rcdy(j) ) ) &
1268 do i = iis, min(iie,
ieh)
1271 call check( __line__, momx_rk(k,i,j) )
1272 call check( __line__, qflx_anti(k ,i ,j ,
zdir) )
1273 call check( __line__, qflx_anti(k-1,i ,j ,
zdir) )
1274 call check( __line__, qflx_anti(k ,i ,j ,
xdir) )
1275 call check( __line__, qflx_anti(k ,i-1,j ,
xdir) )
1276 call check( __line__, qflx_anti(k ,i ,j ,
ydir) )
1277 call check( __line__, qflx_anti(k ,i ,j-1,
ydir) )
1279 momx_rk(k,i,j) = momx_rk(k,i,j) &
1280 + dtrk * ( ( ( qflx_anti(k,i,j,
zdir) - qflx_anti(k-1,i ,j ,
zdir) ) * rcdz(k) &
1281 + ( qflx_anti(k,i,j,
xdir) - qflx_anti(k ,i-1,j ,
xdir) ) * rfdx(i) &
1282 + ( qflx_anti(k,i,j,
ydir) - qflx_anti(k ,i ,j-1,
ydir) ) * rcdy(j) ) ) &
1283 * mapf(i,j,1,
i_uy) * mapf(i,j,2,
i_uy) &
1284 / gsqrt(k,i,j,
i_uyz)
1290 k = iundef; i = iundef; j = iundef
1297 qflx_lo(:,:,:,:) = undef
1298 qflx_anti(:,:,:,:) = undef
1304 qflx_hi(:,:,:,:) = undef
1322 gsqrt(:,:,:,
i_xvw), j33g, &
1325 iis, iie, jjs, jje )
1329 gsqrt(:,:,:,
i_xvz), j13g(:,:,:,
i_xvw), mapf(:,:,:,
i_xv), &
1331 iis, iie, jjs, jje )
1334 gsqrt(:,:,:,
i_xvz), j23g(:,:,:,
i_xvw), mapf(:,:,:,
i_xv), &
1336 iis, iie, jjs, jje )
1345 iis, iie, jjs, jje )
1354 iis, iie, jjs, jje )
1365 pgf(k,i,j) = ( ( gsqrt(k,i,j+1,
i_xyz) * dpres(k,i,j+1) &
1366 - gsqrt(k,i,j ,
i_xyz) * dpres(k,i,j ) &
1368 + ( j23g(k ,i,j,
i_xvw) &
1369 * 0.5_rp * ( f2h(k ,1,
i_xvz) * ( dpres(k+1,i,j+1)+dpres(k+1,i,j) ) &
1370 + f2h(k ,2,
i_xvz) * ( dpres(k ,i,j+1)+dpres(k ,i,j) ) ) &
1371 - j23g(k-1,i,j,
i_xvw) &
1372 * 0.5_rp * ( f2h(k-1,1,
i_xvz) * ( dpres(k ,i,j+1)+dpres(k ,i,j) ) &
1373 + f2h(k-1,2,
i_xvz) * ( dpres(k-1,i,j+1)+dpres(k-1,i,j) ) ) &
1388 call check( __line__, momx(k,
is,j ) )
1389 call check( __line__, momx(k,
is,j+1) )
1391 cor(k,
is,j) = - 0.25_rp * ( corioli(
is,j+1)+corioli(
is,j) ) &
1392 * ( momx(k,
is,j+1)+momx(k,
is,j) )
1402 call check( __line__, momx(k,i ,j ) )
1403 call check( __line__, momx(k,i ,j+1) )
1404 call check( __line__, momx(k,i-1,j ) )
1405 call check( __line__, momx(k,i-1,j+1) )
1407 cor(k,i,j) = - 0.125_rp * ( corioli( i ,j+1)+corioli( i ,j) ) &
1408 * ( momx(k,i ,j+1)+momx(k,i ,j) &
1409 + momx(k,i-1,j+1)+momx(k,i-1,j) ) &
1410 - 0.25_rp * mapf(i,j,1,
i_xv) * mapf(i,j,2,
i_xv) &
1411 * ( momx(k,i,j) + momx(k,i-1,j) + momx(k,i,j+1) + momx(k,i-1,j+1) )&
1413 * ( 1.0_rp/mapf(i,j,2,
i_uv) - 1.0_rp/mapf(i-1,j,2,
i_uv) ) * rcdx(i) &
1414 - 0.25_rp * ( momx(k,i,j)+momx(k,i-1,j)+momx(k,i,j+1)+momx(k,i-1,j+1) ) &
1415 * ( 1.0_rp/mapf(i,j+1,1,
i_xy) - 1.0_rp/mapf(i,j,1,
i_xy) ) * rfdy(j) ) &
1416 * 2.0_rp / ( dens(k,i,j) + dens(k,i,j+1) )
1427 do j = jjs, min(jje,
jeh)
1430 call check( __line__, qflx_hi(k ,
is,j ,
zdir) )
1431 call check( __line__, qflx_hi(k-1,
is,j ,
zdir) )
1432 call check( __line__, qflx_hi(k ,
is,j ,
ydir) )
1433 call check( __line__, qflx_hi(k ,
is,j-1,
ydir) )
1434 call check( __line__, ddiv(k,
is,j+1) )
1435 call check( __line__, ddiv(k,
is,j ) )
1436 call check( __line__, momy_t(k,
is,j) )
1437 call check( __line__, momy0(k,
is,j) )
1439 advcv = - ( qflx_hi(k,
is,j,
zdir) - qflx_hi(k-1,
is,j ,
zdir) &
1440 + qflx_j23(k,
is,j) - qflx_j23(k-1,
is,j) ) * rcdz(k)
1441 advch = - ( qflx_hi(k,
is,j,
ydir) - qflx_hi(k ,
is,j-1,
ydir) ) * rfdy(j) &
1443 div = divdmp_coef / dtrk * fdy(j) * ( ddiv(k,
is,j+1)-ddiv(k,
is,j) )
1444 momy_rk(k,
is,j) = momy0(k,
is,j) &
1445 + dtrk * ( ( advcv + advch &
1455 pg_t(k,
is,j,3) = - pgf(k,i,j) / gsqrt(k,
is,j,
i_uyz)
1456 cf_t(k,
is,j,2) = cor(k,
is,j)
1457 ddiv_t(k,
is,j,3) = div
1465 do j = jjs, min(jje,
jeh)
1469 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
1470 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
1471 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
1472 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
1473 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
1474 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
1475 call check( __line__, ddiv(k,i,j+1) )
1476 call check( __line__, ddiv(k,i,j ) )
1477 call check( __line__, momy_t(k,i,j) )
1478 call check( __line__, momy0(k,i,j) )
1480 advcv = - ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) &
1481 + qflx_j13(k,i,j) - qflx_j13(k-1,i,j) &
1482 + qflx_j23(k,i,j) - qflx_j23(k-1,i,j) ) * rcdz(k)
1483 advch = - ( ( qflx_hi(k,i,j,
xdir) - qflx_hi(k ,i-1,j ,
xdir) ) * rcdx(i) &
1484 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k ,i ,j-1,
ydir) ) * rfdy(j) ) &
1485 * mapf(i,j,1,
i_xv) * mapf(i,j,2,
i_xv)
1486 div = divdmp_coef / dtrk * fdy(j) * ( ddiv(k,i,j+1)-ddiv(k,i,j) )
1487 momy_rk(k,i,j) = momy0(k,i,j) &
1488 + dtrk * ( ( advcv + advch &
1490 ) / gsqrt(k,i,j,
i_xvz) &
1496 advcv_t(k,i,j,
i_momy) = advcv / gsqrt(k,i,j,
i_uyz)
1497 advch_t(k,i,j,
i_momy) = advch / gsqrt(k,i,j,
i_uyz)
1498 pg_t(k,i,j,3) = - pgf(k,i,j) / gsqrt(k,i,j,
i_uyz)
1499 cf_t(k,i,j,2) = cor(k,i,j)
1500 ddiv_t(k,i,j,3) = div
1511 k = iundef; i = iundef; j = iundef
1515 if ( flag_fct_momentum )
then
1520 momz, momy0, dens, &
1521 gsqrt(:,:,:,
i_xvz), j33g, &
1524 iis-1, iie+1, jjs-1, jje+1 )
1529 momx, momy0, dens, &
1533 iis-1, iie+1, jjs-1, jje+1 )
1538 momy, momy0, dens, &
1542 iis-1, iie+1, jjs-1, jje+1 )
1548 if ( flag_fct_momentum )
then
1553 qflx_hi(k,i,j,
zdir) = qflx_hi(k,i,j,
zdir) / ( mapf(i,j,1,
i_xv) * mapf(i,j,2,
i_xv) ) &
1554 + qflx_j13(k,i,j) + qflx_j23(k,i,j)
1562 dens0_uvw(k,i,j) = 0.5_rp * ( dens0(k,i,j) + dens0(k,i,j+1) )
1563 dens_uvw(k,i,j) = 0.5_rp * ( dens_rk(k,i,j) + dens_rk(k,i,j+1) )
1568 call comm_wait ( vely(:,:,:), 6 )
1571 vely, dens0_uvw, dens_uvw, &
1575 gsqrt(:,:,:,
i_xvz), &
1578 flag_fct_along_stream )
1588 do j = jjs, min(jje,
jeh)
1591 call check( __line__, momy_rk(k,
is,j) )
1592 call check( __line__, qflx_anti(k ,
is,j ,
zdir) )
1593 call check( __line__, qflx_anti(k-1,
is,j ,
zdir) )
1594 call check( __line__, qflx_anti(k ,
is,j ,
ydir) )
1595 call check( __line__, qflx_anti(k ,
is,j-1,
ydir) )
1597 momy_rk(k,
is,j) = momy_rk(k,
is,j) &
1598 + dtrk * ( ( ( qflx_anti(k,
is,j,
zdir) - qflx_anti(k-1,
is,j ,
zdir) ) * rcdz(k) &
1599 + ( qflx_anti(k,
is,j,
ydir) - qflx_anti(k ,
is,j-1,
ydir) ) * rfdy(j) ) ) &
1607 do j = jjs, min(jje,
jeh)
1611 call check( __line__, momy_rk(k,i,j) )
1612 call check( __line__, qflx_anti(k ,i ,j ,
zdir) )
1613 call check( __line__, qflx_anti(k-1,i ,j ,
zdir) )
1614 call check( __line__, qflx_anti(k ,i ,j ,
xdir) )
1615 call check( __line__, qflx_anti(k ,i-1,j ,
xdir) )
1616 call check( __line__, qflx_anti(k ,i ,j ,
ydir) )
1617 call check( __line__, qflx_anti(k ,i ,j-1,
ydir) )
1619 momy_rk(k,i,j) = momy_rk(k,i,j) &
1620 + dtrk * ( ( ( qflx_anti(k,i,j,
zdir) - qflx_anti(k-1,i ,j ,
zdir) ) * rcdz(k) &
1621 + ( qflx_anti(k,i,j,
xdir) - qflx_anti(k ,i-1,j ,
xdir) ) * rcdx(i) &
1622 + ( qflx_anti(k,i,j,
ydir) - qflx_anti(k ,i ,j-1,
ydir) ) * rfdy(j) ) ) &
1623 * mapf(i,j,1,
i_xv) * mapf(i,j,2,
i_xv) &
1624 / gsqrt(k,i,j,
i_xvz)
1630 k = iundef; i = iundef; j = iundef
1637 qflx_lo(:,:,:,:) = undef
1638 qflx_anti(:,:,:,:) = undef
1643 qflx_hi(
ks:,:,:,:) = undef
1660 mflx_hi(:,:,:,
zdir), pott, gsqrt(:,:,:,
i_xyw), &
1663 iis, iie, jjs, jje )
1668 mflx_hi(:,:,:,
xdir), pott, gsqrt(:,:,:,
i_uyz), &
1671 iis, iie, jjs, jje )
1675 mflx_hi(:,:,:,
ydir), pott, gsqrt(:,:,:,
i_xvz), &
1678 iis, iie, jjs, jje )
1687 call check( __line__, tflx_hi(k ,
is,j ,
zdir) )
1688 call check( __line__, tflx_hi(k-1,
is,j ,
zdir) )
1689 call check( __line__, tflx_hi(k ,
is,j ,
ydir) )
1690 call check( __line__, tflx_hi(k ,
is,j-1,
ydir) )
1691 call check( __line__, rhot_t(k,
is,j) )
1692 call check( __line__, rhot0(k,
is,j) )
1694 advcv = - ( tflx_hi(k,
is,j,
zdir) - tflx_hi(k-1,
is,j ,
zdir) ) * rcdz(k)
1695 advch = - ( tflx_hi(k,
is,j,
ydir) - tflx_hi(k ,
is,j-1,
ydir) ) * rcdy(j)
1696 rhot_rk(k,
is,j) = rhot0(k,
is,j) &
1697 + dtrk * ( ( advcv + advch ) * mapf(
is,j,2,
i_xy) / gsqrt(k,
is,j,
i_xyz) &
1713 call check( __line__, tflx_hi(k ,i ,j ,
zdir) )
1714 call check( __line__, tflx_hi(k-1,i ,j ,
zdir) )
1715 call check( __line__, tflx_hi(k ,i ,j ,
xdir) )
1716 call check( __line__, tflx_hi(k ,i-1,j ,
xdir) )
1717 call check( __line__, tflx_hi(k ,i ,j ,
ydir) )
1718 call check( __line__, tflx_hi(k ,i ,j-1,
ydir) )
1719 call check( __line__, rhot_t(k,i,j) )
1720 call check( __line__, rhot0(k,i,j) )
1722 advcv = - ( tflx_hi(k,i,j,
zdir) - tflx_hi(k-1,i ,j ,
zdir) ) * rcdz(k)
1723 advch = - ( tflx_hi(k,i,j,
xdir) - tflx_hi(k ,i-1,j ,
xdir) ) * rcdx(i) &
1724 - ( tflx_hi(k,i,j,
ydir) - tflx_hi(k ,i ,j-1,
ydir) ) * rcdy(j)
1725 rhot_rk(k,i,j) = rhot0(k,i,j) &
1726 + dtrk * ( ( advcv + advch ) * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) / gsqrt(k,i,j,
i_xyz) &
1730 advcv_t(k,i,j,
i_rhot) = advcv * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy)/ gsqrt(k,i,j,
i_xyz)
1731 advch_t(k,i,j,
i_rhot) = advch * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy)/ gsqrt(k,i,j,
i_xyz)
1739 k = iundef; i = iundef; j = iundef
1747 if ( flag_fct_t )
then
1749 call comm_vars8( mflx_hi(:,:,:,
zdir), 1 )
1750 call comm_vars8( mflx_hi(:,:,:,
xdir), 2 )
1751 call comm_vars8( mflx_hi(:,:,:,
ydir), 3 )
1752 call comm_wait ( mflx_hi(:,:,:,
zdir), 1, .false. )
1753 call comm_wait ( mflx_hi(:,:,:,
xdir), 2, .false. )
1754 call comm_wait ( mflx_hi(:,:,:,
ydir), 3, .false. )
1756 if ( .NOT. flag_fct_momentum )
then
1757 call comm_vars8( dens_rk, 1 )
1758 call comm_wait ( dens_rk, 1, .false. )
1765 pott(k,i,j) = rhot0(k,i,j) / dens0(k,i,j)
1778 mflx_hi(:,:,:,
zdir), pott, gsqrt(:,:,:,
i_xyz), &
1781 iis-1, iie+1, jjs-1, jje+1 )
1786 mflx_hi(:,:,:,
xdir), pott, gsqrt(:,:,:,
i_uyz), &
1789 iis-1, iie+1, jjs-1, jje+1 )
1793 mflx_hi(:,:,:,
ydir), pott, gsqrt(:,:,:,
i_xvz), &
1796 iis-1, iie+1, jjs-1, jje+1 )
1802 pott, dens0, dens_rk, &
1806 gsqrt(:,:,:,
i_xyz), &
1809 flag_fct_along_stream )
1823 call check( __line__, rhot_rk(k,
is,j) )
1824 call check( __line__, tflx_anti(k ,
is,j ,
zdir) )
1825 call check( __line__, tflx_anti(k-1,
is,j ,
zdir) )
1826 call check( __line__, tflx_anti(k ,
is,j ,
ydir) )
1827 call check( __line__, tflx_anti(k ,
is,j-1,
ydir) )
1829 rhot_rk(k,
is,j) = rhot_rk(k,
is,j) &
1830 + dtrk * ( ( tflx_anti(k,
is,j,
zdir) - tflx_anti(k-1,
is,j ,
zdir) ) * rcdz(k) &
1831 + ( tflx_anti(k,
is,j,
ydir) - tflx_anti(k ,
is,j-1,
ydir) ) * rcdy(j) ) &
1843 call check( __line__, rhot_rk(k,i,j) )
1844 call check( __line__, tflx_anti(k ,i ,j ,
zdir) )
1845 call check( __line__, tflx_anti(k-1,i ,j ,
zdir) )
1846 call check( __line__, tflx_anti(k ,i ,j ,
xdir) )
1847 call check( __line__, tflx_anti(k ,i-1,j ,
xdir) )
1848 call check( __line__, tflx_anti(k ,i ,j ,
ydir) )
1849 call check( __line__, tflx_anti(k ,i ,j-1,
ydir) )
1851 rhot_rk(k,i,j) = rhot_rk(k,i,j) &
1852 + dtrk * ( ( tflx_anti(k,i,j,
zdir) - tflx_anti(k-1,i ,j ,
zdir) ) * rcdz(k) &
1853 + ( tflx_anti(k,i,j,
xdir) - tflx_anti(k ,i-1,j ,
xdir) ) * rcdx(i) &
1854 + ( tflx_anti(k,i,j,
ydir) - tflx_anti(k ,i ,j-1,
ydir) ) * rcdy(j) ) &
1855 * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) &
1856 / gsqrt(k,i,j,
i_xyz)
1862 k = iundef; i = iundef; j = iundef
1871 call file_history_in(advcv_t(:,:,:,
i_dens),
'DENS_t_advcv',
'tendency of density (vert. advection) (w/ HIST_TEND)',
'kg/m3/s' )
1872 call file_history_in(advcv_t(:,:,:,
i_momz),
'MOMZ_t_advcv',
'tendency of momentum z (vert. advection) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZHXY')
1873 call file_history_in(advcv_t(:,:,:,
i_momx),
'MOMX_t_advcv',
'tendency of momentum x (vert. advection) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXHY')
1874 call file_history_in(advcv_t(:,:,:,
i_momy),
'MOMY_t_advcv',
'tendency of momentum y (vert. advection) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXYH')
1875 call file_history_in(advcv_t(:,:,:,
i_rhot),
'RHOT_t_advcv',
'tendency of rho*theta (vert. advection) (w/ HIST_TEND)',
'K kg/m3/s' )
1877 call file_history_in(advch_t(:,:,:,
i_dens),
'DENS_t_advch',
'tendency of density (horiz. advection) (w/ HIST_TEND)',
'kg/m3/s' )
1878 call file_history_in(advch_t(:,:,:,
i_momz),
'MOMZ_t_advch',
'tendency of momentum z (horiz. advection) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZHXY')
1879 call file_history_in(advch_t(:,:,:,
i_momx),
'MOMX_t_advch',
'tendency of momentum x (horiz. advection) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXHY')
1880 call file_history_in(advch_t(:,:,:,
i_momy),
'MOMY_t_advch',
'tendency of momentum y (horiz. advection) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXYH')
1881 call file_history_in(advch_t(:,:,:,
i_rhot),
'RHOT_t_advch',
'tendency of rho*theta (horiz. advection) (w/ HIST_TEND)',
'K kg/m3/s' )
1883 call file_history_in(pg_t(:,:,:,1),
'MOMZ_t_pg',
'tendency of momentum z (pressure gradient) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZHXY')
1885 call file_history_in(pg_t(:,:,:,2),
'MOMX_t_pg',
'tendency of momentum x (pressure gradient) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXHY')
1886 call file_history_in(pg_t(:,:,:,3),
'MOMY_t_pg',
'tendency of momentum y (pressure gradient) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXYH')
1888 call file_history_in(wdmp_t(:,:,:),
'MOMZ_t_wdamp',
'tendency of momentum z (Rayleigh damping) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZHXY')
1890 call file_history_in(ddiv_t(:,:,:,1),
'MOMZ_t_ddiv',
'tendency of momentum z (divergence damping) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZHXY')
1892 call file_history_in(ddiv_t(:,:,:,2),
'MOMX_t_ddiv',
'tendency of momentum x (divergence damping) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXHY')
1893 call file_history_in(ddiv_t(:,:,:,3),
'MOMY_t_ddiv',
'tendency of momentum y (divergence damping) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXYH')
1895 call file_history_in(cf_t(:,:,:,1),
'MOMX_t_cf',
'tendency of momentum x (coliolis force) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXHY')
1896 call file_history_in(cf_t(:,:,:,2),
'MOMY_t_cf',
'tendency of momentum y (coliolis force) (w/ HIST_TEND)',
'kg/m2/s2', dim_type=
'ZXYH')