Results Figures for the Web Site
This section describes how figures are produced automatically from the results of nowcast system runs to appear on the daily pages that are linked from https://salishsea.eos.ubc.ca/nemo/results/.
In summary:
Web site figures are generated by code modules stored in the
nowcast/figures/
directory tree. See Figure Modules Organization for details and links to docs about how to structure and write the functions in a figure module, and how to develop and test a figure module with the help of a Jupyter notebook.The
make_figure()
functions from figure modules are called by the nowcast systemnowcast.workers.make_plots
worker. The figure object that amake_figure()
function returns is rendered to storage on thesalishsea.eos.ubc.ca
figures server. See Calling make_figure() Functions in the make_plots Worker for details of variables that themake_plots
worker can provide tomake_figure()
functions, and how to store the figure to the figures server.The title of the figure and the name of the figure file are added to a list of web site figures. The title will appear on the results figures page linked from https://salishsea.eos.ubc.ca/nemo/results/. The figure file name is used to find the figure on the figures server. The list of figures is in the
salishsea_site.views.salishseacast
module of the salishsea.eos.ubc.ca Site Web App. The figure titles and file names are added to the list asFigureMetadata
instances. See SalishSeaCast Web Page View Figure Metadata for details of how to add figure titles and file names to the site web app view module.
The Nowcast Figures Development Environment section below explains how to set up a conda environment that you can use to:
develop figure modules
test that the
nowcast.workers.make_plots
worker can render your figures to to the figures servertest that the figure appears on a results page in the web app