CDORemap: error at ecmwf machine?
As you may have read at the issue https://earth.bsc.es/gitlab/es/requests/-/issues/2029#note_238031, CDORemap fails at ECMWF machine.
By running an example it returns the following error:
library(s2dv)
tas <- array(1:50, dim = c(25, 50))
names(dim(tas)) <- c('lat', 'lon')
lon <- seq(0, 360 - 360/50, length.out = 50)
lat <- seq(-90, 90, length.out = 25)
tas2 <- CDORemap(tas, lon, lat, 't170grid', 'bil', TRUE)
Error in CDORemap(tas, lon, lat, "t170grid", "bil", TRUE) :
CDO remap failed. Possible problem: parameter 'grid'.
In addition: Warning message:
! Warning: CDORemap: Using CDO version 1.9.8.
I have been debugging the problem. The temporal file and path are correct. However, err
obejct gets 1 after the interpolation, and I don't know what it means.
> source("CDORemap.R")
> source("https://earth.bsc.es/gitlab/es/s2dv/-/raw/master/R/Utils.R")
> tas2 <- CDORemap(tas, lon, lat, 't170grid', 'bil', TRUE)
Called from: CDORemap(tas, lon, lat, "t170grid", "bil", TRUE)
Warning message:
! Warning: CDORemap: Using CDO version 1.9.8.
Browse[1]> tmp_file
[1] "/etc/ecmwf/ssd/ssd1/tmpdirs/cyce.3140650.20231025_061819.884/Rtmp7FABGs/R_CDORemap_307d64673d85bf.nc"
Browse[1]> library(ncdf4)
Browse[1]> ncdf_remapped <- nc_open(tmp_file)
Browse[1]> ncdf_remapped
File /etc/ecmwf/ssd/ssd1/tmpdirs/cyce.3140650.20231025_061819.884/Rtmp7FABGs/R_CDORemap_307d64673d85bf.nc (NC_FORMAT_CLASSIC):
1 variables (excluding dimension variables):
int var[lat,lon]
2 dimensions:
lat Size:25
units: degrees_north
lon Size:50
units: degrees_east
Browse[1]> err
[1] 1
Browse[1]> ncdf_remapped <- nc_open(tmp_file2)
Error in R_nc4_open: No such file or directory
Error in nc_open(tmp_file2) :
Error in nc_open trying to open file /etc/ecmwf/ssd/ssd1/tmpdirs/cyce.3140650.20231025_061819.884/Rtmp7FABGs/R_CDORemap_307d645986595c.nc (return_on_error= FALSE )
The tmp_file exists and can be opened. The tmp_file2 doesn't exist.
ls Rtmp7FABGs/
R_CDORemap_307d64673d85bf.nc
Do you have any suggestion?
Núria