pcmdi_metrics.io.get_longitude

pcmdi_metrics.io.get_longitude(ds)[source]

Extract longitude coordinate data.

Parameters:

ds (Union[xr.Dataset, xr.DataArray]) – The input dataset or data array.

Returns:

xr.DataArray – The longitude coordinate data.

Examples

>>> from pcmdi_metrics.io import get_longitude
>>> lon = get_longitude(ds)