xarray
xarray: N-D labeled arrays and datasets in Python
Xarray was inspired by and borrows heavily from pandas, the popular data analysis package focused on labelled tabular data. It is particularly tailored to working with netCDF files, which were the source of xarray’s data model, and integrates tightly with dask for parallel computing. Official documents
Interpolating data
Examples
Xarray related projects
Xarray Tutorial
Tutorials
`#53 - XArray Basics : Unidata Developer's Blog
`#164 - MetPy 1.0 XArray Basics with the GFS : Unidata Developer's Blog `#165 - Using XArray to Subset in Lat/Lon and Map the GFS : Unidata Developer's Blog
subsetting, plotting
`#166 - Getting Familiar with XArray : Unidata Developer's Blog
dataset, dataarray, dimension, coordinate
`#167 - Building with XArray from Scratch : Unidata Developer's Blog
`#168 - Complex XArrays and Selecting : Unidata Developer's Blog
Handling NetCDF Files using XArray for Absolute Beginners
Xarray Tutorial — NCAR-ESDS
Examples
PyVideo.org · Efficient Atmospheric Analogue Selection with Xarray and Dask | SciPy 2019 | Tyler Wixstrom Tips
Area weighted mean
Compare weighted and unweighted mean temperature
code:python
weights = np.cos(np.deg2rad(air.lat))
air_weighted = air.weighted(weights)
weighted_mean = air_weighted.mean(("lon", "lat"))
Weighted array reductions
select beyond date line
python - xarray slicing across the antimeridian - Geographic Information Systems Stack Exchange
lazy
code:python
ds.sel(lon=(ds.lon < -80) | (ds.lon > 40))
not lazy
code:python
ds_rolled = ds.assign_coords(lon=(ds.lon % 360)).roll(lon=(ds.dims'lon' // 2)) subpages
Related packages
xarray with MetPy Tutorial
xagg: A package to aggregate gridded data in xarray to polygons in geopandas xclim: Library of derived climate variables, ie climate indicators, based on xarray. xarray-clim: wrapper functions for xarray to perform common tasks in analyzing gridded climate and weather data xr-scipy: thin wrapper of scipy for xarray eco-system. xtrude: an xarray extension for 3D terrain visualization Xscale: Xscale a library of multi-dimensional signal processing tools using parallel computing xmovie: A simple way of creating beautiful movies from xarray objects. Xoak: Xoak is an Xarray extension that allows point-wise selection of irregular, n-dimensional data encoded in coordinates with an arbitrary number of dimensions. xoa: intended to help reading and manipulating observed and simulated ocean data. Xarray-Beam: Xarray-Beam is a Python library for building Apache Beam pipelines with Xarray datasets.