rompy.swan.components.output.CURVE#

pydantic model rompy.swan.components.output.CURVE[source]#

Output locations along a curve.

CURVE 'sname' [xp1] [yp1] < [int] [xp] [yp] >

With this optional command the user defines output along a curved line. Actually this curve is a broken line, defined by the user with its corner points. The values of the output quantities along the curve are interpolated from the computational grid. This command may be used more than once to define more curves.

Note

The following pre-defined curves are available and could be used instead of a CURVE component: ‘BOUNDARY’ and BOUND_0N where N is boundary part number.

Note

All coordinates and distances should be given in m when Cartesian coordinates are used or degrees when Spherical coordinates are used (see command COORD).

Note

Repeat the group < int xp yp > in proper order if there are more corner points on the curve.

Examples

In [1]: from rompy.swan.components.output import CURVE

In [2]: loc = CURVE(
   ...:     sname="outcurve",
   ...:     xp1=172,
   ...:     yp1=-40,
   ...:     npts=[3, 3],
   ...:     xp=[172.0, 174.0],
   ...:     yp=[-38.0, -38.0],
   ...: )
   ...: 

In [3]: print(loc.render())
CURVE sname='outcurve' xp1=172.0 yp1=-40.0 &
    int=3 xp=172.0 yp=-38.0 &
    int=3 xp=174.0 yp=-38.0
Fields:
Validators:
field model_type: Literal['curve', 'CURVE'] = 'curve'#

Model type discriminator

Validated by:
field npts: list[int] [Required]#

The int CURVE parameter, SWAN will generate npts-1 equidistant locations between two subsequent corner points of the curve including the two corner points

Constraints:
  • min_length = 1

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

problem coordinates of a corner point of the curve in the x-direction

Constraints:
  • min_length = 1

Validated by:
field xp1: float [Required]#

Problem coordinate of the first point of the curve in the x-direction

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

problem coordinates of a corner point of the curve in the y-direction

Constraints:
  • min_length = 1

Validated by:
field yp1: float [Required]#

Problem coordinate of the first point of the curve in the y-direction

Validated by:
cmd() str[source]#

Command file string for this component.

validator ensure_equal_size  »  all fields[source]#