Structured access to all attributes of the netCDF file.
ebv_properties(
filepath,
datacubepath = NULL,
scenario = NULL,
metric = NULL,
verbose = TRUE
)
Character. Path to the netCDF file.
Character. Optional. Default: NULL. Path to the datacube
(use ebv_datacubepaths()
). Alternatively, you can use the
scenario and metric argument to define which cube you want to access.
Character or integer. Optional. Default: NULL. Define the
scenario you want to access. If the EBV netCDF has no scenarios, leave the
default value (NULL). You can use an integer value defining the scenario or
give the name of the scenario as a character string. To check the available
scenarios and their name or number (integer), use
ebv_datacubepaths()
.
Character or integer. Optional. Define the metric you want to
access. You can use an integer value defining the metric or give the name
of the scenario as a character string. To check the available metrics and
their name or number (integer), use ebv_datacubepaths()
.
Logical. Default: TRUE. Turn off additional prints by setting it to FALSE.
S4 class containing information about file or file and datacube depending on input.
#define path to EBV netCDF
file <- system.file(file.path("extdata","martins_comcom_subset.nc"), package="ebvcube")
#get all datacubepaths of EBV netCDF
datacubes <- ebv_datacubepaths(file, verbose=FALSE)
#get properties only for the file
prop_file <- ebv_properties(file)
#> [1] "Giving the properties for the file. For more info on a specific datacube, define the metric and scenario OR datacubepath."
#get properties for the file and a specific datacube - use datacubepath
prop_dc <- ebv_properties(file, datacubepath = datacubes[1,1])
#> [1] "Giving the properties for the file and a specified datacube."
#get properties for the file and a specific datacube - use scenario & metric
#note: this dataset has no scenario -> only metric is defined
prop_dc <- ebv_properties(file, metric = 2)
#> [1] "Referring to datacubepath metric_2/ebv_cube"
#> [1] "Giving the properties for the file and a specified datacube."