subroutine wallstress_dns(txz,tyz)
use types,only:rprec
use param,only:ld,nx,ny,nz,nu_molec,z_i,u_star,dz
use sim_param,only:u,v
implicit none
real(kind=rprec),dimension(ld,ny,nz),intent(out)::txz,tyz
integer::jx,jy
      
do jy=1,ny
do jx=1,nx
   txz(jx,jy,1)=-nu_molec/(z_i*u_star)*u(jx,jy,1)/(0.5_rprec*dz)
   tyz(jx,jy,1)=-nu_molec/(z_i*u_star)*v(jx,jy,1)/(0.5_rprec*dz)
end do
end do
end subroutine wallstress_dns
