Anwesha,
Assuming you want the data timestep by timestep (but you can adjust it
for all timesteps, pixel by pixel) you can do something like the
below. I copied it straight from ?get.var.ncdf
library(ncdf)
ncdata<-open.ncdf("air.2m.1950-1999.nc")
lon<-get.var.ncdf(ncdata,"lon")
lat<-get.var.ncd
i'm really sorry for that.
let me state the problem once again with the codes.
graphics.off()
> library(ncdf)
> ncdata<-open.ncdf("air.2m.1950-1999.nc")
> lon<-get.var.ncdf(ncdata,"lon")
> lat<-get.var.ncdf(ncdata,"lat")
> time<-get.var.ncdf(ncdata,"time")
> dat<-get.var.ncdf(ncdata,"air")
Error:
On Tue, 7 Apr 2009, Anwesha Chakrabarti wrote:
hi all,
i want to read a .netcdf file in R. the file contains one variable that has
three dimensions lon, lat and time.
and the data consists of a 192x94 matrix of the variable. whenever i'm
trying to open the file i'm getting the following error ms
hi all,
i want to read a .netcdf file in R. the file contains one variable that has
three dimensions lon, lat and time.
and the data consists of a 192x94 matrix of the variable. whenever i'm
trying to open the file i'm getting the following error msg
"can not allocate vector of size 1.2gb"!
so i gu