rompy.swan.components.output.RAY#
- pydantic model rompy.swan.components.output.RAY[source]#
Output locations along a depth contour.
RAY 'rname' [xp1] [yp1] [xq1] [yq1] < [int] [xp] [yp] [xq] [yq] >
With this optional command the user provides SWAN with information to determine output locations along the depth contour line(s) defined subsequently in command ISOLINE (see below).
These locations are determined by SWAN as the intersections of the depth contour line(s) and the set of straight rays defined in this command RAY. These rays are characterized by a set of master rays defined by their start and end positions (xp,`yp`) and (xq,`yq`). Between each pair of sequential master rays thus defined SWAN generates int-1 intermediate rays by linear interpolation of the start and end positions.
Rays defined by this component have nothing in common with wave rays (e.g. as obtained from conventional refraction computations).
Note
Cannot be used in 1D-mode.
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
When using rays the input grid for bottom and water level should not be curvilinear.
Examples
In [1]: from rompy.swan.components.output import RAY In [2]: loc = RAY( ...: rname="outray", ...: xp1=171.9, ...: yp1=-40.1, ...: xq1=172.1, ...: yq1=-39.9, ...: npts=[3, 3], ...: xp=[171.9, 173.9], ...: yp=[-38.1, -38.1], ...: xq=[172.1, 174.1], ...: yq=[-37.9, -37.9], ...: ) ...: In [3]: print(loc.render()) RAY rname='outray' xp1=171.9 yp1=-40.1 xq1=172.1 yq1=-39.9 & int=3 xp=171.9 yp=-38.1 xq=172.1 yq=-37.9 & int=3 xp=173.9 yp=-38.1 xq=174.1 yq=-37.9
- Fields:
- Validators:
ensure_equal_size
»all fields
- field model_type: Literal['ray', 'RAY'] = 'ray'#
Model type discriminator
- Validated by:
- field npts: list[int] [Required]#
The int RAY parameter, number of subdivisions between the previous master ray and the following master ray defined by the following data (number of subdivisions is one morethan the number of interpolated rays)
- Constraints:
min_length = 1
- Validated by:
- field rname: str [Required]#
Name of the set of rays defined by this command
- Constraints:
max_length = 32
- Validated by:
- field xp: list[float] [Required]#
problem coordinates of the begin of each subsequent master ray in the x-direction
- Constraints:
min_length = 1
- Validated by:
- field xp1: float [Required]#
Problem coordinate of the begin point of the first master ray in the x-direction
- Validated by:
- field xq: list[float] [Required]#
problem coordinates of the end of each subsequent master ray in the x-direction
- Constraints:
min_length = 1
- Validated by:
- field xq1: float [Required]#
Problem coordinate of the end point of the first master ray in the x-direction
- Validated by:
- field yp: list[float] [Required]#
problem coordinates of the begin of each subsequent master ray in the y-direction
- Constraints:
min_length = 1
- Validated by:
- field yp1: float [Required]#
Problem coordinate of the begin point of the first master ray in the y-direction
- Validated by:
- field yq: list[float] [Required]#
problem coordinates of the end of each subsequent master ray in the y-direction
- Constraints:
min_length = 1
- Validated by:
- field yq1: float [Required]#
Problem coordinate of the end point of the first master ray in the y-direction
- Validated by: