rompy.swan.components.output.SPECOUT#
- pydantic model rompy.swan.components.output.SPECOUT[source]#
Write to data file the wave spectra.
SPECOUT 'sname' SPEC1D|->SPEC2D ->ABS|REL 'fname' & (OUTPUT [tbeg] [delt] SEC|MIN|HR|DAY)
With this optional command the user indicates that for each location of the output location set ‘sname’ (see commands POINTS, CURVE, FRAME or GROUP) the 1D or 2D variance / energy (see command SET) density spectrum (either the relative frequency or the absolute frequency spectrum) is to be written to a data file.
Note
This write command supports the following location types: POINTS, CURVE, FRAME and GROUP.
Note
This output file can be used for defining boundary conditions for subsequent SWAN runs (command BOUNDSPEC).
Examples
In [1]: from rompy.swan.components.output import SPECOUT In [2]: out = SPECOUT(sname="outpts", fname="./specout.swn") In [3]: print(out.render()) SPECOUT sname='outpts' fname='./specout.swn' In [4]: out = SPECOUT( ...: sname="outpts", ...: dim=dict(model_type="spec2d"), ...: freq=dict(model_type="rel"), ...: fname="./specout.nc", ...: times=dict(tbeg="2012-01-01T00:00:00", delt="PT30M", dfmt="min"), ...: ) ...: In [5]: print(out.render()) SPECOUT sname='outpts' SPEC2D REL fname='./specout.nc' OUTPUT tbegspc=20120101.000000 deltspc=30.0 MIN
- Fields:
- Validators:
- field model_type: Literal['specout', 'SPECOUT'] = 'specout'#
Model type discriminator
- Validated by:
- property suffix: str#