Giter VIP home page Giter VIP logo

netcdf4-python's Introduction

netcdf4-python

Python/numpy interface to the netCDF C library.

Build Status PyPI package

News

For the latest updates, see the Changelog.

10/15/2015: Version 1.2.1 released. Adds the ability to slice Variables with unsorted integer sequences, and integer sequences with duplicates.

9/23/2015: Version 1.2.0 released. New features:

7/28/2015: Version 1.1.9 bugfix release.

5/14/2015: Version 1.1.8 released. Unix-like paths can now be used in createVariable and createGroup.

    v = nc.createVariable('/path/to/var1', ('xdim', 'ydim'), float)

will create a variable named 'var1', while also creating the groups 'path' and 'path/to' if they do not already exist.

Similarly,

    g = nc.createGroup('/path/to') 

now acts like mkdir -p in unix, creating groups 'path' and '/path/to', if they don't already exist. Users who relied on nc.createGroup(groupname) failing when the group already exists will have to modify their code, since nc.createGroup will now return the existing group instance. Dataset.__getitem__ was also added. nc['/path/to'] now returns a group instance, and nc['/path/to/var1'] now returns a variable instance.

3/19/2015: Version 1.1.7 released. Global Interpreter Lock (GIL) now released when extension module calls C library for read operations. This speeds up concurrent reads when using threads. Users who wish to use netcdf4-python inside threads should read http://www.hdfgroup.org/hdf5-quest.html#gconc regarding thread-safety in the HDF5 C library. Fixes to setup.py now ensure that pip install netCDF4 with export USE_NCCONFIG=0 will use environment variables to find paths to libraries and include files, instead of relying exclusively on the nc-config utility.

Quick Start

  • Clone GitHub repository (git clone https://github.com/Unidata/netcdf4-python.git), or get source tarball from PyPI. Links to Windows and OS X precompiled binary packages are also available on PyPI.

  • Make sure numpy (required) and Cython (recommended) are installed and you have Python 2.5 or newer.

  • Make sure HDF5 and netcdf-4 are installed, and the nc-config utility is in your Unix PATH. If setup.cfg does not exist, copy setup.cfg.template to setup.cfg, and make sure the line with use_ncconfig=True is un-commented.

  • Run python setup.py build, then python setup.py install (with sudo if necessary).

  • To run all the tests, execute cd test && python run_all.py.

Documentation

See the online docs for more details.

Usage

Sample iPython notebooks available in the examples directory on reading and writing netCDF data with Python.

netcdf4-python's People

Contributors

cgohlke avatar cmarquardt avatar cournape avatar cpaulik avatar docotak avatar dopplershift avatar hetland avatar huard avatar jswhit avatar matthew-brett avatar mcuntz avatar mdunphy avatar mindw avatar ocefpaf avatar rhattersley avatar rossgammon avatar sebastic avatar shoyer avatar swails avatar takluyver avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.