plots.metadata.labels
Attributes
Functions
|
Get the default label type for a given data object (analysis or forecast). |
|
Extract an attribute from a data object. |
Module Contents
- plots.metadata.labels.CRS_NAMES
- plots.metadata.labels.DEFAULT_ANALYSIS_TITLE = '{variable_name} at {valid_time:%H:%M} on {valid_time:%Y-%m-%d}'
- plots.metadata.labels.DEFAULT_FORECAST_TITLE = Multiline-String
Show Value
"""{variable_name} Base time: {base_time:%H:%M} on {base_time:%Y-%m-%d} Valid time: {valid_time:%H:%M} on {valid_time:%Y-%m-%d} (T+{lead_time})"""
- plots.metadata.labels.MAGIC_KEYS
- plots.metadata.labels.TIME_KEYS = ['base_time', 'valid_time', 'lead_time', 'time', 'utc_offset']
- plots.metadata.labels.default_label(data)
Get the default label type for a given data object (analysis or forecast).
- Parameters:
data (earthkit.plots.sources.Source) – The data source to get the label for.
- plots.metadata.labels.extract(data, attr, default=None)
Extract an attribute from a data object.
- Parameters:
data (earthkit.plots.sources.Source) – The data source to extract the label from.
attr (str) – The attribute to extract.
default (str, optional) – The default label to use if the attribute is not found.