search for: temp_data_mat

Displaying 1 result from an estimated 1 matches for "temp_data_mat".

2011 May 10
1
Reading a large netCDF file using R
...allocate vector of size 2.1 Gb This file has six hourly data for the 199 x 99 points for 10 years. I wanted to aggregate this data into a monthly scale. I tried used a simple code like this for (i in 1:noofdays) { for (j in 0:3) { x= get.var.ncdf(nc,v1,start=c(1,1,(i+j)),count=c(199,99,1)) temp_data_mat=temp_data_mat+x } for (x1 in 1:199) { for (x2 in 1:99) { data_mat_89_99[x1,x2,ctr]=temp_data_mat[x1,x2] } } ctr=ctr+1 temp_data_mat=matrix(0,ncol=99,nrow=199) } I didnt think it worked... can u suggest me some other way ... I could not use the start and count properly -- View this...