epwshiftr
epwshiftr copied to clipboard
downloading CMIP6 models get sutck with some variables
Hello! I've been having issues downloading models. For some reason, it get stuck in most of the files that I've tried to pull. See some examples using this code for the variable o2.
Thanks for any help!
idx <- init_cmip6_index(
# only consider ScenarioMIP activity
activity = "ScenarioMIP",
# specify dry-bulb temperature and relative humidity
variable = "o2",
# specify report frequent
frequency = "mon",
# specify experiment name
experiment = c("ssp126", "ssp245", "ssp585"),
# specify GCM name
source = NULL,
# specify variant
variant = "r1i1p1f1",
# More options
replica = FALSE,
latest = TRUE,
resolution = NULL,
data_node = NULL,
# specify years of interest
years = c(seq(2022, 2100, 1)),
# save to data dictionary
save = TRUE,
)
esm <- idx$file_url[1]
download.file(url = esm[1],
destfile = paste0("inputs/o2/", basename(esm[1])),
cacheOK = TRUE,
extra = "--random-wait --retry-on-http-error=503",
mode = "wb")