Elizabeth,
Creating a raster object from a nc file is probably easiest done like this:
r - raster(filename, band=1)
Or to get the all:
b - brick(filename)
then:
ba - aggregate(b, )
Normally, you should be able to do this to save it as ncdf:
ba - writeRaster(ba, filename='out.nc')
Or
Elizabeth,
Are you using a raster stack or a raster brick?
i've written out 'bricks successfully. Robert (maintainer) is Out of the
office for a bit
if you havent tried it using a brick, give that a go.
On Mon, Oct 4, 2010 at 8:20 PM, Elizabeth Crisfield ea...@psu.edu wrote:
I have read a 10
I have read a 10 band .nc file into R using *open.ncdf* and
*get.var.ncdf*and I've read each band into a raster format e.g.
*raster(data[,,1])*. I used *aggregate* to upscale the data, and now I want
to write it back out to netcdf format. For some reason, I can write each
band out separately (e.g.