file.pairer: Pair temperature and precipitation (or any other variable)...

Description Usage Arguments Value

View source: R/readdata.R

Description

This function reads in a directory or list of netCDF files, with names following CMIP5 scenario design conventions, and pairs the temperature and precipitation files based on scenario. Technically any two variables could have files paired using this function, just by changing the tvarname and pvarname inputs.

Usage

1
file.pairer(dat, tvarname = "tas", pvarname = "pr")

Arguments

dat

A single directory name, or a list of netCDF files. If a directory name is given, all netCDF files in the directory will be used.The pairing of temperature and precipitation netCDF files in the directory relies on the CMIP5 file naming conventions. Other naming conventions are not currently supported.

tvarname

The name of the temperature variable in CMIP5 ('tas' default).

varname

The name of the precipitation variable in CMIP5 ('pr' default).

Value

A tibble of paired file names in two columns: tfilename, pfilename. Each row of the tibble is a single scenario.


JGCRI/fldgen documentation built on July 18, 2020, 1:42 p.m.