Skip to content
Paegan - The Python CDM for Met/Ocean data
Branch: master
Clone or download
Pull request Compare This branch is 27 commits ahead of asascience-open:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Paegan - The Python CDM for Met/Ocean data

Build Status

Paegan attempts to fill the need for a high level common data model (CDM) library for array based met/ocean data stored in netCDF files or distributed over OPeNDAP.

Common Dataset Functions

Grids / UGrids

from paegan.cdm.dataset import CommonDataset
url = ""
pd =



pd.restrict_bbox((-74, 40, -70, 42))


from datetime import datetime,timedelta
ending = datetime.utcnow()
starting = ending - timedelta(hours=12)
pd.restrict_time((starting, ending))





Nearest subsetting


from datetime import datetime
import pytz
now = datetime.utcnow().replace(tzinfo=pytz.utc)




Coming Soon

Discrete Sampling Geometries

Coming Soon


You are using virtualenv, right?

  1. Install virtualenv-burrito
  2. Create virtualenv named "paegan-dev": mkvirtualenv -p your_python_binary paegan-dev
  3. Start using your new virtualenv: workon paegan-dev


Paegan requires python 2.7.x and is available on PyPI.

The best way to install Paegan is through pip:

pip install paegan

Paegan requires the following python libraries which will be downloaded and installed through pip:

  • numpy>=1.7.0
  • scipy
  • netCDF4>=1.0.2 (requires netcdf and hdf5 C libraries)
  • Shapely>=1.2.15 (requires geos C library)
  • pytz
  • python-dateutil>=1.5

If your NetCDF4 and HDF5 libraries are in non-typical locations, you will need to pass the locations to the pip command:

NETCDF4_DIR=path HDF5_DIR=path pip install paegan

There seems to be a problem installing numpy through pip so you may need to install numpy before doing any of the above:

pip install numpy==1.7.0


  • Better grid support
  • Regridding tools


Other modules making use of Paegan

  • paegan-transport - Parallelized Lagrangian transport model for NetCDF/OPeNDAP data
  • paegan-viz - Visualization tools for NetCDF/OPeNDAP data


If you are having trouble getting any of the paegan functionality to work, try running the tests:

git clone`
cd paegan
python test

If you want to run the dataset, timevar, depthvar, or roms tests, you will need to edit the test files with paths appropriate for your system.

Some tests requires large files that are not in source control. You can get them here:

They are expected to be located in /data/lm/tests, if they are not you can symlink to them in that directory.


You can’t perform that action at this time.