pangeo_fish.visualization.render_frame

Contents

pangeo_fish.visualization.render_frame#

pangeo_fish.visualization.render_frame(ds: Dataset, *args, figsize=(14, 8), frames_dir='.', **kwargs)#

Warning

Designed to be used with dask.map_blocks(). As such, ds must have the following variables:

  • time_index, representing the time index. It is used for naming the image (.png)

  • emission and states, the data to plot

Used along with dask.map_blocks(), it will call create_single_frame() for each timestep, and save the consequent images under {frames_dir}/frame_XXXXX.png.

Parameters:
  • frames_dir (str, default: ".") – Name of the folder to save the frame

  • figsize (tuple of float, default: (14, 8)) – Name of the folder to save the frame

Returns:

ds (xarray.Dataset) – The input dataset (see dask.map_blocks())