MyNixOS website logo
Description

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 <https://www.unidata.ucar.edu/software/netcdf/>. 'RNetCDF' matches the library itself with only the named concepts of 'variables', 'dimensions' and 'attributes'.

R-CMD-check CRANstatus

ncmeta

The ncmeta package provides straightforward NetCDF metadata, with a set of consistent entity-based functions for extracting metadata from a file or online source. We aim to fill a gap in between the generality and power of the NetCDF framework and ease of use.

There are two main packages for using NetCDF in R, RNetCDF and ncdf4 and ncmeta uses both, where appropriate. Both packages are very close the native API of NetCDF itself, and ncmeta simply provides an easier high-level interpretation.

About NetCDF

NetCDF is both a data model and an API, and provides a very general framework for expressing data formats. The explicit entities in NetCDF are variables, dimensions and attributes and ncmeta provides functions nc_vars, nc_dims, and nc_atts to extract their names, order and other metadata. There are matching functions nc_var, nc_dim, and nc_att with an extra identifier to extract specific information about an individual variable, dimension, or attribute.

Also includes functions for implicit entities, these are grids and axes. These don’t exist in the NetCDF specification explicitly, but are meaningful and worth making explicit. Many NetCDF tools don’t explicitly present these concepts so grab hold of them with ncmeta!

A grid is an ordered set of dimensions, and the Unidata site refers informally to this concept as shape.

An axis is an instance of a dimension, the use of that dimension within a particular variable.

These functions provide a more developer-friendly scheme for working with the range of formats provided by the NetCDF ecosystem.

Installation

Install ncmeta from CRAN with:

install.packages("ncmeta")

You can install the development version of ncmeta from github with:

# install.packages("devtools")
devtools::install_github("hypertidy/ncmeta")

Example

This example shows some of the functions for extracting information from a NetCDF source.

library(ncmeta)
filename <- system.file("extdata", "S2008001.L3m_DAY_CHL_chlor_a_9km.nc", package = "ncmeta")
nc_inq(filename) # one-row summary of file

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

Get involved!

Please let us know if you have any feedback, see the Issues tab if you found a bug or have a question. Feel free to email the maintainer directly for other questions.


Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Metadata

Version

0.4.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows