rompy.swan.subcomponents.physics.LINE#

pydantic model rompy.swan.subcomponents.physics.LINE[source]#

Line of points to define obstacle location.

LINE < [xp] [yp] >

With this option the user indicates that the fixed transmission trcoef and reflection reflc coefficients are freeboard dependent. The freeboard dependency has no effect on the transmission coefficient as computed using the DAM option.

Notes

Points coordinates should be provided in m If Cartesian coordinates are used or in degrees if spherical coordinates are used (see command COORD). At least two corner points must be provided.

Examples

In [37]: from rompy.swan.subcomponents.physics import LINE

In [38]: line = LINE(xp=[174.1, 174.2, 174.3], yp=[-39.1, -39.1, -39.1])

In [39]: print(line.render())
LINE 174.1 -39.1 174.2 -39.1 174.3 -39.1
Fields:
Validators:
field model_type: Literal['line', 'LINE'] = 'line'#

Model type discriminator

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

The x-coordinates of the points defining the line

Constraints:
  • min_length = 2

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

The y-coordinates of the points defining the line

Constraints:
  • min_length = 2

Validated by:
validator check_length  »  all fields[source]#

Check that the length of xp and yp are the same.

cmd() str[source]#

Command file string for this subcomponent.