Data API¶
API reference for data interfaces that generate boundary conditions from external sources.
Wave Boundaries¶
JONS Boundary Type¶
BoundaryStationSpectraJons
¶
BoundaryStationParamJons
¶
Bases: ParamMixin, BoundaryJons, BoundaryBaseStation
Wave boundary conditions from station type parameters dataset such as SMC.
BoundaryPointParamJons
¶
Bases: ParamMixin, BoundaryJons, BoundaryBasePoint
Wave boundary conditions from point timeseries type parameters dataset.
Attributes¶
model_type
class-attribute
instance-attribute
¶
model_type: Literal['point_param_jons'] = Field(default='point_param_jons', description='Model type discriminator')
source
class-attribute
instance-attribute
¶
source: SOURCE_TIMESERIES_TYPES = Field(description='Dataset source reader for point timeseries type data', discriminator='model_type')
BoundaryGridParamJons
¶
JONSTABLE Boundary Type¶
BoundaryStationSpectraJonstable
¶
Bases: SpectraMixin, BoundaryJonstable, BoundaryBaseStation
Wave boundary conditions from station type parameters dataset such as SMC.
BoundaryStationParamJonstable
¶
Bases: ParamMixin, BoundaryJonstable, BoundaryBaseStation
Wave boundary conditions from station type parameters dataset such as SMC.
BoundaryPointParamJonstable
¶
Bases: ParamMixin, BoundaryJonstable, BoundaryBasePoint
Wave boundary conditions from point timeseries type parameters dataset.
Attributes¶
model_type
class-attribute
instance-attribute
¶
model_type: Literal['point_param_jonstable'] = Field(default='point_param_jonstable', description='Model type discriminator')
source
class-attribute
instance-attribute
¶
source: SOURCE_TIMESERIES_TYPES = Field(description='Dataset source reader for point timeseries type data', discriminator='model_type')
BoundaryGridParamJonstable
¶
Bases: ParamMixin, BoundaryJonstable, BoundaryBaseGrid
Generate XBeach JONSTABLE wave boundary conditions from gridded parameter data.
This class reads wave parameters (Hm0, Tp, Dir, Spread, Gamma) from a gridded data
source, selects/interpolates the data at the offshore boundary location of the
XBeach grid, and writes the time-varying parameters to a JONSTABLE format file (bcfile).
Inherits spatial selection from BoundaryBaseGrid/BaseDataGrid, parameter handling from ParamMixin, and JONSTABLE file writing logic from BoundaryJonstable.
SWAN Boundary Type¶
BoundaryStationSpectraSwan
¶
Bases: FilelistMixin, SpectraMixin, BoundaryBaseStation
Base class for SWAN wave boundary from station type dataset such as SMC.
XBeach assumes the directional information in the SWAN file is according to the nautical convention. If the file uses the Cartesian convention for directions, the user must specify the angle in degrees to rotate the x-axis in SWAN to the x-axis in XBeach (by the Cartesian convention). This value is specified in params.txt using the keyword dthetaS_XB.
This class generates SWAN boundary files from wave data and returns a SpectralWaveBoundary specification.
Attributes¶
id
class-attribute
instance-attribute
¶
wbc
class-attribute
instance-attribute
¶
wbc: Optional[SpectralWaveBoundaryConditions] = Field(default=None, description='Wave boundary condition parameters (nmax, rt, dtbc, etc.)')
model_type
class-attribute
instance-attribute
¶
model_type: Literal['station_spectra_swan'] = Field(default='station_spectra_swan', description='Model type discriminator')
Functions¶
_instantiate_boundary
¶
Instantiate the boundary object.
Parameters¶
data : xr.Dataset Dataset containing single time for the boundary spectral data.
get
¶
get(destdir: str | Path, grid: RegularGrid, time: Optional[TimeRange] = None) -> SpectralWaveBoundary
Write the selected boundary data to file.
Parameters¶
destdir : str | Path
Destination directory for the netcdf file.
grid : RegularGrid
Grid instance to use for selecting the boundary points.
time: TimeRange, optional
The times to filter the data to, only used if self.crop_data is True.
Returns¶
SpectralWaveBoundary Complete wave boundary specification with wbctype, bcfile, and wbc parameters.
Tide / Water Level¶
Tidal Constituents¶
TideConsGrid
¶
Bases: TideConsBase, BaseDataGrid
Water level forcing from gridded tide cons processed with oceantide.
Attributes¶
model_type
class-attribute
instance-attribute
¶
model_type: Literal['tide_cons_grid'] = Field(default='tide_cons_grid', description='Model type discriminator')
source
class-attribute
instance-attribute
¶
source: SourceCRSOceantide = Field(description='Source of the tide data')
TideConsPoint
¶
Bases: TideConsBase, BaseDataPoint
Water level forcing from single tide cons point processed with oceantide.
Water Level Timeseries¶
WaterLevelGrid
¶
WaterLevelStation
¶
WaterLevelPoint
¶
Wind¶
WindGrid
¶
WindStation
¶
Bases: WindMixin, BaseDataStation
Wind forcing from station data.
Namelist¶
- windfile : str Name of file with non-stationary wind data.