0

I am not able to run the command due to following error

t2 <- interpGrid(tasmax, new.coordinates = list(x = 9.2, y = 50.7), method=c("nearest"))

NOTE: argument 'bilin.method' ignored for nearest neighbour interpolation

Error: cannot allocate vector of size 2.4 Gb

Though it seems there is enough memory available still this command is not processing.

>  memory.limit()

[1] 8138

> memory.size()

[1] 7515.31

> memory.profile()

           NULL      symbol    pairlist     closure environment     promise 

              1       19456     1209338       24939        4373       14778 

       language     special     builtin        char     logical     integer

         368282          45         675       44372       39378      169595 

         double     complex   character         ...         any        list 

      30181          45      352790           0           0       84343 

 expression    bytecode externalptr     weakref         raw          S4 

          1       73101        3867         975         976        4357 
> gc()

            used   (Mb) gc trigger   (Mb)   max used   (Mb)

Ncells   2445874  130.7    3886542  207.6    3427423  183.1

Vcells 322961407 2464.0  885780355 6758.0 1042526251 7953.9
halfer
  • 19,824
  • 17
  • 99
  • 186
  • Did you take a look at https://stackoverflow.com/questions/5171593/r-memory-management-cannot-allocate-vector-of-size-n-mb ? – rodrigoap Mar 17 '18 at 13:10
  • Based on the little information provided, I'm not sure this is a memory issue per se. I would bet that there's something "wrong" with the data. Can you subset your data and run the function and slowly increasing the sample size until things break? – Roman Luštrik Mar 17 '18 at 15:02
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Mar 18 '18 at 00:41
  • @rodrigoap Hi, yes i tried with most of the listed things over there, before posting it here. – Dhruv Sehgal Mar 21 '18 at 09:59
  • @RomanLuštrik the data is in the form of netcdf file. my main focus is to read this netcdf file, so that i can reduce the size of my data by recreating grids over my region. This file contains climatic data( 1 parameter) over Europe spread as grids. My main aim is to read this netcdf file, then recreate grids with nearest neighbor technique over region of my research x = 9.2, y = 50.7 (latitude and longitude), so as to reduce my data size and then save data as .csv file . Let me know what else information i can provide you. I am using Climate4R for working on this. – Dhruv Sehgal Mar 21 '18 at 10:04

0 Answers0