Learn R Programming

ncdfCF (version 0.4.0)

peek_ncdf: Examine a netCDF resource

Description

This function will read a netCDF resource and return a list of identifying information, including data variables, axes and global attributes. Upon returning the netCDF resource is closed.

Usage

peek_ncdf(resource)

Value

A list with elements "variables", "axes" and global "attributes", each a data.frame.

Arguments

resource

The name of the netCDF resource to open, either a local file name or a remote URI.

Details

If you find that you need other information to be included in the result, open an issue: https://github.com/pvanlaake/ncdfCF/issues.

Examples

Run this code
fn <- system.file("extdata",
  "pr_day_EC-Earth3-CC_ssp245_r1i1p1f1_gr_20230101-20231231_vncdfCF.nc",
  package = "ncdfCF")
peek_ncdf(fn)

Run the code above in your browser using DataLab