Skip to content
Prev 24433 / 29559 Next

Raster: Can't read raster-created NCDF back in

On Wed, 25 May 2016 at 19:59 Mark R Payne <markpayneatwork at gmail.com> wrote:

            
I don't know the proper fix, but it works if you use a RasterLayer rather
than a 1-layer RasterBrick:

 crop(b[[1]],extent(320,340,55,60))

It's straightforwardly a bug IMO, due to the logic of a 1-layer degenerate
dimension - and one for the the raster maintainer.  If you can look at the
source of raster:::.readRowsBrickNetCDF you'll probably find it if for a
suggested fix or patch.

Cheers, Mike.