rompy.swan.components.output.OUTPUT_OPTIONS#

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

Set format of output.

OUTPUT OPTIons 'comment' (TABLE [field]) (BLOCK [ndec] [len]) (SPEC [ndec])

This command enables the user to influence the format of block, table and spectral output.

Examples

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

In [2]: opts = OUTPUT_OPTIONS(
   ...:     comment="!", field=10, ndec_block=4, len=20, ndec_spec=6,
   ...: )
   ...: 

In [3]: print(opts.render())
OUTPUT OPTIONS comment='!' TABLE field=10 BLOCK ndec=4 len=20 SPEC ndec=6
Fields:
field comment: str | None = None#

Comment character used in comment lines in the output (SWAN default: %)

Constraints:
  • min_length = 1

  • max_length = 1

field field: int | None = None#

Length of one data field in a table (SWAN default: 12)

Constraints:
  • ge = 8

  • le = 16

field len: int | None = None#

Number of data on one line of block output (SWAN default: 6)

Constraints:
  • ge = 1

  • le = 9999

field model_type: Literal['block', 'BLOCK'] = 'block'#

Model type discriminator

field ndec_block: int | None = None#

Number of decimals in block output (SWAN default: 4)

Constraints:
  • ge = 0

  • le = 9

field ndec_spec: int | None = None#

Number of decimals in spectra output (SWAN default: 4)

Constraints:
  • ge = 0

  • le = 9

cmd() str[source]#

Command file string for this component.