<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Because of that junk on the end of your longitude values, GrADS thinks your file has a non-linear X axis, which is probably causing these problems. Try overriding the metadata with a complete XDEF statement in a descriptor file and see if that changes anything.&nbsp;<div>--Jennifer<br><div><br><div><div>On Feb 15, 2011, at 10:59 PM, Frank Sonntag wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello,<br><br>We've come across a problem when working with netcdf data from the Ocean <br>Forecast System. The grid spans the date line with longitudes from 250 to 20 <br>degrees. The netcdf file is created by wgrib2.<br>Printing out the longitude of the second (or later) point past the date line <br>gives the following error:<br><br>ga-&gt; set x 2200<br>LON set to 4.92 4.92<br>ga-&gt; d lon<br>Data Request Error: Invalid grid coordinates<br> &nbsp;World coordinates convert to non-integer &nbsp;grid coordinates<br> &nbsp;&nbsp;&nbsp;Variable = lon &nbsp;Dimension = 0<br> &nbsp;Error ocurred at column 1<br>DISPLAY error: &nbsp;Invalid expression<br> &nbsp;Expression = lon<br><br><br>However the first point past the date line works:<br>ga-&gt; set x 2102<br>LON set to 0.02 0.02<br>ga-&gt; d lon<br>Printing Grid -- 1 Values -- Undef = -9.99e+08<br>0.02<br><br><br><br>I have noticed that when handling netcdf files grads tests whether a dimension <br>is linear or in levels by comparing the differences between the element 1 and <br>2 and 2 and 3 which in this case would yield a positive result.<br>OTOH the longitudes generated by wgrib2 are not strictly linear, as the <br>following excerpt shows:<br>359.57, 359.62, 359.67, 359.72,<br> &nbsp;&nbsp;&nbsp;359.77, 359.82, 359.87, 359.92, 359.97, 0.0200000000000387,<br> &nbsp;&nbsp;&nbsp;0.07000000000005, 0.120000000000005, 0.170000000000016,<br> &nbsp;&nbsp;&nbsp;0.220000000000027, 0.270000000000039, 0.32000000000005,<br> &nbsp;&nbsp;&nbsp;0.370000000000005, 0.420000000000016, 0.470000000000027,<br> &nbsp;&nbsp;&nbsp;0.520000000000039, 0.57000000000005, 0.620000000000005,<br> &nbsp;&nbsp;&nbsp;0.670000000000016, 0.720000000000027, 0.770000000000039,<br> &nbsp;&nbsp;&nbsp;0.82000000000005, 0.870000000000005, 0.920000000000016,<br> &nbsp;&nbsp;&nbsp;0.970000000000027, 1.02000000000004, 1.07000000000005, 1.12,<br> &nbsp;&nbsp;&nbsp;1.17000000000002, 1.22000000000003, 1.27000000000004, 1.32000000000005,<br> &nbsp;&nbsp;&nbsp;1.37, 1.42000000000002, 1.47000000000003, 1.52000000000004,<br> &nbsp;&nbsp;&nbsp;1.57000000000005, 1.62, 1.67000000000002, 1.72000000000003,<br> &nbsp;&nbsp;&nbsp;1.77000000000004, 1.82000000000005, 1.87, 1.92000000000002,<br> &nbsp;&nbsp;&nbsp;1.97000000000003, 2.02000000000004, 2.07000000000005, 2.12,<br> &nbsp;&nbsp;&nbsp;2.17000000000002, 2.22000000000003, 2.27000000000004, 2.32000000000005,<br> &nbsp;&nbsp;&nbsp;2.37, 2.42000000000002, 2.47000000000003, 2.52000000000004,<br> &nbsp;&nbsp;&nbsp;2.57000000000005, 2.62, 2.67000000000002, 2.72000000000003,<br> &nbsp;&nbsp;&nbsp;2.77000000000004, 2.82000000000005, 2.87, 2.92000000000002,<br><br><br>I am not sure if this is a bug in grads or expected behaviour but would be <br>grateful for any opinions on this or workarounds.<br><br>I can provide a (800kb) test data file on request.<br><br>Cheers,<br>Frank<br><br>Environment:<br>GNU/Linux<br><br>Config: v2.0.a8 little-endian readline printim grib2 netcdf hdf4-sds hdf5 <br>opendap-grids,stn geotiff shapefile<br>Grid Analysis and Display System (GrADS) Version 2.0.a8<br>Copyright (c) 1988-2010 by Brian Doty and the<br>Institute for Global Environment and Society (IGES)<br>This program is distributed WITHOUT ANY WARRANTY<br>See file COPYRIGHT for more information.<br><br>Built Fri Mar 26 10:24:10 EDT 2010 for x86_64-unknown-linux-gnu<br><br>This version of GrADS has been configured with the following options:<br> &nbsp;o Built on a LITTLE ENDIAN machine<br> &nbsp;o Athena Widget GUI DISABLED<br> &nbsp;o Command line editing ENABLED<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://tiswww.case.edu/php/chet/readline/rltop.html">http://tiswww.case.edu/php/chet/readline/rltop.html</a><br> &nbsp;o printim command for image output ENABLED<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.zlib.net">http://www.zlib.net</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.libpng.org/pub/png/libpng.html">http://www.libpng.org/pub/png/libpng.html</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.libgd.org/Main_Page">http://www.libgd.org/Main_Page</a><br> &nbsp;o GRIB2 interface ENABLED<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.ijg.org">http://www.ijg.org</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.ece.uvic.ca/~mdadams/jasper">http://www.ece.uvic.ca/~mdadams/jasper</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2">http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g2clib-1.1.8<br> &nbsp;o NetCDF interface ENABLED<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.unidata.ucar.edu/software/netcdf">http://www.unidata.ucar.edu/software/netcdf</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;netcdf 4.1.1-rc2 of Mar 23 2010 09:31:58 $<br> &nbsp;o OPeNDAP gridded data interface ENABLED<br> &nbsp;o OPeNDAP station data interface ENABLED<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://iges.org/grads/gadoc/supplibs.html">http://iges.org/grads/gadoc/supplibs.html</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;libgadap 2.0<br> &nbsp;o HDF4 and HDF5 interfaces ENABLED<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://hdfgroup.org">http://hdfgroup.org</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HDF 4.2r3<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HDF5 1.8.4<br> &nbsp;o GeoTIFF and KML output ENABLED<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.libtiff.org">http://www.libtiff.org</a><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://geotiff.osgeo.org">http://geotiff.osgeo.org</a><br> &nbsp;o Shapefile interface ENABLED<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://shapelib.maptools.org">http://shapelib.maptools.org</a><br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></div></body></html>