Distribution Statement
Title Formatters in GeoIPS#
A title formatter is a class-based GeoIPS plugin that generates a title that is applied to image-based outputs. Title formatters generally contain useful information (e.g. valid time) concerning the plotted data, but this plugin type can be customized however the user desires.
For an example of a title formatter, see the static standard title formatter.
Title formatters can be applied in two ways:
1. Direct Invocation: Unlike most class-based GeoIPS plugins, title formatters are generally accessed directly from within an output formatter:
from geoips.interfaces import title_formatters title_fmt_name = "static_standard" title_string = title_formatters.get_plugin(title_fmt_name) ax.set_title(title_string, position=[xpos, ypos], fontsize=fontsize)
2. Specification at the Command Line: Title formatters can also be specified as arguments at the command line. Since they are called from within an output formatter, they are passed as an output formatter keyword argument formatted as a JSON dictionary:
--output_formatter_kwargs '{"title_formatter": "static_standard"}'
For an example of calling a title formatter from a test script, see the HY-2 windspeed test script.
Plugin arguments#
The arguments accepted by a title formatter step (validated in Order-Based Processing workflows) are defined by the model below. These fields are generated directly from the code, so they always reflect the current validation rules.
- pydantic model geoips.pydantic_models.v1.title_formatters.TitleFormatterArgumentsModel[source]
Title-Formatter step argument definition.
Pydantic model defining and validating Title Formatter step arguments.
- Fields:
- Validators:
- field area_def: str = None
Area definition identifier.
- field bg_datatype_title: str = None
Background data type label for the background product title.
- field bg_product_name_title: str = None
Background product name title when background layer is provided.
- field product_datatype_title: str = None
Product data type label to include in the title.
- field product_name_title: str = None
Product name title.
- field title_copyright: str = None
Copyright string to append to the generated title