Commit 0623b0ee authored by hb's avatar hb
Browse files

GETM runs without barotropic mode enabled, set -DNO_BAROTROPIC

parent 8e81cc97
!$Id: m3d.F90,v 1.42 2008-04-14 11:25:06 kb Exp $
!$Id: m3d.F90,v 1.43 2009-02-18 13:38:14 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -477,6 +477,7 @@
#endif
UEx=_ZERO_ ; VEx=_ZERO_
#ifndef NO_BAROTROPIC
if (kmax .gt. 1) then
#ifndef NO_BOTTFRIC
call slow_bottom_friction()
......@@ -492,6 +493,7 @@
end if
call slow_terms()
#endif
call stop_macro()
#ifdef DEBUG
......
!$Id: upstream_adv.F90,v 1.6 2007-06-07 10:25:19 kbk Exp $
!$Id: upstream_adv.F90,v 1.7 2009-02-18 13:38:14 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -115,6 +115,12 @@
Ncall = Ncall+1
write(debug,*) 'upstream_adv() # ',Ncall
#endif
#ifdef NO_BAROTROPIC
STDERR 'Do not use upstream_adv() with the compiler option NO_BAROTROPIC'
STDERR 'Use w_split_it_adv() instead, choose option ITERATE_VERT_ADV'
stop 'upstream_adv()'
#endif
#ifdef USE_ALLOCATED_ARRAYS
allocate(adv(I3DFIELD),stat=rc) ! work array
......
!$Id: uu_momentum_3d.F90,v 1.16 2008-03-26 13:25:52 hb Exp $
!$Id: uu_momentum_3d.F90,v 1.17 2009-02-18 13:38:14 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -151,9 +151,13 @@
end do
! Barotropic pressure gradient
#ifndef NO_BAROTROPIC
zp=max(sseo(i+1,j),-H(i ,j)+min(min_depth,D(i+1,j)))
zm=max(sseo(i ,j),-H(i+1,j)+min(min_depth,D(i ,j)))
zx=(zp-zm+(airp(i+1,j)-airp(i,j))/gamma)/DXU
#else
zx=0.
#endif
! Matrix elements for surface layer
k=kmax
......@@ -208,7 +212,11 @@
#endif
do k=kumin(i,j),kmax
#ifndef NO_BAROTROPIC
uu(i,j,k)=Res(k) +hun(i,j,k)*Diff
#else
uu(i,j,k)=Res(k)
#endif
end do
else ! if (kmax .eq. kumin(i,j))
uu(i,j,kmax)=Uint(i,j)
......
!$Id: vv_momentum_3d.F90,v 1.19 2008-03-26 13:25:52 hb Exp $
!$Id: vv_momentum_3d.F90,v 1.20 2009-02-18 13:38:14 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -168,9 +168,13 @@
end do
! Barotropic pressure gradient
#ifndef NO_BAROTROPIC
zp=max(sseo(i,j+1),-H(i,j )+min(min_depth,D(i,j+1)))
zm=max(sseo(i,j ),-H(i,j+1)+min(min_depth,D(i,j )))
zy=(zp-zm+(airp(i,j+1)-airp(i,j))/gamma)/DYV
#else
zy=0.
#endif
! Matrix elements for surface layer
k=kmax
......@@ -227,7 +231,11 @@
do k=kvmin(i,j),kmax
#ifndef NO_BAROTROPIC
vv(i,j,k)=Res(k)+hvn(i,j,k)*Diff
#else
vv(i,j,k)=Res(k)
#endif
end do
else ! (kmax .eq. kvmin(i,j))
vv(i,j,kmax)=Vint(i,j)
......
!$Id: w_split_adv.F90,v 1.4 2007-06-07 10:25:19 kbk Exp $
!$Id: w_split_adv.F90,v 1.5 2009-02-18 13:38:14 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -72,7 +72,11 @@
Ncall = Ncall+1
write(debug,*) 'w_split_adv() # ',Ncall
#endif
#ifdef NO_BAROTROPIC
STDERR 'Do not use w_split_adv() with the compiler option NO_BAROTROPIC'
STDERR 'Use w_split_it_adv() instead, choose option ITERATE_VERT_ADV'
stop 'w_split_adv()'
#endif
cu = _ZERO_
! Calculating w-interface fluxes !
......
!$Id: w_split_it_adv.F90,v 1.5 2007-07-31 07:28:10 hb Exp $
!$Id: w_split_it_adv.F90,v 1.6 2009-02-18 13:38:14 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -82,7 +82,6 @@
cu = _ZERO_
! Calculating w-interface fluxes !
select case (method)
case (UPSTREAM_SPLIT)
do j=jmin,jmax
......@@ -133,10 +132,14 @@
it=1
ready=.false.
111 do ii=1,it
do k=1,kmax-1
do k=1,kmax
cu(i,j,k) = _ZERO_
if (ww(i,j,k) .gt. _ZERO_) then
c=ww(i,j,k)/float(it)*dt/(0.5*(hi(i,j,k)+hi(i,j,k+1)))
if (k.lt.kmax) then
c=ww(i,j,k)/float(it)*dt/(0.5*(hi(i,j,k)+hi(i,j,k+1)))
else
c=ww(i,j,k)/float(it)*dt/hi(i,j,k)
end if
if (c .gt. cmax) cmax=c
if (k .gt. 1) then
fu=f(i,j,k-1) ! upstream
......@@ -144,21 +147,37 @@
fu=f(i,j,k)
end if
fc=f(i,j,k ) ! central
fd=f(i,j,k+1) ! downstream
if (k.lt.kmax) then
fd=f(i,j,k+1) ! downstream
else
fd=f(i,j,k) ! downstream
end if
if (abs(fd-fc) .gt. 1e-10) then
r=(fc-fu)/(fd-fc) ! slope ratio
else
r=(fc-fu)*1.e10
end if
else
c=-ww(i,j,k)/float(it)*dt/(0.5*(hi(i,j,k)+hi(i,j,k+1)))
if (k.lt.kmax) then
c=-ww(i,j,k)/float(it)*dt/(0.5*(hi(i,j,k)+hi(i,j,k+1)))
else
c=-ww(i,j,k)/float(it)*dt/hi(i,j,k)
end if
if (c .gt. cmax) cmax=c
if (k .lt. kmax-1) then
fu=f(i,j,k+2) ! upstream
else
fu=f(i,j,k+1)
if (k.lt.kmax) then
fu=f(i,j,k+1)
else
fu=f(i,j,k)
end if
end if
if (k.lt.kmax) then
fc=f(i,j,k+1) ! central
else
fc=f(i,j,k) ! central
end if
fc=f(i,j,k+1) ! central
fd=f(i,j,k ) ! downstream
if (abs(fc-fd) .gt. 1e-10) then
r=(fu-fc)/(fc-fd) ! slope ratio
......
!$Id: integration.F90,v 1.11 2007-09-30 13:00:42 kbk Exp $
!$Id: integration.F90,v 1.12 2009-02-18 13:38:15 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -20,6 +20,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: integration.F90,v $
! Revision 1.12 2009-02-18 13:38:15 hb
! GETM runs without barotropic mode enabled, set -DNO_BAROTROPIC
!
! Revision 1.11 2007-09-30 13:00:42 kbk
! prints real time as part of progessoutput
!
......@@ -183,7 +186,9 @@
#endif
end if
#ifndef NO_BAROTROPIC
call integrate_2d(runtype,n,tausx,tausy,airp)
#endif
#ifndef NO_3D
call do_rivers(do_3d)
if (do_3d) then
......
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