Code Monkey home page Code Monkey logo

narwhal's Introduction

Narwhal

Build Status

Oceanographic data analysis in Python

Narwhal is a Python module built on pandas and matplotlib. Narwhal is designed for manipulating and visualizing oceanographic data.

Data are organized into self-describing Cast and CastCollection data structures. Convenience methods and functions are included for:

  • interpolation
  • density and depth calculation
  • buoyancy frequency estimation
  • baroclinic mode analysis
  • water type fraction inversion

Quickly visualize results

The narwhal.plotting submodule contains convenience methods for creating T-S diagrams, cast plots, and section plots. Here's some data from off the coast of northeastern Greenland:

T-S diagram

Section diagram

Python wrapper for the thermodynamic equation of state

Narwhal provides a ctypes wrapper for the Gibbs Seawater Toolbox in the narwhal.gsw submodule, making things like the following possible:

density = narwhal.gsw.rho(cast["sa"], cast["ct"], cast["p"])

Currently, GSW 3.05 is packaged with Narwhal.

Data should not be tied to software

For storage, data is serialized to JSON or HDF files. These common formats are open and easily imported into other analysis packages (such as MATLAB), or visualization libraries (such as D3).

Installation

git clone https://github.com/njwilson23/narwhal.git
pip install -r narwhal/requirements.txt
pip install narwhal

Dependencies

  • Python 2.7+ or Python 3.4+
  • pandas
  • matplotlib
  • scipy
  • requests
  • dateutil
  • six
  • C-compiler (for GSW)
  • h5py (optional, required for HDF read/write)

If Karta is installed, it will be used for fast and accurate geographical calculations.

Narwhal is experimental. See also python-oceans and oce (R).

narwhal's People

Contributors

arnaldorusso avatar njwilson23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

narwhal's Issues

Import issues

~/Documents/Git/narwhal-master/narwhal/gsw.py in ()
12 return splitext(s)[1] == ".so" and s.startswith("cgsw")
13
---> 14 name = list(filter(find_gsw, listdir(install_dir)))[0]
15 cgsw = ctypes.cdll.LoadLibrary(join(install_dir, name))
16

IndexError: list index out of range

Install requirements

Hi,

Maybe you should address an information that karta should be installed with their requirements.txt as well. While installing following your stpes, it does not install shapefiles

while running runtests.py

ImportError: No module named shapefile

I have cloned karta and install their requirements and compiled again.
Now it pass:

...............................................
----------------------------------------------------------------------
Ran 47 tests in 0.355s

OK

Is there any possible way to assert requirements.txt from other packages?

Cheers,
Arnaldo.

Tests needed

Tests are needed in the following areas:

Analysis functions

  • thermal wind
  • EOFs
  • baroclinic modes

Plotting functions

  • T-S plot
  • Section plot
  • bathymetry in section plot

Add Docs to website

Generate docs from docstrings and come up with a template to post them to narwhal/features.html.

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.