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
Show JSON schema
{ "title": "LINE", "description": "Line of points to define obstacle location.\n\n.. code-block:: text\n\n LINE < [xp] [yp] >\n\nWith this option the user indicates that the fixed transmission `trcoef` and\nreflection `reflc` coefficients are freeboard dependent. The freeboard dependency\nhas no effect on the transmission coefficient as computed using the DAM option.\n\nNotes\n-----\nPoints coordinates should be provided in m If Cartesian coordinates are used or in\ndegrees if spherical coordinates are used (see command `COORD`). At least two\ncorner points must be provided.\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.subcomponents.physics import LINE\n line = LINE(xp=[174.1, 174.2, 174.3], yp=[-39.1, -39.1, -39.1])\n print(line.render())", "type": "object", "properties": { "model_type": { "default": "line", "description": "Model type discriminator", "enum": [ "line", "LINE" ], "title": "Model Type", "type": "string" }, "xp": { "description": "The x-coordinates of the points defining the line", "items": { "type": "number" }, "minItems": 2, "title": "Xp", "type": "array" }, "yp": { "description": "The y-coordinates of the points defining the line", "items": { "type": "number" }, "minItems": 2, "title": "Yp", "type": "array" } }, "additionalProperties": false, "required": [ "xp", "yp" ] }
- Fields:
- Validators:
check_length
»all fields
- 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: