effluent.roms

The module contains functions for working with ROMS datasets

Functions

compute_azimuthal_vel(dset, az)

Compute directional current velocity

compute_dens(dset)

Compute variable dens from a ROMS dataset

compute_zrho(dset)

Compute z_rho variable from a ROMS dataset

compute_zrho_star(dset)

Compute z_rho_star variable from a ROMS dataset

load_location(file, lat, lon, az)

Load ROMS dataset at specific location

select_xy(dset, x, y)

Select a single x, y point within ROMS dataset

Module Contents

effluent.roms.compute_azimuthal_vel(dset, az)

Compute directional current velocity

Parameters:
  • dset (xarray.Dataset) – ROMS dataset

  • az – The direction in which to measure the current

Returns:

An xarray.DataArray representing the current velocity

Return type:

xarray.DataArray

effluent.roms.compute_dens(dset)

Compute variable dens from a ROMS dataset

Parameters:

dset (xarray.Dataset) – ROMS dataset

Returns:

Density variable

Return type:

xarray.DataArray

effluent.roms.compute_zrho(dset)

Compute z_rho variable from a ROMS dataset

The z_rho variable is negative depth, with tidal variation

Parameters:

dset (xarray.Dataset) – ROMS dataset

Returns:

The z_rho variable

Return type:

xarray.DataArray

effluent.roms.compute_zrho_star(dset)

Compute z_rho_star variable from a ROMS dataset

The z_rho_star variable is negative depth, without tidal variation

Parameters:

dset (xarray.Dataset) – ROMS dataset

Returns:

The z_rho_star variable

Return type:

xarray.DataArray

effluent.roms.load_location(file, lat, lon, az)

Load ROMS dataset at specific location

The output coordinates are ‘time’ and ‘depth’. Fields are interpolated to the desired position, and the depth of each vertical level is computed. Current velocities are rotated according to the specified azimuthal orientation.

Parameters:
  • file – Name of ROMS file(s), or wildcard pattern

  • lat – Latitude of location

  • lon – Longitude of location

  • az – Azimuthal orientation of u velocity (0 is north, 90 is east)

Returns:

An xarray.Dataset object

Return type:

xarray.Dataset

effluent.roms.select_xy(dset, x, y)

Select a single x, y point within ROMS dataset

The function interpolates u, v variables to midpoint values

Parameters:
  • dset (xarray.Dataset) – ROMS dataset

  • x – The dataset x coordinate

  • y – The dataset y coordinate

Returns:

Single-point dataset

Return type:

xarray.Dataset