Salish Sea Nowcast System Workers
Process Flow
Work flow of preparation for and execution of the daily runs.
The green, pink, and blue boxes in the figure above are the workers described below.
The other workers are launched and coordinated by the Manager, another long-running process that keeps track of the state of the nowcast system. The workers and manager communicate by using the Messaging System to pass messages back and forth.
The messages are mediated by the Message Broker, a third long-running process that queues messages in both directions between the manager and the workers. That queuing improves the robustness of the system.
Please see NEMO Nowcast Framework Architecture for a more detailed description of the system architecture.
The process flow in the diagram above is somewhat idealized. For example:
The
collect_weatherworker is launched four times daily, to get the hour 00, 06, 12, and 18 UTC forecast products.The
make_runoff_fileworker is launched both after the 06 forecast download finishes to calculate the river runoff forcing for the preliminary forecast runs from the previous day’s ECCC gauged rivers average discharge values. It is launched again to update the river runoff forcing for the nowcast and final forecast runs with the previous day’s USGS gauged rivers average discharge values that are unavailable at preliminary forecast time.The
grib_to_netcdfworker is only launched after the 06 and 12 forecast downloads finish to prepare the atmospheric forcing files that will be used by the preliminary forecast run, and the nowcast and updated forecast runs. However,grib_to_netcdfuses results from several preceding forecast products downloads to do its job.Etc.
To fully understand the flow and interactions of workers,
please read the code in the nowcast.next_workers module.
Workers
collect_weather
SalishSeaCast worker that monitors a mirror of HRDPS files from the ECCC MSC datamart model_hrdps.west.grib2 service, and moves the expected files into our atmospheric forcing directory tree.
download_weather
SalishSeaCast worker that downloads the GRIB2 files from the 00, 06, 12, or 18 Environment and Climate Change Canada GEM 2.5km HRDPS operational model forecast.
crop_gribs
SalishSeaCast worker that loads ECCC MSC 2.5 km rotated lat-lon continental grid HRDPS GRIB2 files, crops them to the subdomain needed for SalishSeaCast NEMO forcing, and writes them to new GRIB2 files.
grib_to_netcdf
SalishSeaCast worker that generates weather forcing file from GRIB2 forecast files.
Collect weather forecast results from hourly GRIB2 files and produce day-long NEMO atmospheric forcing netCDF files.
collect_river_data
SalishSeaCast worker that collects river discharge observation data from an ECCC datamart CSV file mirror, or the USGS Water Service REST service, and appends a day-average discharge to a SOG-format forcing file.
make_runoff_file
SalishSeaCast worker that calculates NEMO runoff forcing file.
The runoff forcing is calculated from day-averaged river discharge observations (lagged by 1 day) from representative gauged rivers in all watersheds and fits developed by Susan Allen. Missing river discharge observations are handled by a scheme of persistence or scaling of a nearby gauged river, depending on the time span of missing observations.
collect_NeahBay_ssh
SalishSeaCast worker that collects a file containing sea surface height observations and forecast values at Neah Bay from an HTTPS server and stores them locally for subsequent processing by another worker to produce a sea surface height boundary condition file.
make_ssh_files
download_live_ocean
SalishSeaCast worker that downloads a daily averaged file from the University of Washington Live Ocean model forecast product for a specified date. The file contains a hyperslab that covers the SalishSeaCast NEMO model western (Juan de Fuca) open boundary that is generated by UW running our salishsea_tools.UBC_subdomain module.
make_live_ocean_files
SalishSeaCast nowcast worker that produces hourly temperature and salinity boundary conditions files for the SalishSeaCast NEMO model western (Juan de Fuca) open boundary from the University of Washington Live Ocean model forecast product.
upload_forcing
SalishSeaCast worker that upload forcing files for NEMO runs.
# SPDX-License-Identifier: Apache-2.0
Upload the forcing files for a nowcast or forecast run to the HPC/cloud facility where the run will be executed.
make_forcing_links
SalishSeaCast worker that creates forcing files symlinks for NEMO runs.
Create the forcing file symlinks for a nowcast run on the HPC/cloud facility where the run will be executed.
run_NEMO
SalishSeaCast worker that prepares the YAML run description file and bash run script for a nowcast, nowcast-green, forecast or forecast2 run on the ONC cloud, and launches the run.
run_NEMO_agrif
SalishSeaCast worker that prepares the YAML run description file and bash run script for a NEMO SMELT AGRIF run on an HPC cluster that uses the TORQUE/MOAB scheduler, and queues the run.
run_NEMO_hindcast
SalishSeaCast worker that prepares the YAML run description file and bash run script for a NEMO hindcast run on an HPC cluster that uses the SLURM scheduler, and queues the run.
watch_NEMO
SalishSeaCast worker that monitors and reports on the progress of a run on the cloud computing facility or salish.
watch_NEMO_agrif
SalishSeaCast worker that monitors and reports on the progress of a NEMO AGRIF run on an HPC cluster that uses the TORQUE/MOAB scheduler.
watch_NEMO_hindcast
SalishSeaCast worker that monitors and reports on the progress of a NEMO hindcast run on an HPC cluster that uses the SLURM scheduler.
make_turbidity_file
make_ww3_wind_file
Salish Sea WaveWatch3 forecast worker that produces the hourly wind forcing file for a prelim-forecast or forecast run
make_ww3_current_file
SalishSeaCast WaveWatch3 forecast worker that produces the hourly ocean currents forcing file for a prelim-forecast or forecast run
run_ww3
SalishSeaCast WaveWatch3 nowcast/forecast worker that prepares the temporary run directory and bash run script for a prelim-forecast, nowcast or forecast run on the ONC cloud, and launches the run.
watch_ww3
Salish Sea nowcast worker that monitors and reports on the progress of a WaveWatch3 run on the ONC cloud computing facility.
download_results
SalishSeaCast worker that downloads the results files from an HPC/cloud facility run to archival storage.
make_averaged_dataset
SalishSeaCast worker that creates a down-sampled time-series dataset netCDF4 file from another model product file using the Reshapr API.
archive_tarball
SalishSeaCast worker that creates a tarball of a month’s run results and moves it to remote archival storage. Compression is not used for the tarball because the netCDF files that compose most of it are already highly compressed. A .index text file containing a list of the files in the tarball is also created and moved to the remote storage.
split_results
SalishSeaCast worker that splits downloaded results of multi-day runs (e.g. hindcast runs) into daily results directories. The results files are renamed so that they look like they came from a single day run so that ERDDAP will accept them. The run description files are left in the first run day’s directory. The restart file is moved to the last run day’s directory.
download_wwatch3_results
SalishSeaCast system worker that downloads the results files from a WaveWatch3 run on the cloud facility to archival storage.
get_onc_ctd
Salish Sea nowcast worker that downloads CTD temperature and salinity data for a specified UTC day from an ONC Strait of Georgia node.
The data are filtered to include only values for which qaqcFlag == 1 (meaning that all of ONC’s automated QA/QC tests were passed). After filtering the data are aggregated into 15 minute bins. The aggregation functions are mean, standard deviation, and sample count.
The data are stored as a netCDF-4/HDF5 file that is accessible via https://salishsea.eos.ubc.ca/erddap/tabledap/index.html?page=1&itemsPerPage=1000.
Development notebook: https://nbviewer.org/github/SalishSeaCast/analysis-doug/blob/main/notebooks/ONC-CTD-DataToERDDAP.ipynb
update_forecast_datasets
SalishSeaCast worker that builds a new directory of symlinks to model results files for the rolling forecast datasets and replaces the previous rolling forecast directory with the new one.
ping_erddap
SalishSeaCast worker that creates flag files to tell the ERDDAP server to reload datasets for which new results have been downloaded.
make_plots
make_surface_current_tiles
make_feeds
SalishSeaCast worker that produces ATOM feeds from forecast and forecast2 run results.
clear_checklist
NEMO_Nowcast framework clear_checklist worker.
Send a message to the nowcast system manager requesting that it clear its system state checklist.
This worker is normally launched in automation at the end of a nowcast
processing cycle (e.g. end of the day), just prior to launching the
nemo_nowcast.workers.rotate_logs worker.
It can also be launched from the command-line by the nowcast administrator as necessary for system maintenance.
rotate_logs
NEMO_Nowcast framework rotate_logs worker.
Iterate through the nowcast system logging handlers, calling the
doRollover() method on any that are instances of
logging.handlers.RotatingFileHandler.
This worker is normally launched in automation at the end of a nowcast processing cycle (e.g. end of the day).
It can also be launched from the command-line by the nowcast administrator as necessary for system maintenance.
Worker Utility Functions
nowcast.lib Module
SalishSeaCast utility functions for use by workers.
- nowcast.lib.configure_logging(config, logger, debug, email=True)[source]
Set up logging configuration.
This function assumes that the logger object has been created in the module from which the function is called. That is typically done with a module-level commands like:
worker_name = lib.get_module_name() logger = logging.getLogger(worker_name)
- Parameters:
config (dict) – Configuration data structure.
logger (
logging.Logger) – Logger to be configured.debug (boolean) – Debug mode; log to console instead of to file.
email (boolean) – Configure SMTP logging handler; only effective when debug == False.
- nowcast.lib.fix_perms(path, mode=436, grp_name=None)[source]
Try to set the permissions and group ownership of the file or directory at path.
The desired permissions are given by mode. If grp_name is given, set the directory’s gid to that associated with the grp_name.
In the event that the file or directory at path is owned by another user the gid or permissions changes fail silently because they are probably correct already.
- Parameters:
path (
pathlib.Pathor str) – Path to fix the permissions of.mode (int) – Permissions to set for the path.
grp_name (str) – Group name to change the path ownership to. Defaults to None meaning do nothing.
- nowcast.lib.mkdir(path, logger, mode=509, grp_name=None, exist_ok=True)[source]
Create a directory at path with its permissions set to mode. If grp_name is given, set the directory’s gid to that associated with the grp_name. If path already exists and exist_ok is False, log an error messages and raise an exception.
In the event that the directory already exists at path but is owned by another user the gid or permissions changes fail silently because they are probably correct already.
- Parameters:
path (
pathlib.Pathor str) – Path to create the directory at.logger (
logging.Logger) – Logger object.mode (int) – Permissions to set for the directory.
grp_name (str) – Group name to change the directory’s ownership to. Defaults to None meaning that the directory’s group will be the same as its parent’s.
exist_ok (boolean) – Indicate whether to log and error message and raise an exception if path already exists. Defaults to True meaning that an existing path is accepted silently.
- Raises:
lib.WorkerErrorif path already exists and exist_ok is False
- nowcast.lib.run_in_subprocess(cmd, output_logger, error_logger)[source]
Run cmd in a subprocess and log its stdout to output_logger. Catch errors from the subprocess, log them to error_logger, and raise the exception for handling somewhere higher in the call stack.
- Parameters:
cmd (list) – Command and its arguments/options to run in subprocess.
output_logger (
logging.Logger()method) – Logger object to send command output to when command is successful.error_logger (
logging.Logger()method) – Logger object to send error message(s) to when command returns non-zero status code.
- Raises:
nowcast.lib.WorkerError
Special Workers
launch_remote_worker
SalishSeaCast worker that launches a specified worker on a remote host.
This worker is for use when it is necessary to intervene after an automation failure. It does the job of `nemo_nowcast.worker.NextWorker.launch()` with a non-default `host` argument, avoiding the need to manually construct a complicated `ssh` command.
rotate_hindcast_logs
SalishSeaCast worker that rotates hindcast processing logs.
Call the doRollover() method on the
logging.handlers.RotatingFileHandler handlers of the run_NEMO_hindcast
logger.
This worker is intended to be launched from the command-line by the nowcast administrator as necessary for maintenance of the hindcast log files e.g. when a new hindcast is started, or when the logs from a running hindcast become annoying long.
next_workers Module
Functions to calculate lists of workers to launch after previous workers end their work.
Function names must be of the form after_worker_name().
- nowcast.next_workers.after_archive_tarball(msg, config, checklist)[source]
Calculate the list of workers to launch after the archive_tarball worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_clear_checklist(msg, config, checklist)[source]
Calculate the list of workers to launch after the clear_checklist worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_collect_NeahBay_ssh(msg, config, checklist)[source]
Calculate the list of workers to launch after the collect_NeahBay_ssh worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_collect_river_data(msg, config, checklist)[source]
Calculate the list of workers to launch after the collect_river_data worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_collect_weather(msg, config, checklist)[source]
Calculate the list of workers to launch after the collect_weather worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_crop_gribs(msg, config, checklist)[source]
Calculate the list of workers to launch after the crop_gribs worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_download_live_ocean(msg, config, checklist)[source]
Calculate the list of workers to launch after the download_live_ocean worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_download_results(msg, config, checklist)[source]
Calculate the list of workers to launch after the download_results worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_download_weather(msg, config, checklist)[source]
Calculate the list of workers to launch after the download_weather worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_download_wwatch3_results(msg, config, checklist)[source]
Calculate the list of workers to launch after the download_wwatch3_results worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_get_onc_ctd(msg, config, checklist)[source]
Calculate the list of workers to launch after the get_onc_ctd worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_get_onc_ferry(msg, config, checklist)[source]
Calculate the list of workers to launch after the get_onc_ferry worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_get_vfpa_hadcp(msg, config, checklist)[source]
Calculate the list of workers to launch after the after_get_vfpa_hadcp worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_grib_to_netcdf(msg, config, checklist)[source]
Calculate the list of workers to launch after the grib_to_netcdf worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_launch_remote_worker(msg, config, checklist)[source]
Calculate the list of workers to launch after the launch_remote_worker worker ends, but it is an empty list because launch_remote_worker is a maintenance tool that is outside the flow of automation.
- Parameters:
msg (
collections.namedtuple) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_CHS_currents_file(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_CHS_currents_file worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_averaged_dataset(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_averaged_dataset worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_feeds(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_feeds worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_forcing_links(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_forcing_links worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_live_ocean_files(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_live_ocean_files worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_plots(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_plots worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_runoff_file(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_runoff_file worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_ssh_files(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_ssh_files worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_surface_current_tiles(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_surface_current_tiles worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_turbidity_file(msg, config, checklist)[source]
Calculate the list of workers to launch after the make_turbidity_file worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_ww3_current_file(msg, config, checklist)[source]
Calculate the list of workers to launch after the after_make_ww3_current_file worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_make_ww3_wind_file(msg, config, checklist)[source]
Calculate the list of workers to launch after the after_make_ww3_wind_file worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_ping_erddap(msg, config, checklist)[source]
Calculate the list of workers to launch after the ping_erddap worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_rotate_hindcast_logs(msg, config, checklist)[source]
Calculate the list of workers to launch after the rotate_hindcast_logs worker ends, but it is an empty list because rotate_hindcast_logs is a maintenance tool that is outside the flow of automation.
- Parameters:
msg (
collections.namedtuple) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_rotate_logs(msg, config, checklist)[source]
Calculate the list of workers to launch after the rotate_logs worker ends, but it is an empty list because rotate_logs is the last worker in the daily automation cycle.
- Parameters:
msg (
collections.namedtuple) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_run_NEMO(msg, config, checklist)[source]
Calculate the list of workers to launch after the run_NEMO worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_run_NEMO_agrif(msg, config, checklist)[source]
Calculate the list of workers to launch after the run_NEMO_agrif worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_run_NEMO_hindcast(msg, config, checklist)[source]
Calculate the list of workers to launch after the run_NEMO_hindcast worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_run_ww3(msg, config, checklist)[source]
Calculate the list of workers to launch after the after_run_ww3 worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_split_results(msg, config, checklist)[source]
Calculate the list of workers to launch after the split_results worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_update_forecast_datasets(msg, config, checklist)[source]
Calculate the list of workers to launch after the update_forecast_datasets worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_upload_forcing(msg, config, checklist)[source]
Calculate the list of workers to launch after the upload_forcing worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_watch_NEMO(msg, config, checklist)[source]
Calculate the list of workers to launch after the watch_NEMO worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_watch_NEMO_agrif(msg, config, checklist)[source]
Calculate the list of workers to launch after the watch_NEMO_agrif worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_watch_NEMO_hindcast(msg, config, checklist)[source]
Calculate the list of workers to launch after the watch_NEMO_handcast worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
- nowcast.next_workers.after_watch_ww3(msg, config, checklist)[source]
Calculate the list of workers to launch after the watch_ww3 worker ends.
- Parameters:
msg (
nemo_nowcast.message.Message) – Nowcast system message.config (
nemo_nowcast.config.Config) –dict-like object that holds the nowcast system configuration that is loaded from the system configuration file.checklist (dict) – System checklist: data structure containing the present state of the nowcast system.
- Returns:
Worker(s) to launch next
- Return type:
Results Figures Modules
The modules in the nowcast.figures namespace are used by the make_plots worker to produce the figures that are published to the web from each run.
The figures are also stored in the figures/ sub-directory of each run’s results directory.
nowcast.figures.website_theme Module
Colour, fonts, and utility functions that define the look of figures for the https://salishsea.eos.ubc.ca/nemo/ web pages.
- nowcast.figures.website_theme.COLOURS = {'axes': {'background': '#dbdee1'}, 'axes textbox': {'facecolor': 'white'}, 'axis': {'labels': 'white', 'spines': 'white', 'ticks': 'white'}, 'cbar': {'label': 'white', 'tick labels': 'white'}, 'contour lines': {'Baynes Sound entrance': 'black'}, 'dark land': '#8b7765', 'figure': {'facecolor': '#2B3E50'}, 'land': 'burlywood', 'marker': {'max ssh': {'edgecolor': 'black', 'facecolor': 'white'}, 'place': {'edgecolor': 'black', 'facecolor': 'white'}}, 'storm surge risk levels': {'extreme risk': 'red', 'moderate risk': 'Gold', None: 'green'}, 'text': {'axes annotation': 'black', 'axes title': 'white', 'axis': 'white', 'figure annotation': 'white', 'figure title': 'white', 'info box content': 'white', 'info box title': 'white', 'risk level label': 'white'}, 'time series': {'2nd Narrows model current direction': {'r12': 'purple', 'x2': 'blue'}, '2nd Narrows model current speed': {'r12': 'purple', 'x2': 'blue'}, '2nd Narrows observed current direction': 'green', '2nd Narrows observed current speed': 'green', 'Sand Heads HRDPS wind direction': 'blue', 'Sand Heads HRDPS wind speed': 'blue', 'Sand Heads observed wind direction': 'green', 'Sand Heads observed wind speed': 'green', 'VENUS CTD salinity': 'green', 'VENUS CTD temperature': 'green', 'VENUS node dev model salinity': 'magenta', 'VENUS node dev model temperature': 'magenta', 'VENUS node model salinity': 'blue', 'VENUS node model temperature': 'blue', 'ciliates': 'brown', 'datetime line': 'red', 'diatoms': 'brown', 'flagellates': 'darkgreen', 'mesozooplankton': 'brown', 'microzooplankton': 'darkgreen', 'nitrate': 'darkgreen', 'obs residual': 'green', 'obs wave height': 'green', 'obs wave period': 'green', 'salinity': 'blue', 'silicon': 'brown', 'ssh residual': 'blue', 'temperature': 'red', 'tidal prediction': 'black', 'tidal prediction vs model': 'purple', 'tide gauge obs': 'green', 'tide gauge ssh': 'MediumBlue', 'wave height': 'blue', 'wave period': 'blue', 'z1_zooplankton': 'brown', 'z2_zooplankton': 'darkgreen'}, 'wind arrow': {'edgecolor': 'black', 'facecolor': 'DarkMagenta'}}
Colours of various figure elements; the dict key(s) should be descriptive enough to identify the element to which the colour applies.
- nowcast.figures.website_theme.FONTS = {'axes annotation': <matplotlib.font_manager.FontProperties object>, 'axes title': <matplotlib.font_manager.FontProperties object>, 'axes title large': <matplotlib.font_manager.FontProperties object>, 'axis': <matplotlib.font_manager.FontProperties object>, 'axis small': <matplotlib.font_manager.FontProperties object>, 'figure annotation': <matplotlib.font_manager.FontProperties object>, 'figure annotation small': <matplotlib.font_manager.FontProperties object>, 'figure title': <matplotlib.font_manager.FontProperties object>, 'info box content': <matplotlib.font_manager.FontProperties object>, 'info box title': <matplotlib.font_manager.FontProperties object>, 'legend label': <matplotlib.font_manager.FontProperties object>, 'legend label large': <matplotlib.font_manager.FontProperties object>, 'legend label small': <matplotlib.font_manager.FontProperties object>, 'legend title': <matplotlib.font_manager.FontProperties object>, 'legend title small': <matplotlib.font_manager.FontProperties object>, 'location label large': <matplotlib.font_manager.FontProperties object>, 'location label small': <matplotlib.font_manager.FontProperties object>}
Font properties of various figure text elements; the top level dict keys should be descriptive enough to identify the element to which the font properties apply.
- nowcast.figures.website_theme.SITE_BACKGROUND_COLOUR = '#2B3E50'
The
salishsea.eos.ubc.ca/nemo/pages background colour, from the https://bootswatch.com/superhero/ theme.
nowcast.figures.surface_current_domain Module
This standalone code produces the surface current tiled domain figure in both website themed and unthemed style and saves the figure files in ‘/SalishSeaCast/salishsea-site/salishsea_site/static/img/’.
The domain is divided into different tiles and needs to be re-run if the tile specification/coordinates are changed.
nowcast.figures.comparison Figure Modules
nowcast.figures.comparison.sandheads_winds Module
Produce a figure that shows the observed and model forcing wind speed and direction at Sand Heads during 24 hours of a nowcast run. Also show a map with the location of Sand Heads marked. Observations are from Environment and Climate Change Canada data: https://climate.weather.gc.ca/ Model forcing winds are from the Environment and Climate Change Canada HRDPS nested model. Text below the map acknowledges the sources of the observations and HRDPS product.
Testing notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/comparison/TestSandHeadsWinds.ipynb
- nowcast.figures.comparison.sandheads_winds.make_figure(hrdps_dataset_url, run_type, run_date, coastline, figsize=(16, 7), theme=<module 'nowcast.figures.website_theme' from '/home/docs/checkouts/readthedocs.org/user_builds/salishsea-nowcast/checkouts/latest/nowcast/figures/website_theme.py'>)[source]
Plot the time series observed and HRDPS model forcing wind speed and direction at Sand Heads.
- Parameters:
hrdps_dataset_url (str) – ERDDAP dataset URL for the HRDPS product to be plotted.
run_type (str) – Type of run to produce figure for.
run_date (
Arrow.arrow) – Date of the run to create the figure for.coastline (
mat.Dataset) – Coastline dataset.figsize (2-tuple) – Figure size (width, height) in inches.
theme – Module-like object that defines the style elements for the figure. See
nowcast.figures.website_themefor an example.
- Returns:
matplotlib.figure.Figure
nowcast.figures.comparison.salinity_ferry_track Module
Produce a figure that compares salinity at 1.5m depth model results to salinity observations from the ONC instrument package aboard a BC Ferries vessel.
Testing notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/comparison/TestSalinityFerryTrackModule.ipynb
- nowcast.figures.comparison.salinity_ferry_track.make_figure(grid_T_hr, figsize=(20, 7.5), theme=<module 'nowcast.figures.website_theme' from '/home/docs/checkouts/readthedocs.org/user_builds/salishsea-nowcast/checkouts/latest/nowcast/figures/website_theme.py'>)[source]
Plot salinity comparison of 1.5m depth model results to salinity observations from the ONC instrument package aboard a BC Ferries vessel as well as ferry route with model salinity distribution.
- Parameters:
grid_T_hr (
netCDF4.Dataset)figsize (2-tuple) – Figure size (width, height) in inches.
theme – Module-like object that defines the style elements for the figure. See
nowcast.figures.website_themefor an example.
- Returns:
matplotlib.figure.Figure
nowcast.figures.publish Figure Modules
nowcast.figures.publish.compare_tide_prediction_max_ssh
Produce a figure that shows a map of the Salish Sea with coloured contours showing the sea surface height when it is at its maximum at a specified tide gauge station. The figure also shows ~7.5 day long time series graphs of:
Raw and corrected model water levels compared to the tidal prediction for the gauge location
Water level residuals (the difference between the corrected model results and the tidal predictions)
The tidal predictions are calculated by ttide (https://www.eoas.ubc.ca/~rich/#T_Tide). Those predictions use Canadian Hydrographic Service (CHS) tidal constituents and include all tide constituents. The corrected model results take into account the errors that result from using only 8 tidal constituents in the model calculations.
The figure is annotated with the calculated maximum sea surface height at the tide gauge location, the time at which it occurs, the ssh residual, and the wind speed and direction at that time.
Testing notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/publish/TestCompareTidePredictionMaxSSH.ipynb
Development notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/publish/DevelopCompareTidePredictionMaxSSH.ipynb
- nowcast.figures.publish.compare_tide_prediction_max_ssh.make_figure(place, ssh_fcst_dataset_url_tmpl, tidal_predictions, forecast_hrs, weather_path, bathy, grid_T_hr_path, figsize=(20, 12), theme=<module 'nowcast.figures.website_theme' from '/home/docs/checkouts/readthedocs.org/user_builds/salishsea-nowcast/checkouts/latest/nowcast/figures/website_theme.py'>)[source]
Plot tidal prediction and models water level timeseries, storm surge residual timeseries, sea surface height contours on a Salish Sea map, and summary text for the tide gauge station at
place.- Parameters:
place (str) – Tide gauge station name; must be a key in
salishsea_tools.places.PLACES.ssh_fcst_dataset_url_tmpl (str) – ERDDAP URL template for tide gauge station sea surface height forecast dataset time series.
tidal_predictions (
pathlib.Path) – Path to directory of tidal prediction file.forecast_hrs (int) – Number of hours in the water level dataset that constitute the forecast. Used control the portion of the dataset that is included in calculations like the maximum sea surface height, etc.
weather_path (
pathlib.Path) – The directory where the weather forcing files are stored.bathy (
netCDF4.Dataset) – Model bathymetry.grid_T_hr_path – Path and file name of hourly averaged tracer results dataset that includes calculated sea surface height.
figsize (2-tuple) – Figure size (width, height) in inches.
theme – Module-like object that defines the style elements for the figure. See
nowcast.figures.website_themefor an example.
- Returns:
matplotlib.figure.Figure
nowcast.figures.publish.pt_atkinson_tide Module
nowcast.figures.publish.storm_surge_alerts Module
Produce a figure that shows a map of the Salish Sea with markers indicating the risks of high water levels at the Point Atkinson, Victoria, Campbell River, Nanaimo, and Cherry Point tide gauge locations. The figure also shows wind vectors that indicate the average wind speed and direction averaged over the 4 hours preceding the maximum sea surface height at each location. Text below the map provides quantitative information about the maximum water level, when it occurs, and the 4 hr averaged wind speed, as well as acknowledgement of data sources.
Testing notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/publish/TestStormSurgeAlertsModule.ipynb
- nowcast.figures.publish.storm_surge_alerts.make_figure(grids_15m, weather_path, coastline, tidal_predictions, figsize=(18, 20), theme=<module 'nowcast.figures.website_theme' from '/home/docs/checkouts/readthedocs.org/user_builds/salishsea-nowcast/checkouts/latest/nowcast/figures/website_theme.py'>)[source]
Plot high water level risk indication markers and 4h average wind vectors on a Salish Sea map with summary text below.
- Parameters:
grids_15m (dict) – Collection of 15 minute averaged sea surface height datasets at tide gauge locations, keyed by tide gauge station name.
weather_path (str) – The directory where the weather forcing files are stored.
coastline (
mat.Dataset) – Coastline dataset.tidal_predictions (str) – Path to directory of tidal prediction file.
figsize (2-tuple) – Figure size (width, height) in inches.
theme – Module-like object that defines the style elements for the figure. See
nowcast.figures.website_themefor an example.
- Returns:
matplotlib.figure.Figure
nowcast.figures.publish.storm_surge_alerts_thumbnail Module
Produce a figure that shows a map of the Salish Sea with markers indicating the risks of high water levels at the Point Atkinson, Victoria, Campbell River, Nanaimo, and Cherry Point tide gauge locations. The figure also shows wind vectors that indicate the average wind speed and direction averaged over the 4 hours preceding the maximum sea surface height at each location.
The figure is a thumbnail version of the figure produced by
nowcast.figures.publish.storm_surge_alerts.
It is intended primarily for use on the Salish Sea Storm Surge Information
Portal page https://salishsea.eos.ubc.ca/storm-surge/.
Testing notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/publish/TestStormSurgeAlertsThumbnailModule.ipynb
- nowcast.figures.publish.storm_surge_alerts_thumbnail.make_figure(grids_15m, weather_path, coastline, tidal_predictions, figsize=(18, 20), theme=<module 'nowcast.figures.website_theme' from '/home/docs/checkouts/readthedocs.org/user_builds/salishsea-nowcast/checkouts/latest/nowcast/figures/website_theme.py'>)[source]
Plot high water level risk indication markers and 4h average wind vectors on a Salish Sea map.
- Parameters:
grids_15m (dict) – Collection of 15m sea surface height datasets at tide gauge locations, keyed by tide gauge station name.
weather_path (str) – The directory where the weather forcing files are stored.
coastline (
mat.Dataset) – Coastline dataset.tidal_predictions (str) – Path to directory of tidal prediction file.
figsize (2-tuple) – Figure size (width, height) in inches.
theme – Module-like object that defines the style elements for the figure. See
nowcast.figures.website_themefor an example.
- Returns:
matplotlib.figure.Figure
nowcast.figures.publish.surface_current_tiles Module
nowcast.figures.research Figure Modules
nowcast.figures.research.tracer_thalweg_and_surface Module
Produce a figure that shows colour contours of a tracer on a vertical slice along a section of the domain thalweg, and on the surface for a section of the domain that excludes Puget Sound in the south and Johnstone Strait in the north.
Note
This module us no longer used in production but it preserved here because the figure development and testing docs and notebooks refer to it.
Testing notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/research/TestTracerThalwegAndSurface.ipynb
Development notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/research/DevelopTracerThalwegAndSurfaceModule.ipynb
- nowcast.figures.research.tracer_thalweg_and_surface.make_figure(tracer_var, bathy, mesh_mask, cmap, depth_integrated, figsize=(16, 9), theme=<module 'nowcast.figures.website_theme' from '/home/docs/checkouts/readthedocs.org/user_builds/salishsea-nowcast/checkouts/latest/nowcast/figures/website_theme.py'>)[source]
Plot colour contours of tracer on a vertical slice along a section of the domain thalweg, and on the surface for the Strait of Georgia and Juan de Fuca Strait regions of the domain.
- Parameters:
tracer_var (
netCDF4.Variable) – Hourly average tracer results from NEMO run.bathy (
netCDF4.Dataset) – SalishSeaCast NEMO model bathymetry data.mesh_mask (
netCDF4.Dataset) – NEMO-generated mesh mask for run that produced tracer_var.cmap (
matplotlib.colors.LinearSegmentedColormap) – Colour map to use for tracer_var contour plots.depth_integrated (boolean) – Integrate the tracer over the water column depth when
True.figsize (2-tuple) – Figure size (width, height) in inches.
theme – Module-like object that defines the style elements for the figure. See
nowcast.figures.website_themefor an example.
- Returns:
matplotlib.figure.Figure
nowcast.figures.research.time_series_plots Module
Produce 4 figures that show the time series of surface:
nitrate and diatom concentrations
mesozooplankton and microzooplankton concentrations
mesodinium rubrum and flagellates concentrations
temperature and salinity
over the last 2 months at a time series site.
Testing notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/research/TestTimeSeriesPlots.ipynb
Development notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/research/DevelopTimeSeriesPlots.ipynb
- nowcast.figures.research.time_series_plots.make_figure(xr_dataset, left_variable, right_variable, place, figsize=(20, 8), theme=<module 'nowcast.figures.website_theme' from '/home/docs/checkouts/readthedocs.org/user_builds/salishsea-nowcast/checkouts/latest/nowcast/figures/website_theme.py'>)[source]
- Parameters:
xr_dataset (
xarray.core.dataset.Dataset) – Hourly average 3d biological fields and tracer fields from the gridapp datasets of the data server ERDAPP (https://salishsea.eos.ubc.ca/erddap/griddap/index.html?page=1&itemsPerPage=1000).left_variable (
xarray.Variable) – One of the data variables among ‘nitrate’, ‘mesozooplankton’, ‘microzooplankton’, ‘temperature’.right_variable (
xarray.Variable) – One of the data variables among ‘diatoms’, ‘microzooplankton’, ‘flagellates’, ‘salinity’.place (str) – time series site.
figsize (2-tuple) – Figure size (width, height) in inches.
theme – Module-like object that defines the style elements for the figure. See
nowcast.figures.website_themefor an example.
- Returns:
matplotlib.figure.Figure
nowcast.figures.wwatch3 Figure Modules
nowcast.figures.wwatch3.wave_height_period Module
Produce a figure that shows significant wave height and dominant wave period at a wave buoy calculated by the SoG WaveWatch3(TM) model, and observed wave heights and dominant wave periods from the NOAA NDBC https://www.ndbc.noaa.gov/data/realtime2/ web service.
Testing notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/wwatch3/TestWaveHeightPeriod.ipynb
Development notebook for this module is https://nbviewer.org/github/SalishSeaCast/SalishSeaNowcast/blob/main/notebooks/figures/wwatch3/DevelopWaveHeightPeriod.ipynb
- nowcast.figures.wwatch3.wave_height_period.make_figure(buoy, wwatch3_dataset_url, figsize=(16, 9), theme=<module 'nowcast.figures.website_theme' from '/home/docs/checkouts/readthedocs.org/user_builds/salishsea-nowcast/checkouts/latest/nowcast/figures/website_theme.py'>)[source]
Plot significant wave height and dominant wave period calculated by the SoG WaveWatch3(TM) model, and observed wave heights and dominant wave periods from the NOAA NDBC https://www.ndbc.noaa.gov/data/realtime2/ web service for the wave buoy at
buoy.- Parameters:
buoy (str) – Wave buoy name; must be a key in
moad_tools.places.PLACES.wwatch3_dataset_url (str) – ERDDAP URL for SalishSeaCast WaveWatch3(TM) NEMO model fields time series dataset.
figsize (2-tuple) – Figure size (width, height) in inches.
theme – Module-like object that defines the style elements for the figure. See
nowcast.figures.website_themefor an example.
- Returns:
matplotlib.figure.Figure