Commit 073c583a authored by hb's avatar hb
Browse files

added support for vertical slice model - via -DSLICE_MODEL

parent 02f2f632
!$Id: depth_update.F90,v 1.5 2003-06-18 08:27:41 kbk Exp $
!$Id: depth_update.F90,v 1.6 2005-10-06 09:54:00 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -26,7 +26,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: depth_update.F90,v $
! Revision 1.5 2003-06-18 08:27:41 kbk
! Revision 1.6 2005-10-06 09:54:00 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.5 2003/06/18 08:27:41 kbk
! using HALO in loop boundaries
!
! Revision 1.4 2003/05/12 09:22:39 kbk
......@@ -119,6 +122,13 @@
dry_v = max(_ZERO_,min(_ONE_,(DV-d1)/d2))
end where
#ifdef SLICE_MODEL
do i=imin,imax
DV(i,1)=DV(i,2)
DV(i,3)=DV(i,2)
end do
#endif
#ifdef DEBUG
do j=jmin,jmax
do i=imin,imax
......
!$Id: momentum.F90,v 1.7 2004-01-07 07:37:36 kbk Exp $
!$Id: momentum.F90,v 1.8 2005-10-06 09:54:00 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -28,7 +28,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: momentum.F90,v $
! Revision 1.7 2004-01-07 07:37:36 kbk
! Revision 1.8 2005-10-06 09:54:00 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.7 2004/01/07 07:37:36 kbk
! to compile with IFORT - TABS, etc.
!
! Revision 1.6 2003/04/23 12:09:44 kbk
......@@ -276,6 +279,13 @@
V=(V-dtm*(g*DV*zy+dry_v*(-tausv/rho_0+fU+VEx+SlVx+Slr)))/(1+dtm*rv/DV)
end where
#ifdef SLICE_MODEL
do i=imin,imax
V(i,1)=V(i,2)
V(i,3)=V(i,2)
end do
#endif
! now v is calculated
call update_2d_halo(V,V,av,imin,jmin,imax,jmax,V_TAG)
call wait_halo(V_TAG)
......
!$Id: sealevel.F90,v 1.6 2004-07-29 19:46:32 hb Exp $
!$Id: sealevel.F90,v 1.7 2005-10-06 09:54:00 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -32,7 +32,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: sealevel.F90,v $
! Revision 1.6 2004-07-29 19:46:32 hb
! Revision 1.7 2005-10-06 09:54:00 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.6 2004/07/29 19:46:32 hb
! For compiler option NOMADS_TEST: some lines shortened
!
! Revision 1.5 2003/12/16 12:32:42 kbk
......@@ -121,6 +124,12 @@
end do
end do
#ifdef SLICE_MODEL
do i=imin,imax
z(i,3)=z(i,2)
end do
#endif
call update_2d_halo(z,z,az,imin,jmin,imax,jmax,z_TAG)
call wait_halo(z_TAG)
......
!$Id: uv_advect.F90,v 1.6 2003-08-28 10:33:25 kbk Exp $
!$Id: uv_advect.F90,v 1.7 2005-10-06 09:54:00 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -31,7 +31,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: uv_advect.F90,v $
! Revision 1.6 2003-08-28 10:33:25 kbk
! Revision 1.7 2005-10-06 09:54:00 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.6 2003/08/28 10:33:25 kbk
! use of ax mask, PP is always set
!
! Revision 1.5 2003/05/02 06:55:49 hb
......@@ -106,6 +109,7 @@
end do
end do
#ifndef SLICE_MODEL
! Upstream for dy(UV/D)
do j=jmin-1,jmax ! PP defined on X-points
do i=imin,imax
......@@ -129,6 +133,7 @@
end if
end do
end do
#endif
! Upstream for dx(UV/D)
do j=jmin,jmax ! PP defined on X-points
......@@ -154,6 +159,7 @@
end do
end do
#ifndef SLICE_MODEL
! Upstream for dy(V^2/D)
do j=jmin,jmax+1 ! PP defined on T-points
do i=imin,imax
......@@ -177,6 +183,7 @@
end if
end do
end do
#endif
#ifdef DEBUG
write(debug,*) 'Leaving uv_advect()'
......
!$Id: uv_diffusion.F90,v 1.4 2003-09-13 10:00:51 kbk Exp $
!$Id: uv_diffusion.F90,v 1.5 2005-10-06 09:54:00 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -64,6 +64,7 @@
end do
end do
#ifndef SLICE_MODEL
! Central for dy(Am*(dy(U^2/DU)+dx(V^2/DV)))
do j=jmin-1,jmax ! PP defined on X-points
do i=imin,imax
......@@ -87,6 +88,7 @@
end if
end do
end do
#endif
! Central for dx(Am*(dy(U^2/DU)+dx(V^2/DV)))
do j=jmin,jmax ! PP defined on X-points
......@@ -112,6 +114,7 @@
end do
end do
#ifndef SLICE_MODEL
! Central for dy(2*Am*dy(V^2/DV))
do j=jmin,jmax+1 ! PP defined on T-points
do i=imin,imax
......@@ -134,6 +137,7 @@
end if
end do
end do
#endif
#ifdef DEBUG
write(debug,*) 'Leaving uv_diffusion()'
......
......@@ -49,7 +49,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: advection_3d.F90,v $
! Revision 1.7 2005-05-25 10:32:13 kbk
! Revision 1.8 2005-10-06 09:54:01 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.7 2005/05/25 10:32:13 kbk
! merged from stabe branch v1_2_1
!
! Revision 1.6.2.1 2005/05/25 08:39:14 kbk
......@@ -254,11 +257,13 @@
iimin,jjmin,iimax,jjmax,kmax,D_TAG)
call wait_halo(D_TAG)
#ifndef SLICE_MODEL
call v_split_adv(dt,f,vv,hvn,delxv,delyv,area_inv,av,a2,&
hor_adv,az,AH)
call update_3d_halo(f,f,az,&
iimin,jjmin,iimax,jjmax,kmax,D_TAG)
call wait_halo(D_TAG)
#endif
if (kmax.gt.1) then
#ifdef ITERATE_VERT_ADV
......@@ -274,11 +279,13 @@
iimin,jjmin,iimax,jjmax,kmax,D_TAG)
call wait_halo(D_TAG)
#ifndef SLICE_MODEL
call v_split_adv(dt,f,vv,hvn,delxv,delyv,area_inv,av,a1,&
hor_adv,az,AH)
call update_3d_halo(f,f,az, &
iimin,jjmin,iimax,jjmax,kmax,D_TAG)
call wait_halo(D_TAG)
#endif
if (kmax.gt.1) then
#ifdef ITERATE_VERT_ADV
......@@ -291,11 +298,13 @@
call wait_halo(D_TAG)
end if
#ifndef SLICE_MODEL
call v_split_adv(dt,f,vv,hvn,delxv,delyv,area_inv,av,a1,&
hor_adv,az,AH)
call update_3d_halo(f,f,az, &
iimin,jjmin,iimax,jjmax,kmax,D_TAG)
call wait_halo(D_TAG)
#endif
call u_split_adv(dt,f,uu,hun,delxu,delyu,area_inv,au,a1,&
hor_adv,az,AH)
......
!$Id: coordinates.F90,v 1.7 2004-04-23 09:03:59 kbk Exp $
!$Id: coordinates.F90,v 1.8 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -32,7 +32,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: coordinates.F90,v $
! Revision 1.7 2004-04-23 09:03:59 kbk
! Revision 1.8 2005-10-06 09:54:01 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.7 2004/04/23 09:03:59 kbk
! reverted to pre-adaptive grid version
!
! Revision 1.5 2004/01/05 13:23:27 kbk
......@@ -475,6 +478,17 @@
end select
#ifdef SLICE_MODEL
do i=iimin,iimax
do k=kvmin(i,2),kmax
hvo(i,1,k)=hvo(i,2,k)
hvo(i,3,k)=hvo(i,2,k)
hvn(i,1,k)=hvn(i,2,k)
hvn(i,3,k)=hvn(i,2,k)
end do
end do
#endif
#ifdef DEBUG
write(debug,*) 'Leaving coordinates()'
write(debug,*)
......
!$Id: slow_advection.F90,v 1.6 2003-08-28 15:16:31 kbk Exp $
!$Id: slow_advection.F90,v 1.7 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -32,7 +32,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: slow_advection.F90,v $
! Revision 1.6 2003-08-28 15:16:31 kbk
! Revision 1.7 2005-10-06 09:54:01 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.6 2003/08/28 15:16:31 kbk
! use ax mask, PP from variables_2d, always set PP
!
! Revision 1.5 2003/05/02 07:55:04 kbk
......@@ -112,6 +115,7 @@
end do
end do
#ifndef SLICE_MODEL
! Upstream for dy(UV/D)
do j=jjmin-1,jjmax ! PP defined on X-points
do i=iimin,iimax
......@@ -135,6 +139,7 @@
end if
end do
end do
#endif
! Upstream for dx(UV/D)
do j=jjmin,jjmax
......@@ -160,6 +165,7 @@
end do
end do
#ifndef SLICE_MODEL
! Upstream for dy(V^2/D)
do j=jjmin,jjmax+1 ! PP defined on T-points
do i=iimin,iimax
......@@ -183,6 +189,7 @@
end if
end do
end do
#endif
#ifdef DEBUG
write(debug,*) 'Leaving slow_advection()'
......
!$Id: slow_diffusion.F90,v 1.4 2003-08-28 15:19:03 kbk Exp $
!$Id: slow_diffusion.F90,v 1.5 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -82,6 +82,7 @@
end do
end do
#ifndef SLICE_MODEL
! Central for dy(AM*(dy(U^2/DU)+dx(V^2/DV)))
do j=jjmin-1,jjmax ! PP defined on X-points
do i=iimin,iimax
......@@ -101,6 +102,7 @@
end if
end do
end do
#endif
! Central for dx(AM*(dy(U^2/DU)+dx(V^2/DV)))
do j=jjmin,jjmax ! PP defined on X-points
......@@ -122,6 +124,7 @@
end do
end do
#ifndef SLICE_MODEL
! Central for dy(2*AM*dy(V^2/DV))
do j=jjmin,jjmax+1 ! PP defined on T-points
do i=iimin,iimax
......@@ -140,6 +143,7 @@
end if
end do
end do
#endif
#ifdef DEBUG
write(debug,*) 'Leaving slow_diffusion()'
......
!$Id: upstream_2dh_adv.F90,v 1.1 2004-01-06 15:04:00 kbk Exp $
!$Id: upstream_2dh_adv.F90,v 1.2 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -43,7 +43,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: upstream_2dh_adv.F90,v $
! Revision 1.1 2004-01-06 15:04:00 kbk
! Revision 1.2 2005-10-06 09:54:01 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.1 2004/01/06 15:04:00 kbk
! FCT advection + split of advection_3d.F90 + extra adv. input checks
!
!
......@@ -79,6 +82,11 @@
allocate(cmin(I3DFIELD),stat=rc) ! work array
if (rc /= 0) stop 'fct_2dh: Error allocating memory (cmin)'
#endif
!#ifdef SLICE_MODEL
FATAL 'upstream_2dh_adv(): Do not use upstream_2dh_adv in SLICE_MODEL mode'
stop
!#endif
flx = _ZERO_
do k=1,kmax ! Calculating u-interface low-order fluxes !
......
!$Id: upstream_adv.F90,v 1.1 2004-01-06 15:04:00 kbk Exp $
!$Id: upstream_adv.F90,v 1.2 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -33,7 +33,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: upstream_adv.F90,v $
! Revision 1.1 2004-01-06 15:04:00 kbk
! Revision 1.2 2005-10-06 09:54:01 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.1 2004/01/06 15:04:00 kbk
! FCT advection + split of advection_3d.F90 + extra adv. input checks
!
!
......@@ -84,6 +87,7 @@
end do
end do
#ifndef SLICE_MODEL
cu = _ZERO_
do k=1,kmax ! Calculating v-interface fluxes !
do j=jjmin-1,jjmax
......@@ -107,6 +111,7 @@
end do
end do
end do
#endif
cu = _ZERO_
if (kmax.gt.1) then
......
!$Id: uv_advect_3d.F90,v 1.8 2005-05-25 10:32:13 kbk Exp $
!$Id: uv_advect_3d.F90,v 1.9 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -37,7 +37,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: uv_advect_3d.F90,v $
! Revision 1.8 2005-05-25 10:32:13 kbk
! Revision 1.9 2005-10-06 09:54:01 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.8 2005/05/25 10:32:13 kbk
! merged from stabe branch v1_2_1
!
! Revision 1.7.2.1 2005/05/25 08:41:38 kbk
......@@ -249,6 +252,7 @@
end do
end do
#ifndef SLICE_MODEL
! Upstream for dy(uu*vv/hun)
do k=1,kmax
do j=jjmin-1,jjmax ! PP defined on X-points
......@@ -278,6 +282,7 @@
end do
end do
end do
#endif
! Upstream for dx(uu*vv/hvn)
do k=1,kmax
......@@ -309,6 +314,7 @@
end do
end do
#ifndef SLICE_MODEL
! Upstream for dy(vv^2/hvn)
do k=1,kmax
do j=jjmin,jjmax+1
......@@ -338,6 +344,7 @@
end do
end do
end do
#endif
! Upstream for (uu*ww)_k - (uu*ww)_{k-1}
do j=jjmin,jjmax
......
!$Id: uv_diffusion_3d.F90,v 1.4 2003-08-28 15:20:37 kbk Exp $
!$Id: uv_diffusion_3d.F90,v 1.5 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -69,6 +69,7 @@
end do
end do
#ifndef SLICE_MODEL
! Central for dy(Am*(dy(uu^2/hun)+dx(vv^2/hvn)))
do k=1,kmax
do j=jjmin-1,jjmax ! PP defined on X-points
......@@ -95,6 +96,7 @@
end do
end do
end do
#endif
! Central for dx(Am*(dy(uu^2/hun)+dx(vv^2/hvn)))
do k=1,kmax
......@@ -123,6 +125,7 @@
end do
end do
#ifndef SLICE_MODEL
! Central for dy(2*Am*dy(vv^2/hvn))
do k=1,kmax
do j=jjmin,jjmax+1
......@@ -148,6 +151,7 @@
end do
end do
end do
#endif
#ifdef DEBUG
write(debug,*) 'Leaving uv_diffusion_3d()'
......
!$Id: vv_momentum_3d.F90,v 1.7 2005-04-25 09:32:34 kbk Exp $
!$Id: vv_momentum_3d.F90,v 1.8 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -50,7 +50,10 @@
! Original author(s): Hans Burchard & Karsten Bolding
!
! $Log: vv_momentum_3d.F90,v $
! Revision 1.7 2005-04-25 09:32:34 kbk
! Revision 1.8 2005-10-06 09:54:01 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.7 2005/04/25 09:32:34 kbk
! added NetCDF IO rewrite + de-stag of velocities - Umlauf
!
! Revision 1.6 2004/07/28 14:58:18 hb
......@@ -249,6 +252,15 @@
end do
end do
#ifdef SLICE_MODEL
do i=iimin,iimax
do k=kvmin(i,2),kmax
vv(i,1,k)=vv(i,2,k)
vv(i,3,k)=vv(i,2,k)
end do
end do
#endif
! Update the halo zones
call update_3d_halo(vv,vv,av,iimin,jjmin,iimax,jjmax,kmax,V_TAG)
......
!$Id: initialise.F90,v 1.8 2005-09-23 11:27:10 kbk Exp $
!$Id: initialise.F90,v 1.9 2005-10-06 09:54:01 hb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -22,7 +22,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: initialise.F90,v $
! Revision 1.8 2005-09-23 11:27:10 kbk
! Revision 1.9 2005-10-06 09:54:01 hb
! added support for vertical slice model - via -DSLICE_MODEL
!
! Revision 1.8 2005/09/23 11:27:10 kbk
! support for biology via GOTMs biology modules
!
! Revision 1.7 2004/06/15 09:04:51 kbk
......@@ -211,6 +214,12 @@
stop 'init_model()'
#endif
end if
#if (defined PARALLEL && defined SLICE_MODEL)
call getm_error('init_model()', &
'SLICE_MODEL does not work with PARALLEL - for now')
#endif
STDERR LINE
STDERR 'getm ver. ',RELEASE,': Started on ',dstr,' ',tstr
STDERR LINE
......
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