Skip to content
Prev 7539 / 29559 Next

Help with conversion from NetCDF to ASCII

If you really require square cells, then the resample function in
'raster' might be useful:

library(raster)
r = raster('ncdffile')
# or r=raster(matrix); extent(r) = c( , , , )
s = raster(r)
res(s) = min(res(s))
s = resample(r, s,  method='bilinear')
s = writeRaster(s, filename='abc.asc', format='ascii')

Or first do an interpolation first. Many options for that. E.g. see
?raster::interpolate

Robert
On Mon, Feb 1, 2010 at 2:49 PM, Michael Sumner <mdsumner at gmail.com> wrote: