[MITgcm-devel] problem in exch2 with small tiles

Jean-Michel Campin jmc at ocean.mit.edu
Sun Mar 25 17:14:30 EDT 2012


Hi,

As I mentioned in the mitgcm-support email, there is a problem
in pkg/exch2 when sNx <> sNy and sNx < 2*Olx or sNy < 2*Oly

I did reproduce Yuan's problem with olx=4, sNx=8, sNy=4 and cs-32 grid, 
and here is an attempt to explain where the problem is:

tile A & B on face 1, tile-A eastern neighbor = B ; tile-B western neighbor = A
tile C & D on face 3, tile-A northern neighbors = C & D
                      tile-C & tile-D western neighbor = A

tile tile (face-3)
  C | D |
  ^   ^
  |   |
 tile-A <-> tile-B
      (face-1)

tile-B NW-corner (not a face corner) received valid values during 
the 2nd EXCH call, which are coming from the Northern halo of tile-A 
(the order in the list of neighbors matters, since it could as well 
 be updated from tile-B northern neighbors).

It means that the 1rst EXCH call needs to provide valid values
in the Northern halo of tile-A (for i=sNx-Olx+1:sNx)
which should come from tile C & D interior (in order to be valid).

The problem: with EXCH_UPDATE_CORNERS, not only interior values (1:sNy) will
be copied to tile-A Northern halo but also Northern & Southern halo values of
tiles C & D, which are not valid before the 1rst EXCH.
The second (C or D) in the list of neighbors can overwrite valid values from
the other (D or C) with invalid ones from (C or D) Northern or Southern halo.

At the end, the Northern halo of tile-A will be fixed by the 2nd EXCH call,
but regarding values which are needed to fill tile-B NW corner (during 2nd
EXCH calls) they should not be overwritten (with invalid values from tile-C halo).
this translates to the condition: sNx-sNy+Olx < sNx-Olx+1 or sNy >= 2*Olx

I can see few solutions:
1) add a stop if sNx <> sNy and sNx < 2*Olx or sNy < 2*Oly
2) add a 3rd EXCH call if sNx <> sNy and sNx < 2*Olx or sNy < 2*Oly
   I think this will fix the problem but slow down the model 
3) change the 1rst EXCH call to use EXCH_IGNORE_CORNERS
  instead of EXCH_UPDATE_CORNERS, but to leave the 2nd EXCH call
  with EXCH_UPDATE_CORNERS.
I think this (3) should work for scalar EXCH (or did I missed something ?)
since I have the impression that only the 2nd EXCH call needs to do
tile-corners update. Not sure yet about vector EXCH.

Cheers,
Jean-Michel



More information about the MITgcm-devel mailing list