ncmeta (version 0.0.1)

nc_inq: File info

Description

Get information about a NetCDF data source, may be a file path, or a RNetCDF file handle, or an Thredds server address.

Usage

nc_inq(x, ...)

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

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

Arguments

x

filename or handle

...

ignored

Examples

Run this code
# NOT RUN {
 f <- raadfiles:::cmip5_files()$fullname[1]
 nc_inq(f)
 nc_var(f, 0)
 nc_dim(f, 0)
 
# }
# NOT RUN {
f <- system.file("extdata", "S2008001.L3m_DAY_CHL_chlor_a_9km.nc", package = "ncmeta")
nc_inq(f)
nc_var(f, 0)
nc_dim(f, 0)

nc_vars(f)
nc_dims(f)
# }
# NOT RUN {
## thredds (see rerddap)
u <- "https://upwell.pfeg.noaa.gov/erddap/tabledap/FRDCPSTrawlLHHaulCatch"
nc_inq(u)
# A tibble: 1 x 5
#ndims nvars ngatts unlimdimid
#<dbl> <dbl>  <dbl>      <lgl>
#  1     2    18     37         NA
# ... with 1 more variables: filename <chr>
# }

Run the code above in your browser using DataCamp Workspace