API Reference#

Grid#

roms_tools.Grid(*[, nx, ny, size_x, size_y, ...])

A single ROMS grid, used for creating, plotting, and then saving a new ROMS domain grid.

Tidal Forcing#

roms_tools.TidalForcing(*, grid, source[, ...])

Represents tidal forcing for ROMS.

Surface Forcing#

roms_tools.SurfaceForcing(*, grid[, ...])

Represents surface forcing input data for ROMS.

Initial Conditions#

roms_tools.InitialConditions(*, grid, ...[, ...])

Represents initial conditions for ROMS, including physical and biogeochemical data.

Boundary Forcing#

roms_tools.BoundaryForcing(*, grid[, ...])

Represents boundary forcing input data for ROMS.

River Forcing#

roms_tools.RiverForcing(*, grid, start_time, ...)

Represents river forcing input data for ROMS.

roms_tools.datasets.river_datasets.DaiRiverDataset(*, ...)

River discharge dataset from Dai & Trenberth (2009).

roms_tools.datasets.river_datasets.GloFASRiverDataset(*, ...)

River discharge dataset from GloFAS v4.0.

CDR Forcing#

roms_tools.VolumeRelease(*, name, lat, lon, ...)

Represents a CDR release with volume flux and tracer concentrations.

roms_tools.TracerPerturbation(*, name, lat, ...)

Represents a CDR release with tracer fluxes and without any volume.

roms_tools.CDRForcing(*[, grid, ...])

Represents Carbon Dioxide Removal (CDR) forcing.

Analyzing ROMS output#

roms_tools.ROMSOutput(*, path, grid, ...)

Represents ROMS model output.

roms_tools.ROMSOutput.plot(var_name[, time, ...])

Generate a plot of a ROMS output field for a specified vertical or horizontal slice.

roms_tools.ROMSOutput.create_movie(var_name)

Create an MP4 movie of a horizontal map using the same logic as plot().

roms_tools.ROMSOutput.regrid([var_names, ...])

Regrid the dataset both horizontally and vertically.

roms_tools.ROMSOutput.cdr_metrics()

Compute and plot Carbon Dioxide Removal (CDR) metrics.

roms_tools.Ensemble(members)

Represents an ensemble of CDR (Carbon Dioxide Removal) experiments.


Utilities#

roms_tools.setup.nesting.align_grids(...[, ...])

This function establishes the relationship between a parent grid and a child grid in ROMS simulations.

roms_tools.setup.nesting.make_nesting_info(...)

Maps child grid boundary points onto absolute indices of the parent grid, and saves the nesting information to NetCDF files.

roms_tools.tiling.partition.partition_netcdf(...)

Partition one or more ROMS NetCDF files into smaller spatial tiles and save them to disk.

roms_tools.tiling.join.join_netcdf(files[, ...])

Join partitioned NetCDFs into a single dataset.

roms_tools.plot.plot(field, grid_ds[, zeta, ...])

Generate a plot of a 2D or 3D ROMS field for a horizontal or vertical slice.

roms_tools.datasets.lat_lon_datasets.get_glorys_bounds(grid)

Compute the latitude/longitude bounds of a GLORYS spatial subset that fully covers the given ROMS grid (with margin for regridding).

roms_tools.setup.utils.compute_potential_density(...)

Compute sigma-0 potential density anomaly (kg/m³ - 1000) via TEOS-10 (gsw).

roms_tools.setup.utils.compute_mld(sigma0, ...)

Compute the mixed layer depth (MLD) from a potential-density field.