Skip to main content

Package for working with ROMS output in xarray

Project description

xroms

Build Status Code Coverage License:MIT Documentation Status Code Style Status Conda Version Python Package Index DOI

xroms contains functions for commonly used scripts for working with ROMS output in xarray.

There are functions to...

  • help read in model output with automatically-calculated z coordinates
  • calculate many derived variables with correct grid metrics in one line including:
    • horizontal speed
    • kinetic energy
    • eddy kinetic energy
    • vertical shear
    • vertical vorticity
    • Ertel potential vorticity
    • density as calculated in ROMS
    • potential density
    • buoyancy
    • $N^2$ (buoyancy frequency/vertical buoyancy gradient)
    • $M^2$ (horizontal buoyancy gradient)
  • useful functions including:
    • derivatives in all dimensions, accounting for curvilinear grids and sigma layers
    • grid metrics (i.e., grid lengths, areas, and volumes)
    • subset horizontal grid such that the staggered grids are consistent
    • easily change horizontal and vertical grids using xgcm grid objects
    • easily reorder to dimensional convention
    • slice along a fixed value
    • wrapper for interpolation in longitude/latitude and for fixed depths
    • mixed-layer depth
  • Demonstrations:
    • selecting data in many different ways
    • interpolation
    • changing time sampling
    • calculating climatologies
    • various calculations
  • provide/track attributes and coordinates through functions
    • wraps cf-xarray to generalize coordinate and dimension calling.
  • ability to automatically choose colormaps for plotting with xarray
    • wraps xcmocean for this

Installation

You need to have conda installed for these installation instructions. You'll have best results if you use the channel conda-forge, which you can prioritize with conda config --add channels conda-forge --force.

Install, the easy way

PyPI:

pip install xroms

conda-forge:

mamba install -c conda-forge xroms

Create environment if needed

As a first step, you can create an environment for this package with conda if you want. If you do this, you'll need to git clone the package first as below. Note that mamba and conda can be used interchangeably, but mamba is faster for installation.

mamba env create -f environment.yml

You can choose to install with conda the optional dependencies for full functionality:

conda install --file requirements-opt.txt

and to install optional dependency xcmocean:

pip install git+git://github.com/pangeo-data/xcmocean

Then choose one of the following to install xroms from GitHub:

  1. Clone xroms into a particular directory then install so that it is editable (-e)

    git clone git@github.com:xoceanmodel/xroms.git
    cd xroms
    pip install -e .
    
  2. Directly install xroms from github

    pip install git+git://github.com/xoceanmodel/xroms
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xroms-0.2.2.tar.gz (39.6 MB view details)

Uploaded Source

Built Distribution

xroms-0.2.2-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file xroms-0.2.2.tar.gz.

File metadata

  • Download URL: xroms-0.2.2.tar.gz
  • Upload date:
  • Size: 39.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for xroms-0.2.2.tar.gz
Algorithm Hash digest
SHA256 77e51c7403f22bfab214693fb9ee9366d29e2fc34176849ec1ffad1291a81a27
MD5 6f6319683a4a06f3c9cffd15a50642fc
BLAKE2b-256 c7d1e3a237991f2ecf943fee10e861d0ac7f9f82a853191a3069a778c9e6932a

See more details on using hashes here.

Provenance

File details

Details for the file xroms-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: xroms-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for xroms-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa3d2a50ac78b066c0e54c938769f724f726ade82767ffd7b679b8661e947da2
MD5 64622fc9de8bcac4b2b2b7150c6f0bdb
BLAKE2b-256 7759ee56b48fe56f93aa566086768a4a0d869476ed87fc6f700056d71c7ad420

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page