A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

xroms

Work with ROMS ocean model output with xarray and calculate many derived variables with correct grid metrics in one line, including horizontal velocity, kinetic energy and eddy kinetic energy.
https://github.com/xoceanmodel/xroms

Category: Hydrosphere
Sub Category: Ocean Models

Keywords from Contributors

archiving measur climate-model projection transforms generic observation conversion optimize geosciences

Last synced: 22 minutes ago
JSON representation

Repository metadata

Work with ROMS ocean model output with xarray

README.md

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
    • horizontal divergence
    • normalized surface divergence
    • 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+https://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 https://github.com/xoceanmodel/xroms.git
    cd xroms
    pip install -e .
    
  2. Directly install xroms from github

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

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 239
Total Committers: 9
Avg Commits per committer: 26.556
Development Distribution Score (DDS): 0.146

Commits in past year: 8
Committers in past year: 2
Avg Commits per committer in past year: 4.0
Development Distribution Score (DDS) in past year: 0.125

Name Email Commits
Kristen Thyng k****g@g****m 204
hetland h****d@t****u 15
dependabot[bot] 4****] 11
Filipe Fernandes o****f@g****m 3
Christoph Renkl c****l@d****a 2
rsignell 1****l 1
Veronica Ruiz Xomchuk v****x@t****u 1
Navid C. Constantinou n****y 1
Mike Smith m****m@m****u 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 43
Total pull requests: 90
Average time to close issues: 6 months
Average time to close pull requests: 23 days
Total issue authors: 18
Total pull request authors: 9
Average comments per issue: 2.81
Average comments per pull request: 0.69
Merged pull request: 81
Bot issues: 0
Bot pull requests: 19

Past year issues: 4
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: 1 day
Past year issue authors: 4
Past year pull request authors: 2
Past year average comments per issue: 1.25
Past year average comments per pull request: 0.67
Past year merged pull request: 3
Past year bot issues: 0
Past year bot pull requests: 1

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/xoceanmodel/xroms

Top Issue Authors

  • bjornaa (6)
  • tlsw231 (5)
  • imcslatte (4)
  • hetland (3)
  • rsignell-usgs (3)
  • dylanschlichting (3)
  • ana-machado (2)
  • kyle-hinson (2)
  • claudiofgcardoso (2)
  • dcherian (2)
  • jl2158 (2)
  • nmalan (2)
  • jaard (2)
  • ak11283 (1)
  • JeremyCollin (1)

Top Pull Request Authors

  • kthyng (62)
  • dependabot[bot] (19)
  • vrx- (2)
  • christophrenkl (2)
  • najascutellatus (1)
  • navidcy (1)
  • ocefpaf (1)
  • rsignell (1)
  • dylanschlichting (1)

Top Issue Labels

Top Pull Request Labels

  • dependencies (19)

Package metadata

pypi.org: xroms

Package for working with ROMS output in xarray

  • Homepage: https://github.com/xoceanmodel/xroms
  • Documentation: https://xroms.readthedocs.io/
  • Licenses: MIT
  • Latest release: 0.6.1 (published 6 months ago)
  • Last Synced: 2025-04-26T14:41:19.464Z (1 day ago)
  • Versions: 24
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 949 Last month
  • Rankings:
    • Forks count: 6.78%
    • Dependent packages count: 7.287%
    • Stargazers count: 11.033%
    • Average: 16.555%
    • Dependent repos count: 41.12%
  • Maintainers (1)

Dependencies

requirements-dev.txt pypi
  • black * development
  • check-manifest * development
  • doctr * development
  • flake8 * development
  • flake8-builtins * development
  • flake8-comprehensions * development
  • flake8-mutable * development
  • flake8-print * development
  • isort * development
  • mypy * development
  • nbsphinx * development
  • pre-commit * development
  • pylint * development
  • pytest * development
  • pytest-cov * development
  • pytest-xdist * development
  • setuptools_scm * development
  • sphinx * development
  • twine * development
  • wheel * development
  • zarr * development
requirements-opt.txt pypi
  • cartopy >=0.18
  • cmocean *
  • datashader >=0.11
  • geoviews *
  • holoviews *
  • hvplot *
  • matplotlib *
  • zarr *
requirements.txt pypi
  • cf_xarray *
  • dask *
  • jupyter *
  • jupyterlab *
  • netcdf4 *
  • numba >=0.49
  • numpy *
  • xarray *
  • xgcm *
.github/workflows/pre-commit.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pre-commit/action v3.0.0 composite
.github/workflows/release.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/test.yaml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • conda-incubator/setup-miniconda v2 composite
docs/environment.yml pypi
  • docrep <=0.2.7
  • jupyter_client *
  • nbsphinx >=0.8.7
  • sphinx-copybutton *
  • sphinx_pangeo_theme *
  • sphinxcontrib-srclinks *
environment.yml pypi
pyproject.toml pypi
setup.py pypi

Score: 13.410395388620397