Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A utility to describe the group structure, dimensions, variables, and attributes of a NetCDF4 file

Notifications You must be signed in to change notification settings

eScienceLab/ncmetadata

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

NetCDF Metadata

Overview

A utility to describe the structure of NetCDF4 datasets.

Reads a NetCDF4 file and reports the group structure and information about any dimensions, variables, and attributes that are defined.

Installation

Build and install the package with...

$ python -m pip install .

The optional test suite may be installed and run with:

$ python -m pip install .[test]
$ pytest --cov=ncmetadata tests

Usage

usage: ncmetadata [-h] [-o {category,group}] [-e <group0>,<group1>,...] [-m] [-d] filename

Extracts metadata from netCDF4 files

positional arguments:
  filename

options:
  -h, --help                show this help message and exit
  -o {category,group}       --order-by {category,group}
                            (default group)
  -e <group0>,<group1>,..., --exclude-groups <group0>,<group1>,...
                            Exclude each of the named <group> arguments
  -m, --omit-metadata       Output only netCDF file contents, not file metadata
  -d, --omit-digest         Do not include a hash digest in file metadata

The --order-by option allows the resulting output to be arranged in one of two ways:

1. By `group` creates a listing of dimensions, variables, and attributes for
   each netCDF group within a file.
2. By `category` creates a listing of the properties of each group organised into
   separate examples for each category of dimension, variable, and attribute.

The --omit-digest option prevents calculation of a SHA256 hash for the processed file. This may be desirable for very large files or test workflows to avoid the potentially time-consuming hashing operation.

Example

For example, to report on the contents of the netCDF4 file test.nc using the default output options...

$ ncmetadata test.nc

About

A utility to describe the group structure, dimensions, variables, and attributes of a NetCDF4 file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.