Commit 2d1ba6f4 authored by kbk's avatar kbk
Browse files

now compiles with -DNO_BAROCLINIC and -DNO_3D

parent 2d01c821
!$Id: gotm.F90,v 1.6 2003-12-16 15:58:54 kbk Exp $
!$Id: gotm.F90,v 1.7 2003-12-17 10:22:41 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -14,7 +14,10 @@
use halo_zones, only: update_3d_halo,wait_halo,H_TAG
use domain, only: iimin,iimax,jjmin,jjmax,kmax,az,min_depth,crit_depth
use variables_2d, only: D,zub,zvb,z
use variables_3d, only: dt,kmin,ho,hn,tke,eps,SS,NN,num,nuh,taus,taub
use variables_3d, only: dt,kmin,ho,hn,tke,eps,SS,num,taus,taub
#ifndef NO_BAROCLINIC
use variables_3d, only: NN,nuh
#endif
use variables_3d, only: avmback,avhback
use turbulence, only: do_turbulence,cde
use turbulence, only: tke1d => tke, eps1d => eps, L1d => L
......@@ -31,7 +34,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: gotm.F90,v $
! Revision 1.6 2003-12-16 15:58:54 kbk
! Revision 1.7 2003-12-17 10:22:41 kbk
! now compiles with -DNO_BAROCLINIC and -DNO_3D
!
! Revision 1.6 2003/12/16 15:58:54 kbk
! back ground viscosity and diffusivity (manuel)
!
! Revision 1.5 2003/05/05 15:51:57 kbk
......@@ -104,7 +110,6 @@
num(i,j,:) = avmback
nuh(i,j,:) = avhback
#else
do j=jjmin,jjmax
do i=iimin,iimax
......@@ -115,16 +120,22 @@
h = hn(i,j,:)
SS1d = SS(i,j,:)
#ifndef NO_BAROCLINIC
NN1d = NN(i,j,:)
#endif
P = num(i,j,:)*SS1d
#ifndef NO_BAROCLINIC
B = -nuh(i,j,:)*NN1d
#endif
tke1d=tke(i,j,:)
eps1d=eps(i,j,:)
L1d=cde*tke1d**1.5/eps1d
num1d=num(i,j,:)
#ifndef NO_BAROCLINIC
nuh1d=nuh(i,j,:)
#endif
z0s = 0.1
z0b=0.5*(max(zub(i-1,j),zub(i,j))+max(zvb(i,j-1),zvb(i,j)))
......@@ -138,7 +149,9 @@
L1d(k)=0.4*(zz+z0b)*sqrt(1.-zz/D(i,j))
eps1d(k)=0.16431677*tke1d(k)**1.5/L1d(k)
num1d(k)=0.09*tke1d(k)**2/eps1d(k)
#ifndef NO_BAROCLINIC
nuh1d(k)=num1d(k)
#endif
end do
#else
call do_turbulence(kmax,dt,D(i,j),u_taus,u_taub,z0s,z0b,h, &
......@@ -148,17 +161,21 @@
tke(i,j,:) = tke1d
eps(i,j,:) = eps1d
num(i,j,:) = num1d + avmback
#ifndef NO_BAROCLINIC
nuh(i,j,:) = nuh1d + avhback
#endif
end if
end do
end do
call update_3d_halo(num,num,az,iimin,jjmin,iimax,jjmax,kmax,H_TAG)
call wait_halo(H_TAG)
#endif
#ifndef NO_BAROCLINIC
call update_3d_halo(nuh,nuh,az,iimin,jjmin,iimax,jjmax,kmax,H_TAG)
call wait_halo(H_TAG)
#endif
#endif
#ifdef DEBUG
write(debug,*) 'Leaving gotm()'
......
!$Id: ss_nn.F90,v 1.3 2003-04-23 12:16:34 kbk Exp $
!$Id: ss_nn.F90,v 1.4 2003-12-17 10:22:41 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -18,9 +18,9 @@
!
! !USES:
use domain, only: iimin,iimax,jjmin,jjmax,kmax,au,av,az
use variables_3d, only: kmin,kumin,uu,hun,kvmin,vv,hvn,SS
use variables_3d, only: kmin,kumin,hn,uu,hun,kvmin,vv,hvn,SS,num
#ifndef NO_BAROCLINIC
use variables_3d, only: hn,NN,rho,num
use variables_3d, only: NN,rho
#endif
IMPLICIT NONE
!
......@@ -34,7 +34,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: ss_nn.F90,v $
! Revision 1.3 2003-04-23 12:16:34 kbk
! Revision 1.4 2003-12-17 10:22:41 kbk
! now compiles with -DNO_BAROCLINIC and -DNO_3D
!
! Revision 1.3 2003/04/23 12:16:34 kbk
! cleaned code + TABS to spaces
!
! Revision 1.2 2003/04/07 13:36:38 kbk
......
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