epwshiftr icon indicating copy to clipboard operation
epwshiftr copied to clipboard

downloading CMIP6 models get sutck with some variables

Open IsaakBM opened this issue 2 years ago • 1 comments

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")

IsaakBM avatar Jun 23 '22 23:06 IsaakBM