pcmdi_metrics.io.get_longitude_key

pcmdi_metrics.io.get_longitude_key(ds)[source]

Get the key for the longitude dimension.

Parameters:

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

Returns:

str – The key for the longitude dimension.

Examples

>>> from pcmdi_metrics.io import get_longitude_key
>>> lon_key = get_longitude_key(ds)