cf-xarray

An accessor for xarray objects that interprets CF attributes.
https://github.com/xarray-contrib/cf-xarray

Category: Climate Change
Sub Category: Climate Data Standards

Keywords

cf-conventions metadata xarray

Keywords from Contributors

climate-science climate-model earth-system-model climate-analysis pangeo climate data-catalog finite-volume gridded-data cmip6

Last synced: about 8 hours ago
JSON representation

Repository metadata

an accessor for xarray objects that interprets CF attributes

README.rst

          .. image:: https://img.shields.io/static/v1.svg?logo=Jupyter&label=Pangeo+Binder&message=GCE+us-central1&color=blue&style=for-the-badge
    :target: https://binder.pangeo.io/v2/gh/xarray-contrib/cf-xarray/main?urlpath=lab
    :alt: Binder

.. image:: https://img.shields.io/readthedocs/cf-xarray/latest.svg?style=for-the-badge
    :target: https://cf-xarray.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. image:: https://img.shields.io/github/actions/workflow/status/xarray-contrib/cf-xarray/ci.yaml?branch=main&logo=github&style=for-the-badge
    :target: https://github.com/xarray-contrib/cf-xarray/actions
    :alt: GitHub Workflow CI Status

.. image:: https://results.pre-commit.ci/badge/github/xarray-contrib/cf-xarray/main.svg
   :target: https://results.pre-commit.ci/latest/github/xarray-contrib/cf-xarray/main
   :alt: pre-commit.ci status

.. image:: https://codecov.io/gh/xarray-contrib/cf-xarray/branch/main/graph/badge.svg?token=hR3x9559bZ
   :target: https://codecov.io/gh/xarray-contrib/cf-xarray
   :alt: Code Coverage

.. image:: https://img.shields.io/pypi/v/cf-xarray.svg?style=for-the-badge
    :target: https://pypi.org/project/cf-xarray
    :alt: Python Package Index

.. image:: https://img.shields.io/conda/vn/conda-forge/cf_xarray.svg?style=for-the-badge
    :target: https://anaconda.org/conda-forge/cf_xarray
    :alt: Conda Version

.. image:: https://zenodo.org/badge/267381269.svg
   :target: https://zenodo.org/badge/latestdoi/267381269

.. image:: https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow
   :target: https://fair-software.eu

cf-xarray
=========

A lightweight convenience wrapper for using CF attributes on xarray objects.

For example you can use ``.cf.mean("latitude")`` instead of ``.mean("lat")`` if appropriate attributes are set! This allows you to write code that does not require knowledge of specific dimension or coordinate names particular to a dataset.

See more in the `introductory notebook `_.

Try out our Earthcube 2021 Annual Meeting notebook `submission `_.

        

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: cf_xarray
message: >-
  If you use this software, please cite it using these
  metadata.
type: software
authors:
  - affiliation: 'National Center for Atmospheric Research, USA'
    family-names: Cherian
    given-names: Deepak
    orcid: 'https://orcid.org/0000-0002-6861-8734'
  - affiliation: 'National Oceanography Centre, Southampton, UK'
    family-names: Almansi
    given-names: Mattia
    orcid: 'https://orcid.org/0000-0001-6849-3647'
  - affiliation: 'Ouranos, Inc.'
    family-names: Bourgault
    given-names: Pascal
    orcid: 'https://orcid.org/0000-0003-1192-0403'
  - affiliation: Axiom Data Science
    family-names: Thyng
    given-names: Kristen
    orcid: 'https://orcid.org/0000-0002-8746-614X'
  - family-names: Thielen
    given-names: Jonathan
    orcid: 'https://orcid.org/0000-0002-5479-0189'
    affiliation: 'Iowa State University, Ames, IA, USA'
  - family-names: Magin
    given-names: Justus
    orcid: 'https://orcid.org/0000-0002-4254-8002'
    affiliation: IFREMER
  - family-names: Aoun
    given-names: Abel
    orcid: 'https://orcid.org/0000-0003-2289-2890'
    affiliation: CERFACS
  - family-names: Buntemeyer
    given-names: Lars
    orcid: 'https://orcid.org/0000-0002-0849-2404'
    affiliation: Helmholtz-Zentrum Hereon
  - family-names: Caneill
    given-names: Romain
    orcid: 'https://orcid.org/0000-0001-6649-4275'
    affiliation: Gothenburg University
  - family-names: Davis
    given-names: Luke
    orcid: 'https://orcid.org/0000-0003-1072-4638'
    affiliation: Colorado State University
  - family-names: Fernandes
    given-names: Filipe
    orcid: 'https://orcid.org/0000-0003-4165-2913'
    affiliation: IOOS
  - family-names: Hauser
    given-names: Matthias
    orcid: 'https://orcid.org/0000-0002-0057-4878'
    affiliation: ETH Zürich
  - family-names: Heerdegen
    given-names: Aidan
    orcid: 'https://orcid.org/0000-0002-4481-4896'
    affiliation: 'Australian National University'
  - affiliation: 'National Center for Atmospheric Research, USA'
    family-names: Kent
    given-names: Julia
    orcid: 'https://orcid.org/0000-0002-5611-8986'
  - family-names: Mankoff
    given-names: Ken
    orcid: 'https://orcid.org/0000-0001-5453-2019'
    affiliation: Goddard Institute for Space Studies
  - family-names: Müller
    given-names: Sebastian
    orcid: 'https://orcid.org/0000-0001-9060-4008'
    affiliation: Helmholtz Centre for Environmental Research - UFZ
  - family-names: Schupfner
    given-names: Martin
    orcid: 'https://orcid.org/0000-0001-8075-589X'
    affiliation: DKRZ (German Climate Computing Centre)
  - family-names: Vo
    given-names: Tom
    orcid: 'https://orcid.org/0000-0002-2461-0191'
    affiliation: Lawrence Livermore National Laboratory
  - family-names: Haëck
    given-names: Clément
    affiliation: Laboratoire d'Océanographie et du Climat (LOCEAN), Paris
  - family-names: Boutte
    given-names: Jason
    orcid: 'https://orcid.org/0009-0009-3996-3772'
    affiliation: Lawrence Livermore National Laboratory
identifiers:
  - type: doi
    value: 10.5281/zenodo.4749735
    description: Zenodo DOI
repository-code: 'https://github.com/xarray-contrib/cf-xarray'
url: 'https://cf-xarray.readthedocs.io'
abstract: >-
  cf_xarray provides an accessor (DataArray.cf or
  Dataset.cf) that allows you to interpret Climate and
  Forecast metadata convention attributes present on xarray
  objects.
keywords:
  - cf-conventions
  - xarray
  - metadata
license: Apache-2.0
# commit: 1b373a21b558423da8f22c3ec79f58737871719b
version: 0.8.2
date-released: '2023-06-23'

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 525
Total Committers: 33
Avg Commits per committer: 15.909
Development Distribution Score (DDS): 0.415

Commits in past year: 68
Committers in past year: 9
Avg Commits per committer in past year: 7.556
Development Distribution Score (DDS) in past year: 0.529

Name Email Commits
Deepak Cherian d****n 307
dependabot[bot] 4****] 73
Mattia Almansi m****i@j****u 37
pre-commit-ci[bot] 6****] 16
Pascal Bourgault b****l@o****a 16
Kristen Thyng k****n@a****o 12
keewis k****s 9
Filipe o****f@g****m 7
Julia Signell j****l@g****m 7
Lars Buntemeyer 5****r 6
Mathias Hauser m****e 4
Tom Vo t****r@g****m 3
Bouwe Andela b****a@e****l 3
Romain Caneill r****l@y****r 3
Martin Schupfner m****r@w****e 2
Julia Kent 4****t 2
Jason Boutte j****5 2
znichollscr 1****r 1
Vecko 3****o 1
Trevor James Smith 1****e 1
Shubhendra Singh Chauhan w****h@g****m 1
Sebastian Müller m****b@p****e 1
Navid C. Constantinou n****y 1
MichaelStLaurent-NOAA 6****0 1
Martin Fleischmann m****n@m****t 1
Luke Davis l****d@g****m 1
Ken Mankoff m****f@g****m 1
Jon Thielen j****n@t****e 1
Joe Hamman j****1@g****m 1
Clément HAËCK 5****e 1
and 3 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 3 days ago

Total issues: 86
Total pull requests: 272
Average time to close issues: 6 months
Average time to close pull requests: 22 days
Total issue authors: 31
Total pull request authors: 27
Average comments per issue: 3.09
Average comments per pull request: 0.92
Merged pull request: 226
Bot issues: 6
Bot pull requests: 105

Past year issues: 11
Past year pull requests: 48
Past year average time to close issues: 5 days
Past year average time to close pull requests: 6 days
Past year issue authors: 8
Past year pull request authors: 10
Past year average comments per issue: 0.64
Past year average comments per pull request: 0.46
Past year merged pull request: 27
Past year bot issues: 1
Past year bot pull requests: 24

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/xarray-contrib/cf-xarray

Top Issue Authors

  • dcherian (29)
  • kthyng (8)
  • larsbuntemeyer (6)
  • github-actions[bot] (6)
  • aulemahal (5)
  • tomvothecoder (3)
  • BorjaEst (2)
  • keewis (2)
  • Zeitsperre (2)
  • MuellerSeb (2)
  • jbusecke (1)
  • mps01060 (1)
  • mraspaud (1)
  • rabernat (1)
  • jenshnielsen (1)

Top Pull Request Authors

  • dcherian (95)
  • dependabot[bot] (84)
  • pre-commit-ci[bot] (21)
  • aulemahal (11)
  • jsignell (9)
  • larsbuntemeyer (6)
  • mathause (5)
  • kthyng (5)
  • jasonb5 (4)
  • Descanonge (3)
  • keewis (3)
  • znichollscr (3)
  • tomvothecoder (3)
  • ocefpaf (3)
  • mps01060 (2)

Top Issue Labels

  • help wanted (13)
  • bug (8)
  • CI (6)
  • enhancement (5)
  • opinion wanted (5)
  • good first issue (4)
  • documentation (3)
  • good second issue (2)
  • invalid (1)

Top Pull Request Labels

  • dependencies (84)
  • github_actions (17)
  • test-build (14)
  • python:uv (7)
  • test-upstream (5)

Package metadata

pypi.org: cf-xarray

A convenience wrapper for using CF attributes on xarray objects

  • Homepage:
  • Documentation: https://cf-xarray.readthedocs.io/
  • Licenses: Apache Software License
  • Latest release: 0.11.3 (published 9 days ago)
  • Last Synced: 2026-06-19T15:30:38.833Z (2 days ago)
  • Versions: 57
  • Dependent Packages: 41
  • Dependent Repositories: 17
  • Downloads: 384,038 Last month
  • Docker Downloads: 1,892
  • Rankings:
    • Dependent packages count: 0.38%
    • Downloads: 1.62%
    • Average: 1.921%
    • Docker downloads count: 2.184%
    • Dependent repos count: 3.502%
  • Maintainers (4)
proxy.golang.org: github.com/xarray-contrib/cf-xarray

conda-forge.org: cf_xarray

A lightweight convenience wrapper for using CF attributes on xarray objects..

  • Homepage: https://github.com/xarray-contrib/cf-xarray
  • Licenses: Apache-2.0
  • Latest release: 0.7.5 (published over 3 years ago)
  • Last Synced: 2026-03-06T17:25:19.792Z (4 months ago)
  • Versions: 17
  • Dependent Packages: 20
  • Dependent Repositories: 58
  • Rankings:
    • Dependent packages count: 3.199%
    • Dependent repos count: 4.661%
    • Average: 17.603%
    • Forks count: 31.074%
    • Stargazers count: 31.479%
nixpkgs-23.11: python310Packages.cf-xarray

An accessor for xarray objects that interprets CF attributes

nixpkgs-unstable: python314Packages.cf-xarray

Accessor for xarray objects that interprets CF attributes

nixpkgs-24.05: python312Packages.cf-xarray

An accessor for xarray objects that interprets CF attributes

nixpkgs-24.11: python312Packages.cf-xarray

Accessor for xarray objects that interprets CF attributes

nixpkgs-23.11: python311Packages.cf-xarray

An accessor for xarray objects that interprets CF attributes

nixpkgs-24.05: python311Packages.cf-xarray

An accessor for xarray objects that interprets CF attributes

nixpkgs-unstable: python313Packages.cf-xarray

Accessor for xarray objects that interprets CF attributes

nixpkgs-24.11: python311Packages.cf-xarray

Accessor for xarray objects that interprets CF attributes


Dependencies

.binder/environment.yml conda
  • matplotlib-base
  • netcdf4
  • pip
  • pooch
  • python 3.*
  • xarray
.github/workflows/ci.yaml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3.1.1 composite
  • mamba-org/provision-with-micromamba v15 composite
.github/workflows/pypi.yaml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish v1.6.4 composite
.github/workflows/testpypi-release.yaml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
.github/workflows/upstream-dev-ci.yaml actions
  • actions/checkout v3 composite
  • mamba-org/provision-with-micromamba v15 composite
  • xarray-contrib/issue-from-pytest-log v1 composite
ci/environment.yml pypi
  • pytest-pretty *
pyproject.toml pypi
  • xarray *

Score: 21.92867266696583