Because we use xarray.Dataset and xarray.DataArray as our data container it would be best and most convenient to make as much functionality as possible accessible via custom xarray Accessors so that we can e.g. plot the CML paths like this
where plg is our custom accessor.
If we go this step, we could also make some basics functions that work in the background more general regarding their input, e.g. allow plotting colored lines by passing the coordinates and values as numpy arrays and not rely on xarray.Dataset in these "low-level functions" because one can call the functions via the xarray Accessor. The only question would where to put the detailed doc string, in the low-level function or in the accessor method.
Because we use
xarray.Datasetandxarray.DataArrayas our data container it would be best and most convenient to make as much functionality as possible accessible via custom xarray Accessors so that we can e.g. plot the CML paths like thiswhere
plgis our custom accessor.If we go this step, we could also make some basics functions that work in the background more general regarding their input, e.g. allow plotting colored lines by passing the coordinates and values as numpy arrays and not rely on
xarray.Datasetin these "low-level functions" because one can call the functions via the xarray Accessor. The only question would where to put the detailed doc string, in the low-level function or in the accessor method.