plots.sources.earthkit

Classes

EarthkitSource

Source class for earthkit data.

Functions

get_points(dx)

Get points for a grid with a given resolution.

Module Contents

class plots.sources.earthkit.EarthkitSource

Bases: earthkit.plots.sources.single.SingleSource

Source class for earthkit data.

Parameters:
  • data (earthkit.data.core.Base) – The data to be plotted.

  • x (numpy.ndarray or str, optional) – The x-coordinates of the data. If a string, it is assumed to be the name of the x-coordinate variable in data.

  • y (numpy.ndarray or str, optional) – The y-coordinates of the data. If a string, it is assumed to be the name of the y-coordinate variable in data.

  • z (numpy.ndarray or str, optional) – The z-coordinates of the data. If a string, it is assumed to be the name of the z-coordinate variable in data.

  • u (numpy.ndarray or str, optional) – The u-component of the data. If a string, it is assumed to be the name of the u-component variable in data.

  • v (numpy.ndarray or str, optional) – The v-component of the data. If a string, it is assumed to be the name of the v-component variable in data.

  • crs (cartopy.crs.CRS, optional) – The CRS of the data.

  • regrid (bool, optional) – Whether to regrid the data.

  • **kwargs – Metadata keys and values to attach to this Source.

property crs
The CRS of the data.
data()

Return the original earthkit data.

datetime(*args, **kwargs)

Get the datetime of the data.

Parameters:
  • *args – The positional arguments to pass to the data object’s datetime method.

  • **kwargs – The keyword arguments to pass to the data object’s datetime method.

dims()

Return the dimensions of the data.

extract_x()

Extract the x values from the data.

extract_xy()

Extract the x and y values from the data.

extract_xyz()

Extract the x, y and z values from the data.

extract_y()

Extract the y values from the data.

extract_z()

Extract the z values from the data.

magnitude_values()

The magnitude values of the data (applicable to vector data).

metadata(key, default=None)

Extract metadata from the data.

Parameters:
  • key (str) – The metadata key to extract.

  • default (any, optional) – The default value to return if the key is not found.

u_values()

The u values of the data.

v_values()

The v values of the data.

x_values()

The x values of the data.

y_values()

The y values of the data.

z_values()

The z values of the data.

plots.sources.earthkit.get_points(dx)

Get points for a grid with a given resolution.

Parameters:

dx (float) – The resolution of the grid.