Commit 052e0322 authored by Knut's avatar Knut
Browse files

changed interface depths for 2d uv advection

parent bd38298f
......@@ -43,11 +43,11 @@
REALTYPE,dimension(E2DFIELD),intent(out) :: DU,DV
end subroutine depth_update
subroutine uv_advect(U,V,DU,DV)
subroutine uv_advect(U,V,Dold,Dnew,DU,DV)
use domain, only: imin,imax,jmin,jmax
IMPLICIT NONE
REALTYPE,dimension(E2DFIELD),intent(in) :: U,V
REALTYPE,dimension(E2DFIELD),target,intent(in) :: DU,DV
REALTYPE,dimension(E2DFIELD),target,intent(in) :: Dold,Dnew,DU,DV
end subroutine uv_advect
subroutine uv_diffusion(An_method,U,V,D,DU,DV)
......@@ -470,7 +470,7 @@
end if
call tic(TIM_INTEGR2D)
call uv_advect(U,V,DU,DV)
call uv_advect(U,V,Dlast,D,DU,DV)
call uv_diffusion(An_method,U,V,D,DU,DV) ! Has to be called after uv_advect.
call toc(TIM_INTEGR2D)
......
......@@ -5,7 +5,7 @@
! !ROUTINE: uv_advect - 2D advection of momentum \label{sec-uv-advect}
!
! !INTERFACE:
subroutine uv_advect(U,V,DU,DV)
subroutine uv_advect(U,V,Dold,Dnew,DU,DV)
! Note (KK): keep in sync with interface in m2d.F90
!
......@@ -32,7 +32,7 @@
!
! !INPUT PARAMETERS:
REALTYPE,dimension(E2DFIELD),intent(in) :: U,V
REALTYPE,dimension(E2DFIELD),target,intent(in) :: DU,DV
REALTYPE,dimension(E2DFIELD),target,intent(in) :: Dold,Dnew,DU,DV
!
! !REVISION HISTORY:
! Original author(s): Hans Burchard & Karsten Bolding
......@@ -77,9 +77,7 @@
Uadv(i,j) = _HALF_*( U(i,j) + U(i+1,j) )
Vadv(i,j) = _HALF_*( V(i,j) + V(i+1,j) )
end if
! Note (KK): DU only valid until imax+1
! therefore DUadv only valid until imax
DUadv(i,j) = _HALF_*( DU(i,j) + DU(i+1,j) )
DUadv(i,j) = _HALF_*( Dold(i+1,j) + Dnew(i+1,j) )
! Note (KK): DV only valid until jmax+1
! therefore DVadv only valid until jmax+1
DVadv(i,j) = _HALF_*( DV(i,j) + DV(i+1,j) )
......@@ -204,9 +202,7 @@
! Note (KK): DU only valid until imax+1
! therefore DUadv only valid until imax+1
DUadv(i,j) = _HALF_*( DU(i,j) + DU(i,j+1) )
! Note (KK): DV only valid until jmax+1
! therefore DVadv only valid until jmax
DVadv(i,j) = _HALF_*( DV(i,j) + DV(i,j+1) )
DVadv(i,j) = _HALF_*( Dold(i,j+1) + Dnew(i,j+1) )
end do
#ifndef SLICE_MODEL
end do
......
......@@ -597,7 +597,7 @@
#endif
call tic(TIM_INTEGR3D)
call uv_advect(Uint,Vint,Dun,Dvn)
call uv_advect(Uint,Vint,Dold,Dn,Dun,Dvn)
call uv_diffusion(0,Uint,Vint,Dn,Dun,Dvn) ! Has to be called after uv_advect.
call toc(TIM_INTEGR3D)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment