rompy.swan.subcomponents.boundary.VARIABLEPAR#

pydantic model rompy.swan.subcomponents.boundary.VARIABLEPAR[source]#

Variable spectral parameter.

VARIABLE PAR < [len] [hs] [per] [dir] [dd] >

Examples

In [270]: from rompy.swan.subcomponents.boundary import VARIABLEPAR

In [271]: par = VARIABLEPAR(
   .....:     hs=[1.5, 1.4, 1.1],
   .....:     per=[8.1, 8.0, 8.1],
   .....:     dir=[225, 226, 228],
   .....:     dd=[25, 22, 23],
   .....:     len=[0, 0.5, 1.0],
   .....: )
   .....: 

In [272]: print(par.render())
VARIABLE PAR &
	len=0.0 hs=1.5 per=8.1 dir=225.0 dd=25.0 &
	len=0.5 hs=1.4 per=8.0 dir=226.0 dd=22.0 &
	len=1.0 hs=1.1 per=8.1 dir=228.0 dd=23.0
Fields:
Validators:
field dd: list[float] [Required]#

Coefficient of directional spreading; a $cos^m(θ)$ distribution is assumed. dd is interpreted as the directional standard deviation in degrees, if the option DEGREES is chosen in the command BOUND SHAPE (SWAN default: 30). dd is interpreted as the power m, if the option POWER is chosen in the command BOUND SHAPE (SWAN default: 2)

Validated by:
field dir: list[float] [Required]#

The peak wave direction thetapeak (degrees), constant over frequencies

Validated by:
field dist: list[float] [Required] (alias 'len')#

Is the distance from the first point of the side or segment to the point along the side or segment for which the incident wave spectrum is prescribed. Note: these points do no have to coincide with grid points of the computational grid. len is the distance in m or degrees in the case of spherical coordinates, not in grid steps. The values of len should be given in ascending order. The length along a SIDE is measured in clockwise or counterclockwise direction, depending on the options CCW or CLOCKWISE (see above). The option CCW is default. In case of a SEGMENT the length is measured from the indicated begin point of the segment

Validated by:
field hs: list[float] [Required]#

The significant wave height (m)

Validated by:
field model_type: Literal['variablepar', 'VARIABLEPAR'] = 'variablepar'#

Model type discriminator

Validated by:
field per: list[float] [Required]#

The characteristic period (s) of the energy spectrum (relative frequency; which is equal to absolute frequency in the absence of currents); per is the value of the peak period if option PEAK is chosen in command BOUND SHAPE or per is the value of the mean period, if option MEAN was chosen in command BOUND SHAPE

Validated by:
cmd() str[source]#

Render subcomponent cmd.

validator ensure_equal_size  »  all fields[source]#