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
Show JSON schema
{ "title": "OUTPUT_OPTIONS", "description": "Set format of output.\n\n.. code-block:: text\n\n OUTPUT OPTIons 'comment' (TABLE [field]) (BLOCK [ndec] [len]) (SPEC [ndec])\n\nThis command enables the user to influence the format of block, table and spectral\noutput.\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.components.output import OUTPUT_OPTIONS\n opts = OUTPUT_OPTIONS(\n comment=\"!\", field=10, ndec_block=4, len=20, ndec_spec=6,\n )\n print(opts.render())", "type": "object", "properties": { "model_type": { "default": "block", "description": "Model type discriminator", "enum": [ "block", "BLOCK" ], "title": "Model Type", "type": "string" }, "comment": { "anyOf": [ { "maxLength": 1, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Comment character used in comment lines in the output (SWAN default: %)", "title": "Comment" }, "field": { "anyOf": [ { "maximum": 16, "minimum": 8, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Length of one data field in a table (SWAN default: 12)", "title": "Field" }, "ndec_block": { "anyOf": [ { "maximum": 9, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of decimals in block output (SWAN default: 4)", "title": "Ndec Block" }, "len": { "anyOf": [ { "maximum": 9999, "minimum": 1, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of data on one line of block output (SWAN default: 6)", "title": "Len" }, "ndec_spec": { "anyOf": [ { "maximum": 9, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of decimals in spectra output (SWAN default: 4)", "title": "Ndec Spec" } }, "additionalProperties": false }
- 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