plots.sources.xarray ==================== .. py:module:: plots.sources.xarray Classes ------- .. autoapisummary:: plots.sources.xarray.XarraySource Module Contents --------------- .. py:class:: XarraySource(dataarray, x=None, y=None, z=None, **kwargs) Bases: :py:obj:`earthkit.plots.sources.single.SingleSource` A data source for xarray-like inputs, extending Source with additional support for identifying x, y, and z dimensions within an xarray Dataset or DataArray. :param dataarray: The xarray data to use as the source. :type dataarray: xarray.Dataset or xarray.DataArray :param x: The x-coordinate name or values of the data. :type x: str or array-like, optional :param y: The y-coordinate name or values of the data. :type y: str or array-like, optional :param z: The z-coordinate name or values of the data. :type z: str or array-like, optional :param u: The u-component of the data. :type u: array-like, optional :param v: The v-component of the data. :type v: array-like, optional :param crs: The CRS of the data. :type crs: cartopy.crs.CRS, optional :param style: The style to use when plotting the data. :type style: str, optional :param metadata: Metadata to attach to this Source. :type metadata: dict, optional :param \*\*kwargs: Additional metadata keys and values to attach to this Source. .. py:property:: crs The CRS of the data. .. py:property:: data Return the original xarray data, if provided. .. py:method:: datetime() Get the datetime of the data. .. py:method:: extract_u(data, u=None) :staticmethod: Return the u-component values of the data, if found. .. py:method:: extract_v(data, v=None) :staticmethod: Return the v-component values of the data, if found. .. py:method:: metadata(key, default=None) Extract metadata from the data. :param key: The metadata key to extract. :type key: str :param default: The default value to return if the key is not found. :type default: any, optional .. py:method:: to_earthkit() Convert the data to an earthkit.data.core.Base object. .. py:property:: z_values Returns the inferred or provided z values (or color values).