[MITgcm-support] Saving grid coordinates in the output files
Sanjiv Ramachandran
sramachandran at umassd.edu
Wed Jan 2 13:01:56 EST 2019
Hi Martin,
Thanks for your reply. I will use the XC and YC variables.
Sanjiv
________________________________
From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Martin Losch <Martin.Losch at awi.de>
Sent: Wednesday, January 2, 2019 6:03 AM
To: MITgcm Support
Subject: Re: [MITgcm-support] Saving grid coordinates in the output files
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
_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20190102/faa0edbc/attachment.html>
More information about the MITgcm-support
mailing list