Skip to content

Error in file_var_reader (missing files)

Hi @aho @nperez ,

I'm getting the following error when retreving some .nc files with startR, the error occurs when some of the files are missing (even if it is not the first one):

Exploring files... This will take a variable amount of time depending
*   on the issued request and the performance of the file server...
Error in R_nc4_open: No such file or directory
Error in file_var_reader(NULL, file_object, NULL, var_to_read, synonims) : 
  Either 'file_path' or 'file_object' must be provided.
  projdir <- "/esarchive/scratch/lpalma/CF-S2S/data-analysis/CF/"
  dir <- paste0(projdir,"ratios/Wind_power_model/",
                "country_level_wind_power_installed_capacity/",
                "$country$_one_half_deg_windfarm_dist.nc")

  Country_inst_WP <- Start(var = "totals",
                           dat = dir,
                           pattern_dims = 'dat',
                           country = c("AUT","ALB"),
                           latitude = values(list(87,30)),
                           latitude_reorder = Sort(decreasing = TRUE),
                           longitude = values(list(321, 48)),
                           longitude_reorder = CircularSort(0, 361),
                           synonims = list(latitude=c('lat','latitude'),
                                           longitude=c('lon','longitude')),
                           return_vars = list(latitude = 'dat',
                                              longitude = 'dat'),
                           retrieve=T)

I'm using startR 2.1.0.

Thanks in advance!

Edited by lpalma