Hello,
while using the loadGridData function, I get following error:
[2023-03-30 13:53:33] Retrieving data subset ...
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.OutOfMemoryError: Java heap space
Calls: loadGridData ... array -> -> .jrcall -> .jcall -> .jcheck
I tried same code on two different machines, windows and linux, with different files.
On linux, I tried to read nc file of size 4.8GB (25 years of daily data) on a machine that has java heap size assigned to 27.8GB, and it gave me above error.
Then I tried same code with smaller files (~700MB) on a windows machine that has java heap size assigned to 13GB, and it can read only one file. If I try to read two files in a row, I get same error above. (if I use gc() between the files, it reads files with no issues)
It seems that loadGridData requires java heap space size rougly 10 times higher than the file size it is reading, which makes it quite hard to use with bigger files.
Given I am doing quantile mapping, the results will differ whether I do it on whole period or just on part of the period, so I am wondering is there any solution for this~ Thanks in advance!
Hello,
while using the loadGridData function, I get following error:
[2023-03-30 13:53:33] Retrieving data subset ...
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.OutOfMemoryError: Java heap space
Calls: loadGridData ... array -> -> .jrcall -> .jcall -> .jcheck
I tried same code on two different machines, windows and linux, with different files.
On linux, I tried to read nc file of size 4.8GB (25 years of daily data) on a machine that has java heap size assigned to 27.8GB, and it gave me above error.
Then I tried same code with smaller files (~700MB) on a windows machine that has java heap size assigned to 13GB, and it can read only one file. If I try to read two files in a row, I get same error above. (if I use gc() between the files, it reads files with no issues)
It seems that loadGridData requires java heap space size rougly 10 times higher than the file size it is reading, which makes it quite hard to use with bigger files.
Given I am doing quantile mapping, the results will differ whether I do it on whole period or just on part of the period, so I am wondering is there any solution for this~ Thanks in advance!