Skip to main content

Parallel Python NetCDF Dataset Standardization Tool

Project description

https://zenodo.org/badge/DOI/10.5281/zenodo.3895009.svg https://codecov.io/gh/NCAR/PyConform/branch/master/graph/badge.svg https://github.com/NCAR/PyConform/workflows/Tests/badge.svg https://github.com/NCAR/PyConform/workflows/Linting/badge.svg

PyConform

A package for transforming a NetCDF dataset into a defined format suitable for publication according to a defined publication standard.

AUTHORS:

Sheri Mickelson, Kevin Paul

COPYRIGHT:

2020, University Corporation for Atmospheric Research

LICENSE:

See the LICENSE.rst file for details

Send questions and comments to Kevin Paul (kpaul@ucar.edu) or Sheri Mickelson (mickelso@ucar.edu).

Overview

The PyConform package is a Python-based package for converting model time-series data into MIP-conforming (i.e., standardized) time-series data. It was designed for CMIP6 specifically for NCAR’s CESM CMIP6 workflow, but we attempted to design the code in a way that is general purpose. PyConform attempts to divide the standardization problem specification step into two separate pieces:

  1. a specification of the standard, and

  2. a specification of the conversion process.

This separate was created to allow the standard to be defined by (for example) the MIP designers and the conversion process to be defined by the model developers (i.e., scientists). For CMIP6, we used the dreqpy utility to define the standard, and the scientists then just needed to provide one-line definitions for how to convert the raw CESM data into the requested standardized output.

Currently, the main considerations that need to be made when creating definitions are the following:

  1. physical units will be converted automatically, if possible according to the cf_units package,

  2. the dimensions of the resulting data variable produced by the definition operation must be mappable to requested dimensions specified in the standard, and

  3. special operations/computations that are not supplied with PyConform in the functions module may need to be written by hand and called explicitly in the output variable definition.

Dependencies

The PyConform package directly depends upon 4 main external packages:

  • ASAPTools (>=0.6)

  • cf-units

  • dreqpy

  • netCDF4-python

  • ply

  • python-dateutil

These dependencies imply the dependencies:

  • numpy (>=1.5)

  • netCDF4

  • MPI

  • UDUNITS2

Additionally, the entire package is designed to work with Python v2.7 and up to (but not including) Python v3.0.

The version requirements have not been rigidly tested, so earlier versions may actually work. No version requirement is made during installation, though, so problems might occur if an earlier versions of these packages have been installed.

Obtaining the Source Code

Currently, the most up-to-date development source code is available via git from the site:

https://github.com/NCAR/PyConform

Check out the most recent stable tag. The source is available in read-only mode to everyone. Developers are welcome to update the source and submit Pull Requests via GitHub.

Building & Installing from Source

Installation of the PyConform package is very simple. After checking out the source from the above svn link, via:

$ git clone https://github.com/NCAR/PyConform

Enter the newly cloned directory:

$ cd PyConform

Then, run the Python setuptools setup script. On unix, this involves:

$  python setup.py install [--prefix=/path/to/install/location]

The prefix is optional, as the default prefix is typically /usr/local on linux machines. However, you must have permissions to write to the prefix location, so you may want to choose a prefix location where you have write permissions. Like most distutils installations, you can alternatively install the PyReshaper with the ‘–user’ option, which will automatically select (and create if it does not exist) the $HOME/.local directory in which to install. To do this, type (on unix machines):

$  python setup.py install --user

This can be handy since the site-packages directory will be common for all user installs, and therefore only needs to be added to the PYTHONPATH once.

The documentation for PyConform is hosted on GitHub Pages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyConform-0.3.0.tar.gz (12.4 MB view details)

Uploaded Source

Built Distribution

PyConform-0.3.0-py3-none-any.whl (88.9 kB view details)

Uploaded Python 3

File details

Details for the file PyConform-0.3.0.tar.gz.

File metadata

  • Download URL: PyConform-0.3.0.tar.gz
  • Upload date:
  • Size: 12.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for PyConform-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5f19898d0a359b9f1500605942acbaa5fa7a0009561516c5cd65adb0af21c928
MD5 95ad4246d20047896b2b30be03be25a3
BLAKE2b-256 9f2153c2effd8281cc2c3e3832711bf048ae2a22093f0b206e703ab14c92aa76

See more details on using hashes here.

File details

Details for the file PyConform-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: PyConform-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 88.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for PyConform-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa111212eed007b7a18b0c67ee502b0739c2763fd405a155027620f4159f92c1
MD5 7f9d2b85e337eeb049ca0f26d4354efa
BLAKE2b-256 c7fe1641279f5babf8bfe75419b55770231400cbf474cccd852f53ede2e666e4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page