recent raster package, bricks and ncdfs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

recent raster package, bricks and ncdfs

Martin
Dear raster package developers,

since my last update to the newest version bricks don't work any more with netcdf files. I can load the data to a brick and everything seems normal, but if i do any function I get this error:

> ncep_wa = crop(ncp, e)
Fehler in .readRowsBrickNetCDF(x, row, nrows, col, ncols, nlyrs = nlyrs) :
  unbenutzte(s) Argument(e) (nlyrs = nlyrs)

> ncep = rotate(ncp)
Fehler in .readRowsBrickNetCDF(x, row, nrows, col, ncols, nlyrs = nlyrs) :
  unbenutzte(s) Argument(e) (nlyrs = nlyrs)

the same worked with the old raster package without problems..

Martin Brandt
Martin Brandt

Department of Geography and
Regional Research
UZA II, Althanstr. 14
1090 Wien, AUSTRIA
http://geooekologie.univie.ac.at
Reply | Threaded
Open this post in threaded view
|

Re: recent raster package, bricks and ncdfs

Robert Hijmans
Sorry about that & thanks for reporting. Fixed in version 1.7-23, which is on its way to CRAN. Robert
Reply | Threaded
Open this post in threaded view
|

Re: recent raster package, bricks and ncdfs

Martin
thanks for fixing Robert. This error's gone, but there still seems to be a problem with the dimensions of the ncdf-bricks. If I crop a brick, it returns only one layer, and if i try to rotate it, i get the following error:

>ncp = rotate(nc)
Fehler in dim(res) <- c(ncols, raster@data@nlayers * nrows):
  Dimensionen [Produkt 462240] passen nicht zur Länge des Objektes [720]

which means in english that the dimensions do not fit the object length. As a stack this works without problems..

Martin Brandt

Department of Geography and
Regional Research
UZA II, Althanstr. 14
1090 Wien, AUSTRIA
http://geooekologie.univie.ac.at