diffe Subroutine

public subroutine diffe(putout)

Uses

  • proc~~diffe~~UsesGraph proc~diffe diffe module~modfields modfields proc~diffe->module~modfields module~modglobal modglobal proc~diffe->module~modglobal module~modmpi modmpi proc~diffe->module~modmpi decomp_2d decomp_2d module~modfields->decomp_2d mpi mpi module~modmpi->mpi

Arguments

Type IntentOptional Attributes Name
real, intent(inout) :: putout(ib-ih:ie+ih,jb-jh:je+jh,kb:ke+kh)

Called by

proc~~diffe~~CalledByGraph proc~diffe diffe proc~subgrid subgrid proc~subgrid->proc~diffe program~dalesurban DALESURBAN program~dalesurban->proc~subgrid

Source Code

  subroutine diffe(putout)

    use modglobal, only : ib,ie,ih,jb,je,jh,kb,ke,kh,dx2i,dzf,dzfi,&
         dy2i,dzhi,dzh2i,jmax
    use modfields, only : e120
    use modmpi,    only : myid
    implicit none

    real, intent(inout) :: putout(ib-ih:ie+ih,jb-jh:je+jh,kb:ke+kh)
    integer             :: i,j,k,im,ip,jm,jp,km,kp

    do k=kb,ke
       kp=k+1
       km=k-1

       do j=jb,je
          jp=j+1
          jm=j-1

          do i=ib,ie
            ip=i+1
            im=i-1

             putout(i,j,k) = putout(i,j,k) &
                           +  1.0 * ( &
                             ( &
                             (ekm(ip,j,k)+ekm(i ,j,k)) * (e120(ip,j,k)-e120(i ,j,k)) &
                           - (ekm(i ,j,k)+ekm(im,j,k)) * (e120(i ,j,k)-e120(im,j,k)) &
                             ) * dx2i &
                           + ( &
                             (ekm(i,jp,k)+ekm(i,j ,k)) * (e120(i,jp,k)-e120(i,j ,k)) &
                           - (ekm(i,j ,k)+ekm(i,jm,k)) * (e120(i,j ,k)-e120(i,jm,k)) &
                             ) * dy2i &
                           + ( &
                             (dzf(kp)*ekm(i,j,k) + dzf(k)*ekm(i,j,kp)) * (e120(i,j,kp)-e120(i,j,k)) *dzh2i(kp) &
                           - (dzf(km)*ekm(i,j,k) + dzf(k)*ekm(i,j,km)) * (e120(i,j,k)-e120(i,j,km)) *dzh2i(k)  &
                             ) * dzfi(k) &
                             )
          end do
       end do
    end do


  end subroutine diffe