rompy.swan.components.boundary.BOUNDSPEC#
- pydantic model rompy.swan.components.boundary.BOUNDSPEC[source]#
Boundary along sides or segment.
BOUNDSPEC ->SIDE|SEGMENT CONSTANT|VARIABLE PAR|FILE
This command BOUNDSPEC defines parametric spectra at the boundary. It consists of two parts, the first part defines the boundary side or segment where the spectra will be given, the second part defines the spectral parameters of these spectra. Note that in fact only the incoming wave components of these spectra are used by SWAN. The fact that complete spectra are calculated at the model boundaries from the spectral parameters should not be misinterpreted. Only the incoming components are effective in the computation.
TODO: Add support for unstructured grid (k).
Examples
In [11]: from rompy.swan.components.boundary import BOUNDSPEC In [12]: boundary = BOUNDSPEC( ....: shapespec=dict(model_type="shapespec", shape=dict(model_type="pm")), ....: location=dict(model_type="side", side="west", direction="ccw"), ....: data=dict(model_type="constantpar", hs=2, per=8, dir=270, dd=30), ....: ) ....: In [13]: print(boundary.render()) BOUND SHAPESPEC PM PEAK DSPR POWER BOUNDSPEC SIDE WEST CCW CONSTANT PAR hs=2.0 per=8.0 dir=270.0 dd=30.0 In [14]: boundary = BOUNDSPEC( ....: shapespec=dict(model_type="shapespec", shape=dict(model_type="pm")), ....: location=dict( ....: model_type="segment", ....: points=dict(model_type="ij", i=[0, 0], j=[0, 3]) ....: ), ....: data=dict(model_type="constantpar", hs=2, per=8, dir=270, dd=30), ....: ) ....: In [15]: print(boundary.render()) BOUND SHAPESPEC PM PEAK DSPR POWER BOUNDSPEC SEGMENT IJ & i=0 j=0 & i=0 j=3 & CONSTANT PAR hs=2.0 per=8.0 dir=270.0 dd=30.0
- Fields:
- field data: CONSTANTPAR | CONSTANTFILE | VARIABLEPAR | VARIABLEFILE [Required]#
Spectral data
- field model_type: Literal['boundspec', 'BOUNDSPEC'] = 'boundspec'#
Model type discriminator