[MITgcm-support] Saving grid coordinates in the output files

Martin Losch Martin.Losch at awi.de
Wed Jan 2 06:03:13 EST 2019


Hi Sanjiv,

the correct coordinates are in grid*.nc. They are called “XC,YC” for the cell centers and “XG,YG” for the cell corners ("bottom left” or “south west”) and are 2D fields, see GRID.h or the only documentation for details.

Usually the 1D-vectors X and Y also have the correct units, except when you use curvilinear or rotated grids, where it is not possible to assign a unique coordinate X to an entire row of “Y’s” and vice versa.

Martin


> On 26. Dec 2018, at 17:55, Sanjiv Ramachandran <sramachandran at umassd.edu> wrote:
> 
> Hi all,
>           The 'X' and 'Y' variables in my output files (state*nc, grid*nc) do not appear to be saving the coordinates but are merely 1-dimensional arrays 1:Nx and 1:Ny, respectively, where Nx and Ny are the number of grid points. How can I get the X and Y variables to save:
> 
> (i) The physical values of X and Y (in meters or km) for simulations with Cartesian grids?
> (ii) The latitude and longitude (in degrees) for simulations with spherical grids?
> 
> The meta data for 'X' suggests the variable contains the "longitude of cell center" in units "degrees east." Perhaps I am failing to set some option in the 'data' files.
> 
> Thanks for your help.
> 
> Sanjiv
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list