[R-sig-Geo] problem in reading NC file and plot it
Lars Dalby
lars.dalby at gmail.com
Thu Jan 5 12:58:21 CET 2012
I think you can do all you want using the functionality in the raster
package. E.g. you can read the ncdf file into R as a raster brick, which is
fairly easy to work with.
Something the this might work:
require(raster);require(ncdf)
# Assuming that the variable name is slp
b <- brick(slp.mon.mean.nc, varname = 'slp')
# now you can plot any of the time step using:
plot(raster(b, layer = 1))# time step one
But there might be several other ways to do what you want.
Regards,
Lars
Lars Dalby, Msc., PhD student
E: lada at dmu.dk | T: +45 871 59013
Department of Bioscience, Aarhus University
Grenåvej 14, 8410 Rønde, Denmark
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/problem-in-reading-NC-file-and-plot-it-tp7150538p7154236.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list