-
Notifications
You must be signed in to change notification settings - Fork 44
How to save biascorrected grids? #49
Description
After biasCorrection command, I need to save the resulting grid in netCDF format. I use grid2nc command and the file is correctly created. But when I try to reopen ti with loadGridData there is this error:
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
Actually, I note that files correctly opened by loadGridData (i.e. ESGF model outputs) have this output:
dataInventory("path_to_file")
$pr =
$Description
'Precipitation'
...... etc........
$Dimensions
$time
...etc....
$lat
...etc...
$lon
...etc...
On the contrary files from bias-corrected grids have this type of output:
dataInventory("path_to_file")
$pr =
$Description
'Precipitation'
...... etc........
$Dimensions
$lat
...etc...
$lon
...etc...
It seems theere is no time dimension and the error seems to depend on it (Am I right???).
But time data are actually presente in the grid! Only the format is different indeed.
It is so:
$Dates
$start
'2021-01-01 UTC'.....................
Otherwise in "ordinary" grids it is so:
$Dates
$start
'2021-01-01 12:00:00 GMT'.....................
Anybody can help me to try to solve?