rompy.swan.subcomponents.spectrum.SHAPESPEC#

pydantic model rompy.swan.subcomponents.spectrum.SHAPESPEC[source]#

Spectral shape specification.

BOUND SHAPESPEC JONSWAP|PM|GAUSS|BIN|TMA PEAK|MEAN DSPR [POWER|DEGREES]

This command BOUND SHAPESPEC defines the shape of the spectra (both in frequency and direction) at the boundary of the computational grid in case of parametric spectral input.

Notes

While technically a component BOUND SHAPESPEC, this is only intended to be used as a subcomponent of the BOUNDSPEC component.

Examples

In [115]: from rompy.swan.subcomponents.spectrum import SHAPESPEC

In [116]: shapespec = SHAPESPEC()

In [117]: print(shapespec.render())
BOUND SHAPESPEC JONSWAP gamma=3.3 PEAK DSPR POWER

In [118]: shapespec = SHAPESPEC(
   .....:     shape=dict(model_type="tma", gamma=3.1, d=12),
   .....:     per_type="mean",
   .....:     dspr_type="degrees",
   .....: )
   .....: 

In [119]: print(shapespec.render())
BOUND SHAPESPEC TMA gamma=3.1 d=12.0 MEAN DSPR DEGREES
Fields:
field dspr_type: Literal['power', 'degrees'] = 'power'#

The type of directional spreading

field model_type: Literal['shapespec', 'SHAPESPEC'] = 'shapespec'#

Model type discriminator

field per_type: Literal['peak', 'mean'] = 'peak'#

The type of characteristic wave period

field shape: JONSWAP | PM | GAUSS | BIN | TMA [Optional]#

The spectral shape

cmd() str[source]#