Live Ocean Boundary Conditions Tools¶
We have developed routines for building our model boundary conditions from Live Ocean model results. Live Ocean is a circulation model for the Pacific Northwest run out of the University Washington by Parker MacCready’s group. This page documents the tools and routines used to create boundary conditions from Live Ocean results.
These routines were designed to be used in the nowcast framework so that each nowcast and forecast simulation is forced with hourly temperature and salinity from the corresponding Live Ocean simulation. However, the routines are adaptable and are capable of producing, for example, a month’s worth of daily averaged forcing files if needed.
For the nowcast framework, the following things happen:
- Download today’s 72-hour Live Ocean simulation. Live Ocean results are saved at an hourly frequency. Live Ocean results are typically available around 1PM PST.
- Save a small sub-domain that covers the Salish Sea NEMO Juan de Fuca boundary. Delete the full domain Live Ocean files.
- Interpolate Live Ocean temperature and salinity onto NEMO boundary.
- Save interpolated results to a boundary forcing file. Each 24 hour period is saved in a different file. Only the last 48 hours of a simulation are saved.
Ideally these steps are executed every day in an automated system like the workers or a cronjob.
Three python modules have been written for these tasks.
The modules are stored in
UBC_subdomain.py- script that extracts and saves the sub-domain containing the NEMO Juan de Fuca boundary.
LiveOcean_grid.py- module from Parker MacCready for loading ROMS grid.
LiveOcean_BCs.py- module for interpolating Live Ocean results to NEMO grid and building boundary files.
- MATLAB - required for converting temperature and salinity to TEOS-10 variables.
- ncks - required for setting time_counter as record dimension in boundary files.
Because of the above two dependencies it is suggested that the code is run on
Two bash scripts have been written for downloading the Live Ocean results and then calling the Python routines.
These scripts can be run as cron jobs,
but ideally these will be replaced by Salish Sea Nowcast System Workers.
These scripts are stored in
download_day.sh- Download a Live Ocean simulation and extracts UBC subdomain. Usage:
bash download_day.sh YYYY-MM-DD destination_directory
download_day.shto download today’s Live Ocean results and then call
LiveOcean_BCs.pyto create boundary forcing files.
Storage of Files¶
- Downloaded Live Ocean sub-domain files are stored in
/results/forcing/LiveOcean/downloaded/. This is hard-coded in
- Processed Live Ocean boundary files are stored in
/results/forcing/LiveOcean/boundary_files/fcst/. This is hard-coded is the main function