[R-sig-Geo] ncdf file with non-equally spaced grid
Michael Sumner
mdsumner at utas.edu.au
Thu Jul 31 23:03:47 CEST 2008
You can use gdalwarp in FWTools to re-grid the data with control points
(perhaps with with some effort), but as you say that will interpolate to
a regular grid.
Is it definitely dlon that increases? Can you post a link to an example
file?
Some netCDF files I've seen are actually using Mercator, but store the
pixel coordinates as lon/lat.
There are totally irregular grids as well though, so as a raster you
would have to resample it in some way. Otherwise you can interpret the
data as a SpatialPointsDataFrame and use it as you would in Matlab. Note
that the image() function will handle irregular (but xy locked) grid
spacings, so you can jig a function to plot these things as an image
pretty easily.
Cheers, Mike.
Matt Oliver wrote:
> Hi All, I have CF compliant ncdf files of sea surface temperature. The lon,
> lat grid is known but not equally spaced (ie dlon increases). Is there a
> clean way to get this matrix ported over to a geo-tiff or some other file
> that Arc will read? I have talked with some arc users that tell me that the
> grid needs to be equally spaced. I guess I could interpolate to an equally
> spaced grid, but I would rather preserve the original grid if possible.
>
> Thanks in advance
>
> Matt
>
>
>
More information about the R-sig-Geo
mailing list