A python interface to UNIDATA's UDUNITS-2 package with CF extensions


Keywords
cf, udunits, UNIDATA, netcdf, data, science, oceanography, meteorology, climate
License
MIT
Install
pip install cfunits==3.3.7

Documentation

Home page


Documentation


Dependencies

  • The package runs on Linux and Mac OS operating systems.

  • Requires a python version from 2.6 up to, but not including, 3.0.

  • Requires the python numpy package at version 1.7 or newer.

  • Requires the python netCDF4 package at version 1.1.1 or newer, but not version 1.2.0. This package requires the netCDF, HDF5 and zlib libraries.

  • Requires the UNIDATA Udunits-2 library. This is a C library which provides support for units of physical quantities. If The Udunits-2 shared library file (libudunits2.so.0 on Linux or libudunits2.0.dylibfile on Mac OS) is in a non-standard location then its path should be added to the LD_LIBRARY_PATH environment variable.


Installation

To install from PyPI:

pip install cfunits

Alternatively, to install from source:

To install from PyPI:

pip install cfunits

Alternatively, to install from source:

  1. Download the cfunits package from cfunits-python downloads.

  2. Unpack the library:

    tar zxvf cfunits-1.1.tar.gz
    cd cfunits-1.1
    
  3. Install the package:

*  To install to a central location:
 
        python setup.py install
   
* To install locally to the user in a default location:
   
        python setup.py install --user
   
*  To install to the <directory> of your choice:
   
        python setup.py install --home=<directory>

Tests

The test script is in the test directory:

python test/run_tests.py

Code license

MIT License

  • Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

  • The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.