urls_CMIP5_ceda: ftp urls of CMIP5 nc files from CEDA

Description Usage Arguments References Examples

Description

For RCP and piControl, only r1i1p1 ensemble returned.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
urls_CMIP5_ceda(
  df,
  info,
  varname = "tasmax",
  TIMESCALE = "Amon",
  PART = NULL,
  scenarios = c("piControl", "historical", "historicalGHG", "historicalMisc",
    "historicalNat", "rcp26", "rcp45", "rcp60", "rcp85"),
  save = TRUE,
  outdir = "."
)

Arguments

df

data.frame of ceda CMIP5 filelist.

  • file : relative path of nc file

  • size_mb: file size

info

file detailed information

varname

which variable to extracted

TIMESCALE

filter time_scale2 in the info. e.g. "Amon", "day", ...

PART

one of "aerosol", "atmos", "land", "landIce", "ocean", "ocnBgchem", "seaIce"

scenarios

which scenarios to be extracted

save

boolean. Whether save urls to txt files?

outdir

output directory

References

  1. ftp://ftp.ceda.ac.uk/badc/cmip5/data/cmip5/

  2. ftp://ftp.ceda.ac.uk/badc/cmip5/data/cmip5/metadata/fileList_20150706.txt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

dir_proj <- "D:/Documents/OneDrive - mail2.sysu.edu.cn/CMIP5/CMIP5_aria2c/"
load(paste0(dir_proj, "data/filelist_CMIP5.rda"))
outdir <- paste0(dir_proj, "test/url_ftp")

l_url.ceda <- urls_CMIP5_ceda(df, info, "hur", "Amon", outdir = outdir)
l_url.ceda <- urls_CMIP5_ceda(df, info, "hfls", "Amon", outdir = outdir)


indir <- "D:/Documents/OneDrive - mail2.sysu.edu.cn/CMIP5/CMIP5_aria2c/test/url_html"
files_sh  <- dir(indir, "*.sh$", full.names = TRUE)
files_txt <- gsub(".sh", ".txt", files_sh)
l_url.esgp  <- llply(files_sh, urls_CMIP5_ESGP)

## End(Not run)

kongdd/CMIP5tools documentation built on Dec. 17, 2020, 11:03 a.m.