Skip to content

mathause/netCDF4p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netCDF4p

Wrapper around python-netCDF4 that allows Coordinate subscripting, similar to NCL.

What's new ---------- version 0.1.0

It has the full capability of python-netCDF4 plus allows coordinate subsetting. This is how you use it:

import netCDF4p as ncp
# open netCDF file
ncf = nc.Dataset('file.nc')
# given the variable Temperature has the dimensions | time x lat x lon |
# you can select a region that conforms to 0° to 30°N and 0° to 20° E like so:
ncf.variables['Temperature'][:, {0, 30}, {0, 20}]
# coordinate selections can also be made passing a dict ('named argument')
ncf.variables['Temperature'][:, {'lat' : (0, 30), 'lon' : (0, 20)}]

What's new

  • version 0.1.1
    • relax netCDF4 requirements
  • version 0.1.0
    • check in for freeze

Features

  • Everything netCDF4 allows
  • Coordinate subsetting by positional argument.
  • Coordinate subsetting by named (dict) argument.

Installation

Not published on PyPy (yet). Install netCDF4p directly from GitHub:

pip install git+git://github.com/mathause/netCDF4p.git

Contribute

  • Issue Tracker: github.com/mathause/netCDF4p/issues
  • Source Code: github.com/mathause/netCDF4p

Support

If you are having issues, please let us know. Please use the Issue Tracker: github.com/mathause/netCDF4p/issues

License

The project is licensed under the MIT license.

About

allow coordinate subscripting in netcdf4-python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages