Unable to load CPC Global Unified data with StartR
Hi @vagudets ,
I was having trouble loading netCDF temperature data previously downloaded in https://downloads.psl.noaa.gov/Datasets/cpc_global_temp/ and located in /esarchive/scratch/jcorvill/gitlab/aedes/cpc_data/
. Even though the path has been set correctly, the StartR function gives an error as follows:
library(startR)
ref_path <- "/esarchive/scratch/jcorvill/gitlab/aedes/cpc_data/"
hyears <- 1979:2024 # hindcast years
lonmin <- -21
lonmax <- 54
latmin <- -37
latmax <- 40
tmax <- startR::Start(
dat = paste0(ref_path, "$var$.$sdate$.nc"),
var = "tmax",
sdate = hyears,
latitude = values(list(latmin, latmax)),
latitude_reorder = Sort(decreasing = FALSE),
longitude = values(list(lonmin, lonmax)),
longitude_reorder = CircularSort(-180, 180),
synonims = list(var = c("var", "variable"),
longitude = c("lon", "longitude"),
latitude = c("lat", "latitude")),
return_vars = list(latitude = "dat", longitude = "dat"),
num_procs = 1,
retrieve = TRUE
)
* Exploring files... This will take a variable amount of time depending
* on the issued request and the performance of the file server...
Error in startR::Start(dat = paste0(ref_path, "$var$.$sdate$.nc"), var = "tmax", :
No data files found for any of the specified datasets.
Everything seems to be in order, so I was wondering if maybe the issue was about StartR being unable to read the ncdfs themselves because of possible formatting issues
(Changing the names of the files into var
_sdate
.nc doesn't fix the issue either)
Thanks in advance for looking into this :)
Module and Package Version
R version: 4.1.2 in Workstation