[Mitgcm-support] jGl, iGl

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:35:34 EDT 2003


      INTEGER iGl,jGl
      iGl(I,bi) = 1+mod(myXGlobalLo-1+(bi-1)*sNx+I+Olx*Nx-1,Nx)
      jGl(J,bj) = 1+mod(myYGlobalLo-1+(bj-1)*sNy+J+Oly*Ny-1,Ny)

     I'm to dumb to figure out if the above statement functions (added
     at c35) are correct. They are supposed to return a global
     index coordinate within the Nx, Ny domain under the general
     situation where the domain has been split across nPx, nPy 
     subdomains with nSx, nSy tiles within the subdomain.
     Subdomain west, south global index is in my[XY]GlobalLo.
     At the western, eastern, southern and northern most tiles the 
     global coordinate needs to wrap around.
     I don't understand why we would ever have to multiply the
     overlap by the total domain size e.g
     OLx*Nx, OLy*Ny. 
     Can anybody explain? Lines are in ini_spherical_polar_grid.F.
     Surprised the code works if its wrong, so I am puzzled.

Thanks,

Chris
     


 P.S I thought statement functions have been
     on the deprecated list in fortran for at least five years.
     Not sure if they are even in Fortran 95, 2000. I am pretty
     certain they became obsolete as of F95. Should we get rid
     of them, stop adding them?



More information about the MITgcm-support mailing list