Learn R Programming

eurocordexr (version 0.2.5)

get_inventory_cmip5: Get inventory from path containing CMIP5 GCMs .nc files

Description

Returns a data.table with information by splitting the netcdf files into their components (GCM, variable, experiment, ...) and aggregates over years.

Usage

get_inventory_cmip5(path, add_files = TRUE)

Value

A data.table with the inventory information.

Arguments

path

Path that will be searched recursively for .nc files.

add_files

Boolean (default TRUE), if TRUE, will add a column containing lists of associated files with their full paths (useful e.g. for further processing).

See Also

check_inventory_cmip5 for performing some checks.

Examples

Run this code
# some empty example files
fn_zip <- system.file("extdata", "inv-test-files-cmip5.zip", package = "eurocordexr")
tmpdir <- tempdir()
unzip(fn_zip, exdir = tmpdir)

dat_inv <- get_inventory_cmip5(fs::path(tmpdir, "testdata-cmip5", "basic"))
print(dat_inv)

Run the code above in your browser using DataLab