Giter VIP home page Giter VIP logo

paegan's Introduction

Paegan - The Python CDM for Met/Ocean data

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 = "http://thredds.axiomalaska.com/thredds/dodsC/PWS_DAS.nc"
pd = CommonDataset.open(url)

Subsets

#####Bbox

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

#####Time

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

#####Depth

pd.restrict_depth((3,50))

#####Variables

pd.restrict_vars(("u","v"))

Nearest subsetting

#####Time

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

#####Depth

pd.nearest_depth(5)

Regridding

Coming Soon

Discrete Sampling Geometries

Coming Soon

Setup

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

Installation

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

Roadmap

  • Better grid support
  • Regridding tools

Modules

Other modules making use of Paegan

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

Troubleshooting

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

git clone [email protected]:asascience-open/paegan.git`
cd paegan
python setup.py 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.

Contributors

paegan's People

Contributors

kwilcox avatar

Watchers

James Cloos avatar Alex Crosby 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.