Giter Site home page Giter Site logo

maikejulie / xmitgcm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mitgcm/xmitgcm

0.0 2.0 0.0 114.22 MB

Read MITgcm mds binary files into xarray

Home Page: http://xmitgcm.readthedocs.io

License: MIT License

Jupyter Notebook 48.86% Python 51.14%

xmitgcm's Introduction

xmitgcm: Read MITgcm mds binary files into xarray

pypi package travis-ci build status code coverage documentation status DOI

xmitgcm is a python package for reading MITgcm binary MDS files into xarray data structures. By storing data in dask arrays, xmitgcm enables parallel, out-of-core analysis of MITgcm output data.

Links

Installation

Requirements

xmitgcm is compatible with python 3 and python 2.7. It requires xarray (>= version 0.8.2) and dask (>= version 0.11.2). These packages are most reliably installed via the conda environment management system, which is part of the Anaconda python distribution. Assuming you have conda available on your system, the dependencies can be installed with the command:

conda install xarray dask

If you are using earlier versions of these packages, you should update before installing xmitgcm.

Installation via pip

If you just want to use xmitgcm, the easiest way is to install via pip:

pip install xmitgcm

This will automatically install the latest release from pypi.

Installation from github

xmitgcm is under active development. To obtain the latest development version, you may clone the source repository and install it:

git clone https://github.com/xgcm/xmitgcm.git
cd xmitgcm
python setup.py install

Users are encouraged to fork xmitgcm and submit issues and pull requests.

Quick Start

First make sure you understand what an xarray Dataset object is. Then find some MITgcm MDS data. If you don't have any data of your own, you can download the xmitgcm test repositories To download the some test data, run the shell commands:

$ curl -L -J -O https://ndownloader.figshare.com/files/6494718
$ tar -xvzf global_oce_latlon.tar.gz

This will create a directory called global_oce_latlon which we will use for the rest of these examples. If you have your own data, replace this with the path to your mitgcm files.

To opean MITgcm MDS data as an xarray.Dataset, do the following in python:

from xmitgcm import open_mdsdataset
data_dir = './global_oce_latlon'
ds = open_mdsdataset(data_dir)

data_dir, should be the path (absolute or relative) to an MITgcm run directory. xmitgcm will automatically scan this directory and try to determine the file prefixes and iteration numbers to read. In some configurations, the open_mdsdataset function may work without further keyword arguments. In most cases, you will have to specify further details.

Consult the online documentation for more details.

xmitgcm's People

Contributors

rabernat avatar serazing avatar braaannigan avatar sambarluc avatar

Watchers

James Cloos avatar Maike Sonnewald 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.