OceanSpy - A Python package to facilitate ocean model data analysis and visualization.

OceanSpy image

PyPI conda-forge Documentation CI pre-commit.ci status Coverage black License doi JOSS binder

Interactive Demo

Check out the interactive demonstration of OceanSpy at www.bndr.it/gfvgd

For publications, please cite the following paper:

Almansi, M., R. Gelderloos, T. W. N. Haine, A. Saberi, and A. H. Siddiqui (2019). OceanSpy: A Python package to facilitate ocean model data analysis and visualization. Journal of Open Source Software, 4(39), 1506, doi: https://doi.org/10.21105/joss.01506 .

This material is based upon work supported by the National Science Foundation under Grant Numbers 1835640, 124330, 118123, and 1756863. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

What is OceanSpy?

OceanSpy is an open-source and user-friendly Python package that enables scientists and interested amateurs to analyze and visualize ocean model datasets. OceanSpy builds on software packages developed by the Pangeo community, in particular xarray, dask, and xgcm. The integration of dask facilitates scalability, which is important for the petabyte-scale simulations that are becoming available.

Why OceanSpy?

Simulations of ocean currents using numerical circulation models are becoming increasingly realistic. At the same time, these models generate increasingly large volumes of model output data, making the analysis of model data harder. Using OceanSpy, model data can be easily analyzed in the way observational oceanographers analyze field measurements.

How to use OceanSpy?

OceanSpy can be used as a standalone package for analysis of local circulation model output, or it can be run on a remote data-analysis cluster, such as the Johns Hopkins University SciServer system, which hosts several simulations and is publicly available (see SciServer Access, and Datasets).


OceanSpy has been developed and tested using MITgcm output. However, it is designed to work with any (structured grid) ocean general circulation model. OceanSpy’s architecture allows to easily implement model-specific features, such as different grids, numerical schemes for vector calculus, budget closures, and equations of state. We actively seek input and contributions from users of other ocean models (feedback submission).