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 the Model Results section of https://gomss.ocean.dal.ca/.
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.
make_figure()functions from figure modules are called by the nowcast system
nowcast.workers.make_plotsworker. The figure object that a
make_figure()function returns is rendered to storage on the nemo cluster. See CallingMakeFigureFunctionsInTheMakePlotsWorker for details of variables that the
make_plotsworker can provide to
make_figure()functions, and how to store the figure to the cluster storage.
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 the Model Results section of https://gomss.ocean.dal.ca/. The figure file name is used to find the figure in the cluster storage. The list of figures is in the
gomss_site.views.landingmodule of the gomss.ocean.dal.ca Site Web App. The figure titles and file names are added to the list as
gomss_site.views.figures.FigureMetadatainstances. See GoMSSSiteWebPageViewFigureMetadata 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_plotsworker can render your figures to to the figures server
test that the figure appears on a results page in the web app
- Nowcast Figures Development Environment
- Figure Modules Organization
- Creating a Figure Module