Xarray interface for Madagascar has been added. All the Madagascar programs can now be directly applied to an xarray.DataArray object, similar to Madagascar’s existing NumPy and MATLAB interface.

Why Xarray? While the NumPy interface is useful, Xarray offers a major advantage. It preserves metadata (coordinates, dimensions, and units) alongside the data. This allows the interface to automatically handle RSF header attributes. See an example