[MITgcm-support] question on sponge-layer/mpi
Uli Riemenschneider
uriemenschneider at whoi.edu
Thu Sep 9 10:50:15 EDT 2004
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!
--
*********************************************************
Ulrike Riemenschneider, Postdoctoral Investigator
Physical Oceanography Dept. MS #21
Woods Hole Oceanographic Institution
Woods Hole, MA 02543, USA
Phone: (+1) 508 289 2916 Fax: (+1) 508 457 2181
*********************************************************
More information about the MITgcm-support
mailing list