|
1 |
| -# rompy |
| 1 | +--- |
| 2 | +title: "Relocatable Ocean Modelling in PYthon (rompy)" |
| 3 | +--- |
2 | 4 |
|
3 |
| -[](https://crate.io/packages/rompy/) |
| 5 | +[](https://badge.fury.io/py/rompy) |
4 | 6 | [](https://rompy.readthedocs.io/en/latest/?badge=latest)
|
5 | 7 |
|
6 |
| -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 model |
| 8 | +# Introduction |
| 9 | + |
| 10 | +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](./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](https://swanmodel.sourceforge.io/) developed by Delft University of Technology. |
| 11 | + |
| 12 | +# Jupyter Notebooks |
| 13 | + |
| 14 | +Jupyter notebooks in the [`./notebooks`](./notebooks) directory include: |
| 15 | + |
| 16 | ++ [catalog_advanced_BOM_WW3.ipynb](./notebooks/catalog_advanced_BOM_WW3.ipynb) |
| 17 | + |
| 18 | + Opens the included `rompy` catalog and demonstrates reading BoM WaveWatch III data. A visualisation example uses `geoviews` 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. |
| 19 | + |
| 20 | ++ [catalog_basic_AODN.ipynb](./notebooks/catalog_basic_AODN.ipynb) |
| 21 | + |
| 22 | + 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 via `rompy` visualisation and shows the data as a timeseries using `xarray` plotting. |
| 23 | + |
| 24 | ++ [catalog_basic_CSIRO_SWAN.ipynb](./notebooks/catalog_basic_CSIRO_SWAN.ipynb) |
| 25 | + |
| 26 | + 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 the `holoviews` 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 the `wavespectra` package. |
| 27 | + |
| 28 | ++ [model_swan_example.ipynb](./notebooks/model_swan_example.ipynb) |
| 29 | + |
| 30 | + 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. |
| 31 | + |
| 32 | ++ [rompy-dev_matchup_code.ipynb](./notebooks/rompy-dev_matchup_code.ipynb) |
| 33 | + |
| 34 | + Development and testing of a function to match SwanModel outputs with observed data collected from a waverider buoy. |
| 35 | + |
| 36 | +# Intake catalogs |
| 37 | + |
| 38 | +YAML files in the [`./rompy/catalogs`](./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. |
| 39 | + |
| 40 | +## CSIRO |
| 41 | + |
| 42 | +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. |
| 43 | + |
| 44 | +## AODN |
| 45 | + |
| 46 | +The AODN catalog provides access to wave buoy, altimetry and remotely sensed SAR wave data. |
| 47 | + |
| 48 | +## BoM |
| 49 | + |
| 50 | +The BoM catalog provides access to WaveWatch III (wind and waves) forecast data. |
| 51 | + |
| 52 | +## WA Deptartment of Transport |
| 53 | + |
| 54 | +The WA Deptartment of Transport catalog provides access to raster bathymetry data. |
| 55 | + |
| 56 | +# Intake Drivers |
| 57 | + |
| 58 | +Custom intake drivers are in [`./rompy/intake.py`](./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`. |
| 59 | + |
| 60 | +# Model Wrappers |
| 61 | + |
| 62 | +## BaseModel |
| 63 | + |
| 64 | +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. |
| 65 | + |
| 66 | +## SwanModel |
| 67 | + |
| 68 | +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. |
| 69 | + |
| 70 | +## BaseGrid |
| 71 | + |
| 72 | +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. |
| 73 | + |
| 74 | +## SwanGrid |
| 75 | + |
| 76 | +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. |
0 commit comments