Commit 0e396279 authored by kbk's avatar kbk
Browse files

set PP equal 0. + only slow_advection when mask .eq. 1

parent f4bfb244
!$Id: slow_advection.F90,v 1.4 2003-04-23 12:16:34 kbk Exp $ !$Id: slow_advection.F90,v 1.5 2003-05-02 07:55:04 kbk Exp $
#include "cppdefs.h" #include "cppdefs.h"
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
!BOP !BOP
...@@ -32,7 +32,10 @@ ...@@ -32,7 +32,10 @@
! Original author(s): Hans Burchard & Karsten Bolding ! Original author(s): Hans Burchard & Karsten Bolding
! !
! $Log: slow_advection.F90,v $ ! $Log: slow_advection.F90,v $
! Revision 1.4 2003-04-23 12:16:34 kbk ! Revision 1.5 2003-05-02 07:55:04 kbk
! set PP equal 0. + only slow_advection when mask .eq. 1
!
! Revision 1.4 2003/04/23 12:16:34 kbk
! cleaned code + TABS to spaces ! cleaned code + TABS to spaces
! !
! Revision 1.3 2003/04/07 16:24:04 kbk ! Revision 1.3 2003/04/07 16:24:04 kbk
...@@ -78,8 +81,6 @@ ...@@ -78,8 +81,6 @@
#endif #endif
do j=jjmin-1,jjmax+1 do j=jjmin-1,jjmax+1
do i=iimin-1,iimax+1 do i=iimin-1,iimax+1
!KBK DUi(i,j)=max(ssun(i,j)+HU(i,j),min_depth)
!KBK DVi(i,j)=max(ssvn(i,j)+HV(i,j),min_depth)
DUi(i,j)=ssun(i,j)+HU(i,j) DUi(i,j)=ssun(i,j)+HU(i,j)
DVi(i,j)=ssvn(i,j)+HV(i,j) DVi(i,j)=ssvn(i,j)+HV(i,j)
end do end do
...@@ -88,7 +89,7 @@ ...@@ -88,7 +89,7 @@
! Upstream for dx(U^2/D) ! Upstream for dx(U^2/D)
do j=jjmin,jjmax do j=jjmin,jjmax
do i=iimin,iimax+1 ! PP defined on T-points do i=iimin,iimax+1 ! PP defined on T-points
!KBK PP(i,j) = _ZERO_ PP(i,j) = _ZERO_
if (az(i,j) .ge. 1) then if (az(i,j) .ge. 1) then
PP(i,j)=0.5*(Uint(i-1,j)+Uint(i,j)) PP(i,j)=0.5*(Uint(i-1,j)+Uint(i,j))
if (PP(i,j) .gt. _ZERO_ ) then if (PP(i,j) .gt. _ZERO_ ) then
...@@ -102,10 +103,10 @@ ...@@ -102,10 +103,10 @@
end do end do
do j=jjmin,jjmax do j=jjmin,jjmax
do i=iimin,iimax ! UEx defined on U-points do i=iimin,iimax ! UEx defined on U-points
if (au(i,j) .ge. 1) then if (au(i,j) .eq. 1) then
UEx(i,j)=(PP(i+1,j)-PP(i ,j))*ARUD1 UEx(i,j)=(PP(i+1,j)-PP(i ,j))*ARUD1
else else
!KBK UEx(i,j)= _ZERO_ UEx(i,j)= _ZERO_
end if end if
end do end do
end do end do
...@@ -113,7 +114,7 @@ ...@@ -113,7 +114,7 @@
! Upstream for dy(UV/D) ! Upstream for dy(UV/D)
do j=jjmin-1,jjmax ! PP defined on X-points do j=jjmin-1,jjmax ! PP defined on X-points
do i=iimin-1,iimax do i=iimin-1,iimax
!KBK PP(i,j) = _ZERO_ PP(i,j) = _ZERO_
if (au(i,j) .ge. 1 .or. au(i,j+1) .ge. 1) then if (au(i,j) .ge. 1 .or. au(i,j+1) .ge. 1) then
PP(i,j)=0.5*(Vint(i+1,j)+Vint(i,j)) PP(i,j)=0.5*(Vint(i+1,j)+Vint(i,j))
if (PP(i,j) .gt. _ZERO_) then if (PP(i,j) .gt. _ZERO_) then
...@@ -127,7 +128,7 @@ ...@@ -127,7 +128,7 @@
end do end do
do j=jjmin,jjmax do j=jjmin,jjmax
do i=iimin,iimax !UEx defined on U-points do i=iimin,iimax !UEx defined on U-points
if (au(i,j) .ge. 1) then if (au(i,j) .eq. 1) then
UEx(i,j)=UEx(i,j)+(PP(i,j )-PP(i,j-1))*ARUD1 UEx(i,j)=UEx(i,j)+(PP(i,j )-PP(i,j-1))*ARUD1
end if end if
end do end do
...@@ -136,7 +137,7 @@ ...@@ -136,7 +137,7 @@
! Upstream for dx(UV/D) ! Upstream for dx(UV/D)
do j=jjmin-1,jjmax do j=jjmin-1,jjmax
do i=iimin-1,iimax ! PP defined on X-points do i=iimin-1,iimax ! PP defined on X-points
!KBK PP(i,j) = _ZERO_ PP(i,j) = _ZERO_
if (av(i,j) .ge. 1 .or. av(i+1,j) .ge. 1) then if (av(i,j) .ge. 1 .or. av(i+1,j) .ge. 1) then
PP(i,j)=0.5*(Uint(i,j)+Uint(i,j+1)) PP(i,j)=0.5*(Uint(i,j)+Uint(i,j+1))
if (PP(i,j) .gt. _ZERO_) then if (PP(i,j) .gt. _ZERO_) then
...@@ -150,10 +151,10 @@ ...@@ -150,10 +151,10 @@
end do end do
do j=jjmin,jjmax do j=jjmin,jjmax
do i=iimin,iimax ! VEx defined on V-points do i=iimin,iimax ! VEx defined on V-points
if (av(i,j) .ge. 1) then if (av(i,j) .eq. 1) then
VEx(i,j)=(PP(i ,j)-PP(i-1,j))*ARVD1 VEx(i,j)=(PP(i ,j)-PP(i-1,j))*ARVD1
else else
!KBK VEx(i,j)= _ZERO_ VEx(i,j)= _ZERO_
end if end if
end do end do
end do end do
...@@ -175,7 +176,7 @@ ...@@ -175,7 +176,7 @@
end do end do
do j=jjmin,jjmax ! VEx defined on V-points do j=jjmin,jjmax ! VEx defined on V-points
do i=iimin,iimax do i=iimin,iimax
if (av(i,j) .ge. 1) then if (av(i,j) .eq. 1) then
VEx(i,j)=VEx(i,j)+(PP(i,j+1)-PP(i,j ))*ARVD1 VEx(i,j)=VEx(i,j)+(PP(i,j+1)-PP(i,j ))*ARVD1
end if end if
end do end do
......
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