<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi Martin,</p>
<p style="margin-top:0;margin-bottom:0">                   Thanks for your reply. I will use the XC and YC variables.
<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Sanjiv<br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Martin Losch <Martin.Losch@awi.de><br>
<b>Sent:</b> Wednesday, January 2, 2019 6:03 AM<br>
<b>To:</b> MITgcm Support<br>
<b>Subject:</b> Re: [MITgcm-support] Saving grid coordinates in the output files</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Sanjiv,<br>
<br>
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.<br>
<br>
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.<br>
<br>
Martin<br>
<br>
<br>
> On 26. Dec 2018, at 17:55, Sanjiv Ramachandran <sramachandran@umassd.edu> wrote:<br>
> <br>
> Hi all,<br>
>           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:<br>
> <br>
> (i) The physical values of X and Y (in meters or km) for simulations with Cartesian grids?<br>
> (ii) The latitude and longitude (in degrees) for simulations with spherical grids?<br>
> <br>
> 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.<br>
> <br>
> Thanks for your help.<br>
> <br>
> Sanjiv<br>
> <br>
> _______________________________________________<br>
> MITgcm-support mailing list<br>
> MITgcm-support@mitgcm.org<br>
> <a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
<br>
_______________________________________________<br>
MITgcm-support mailing list<br>
MITgcm-support@mitgcm.org<br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>