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

View source: R/get_inventory_cmip5.R

get_inventory_cmip5R Documentation

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)

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

Value

A data.table with the inventory information.

See Also

check_inventory_cmip5 for performing some checks.

Examples

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


eurocordexr documentation built on Aug. 24, 2023, 9:07 a.m.