Emmanuel Jjunju
2011-Nov-29 15:41 UTC
[R] Problems with Raster and clim.pact packages with large netcdf files (2.7G) in x64 bit R
I normally use the raster or clim.pact pckages to read netcdf (.nc) files. This has always worked out for me until this weekend every time i try to read a .nc file i get the following error Program: C:\Program Files\RStudio\bin\x64\rsession.exe File: posixio.c, Line 417 Expression: offset >= 0 This application has requested the Runtime to terminate it in an unusual way.Please contact the application's support team for more information. here is an example of my code library(raster) library(clim.pact) PET1<-brick("cru_ts_3_10.1901.2009.pet.dat.nc") #will give error PET<-retrieve.nc("cru_ts_3_10.1901.2009.pet.dat.nc",x.rng=c(20,50),y.rng=c(-15,40)) #will give error The files are CRU data downloaded from BADC. Smaller files work ok but these are bigger file 1. This is the link to the original data source for which a free user account is required. http://badc.nerc.ac.uk/browse/badc/cru/data/cru_ts_3.10) I get the error when I am using R.2.14.0 64 Bit. Using the 32 Bit version doesnt bring errors.I have tried installing and uninstalling both R and Rstudio several times without success 2. I have confirmed that the problem is with R x64 Bit regardless of whether using Rstudio or R GUI or any other GUI. I repeat: No problems with 32 bit which is strange given that 32 bit restricts my memory to 3583 !! and if i load more data in the workspace i will run out of memeory. My machine has 16GB of RAM -- You have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. Steve Jobs http://business.blogs.cnn.com/2011/10/06/life-lessons-steve-jobs-on-steve-jobs/ [[alternative HTML version deleted]]
Roger Bivand
2011-Nov-30 14:17 UTC
[R] Problems with Raster and clim.pact packages with large netcdf files (2.7G) in x64 bit R
Emmanuel Jjunju <ejjunju <at> gmail.com> writes:> > I normally use the raster or clim.pact pckages to read netcdf (.nc) files. > This has always worked out for me until this weekend every time i try to > read a .nc file i get the following error >... Could you please: 1. Consider moving this thread to R-sig-geo, where it may get more response? 2. Try to reproduce this just using the functions in the ncdf package, as this is the package that both clim.pact and raster use for reading NetCDF files. 3. If you have access to a non-Windows platform, see if the fault is the same, which would point to something in ncdf/64-bit, or if not, would point to an issue in the Windows 64-bit NetCDF external dependency. 4. Since this is also file-dependent, see if any other similarly large NetCDF files with a similar structure. There is some traffic on NetCDF lists suggesting possible issues with posix.c Hope this helps, Roger> > I have confirmed that the problem is with R x64 Bit regardless of > whether using Rstudio or R GUI or any other GUI. > I repeat: No problems with 32 bit which is strange given that 32 bit > restricts my memory to 3583 !! and if i load more data in the workspace i > will run out of memeory. > > My machine has 16GB of RAM >