stats_compute_xyavg_vel Subroutine

private subroutine stats_compute_xyavg_vel()

Arguments

None

Calls

proc~~stats_compute_xyavg_vel~~CallsGraph proc~stats_compute_xyavg_vel stats_compute_xyavg_vel interface~spatial_avg spatial_avg proc~stats_compute_xyavg_vel->interface~spatial_avg proc~spatial_avg_xy spatial_avg_xy interface~spatial_avg->proc~spatial_avg_xy proc~spatial_avg_y spatial_avg_y interface~spatial_avg->proc~spatial_avg_y mpi_allreduce mpi_allreduce proc~spatial_avg_xy->mpi_allreduce proc~spatial_avg_y->mpi_allreduce

Called by

proc~~stats_compute_xyavg_vel~~CalledByGraph proc~stats_compute_xyavg_vel stats_compute_xyavg_vel proc~stats_main stats_main proc~stats_main->proc~stats_compute_xyavg_vel program~udales uDALES program~udales->proc~stats_main

Source Code

    subroutine stats_compute_xyavg_vel
      implicit none
      !> Mean
      call spatial_avg(uxy,um(ib:ie,jb:je,kb:ke+kh),kb,ke,IIu(ib:ie,jb:je,kb:ke+kh),IIus(kb:ke+kh),.false.)
      call spatial_avg(vxy,vm(ib:ie,jb:je,kb:ke+kh),kb,ke,IIv(ib:ie,jb:je,kb:ke+kh),IIvs(kb:ke+kh),.false.)
      call spatial_avg(wxy,wm(ib:ie,jb:je,kb:ke+kh),kb,ke,IIw(ib:ie,jb:je,kb:ke+kh),IIws(kb:ke+kh),.true.)
      call spatial_avg(pxy,pres0(ib:ie,jb:je,kb:ke+kh),kb,ke,IIc(ib:ie,jb:je,kb:ke+kh),IIcs(kb:ke+kh),.false.)

      !> Advective fluxes and some necesseary mean
      call spatial_avg(uwxyik,uik(ib:ie,jb:je,kb:ke+kh)*wik(ib:ie,jb:je,kb:ke+kh),kb,ke,IIuw(ib:ie,jb:je,kb:ke+kh),IIuws(kb:ke+kh),.true.)
      call spatial_avg(uxyik,uik(ib:ie,jb:je,kb:ke+kh),kb,ke,IIuw(ib:ie,jb:je,kb:ke+kh),IIuws(kb:ke+kh),.true.)
      call spatial_avg(wxyik,wik(ib:ie,jb:je,kb:ke+kh),kb,ke,IIuw(ib:ie,jb:je,kb:ke+kh),IIuws(kb:ke+kh),.true.)
      call spatial_avg(vwxyjk,vjk(ib:ie,jb:je,kb:ke+kh)*wjk(ib:ie,jb:je,kb:ke+kh),kb,ke,IIvw(ib:ie,jb:je,kb:ke+kh),IIvws(kb:ke+kh),.true.)
      call spatial_avg(vxyjk,vjk(ib:ie,jb:je,kb:ke+kh),kb,ke,IIvw(ib:ie,jb:je,kb:ke+kh),IIvws(kb:ke+kh),.true.)
      call spatial_avg(wxyjk,wjk(ib:ie,jb:je,kb:ke+kh),kb,ke,IIvw(ib:ie,jb:je,kb:ke+kh),IIvws(kb:ke+kh),.true.)
      call spatial_avg(uvxyij,uij(ib:ie,jb:je,kb:ke+kh)*vij(ib:ie,jb:je,kb:ke+kh),kb,ke,IIuv(ib:ie,jb:je,kb:ke+kh),IIuvs(kb:ke+kh),.true.)
      call spatial_avg(uxyij,uij(ib:ie,jb:je,kb:ke+kh),kb,ke,IIuv(ib:ie,jb:je,kb:ke+kh),IIuvs(kb:ke+kh),.true.)
      call spatial_avg(vxyij,vij(ib:ie,jb:je,kb:ke+kh),kb,ke,IIuv(ib:ie,jb:je,kb:ke+kh),IIuvs(kb:ke+kh),.true.)

      call spatial_avg(uuxyi,um(ib:ie,jb:je,kb:ke+kh)*um(ib:ie,jb:je,kb:ke+kh),kb,ke,IIu(ib:ie,jb:je,kb:ke+kh),IIus(kb:ke+kh),.true.)
      call spatial_avg(vvxyj,vm(ib:ie,jb:je,kb:ke+kh)*vm(ib:ie,jb:je,kb:ke+kh),kb,ke,IIv(ib:ie,jb:je,kb:ke+kh),IIvs(kb:ke+kh),.true.)
      call spatial_avg(wwxyk,wm(ib:ie,jb:je,kb:ke+kh)*wm(ib:ie,jb:je,kb:ke+kh),kb,ke,IIw(ib:ie,jb:je,kb:ke+kh),IIws(kb:ke+kh),.true.)

      !> Turbulent fluxes (masked where the corner mask has no fluid point, e.g. kb)
      upwpxyik = uwxyik - uxyik*wxyik
      vpwpxyjk = vwxyjk - vxyjk*wxyjk
      upvpxyij = uvxyij - uxyij*vxyij
      where (IIuws(kb:ke+kh)==0) upwpxyik = -999.
      where (IIvws(kb:ke+kh)==0) vpwpxyjk = -999.
      where (IIuvs(kb:ke+kh)==0) upvpxyij = -999.

      !> SGS fluxes
      call spatial_avg(usgsxy,usgs(ib:ie,jb:je,kb:ke+kh),kb,ke,IIuw(ib:ie,jb:je,kb:ke+kh),IIuws(kb:ke+kh),.true.)
      call spatial_avg(vsgsxy,vsgs(ib:ie,jb:je,kb:ke+kh),kb,ke,IIvw(ib:ie,jb:je,kb:ke+kh),IIvws(kb:ke+kh),.true.)
      call spatial_avg(wsgsxy,wsgs(ib:ie,jb:je,kb:ke+kh),kb,ke,IIc(ib:ie,jb:je,kb:ke+kh),IIcs(kb:ke+kh),.false.)
    end subroutine stats_compute_xyavg_vel