[Mitgcm-support] Re: jGl, iGl

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:31:20 EDT 2003


Cool! I will check in a comment later.

Chris
Jean-Michel Campin wrote:
> 
> Hello Chris,
> 
> >    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.
> 
> Yes, I can explain this since I put this modification to work
> with small domain (where Oly > Ny, as for instance, zonal-average
> case):
> This has no effect on the acuracy of the evaluation of iGl(I,bi)
> and jGl(J,bj) since we take mod(a+OLx*Nx,Nx) and mod(b+OLy*Ny,Ny).
> But in case a or b is negative, then the FORTRAN function "mod"
> does not return the matematical value of the "modulus" function,
> and this is not good for your purpose.
> This is why I add +OLx*Nx and +OLy*Ny to be sure that the 1rst
> argument of the mod function is positive.
> 
> See you,
> 
> Jean-Michel



More information about the MITgcm-support mailing list