[MITgcm-support] question on sponge-layer/mpi

Patrick Heimbach heimbach at MIT.EDU
Thu Sep 9 14:47:05 EDT 2004


Hi,

there is a sponge layer code available in
conjunction with obcs which, unfortunately,
hasn't been merged to the main MITgcm repository
so far (it has been part of the ECCO environment).
We will try to do the merging next week
and make this code available, so that you
don't have to worry about tiles, mpi-id's etc.

-Patrick



Quoting Theo Gerkema <Theo.Gerkema at hmg.inpg.fr>:

> Hi Uli,
> 
> The problem arising on multiple processors has been solved.
> 
> I've defined the sponge in external_forcing.F
> by introducing the field rayleighz, as indicated previously.
> (NB: one needs to add a line in DYNVARS.h too:
>       _RL  rayleighz(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)  ).
> To make it work on multiple processors, add the line
>    #include "EESUPPORT.h"
> in external_forcing.F, and also, under !INPUT/OUTPUT PARAMETERS:
>       INTEGER mpiMyId
> Then build a loop around the sponge:
>        IF (mpiMyId .EQ. 0) THEN
>    .....
>        ENDIF
> 
> This way the sponge works only in the most leftward tile.
> NB: my runs are basically 2d (3 points in y), and the tiles
> are set up in x. I'm not sure the procedure works the same way
> in a full 3d problem.
> 
> -- Theo.
> 
> 
> 
> Uli Riemenschneider wrote:
> 
> > Hi again,
> >
> > I was wondering if someone could give me a few pointers on how to setup
> > a sponge layer in the MITgcm. Basically what I want to do is a kind of 
> > climatological relaxation to a fixed/prescribed background profile of 
> > temperature. Following the e-mails from Theo a few weeks back I have 
> > figured out that I need to add a bit of code in the temperature 
> > subroutine of external_forcing.F along the lines of what Theo outlined 
> > n his mail, but for the temperature field:
> >
> >        DO j=jMin,jMax
> >        DO i=iMin+1,iMax-1
> >         gT(i,j,kLev,bi,bj) = gT(i,j,kLev,bi,bj)
> >     &   +rayleighz(i,j,kLev,bi,bj)*
> >     &   ('backgound Temp (tRef ?)' - gT(i,j,kLev,bi,bj))
> >        ENDDO
> >       ENDDO
> >
> > I am sure someone has done this kind of thing before so I was hoping I 
> > could get help with figuring out where to best add the sponge layer to 
> > the code. Plus I am also running the model on multiple processors and 
> > was wondering if the problem Theo was having has been resolved?
> >
> > Many thanks!
> > Uli
> >
> > Quoting Theo Gerkema <Theo.Gerkema at hmg.inpg.fr>:
> >
> > Could someone help me sorting out the following problem:
> > in external_forcing.F I've added a sponge-layer; the sponge
> > covers (say) the first 100 points of the basin:
> >
> >      DO j=jMin,jMax
> >       DO i=iMin,iMax
> >        rayleighz(i,j,kLev,bi,bj)=0.
> >       ENDDO
> >      ENDDO
> >      DO j=jMin,jMax
> >       DO i=1,100
> >        rayleighz(i,j,kLev,bi,bj)=0.1*(100-i)/100.
> >       ENDDO
> >      ENDDO
> >
> > It works selectively on the baroclinic field (tides):
> >
> >        DO j=jMin,jMax
> >        DO i=iMin+1,iMax-1
> >         gU(i,j,kLev,bi,bj) = gU(i,j,kLev,bi,bj)
> >     &   -rayleighz(i,j,kLev,bi,bj)*
> >     &    abs(uVel(i+1,j,kLev,bi,bj)-uVel(i-1,j,kLev,bi,bj))*
> >     &    uVel(i,j,kLev,bi,bj)
> >        ENDDO
> >       ENDDO
> >
> > This works well, but I've now started doing runs in parallel,
> > and if I run the code on for example two processors, an additional
> > sponge-layer appears halfway the basin (ie at the left end of the 2nd
> > sub-domain), rendering the results meaningless.
> > Is there a way I can avoid the repetition of the sponge in parallel
> > runs? Many thanks!
> >
> 
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://dev.mitgcm.org/mailman/listinfo/mitgcm-support
> 


--------------------------------------------------------
Patrick Heimbach   Massachusetts Institute of Technology
FON: +1/617/253-5259                  EAPS, Room 54-1518
FAX: +1/617/253-4464             77 Massachusetts Avenue
mailto:heimbach at mit.edu               Cambridge MA 02139
http://www.mit.edu/~heimbach/                        USA




More information about the MITgcm-support mailing list