Skip to content

Visualisations

DEFAULT_SIC_SPEC = PlotSpec(variable='sea_ice_concentration', title_groundtruth='Ground Truth', title_prediction='Prediction', title_difference='Difference', colourmap='viridis', diff_mode='signed', vmin=0.0, vmax=1.0, colourbar_location='horizontal', colourbar_strategy='shared', outside_warn=0.05, severe_outside=0.2, include_shared_range_mismatch_check=True) module-attribute

Plotter

plot_spec = plot_spec instance-attribute

land_mask = LandMask(None) instance-attribute

get_metadata(config, model_name)

Get metadata for the plotter based on the model test output.

set_metadata(metadata)

Set metadata for the plotter, which may be used in titles and subtitles.

log_static_inputs(inputs, dates, image_loggers, prefix=None)

Extract and log static raw input plots.

log_static_outputs(outputs, dates, image_loggers, channel_names, prefix=None, uncertainties=None)

Create and log static output plots, including uncertainty when available.

log_video_inputs(inputs, dates, video_loggers, prefix=None)

Extract and log raw input videos.

log_video_outputs(outputs, dates, video_loggers, channel_names, prefix=None)

Create and log output videos.

set_hemisphere(hemisphere)

Set the hemisphere and update the plot spec accordingly.

plot_variables_static(*, base_path, dataset_name, dataset_path, timestep)

Save static plots for one timestep of a downloaded dataset.

plot_variables_video(*, base_path, dataset_name, dataset_path, n_steps, timestep)

Save one animation per variable for a run of consecutive timesteps.

compute_standardised_difference(ground_truth, prediction, uncertainty)

Return prediction error in units of observational standard uncertainty.

The signed convention matches the existing plotting difference convention: ground_truth - prediction. Locations with non-finite or non-positive uncertainty are returned as NaN because a z value is undefined there.

Parameters:

Name Type Description Default
ground_truth ndarray

Two-dimensional observed values.

required
prediction ndarray

Two-dimensional predicted values.

required
uncertainty ndarray

Two-dimensional standard uncertainty for the observations.

required

Returns:

Type Description
ndarray

Two-dimensional standardised difference array.

Raises:

Type Description
InvalidArrayError

If inputs are not two-dimensional arrays of equal shape.

plot_static_uncertainty(arrays, *, date, land_mask, plot_spec, variable_name)

Plot signed prediction error in units of observational uncertainty.

A value of z=1 means the observation exceeds the prediction by one reported standard uncertainty. Invalid or non-positive uncertainty values are masked.

register_animation_backends()

Register the ImageIO FFMPEG animation backend.