v0.15.1
Getting Started
Overview: Why xarray?
Frequently Asked Questions
Quick overview
Examples
Toy weather data
Calculating Seasonal Averages from Timeseries of Monthly Means
Compare weighted and unweighted mean temperature
Working with Multidimensional Coordinates
Visualization Gallery
ROMS Ocean Model Example
GRIB Data Example
Using apply_ufunc
Applying unvectorized functions with
apply_ufunc
External Examples
Managing raster data with rioxarray
Xarray with dask
Xarray and dask on the cloud with Pangeo
Installation
User Guide
Terminology
Data Structures
Indexing and selecting data
Interpolating data
Computation
GroupBy: split-apply-combine
Reshaping and reorganizing data
Combining data
Time series data
Weather and climate data
Working with pandas
Reading and writing files
Parallel computing with Dask
Plotting
Help & reference
What’s New
How do I …
API reference
xarray Internals
Development roadmap
Contributing to xarray
Xarray related projects
xarray
Docs
»
Examples
Edit on GitHub
Examples
¶
Toy weather data
Examine a dataset with pandas and seaborn
Probability of freeze by calendar month
Monthly averaging
Calculate monthly anomalies
Calculate standardized monthly anomalies
Fill missing values with climatology
Calculating Seasonal Averages from Timeseries of Monthly Means
Some calendar information so we can support any netCDF calendar.
A few calendar functions to determine the number of days in each month
Open the
Dataset
Now for the heavy lifting:
Compare weighted and unweighted mean temperature
Data
Creating weights
Weighted mean
Plot: comparison with unweighted mean
Working with Multidimensional Coordinates
Plotting
Multidimensional Groupby
Visualization Gallery
Multiple plots and map projections
Centered colormaps
Control the plot’s colorbar
Multiple lines from a 2d DataArray
imshow()
and rasterio map projections
Parsing rasterio geocoordinates
ROMS Ocean Model Example
Load in ROMS dataset as an xarray object
Add a lazilly calculated vertical coordinates
A naive vertical slice
A plan view
GRIB Data Example
Using apply_ufunc
¶
Applying unvectorized functions with
apply_ufunc
Load data
No errors are raised so our interpolation is working.
apply_ufunc
exclude_dims
Core dimensions
Vectorization with
np.vectorize
Parallelization with dask
High performance vectorization: gufuncs, numba & guvectorize
External Examples
¶
Managing raster data with rioxarray
Xarray with dask
Xarray and dask on the cloud with Pangeo
Read the Docs
v: v0.15.1
Versions
latest
stable
v0.15.1
v0.15.0
v0.14.1
v0.14.0
v0.13.0
v0.12.3
v0.12.2
v0.12.1
v0.12.0
v0.11.3
v0.11.2
v0.11.1
v0.11.0
v0.10.9
v0.10.8
v0.10.7
v0.10.6
v0.10.4
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.6
v0.9.5
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.2
v0.7.1
v0.7.0
v0.6.1
v0.6.0
v0.5.2
v0.5.1
v0.5
v0.4.1
v0.4
v0.3.2
v0.3.1
v0.3
v0.2
v0.1.1
Downloads
On Read the Docs
Project Home
Builds
Free document hosting provided by
Read the Docs
.