Xarray for labelled array data

Xarray for labelled array data#

Xarray provides two fundamental data structures:

  • DataArrays are n-dimensional arrays with additional meta data such as a name, named dimensions, and other attributes.

  • Datasets are collections of DataArrays.

To learn about the fundamentals of Xarray, there is the great Xarray in 45 minutes tutorial.

When working throgh the tutorial, focus on the following questions:

  • What are the defining parts of a DataArray?

  • What is the difference between dimensions and coordinates?

  • How does a DataArray store its data?

  • How do I select data based on labels?

  • How do I select data based on position?

  • How do I write and read Datasets to / from netCDF files?