[R-sig-Geo] loading all levels and time in netCDF using brick/stack

ppanday ppanday at clarku.edu
Tue Jan 8 17:42:11 CET 2013


Hello all

I have a netCDF file with 42 levels across time. Is it possible to load
using brick or stack both levels and time dimensions? Using brick option, I
can only load either all time or all levels? Is it possible to work with
both dimensions so that if I need to average across levels, across time, I
would be able to do that.

Thanks,
Prajjwal

**********************************************************************
Example: foo.nc
[1] "file foo.nc has 4 dimensions:"
[1] "time   Size: 2"
[1] "levels   Size: 42"
[1] "longitude   Size: 540"
[1] "latitude   Size: 361"
[1] "------------------------"
[1] "file foo.nc has 1 variables:"
[1] "float t[longitude,latitude,levels,time]  Longname:Air temperature
Missval:999999986991104"

r <- brick("foo.nc")
r
class       : RasterBrick 
dimensions  : 361, 540, 194940, 2  (nrow, ncol, ncell, nlayers)
resolution  : 0.6666667, 0.5  (x, y)
extent      : -180.3333, 179.6667, -90.25, 90.25  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 
data source : C:\Data\Documents\IBIS\reanalysis_data\merra\temp\foo.nc 
names       : X0, X720 
z-value     : 0, 720 
varname     : t 
level       : 1 





--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/loading-all-levels-and-time-in-netCDF-using-brick-stack-tp7582269.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list