xarray.DataArray.pr.gwp_context

xarray.DataArray.pr.gwp_context#

DataArray.pr.gwp_context#

The pint conversion context for this DataArray, directly usable for conversions.

Returns:
contextpint.Context

Examples

>>> import primap2
>>> import primap2.tests
>>> ds = primap2.tests.minimal_ds()
>>> with ds["SF6 (SARGWP100)"].pr.gwp_context:
...     ds["CH4"].pint.to("Gg CO2 / year")