rompy.swan.subcomponents.physics.TRANS2D#

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

Frequency-direction dependent transmission.

TRANS2D < [trcoef] >

Examples

In [77]: from rompy.swan.subcomponents.physics import TRANS2D

In [78]: trcoef = np.array([[0.0, 0.0], [0.1, 0.1], [0.2, 0.2]])

In [79]: transm = TRANS2D(trcoef=trcoef)

In [80]: print(transm.render())
TRANS2D &
	0.0 0.0 &
	0.1 0.1 &
	0.2 0.2 &
Fields:
Validators:
field model_type: Literal['trans2d', 'TRANS2D'] = 'trans2d'#

Model type discriminator

field trcoef: ndarray[tuple[int, int], dtype[Any]] | Path | MultiArrayNumpyFile [Required]#

Transmission coefficient (ratio of transmitted over incoming significant wave height) per frequency and direction, rows represent directions and columns represent frequencies

Constraints:
  • dimensions = 2

  • strict_data_typing = False

  • serialize_numpy_array_to_json = <function pd_np_native_numpy_array_to_data_dict_serializer at 0x7f958b57e440>

  • json_schema_from_type_data = <function pd_np_native_numpy_array_json_schema_from_type_data at 0x7f958b12fb50>

  • __module__ = pydantic_numpy.helper.annotation

Validated by:
cmd() str[source]#

Command file string for this subcomponent.

validator constrained_0_1  »  trcoef[source]#

Ensure all directions have the same number of frequencies.