ncmeta v0.0.1


Monthly downloads



Straightforward 'NetCDF' Metadata

Extract metadata from 'NetCDF' data sources, these can be files, file handles or servers. This package leverages and extends the lower level functions of the 'RNetCDF' package providing a consistent set of functions that all return data frames. We introduce named concepts of 'grid', 'axis' and 'source' which are all meaningful entities without formal definition in the 'NetCDF' library <>. 'RNetCDF' matches the library itself with only the named concepts of 'variables', 'dimensions' and 'attributes'. 'ncmeta' provides a required framework for the in-development 'tidync' project <>.


Travis-CI Build Status AppVeyor Build Status Coverage Status


Straightforward NetCDF metadata for use in building interfaces to this format.


You can install ncmeta from github with:

# install.packages("devtools")


This is a basic example which shows you how to solve a common problem:

nc_inq(filename) # one-row summary of file

nc_dim(filename, 0)  ## first dimesion
nc_dims(filename)  ## all dimensions

Compare timings.

f <- system.file("extdata", "", package = "ncmeta")
u <- ""

junk <- capture.output(a <- microbenchmark(nc_open = ncdf4::nc_open(f), 
               ncdump = ncdump::NetCDF(f), 
               ncmeta = nc_meta(f) ,
               RNetCDF =, 
                times = 10)
#> Unit: milliseconds
#>     expr      min       lq      mean    median        uq       max neval
#>  nc_open 14.15938 14.23332 112.95724  14.98906  21.33014 656.46713    10
#>   ncdump 93.73832 95.89619 134.31769 101.12352 107.68589 370.77173    10
#>   ncmeta 59.67635 61.19443  62.97108  61.91249  62.57958  70.01173    10
#>  RNetCDF 32.97361 33.77285  52.62526  35.87184  40.15188 135.59934    10

Functions in ncmeta

Name Description
nc_inq File info
nc_axes NetCDF axes
nc_grids NetCDF grids
nc_axis NetCDF axes
nc_att NetCDF attributes
nc_atts NetCDF attributes
ncmeta ncmeta: straightforward NetCDF metadata
nc_dim NetCDF variables Obtain information about a single dimension by index.
nc_dims NetCDF dimension
nc_sources NetCDF sources
nc_var NetCDF variable
nc_vars NetCDF variables
nc_meta Top level NetCDF metadata.
No Results!

Last month downloads


License GPL-3
Encoding UTF-8
LazyData true
RoxygenNote 6.0.1
ByteCompile TRUE
NeedsCompilation no
Packaged 2017-12-01 12:24:36 UTC; mdsumner
Repository CRAN
Date/Publication 2017-12-01 18:16:57 UTC

Include our badge in your README