lair.inventories.convert_units#

lair.inventories.convert_units(data, pollutant, dst_units)[source]#

Convert the units of a pint quantified data array or dataset.

Parameters:
  • data (xr.DataArray | xr.Dataset) – The data to convert. Must have pint units.

  • pollutant (str) – The pollutant.

  • dst_units (Any) – The destination units.

Returns:

xr.DataArray | xr.Dataset – The data with converted units.

Return type:

_XarrayT