Error in which(unlist(found_files)) in StartR
Hi @nmanubens
I've been trying to load the a0pe daily data (SIE North) with the following code:
#!/usr/bin/env Rscript
setwd("/esnas/scratch/ruben/a0pe/scripts")
library(s2dverification)
library(abind)
library(startR)
pathin = '/esnas/scratch/ruben/a0pe/data/series/'
path_plot_series = paste("/esnas/scratch/ruben/a0pe/plots/series/")
path_ICE = '/esarchive/exp/ecearth/a0pe/daily_mean/$var$_*/$var$_OIday_EC-EARTH3_a0pe_*S$sdate$_$member$_$chunk$.nc'
lst_var = c('siextentn')
for (var in lst_var) {
lst_exp = c('a0pe')
lst_months = c('may_ini')
for (exp in lst_exp) {
for (start_month in lst_months) {
start_dates = switch(start_month, 'may_ini'= paste(seq(1993, 1994, 1),'0501', sep=''),
'nov_ini' = paste(seq(1993, 2014, 1),'1101', sep=''))
pathIN = switch(var, 'siextentn' = path_ICE)
lst_regions <- c('TotalArc')
for (reg in lst_regions) {
savename = paste(var, '_', reg, '_', exp, '_', start_month,'.RData', sep='')
if (file.exists(paste(pathin, savename, sep=''))) {
load(paste(pathin, savename, sep=''))
} else {
Data_EXP <- Start(dataset = pathIN,
region = c(reg),
region_var = 'region',
var = var,
member = 'all',
sdate = start_dates,
time = 'all',
chunk = 'all',
chunk_depends = 'sdate',
time_across = 'chunk',
return_vars = list(region = NULL))
}
}
}
}
}
I get this error:
* Exploring files... This will take a variable amount of time depending on the issued request and the performance of the file
* server...
* Detected dimension sizes:
* dataset: 1
* region: 1
* var: 1
* member: 10
* sdate: 2
* time: 214
* chunk: 1
* Total size of requested data:
* 1 x 1 x 1 x 10 x 2 x 214 x 1 x 8 bytes = 33.4 Kb
* If the size of the requested data is close to or above the free shared RAM memory, R may crash.
* If the size of the requested data is close to or above the half of the free RAM memory, R may crash.
* Will now proceed to read and process 20 data files:
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r10i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r1i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r2i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r3i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r4i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r5i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r6i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r7i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r8i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19930501_r9i1p1_199305-199311.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r10i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r1i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r2i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r3i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r4i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r5i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r6i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r7i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r8i1p1_199405-199411.nc
* /esarchive/exp/ecearth/a0pe/daily_mean/siextentn_f6h/siextentn_OIday_EC-EARTH3_a0pe_S19940501_r9i1p1_199405-199411.nc
* Loading... This may take several minutes...
* Progress: 0%starting worker pid=16841 on localhost:11128 at 12:11:36.950
starting worker pid=16857 on localhost:11128 at 12:11:37.242
starting worker pid=16873 on localhost:11128 at 12:11:37.552
starting worker pid=16889 on localhost:11128 at 12:11:37.841
starting worker pid=16905 on localhost:11128 at 12:11:38.140
starting worker pid=16921 on localhost:11128 at 12:11:38.438
starting worker pid=16937 on localhost:11128 at 12:11:38.723
starting worker pid=16953 on localhost:11128 at 12:11:39.026
+ 33.33% + 33.33% + 33.33%Error in checkForRemoteErrors(val) :
one node produced an error: attempt to set an attribute on NULL
In addition: Warning messages:
1: ! Warning: Parameter 'pattern_dims' not specified. Taking the first dimension, 'dataset' as 'pattern_dims'.
2: ! Warning: Could not find any pattern dim with explicit data set descriptions (in the form of list of lists). Taking the first pattern
! dim, 'dataset', as dimension with pattern specifications.
Error in which(unlist(found_files)) : argument to 'which' is not logical
Am I not writing it properly? It seems that at first moment it gets the location of the data...