Relocatable Ocean Modelling in PYthon (rompy)
Project description
title: "Relocatable Ocean Modelling in PYthon (rompy)"
Introduction
Relocatable Ocean Modelling in PYthon (rompy) combines templated cookie-cutter model configuration with various xarray
extensions to assist in the setup and evaluation of coastal ocean models, and is intended to simplify their configuration, execution and analysis. This repository also includes Jupyter notebooks that provide examples to illustrate the use of rompy
code, create visualisations and provide inline documentation. Currently rompy
implements one model class for the SWAN wave model developed by Delft University of Technology.
Jupyter Notebooks
Jupyter notebooks in the ./notebooks
directory include:
-
catalog_advanced_BOM_WW3.ipynb
Opens the included
rompy
catalog and demonstrates reading BoM WaveWatch III data. A visualisation example usesgeoviews
to show the location of the WaveWatch III data overlayed on satellite imagery. This notebook also shows how a filter can be used with the catalog to load only a specific wave station. -
Opens the included
rompy
catalog and demonstrates reading the remotely sensed near-real-time SAR dataset from the AODN. It also demonstrates plotting the SAR locations and image timing viarompy
visualisation and shows the data as a timeseries usingxarray
plotting. -
catalog_basic_CSIRO_SWAN.ipynb
Opens the included
rompy
catalog and demonstrates reading and visualising the SWAN model outputs stored remotely on CSIRO thredds servers. This notebook provides visualisation of wave height as a spatial surface at a particular time with theholoviews
package, and as a time series at a particular point. It shows a contour visualisation of spectral characteristics and waves at a point in space and time using thewavespectra
package. -
Shows how the SwanModel class can be used to generate configuration for a SWAN model. It shows the creation of a SwanModel instance from a template and demonstrates the visualisation of the spatial boundaries of the SwanModel derived from the template.
-
Development and testing of a function to match SwanModel outputs with observed data collected from a waverider buoy.
Intake catalogs
YAML files in the ./rompy/catalogs
directory are automatically parsed into a catalog in the rompy.cat
variable when rompy
is imported. The master catalog (master.yaml
) points at the AODN, WA Department of Transport, CSIRO, and BoM datasets via subcatalogs.
CSIRO
The CSIRO catalog provides access to SWAN data runs for Mandurah and Perth domains, the main catalog links to csiro.yaml
to a catalog hosted on a CSIRO Thredds server.
AODN
The AODN catalog provides access to wave buoy, altimetry and remotely sensed SAR wave data.
BoM
The BoM catalog provides access to WaveWatch III (wind and waves) forecast data.
WA Deptartment of Transport
The WA Deptartment of Transport catalog provides access to raster bathymetry data.
Intake Drivers
Custom intake drivers are in ./rompy/intake.py
. An intake driver is code for loading data in an intake catalog. For example, built-in intake drivers can be associated with NetCDF, CSV, zarr, and other datasets in intake.yaml
.
Model Wrappers
BaseModel
BaseModel is a general-purpose abstract model wrapper class. BaseModel provides a settings dictionary which is a general-purpose key value store that is used to replace values in the corresponding cookiecutter template.
SwanModel
SwanModel is a subclass of BaseModel and is a wrapper around a configuration of a SWAN model. SWAN model configurations are a set of files and directories expected by the externally developed SWAN model for it to correctly run and produce output. Therefore, SwanModel provides an interface between python code and the bespoke SWAN model configuration.
BaseGrid
BaseGrid stores information about a geographic grid. The grid may be structured or unstructured. A list of $x$ and $y$ values can be set to define the grid points. From $x$ and $y$ values a bounding box can be accessed through the bbox
function and a shapely
boundary shape generated through the boundary
function. The boundary_points
function provides a list of boundary points as coordinates and a plot
function uses matplotlib
to plot the grid boundary over a coastline.
SwanGrid
SwanGrid extends BaseGrid and can be parameterized to provide specific grid types for SWAN. A helper function nearby_spectra
accepts a spectral file in wavespectra
xarray
format and selects spectral points close to the grid boundary.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rompy-0.1.0.tar.gz
.
File metadata
- Download URL: rompy-0.1.0.tar.gz
- Upload date:
- Size: 7.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d501f6a0c68624eb7c2072d4f3599ed90716e27f9eaff5b6de0ea70995c57290 |
|
MD5 | 6e8200e6c401365b02ce58a6d66d4e5a |
|
BLAKE2b-256 | 65278446cfd69e811cba6e3cf553dc5fcf0d6e7cf89d73410babc26c4f2bfc29 |
File details
Details for the file rompy-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: rompy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39722358874f37f737a2f5cff49895cd4b921a549e97faee615e89b0cec113ee |
|
MD5 | 5009c10c1ce0653baf263da6d7304631 |
|
BLAKE2b-256 | 0a1875729ef5c61683b09533353cd57ec24014cef17e9312ab97fda238deaa0b |