rompy.swan.components.output.QUANTITY#

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

Define output settings.

QUANTITY < output > 'short' 'long' [lexp] [hexp] [excv] [power] [ref] &
    [fswell] [fmin] [fmax] ->PROBLEMCOORD|FRAME

Examples:
---------
QUANTITY Xp hexp=100.
QUANTITY HS TM01 RTMM10 excv=-9.
QUANTITY HS TM02 FSPR fmin=0.03 fmax=0.5
QUANTITY Hswell fswell=0.08
QUANTITY Per short='Tm-1,0' power=0.
QUANTITY Transp Force Frame

With this command the user can influence:

  • The naming of output quantities

  • The accuracy of writing output quantities

  • The definition of some output quantities

  • Reference direction for vectors

Note

The following data are accepted only in combination with some specific quantities:

  • power

  • ref

  • fswell

  • fmin

  • fmax

  • PROBLEMCOORD

  • FRAME

Note

PROBLEMCOORD: Vector components are relative to the x- and y-axes of the problem coordinate system (see command SET):

  • Directions are counterclockwise relative to the positive x-axis of the problem coordinate system if Cartesian direction convention is used.

  • Directions are relative to North (clockwise) if Nautical direction convention is used.

Note

FRAME: If output is requested on sets created by command FRAME or automatically (see command SET) (COMPGRID or BOTTGRID):

  • Vector components are relative to the x- and y-axes of the frame coordinate system.

  • Directions are counterclockwise relative to the positive x-axis of the frame coordinate system if Cartesian direction convention is used.

  • Directions are relative to North (clockwise) if Nautical direction convention is used.

Examples

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

In [2]: quant = QUANTITY(output=["xp"], hexp=100)

In [3]: print(quant.render())
QUANTITY XP hexp=100.0

In [4]: quant = QUANTITY(output=["hsign", "tm01", "rtmm10"], excv=-9)

In [5]: print(quant.render())
QUANTITY HSIGN TM01 RTMM10 excv=-9.0

In [6]: quant = QUANTITY(output=["hsign", "tm02", "fspr"], fmin=0.03, fmax=0.5)

In [7]: print(quant.render())
QUANTITY HSIGN TM02 FSPR fmin=0.03 fmax=0.5

In [8]: quant = QUANTITY(output=["hsign"], fswell=0.08)

In [9]: print(quant.render())
QUANTITY HSIGN fswell=0.08

In [10]: quant = QUANTITY(output=["per"], short="Tm-1,0", power=0)

In [11]: print(quant.render())
QUANTITY PER short='Tm-1,0' power=0.0

In [12]: quant = QUANTITY(output=["transp", "force"], coord="frame")

In [13]: print(quant.render())
QUANTITY TRANSP FORCE FRAME
Fields:
field coord: Literal['problemcoord', 'frame'] | None = None#

Define if vectors and directions refer to the problem coordinate system (‘problemcoord’) or sets created by command FRAME (‘frame’) (SWAN default: problemcoord)

field excv: float | None = None#

In case there is no valid value (e.g. wave height in a dry point) this exception value is written in a table or block output

field fmax: float | None = None#

Upper limit of frequency range used for computing integral parameters (SWAN default: 1000.0 Hz, acts as infinity)

field fmin: float | None = None#

Lower limit of frequency range used for computing integral parameters (SWAN Default: 0.0 Hz)

field fswell: float | None = None#

Upper limit of frequency range used for computing the quantity HSWELL (SWAN default: 0.1 Hz)

field hexp: float | None = None#

Highest expected value of the output quantity; the highest expected value is used by SWAN to determine the number of decimals in a table with heading. So the QUANTITY command can be used in case the default number of decimals in a table is unsatisfactory

field lexp: float | None = None#

Lowest expected value of the output quantity

field long: str | None = None#

Long name of the output quantity (e.g. the name in the heading of a block output written by SWAN). If this option is not used, SWAN will use a realistic name

Constraints:
  • max_length = 16

field model_type: Literal['quantity', 'QUANTITY'] = 'quantity'#

Model type discriminator

field noswll: int | None = None#

Number of swells to output for watershed quantities

field output: list[BlockOptions] [Required]#

The output variables to define settings for

Constraints:
  • min_length = 1

field power: float | None = None#

power p appearing in the definition of PER, RPER and WLEN. Note that the value for power given for PER affects also the value of RPER; the power for WLEN is independent of that of PER or RPER (SWAN default: 1)

field ref: str | None = None#

Reference time used for the quantity TSEC. Default value: starting time of the first computation, except in cases where this is later than the time of the earliest input. In these cases, the time of the earliest input is used

field short: str | None = None#

Short name of the output quantity (e.g. the name in the heading of a table written by SWAN). If this option is not used, SWAN will use a realistic name

Constraints:
  • max_length = 16

cmd() str[source]#

Command file string for this component.