Learn R Programming

ncmeta (version 0.5.0)

nc_meta: Top level NetCDF metadata.

Description

This function exists to maintain the open connection while all dimension, variable, and attribute metadata is extracted.

Usage

nc_meta(x, ...)

# S3 method for NetCDF nc_meta(x, ...)

# S3 method for character nc_meta(x, ...)

Value

a list of data frames, with class 'ncmeta', named 'dimension', 'variable' (NULL if the source has no variables), 'attribute', 'extended', 'axis', 'grid', 'source'

Arguments

x

data source address, file name or handle

...

ignored

Details

This function is pretty ambitious, and will send nearly any string to the underlying NetCDF library other than "", which immediately generates an error. This should be robust, but might present fairly obscure error messages from the underlying library.

Examples

Run this code
f <- system.file("extdata", "S2008001.L3m_DAY_CHL_chlor_a_9km.nc", package = "ncmeta")
nc_meta(f)
if (FALSE) {
## remote server, not run in checks
u <- "https://upwell.pfeg.noaa.gov/erddap/tabledap/FRDCPSTrawlLHHaulCatch"
nc_meta(u)
}

Run the code above in your browser using DataLab