xCDAT: Xarray Climate Data Analysis Tools#

xCDAT is an extension of xarray for climate data analysis on structured grids. It serves as a spiritual successor to the Community Data Analysis Tools (CDAT) library.

Planned Features#

The goal of xCDAT is to provide climate domain specific features and general utilities with xarray.

Initial planned features include:

  • Extension of xarray’s open_dataset() and open_mfdataset() with post-processing options

    • Generate bounds for axes supported by xcdat if they don’t exist in the Dataset

    • Optional decoding non-CF time units, in addition to CF time units (already supported in xarray)

    • Optional centering of time coordinates using time bounds

    • Optional conversion of longitudinal axis orientation between [0, 360) and [-180, 180)

  • Temporal averaging

    • Time series averages (single snapshot and grouped), climatologies, and departures

    • Weighted or unweighted

    • Optional seasonal configuration (e.g., DJF vs. JFD, custom seasons)

  • Geospatial weighted averaging

    • Support rectilinear grid

    • Optional specification of regional domain

  • Horizontal structured regridding

    • Support rectilinear and cuvilinear grids

    • Python implementation of regrid2 for handling cartesian latitude longitude grids

    • API that wraps xesmf with utilities to handle edge cases

  • Vertical structured regridding

    • Support rectilinear and cuvilinear grids

Things we are striving for:

  • Support for CF compliant, E3SM non-CF compliant, and common metadata

  • Robust handling of coordinates and its associated bounds

    • Coordinate variables are retrieved with cf_xarray using either the "axis", "standard_name", or dimension name attribute.

    • Bounds are retrieved with cf_xarray using the "bounds" attr.

    • Ability to operate on both longitudinal axis orientations, [0, 360) and [-180, 180)

  • Support for parallelism using dask where it is both possible and makes sense


This software is jointly developed by scientists and developers from the Energy Exascale Earth System Model (E3SM) Project and Program for Climate Model Diagnosis and Intercomparison (PCMDI). The work is performed for the E3SM project, which is sponsored by Earth System Model Development (ESMD) program, and the Simplifying ESM Analysis Through Standards (SEATS) project, which is sponsored by the Regional and Global Model Analysis (RGMA) program. ESMD and RGMA are programs for the Earth and Environmental Systems Sciences Division (EESSD) in the Office of Biological and Environmental Research (BER) within the Department of Energy’s Office of Science.


SPDX-License-Identifier: (Apache-2.0)

See LICENSE for details