[MITgcm-support] help to determine the global index
Andrea Molod
molod at ocean.mit.edu
Fri Oct 14 16:03:14 EDT 2005
hi hong,
On Fri, 14 Oct 2005, Hong Zhang wrote:
> Hi, there
> I have problem trying to determine the global index of (I,J)
> from tile index (i,j,bi,bj).
> My gridding configuration is as follows:
> & sNx = 24,
> & sNy = 28,
> & OLx = 3,
> & OLy = 3,
> & nSx = 1,
> & nSy = 1,
> & nPx = 4,
> & nPy = 4,
> For example I want to locate the global point (50,76).
> How can I find this point?
> I checked XC and YC, unfortunately they are not consistent with
> global I,J because I use a rotated coordinate system.
this was a bit hard for me to get too, especially when i went
away from the topologies that were easier to understand. maybe this
will help:
there is a routine called w2_e2setup.F somewhere in your code
configuration (i am not sure which code you are using, where you
get all the peices from) - when you are compiling you will see
it in the directory where you are 'build'ing.
there is a set of arrays that get set in there that are called
exch2_txglobalo and exch2_tyglobalo
that contain the starting index in the global arrays in the
x and y directions. this is done explicitly for each tile.
for example, a code sequence like
exch2_txglobalo(2)=29
exch2_tyglobalo(2)=1
tells you that the starting index into the global arrays for
tile 2 (the index of exch2_txglobalo) are 29 in the x direction
and 1 in the y direction.
(usually exch2_txglobalo(1)=1 and exch2_tyglobalo(1)=1)
you can either look for these lines in the code, or just print
out these arrays - they are held in the 'include' file called
W2_EXCH2_TOPOLOGY.h.
hope this helps a little....
take care hong!
andrea
----------------------------------------------------------------
Andrea M. Molod, PhD.
Department of Earth, Atmospheric & Planetary Sciences
MIT
Tel: (617) 253-5458, Email: amolod at mit.edu
WWW:http://paoc.mit.edu/paoc/people/person.asp?position=Postdoc&who=molod
----------------------------------------------------------------
More information about the MITgcm-support
mailing list