rompy.swan.components.output.TABLE#
- pydantic model rompy.swan.components.output.TABLE[source]#
Write spatial distributions.
TABLE 'sname' ->HEADER|NOHEADER|INDEXED 'fname' < output > & (OUTPUT [tbegblk] [deltblk]) SEC|MIN|HR|DAY
With this optional command the user indicates that for each location of the output location set ‘sname’ (see commands POINTS, CURVE, FRAME or GROUP) one or more variables should be written to a file. The keywords HEADER and NOHEADER determine the appearance of the table; the filename determines the destination of the data.
Note
HEADER: output is written in fixed format to file with headers giving name of variable and unit per column (numbers too large to be written will be shown as ****. The number of header lines is 4.
NOHEADER: output is written in floating point format to file and has no headers.
INDEXED: output compatible with GIS tools such as ARCVIEW, ARCINFO, etc. The user should give two TABLE commands, one to produce one file with XP and YP as output quantities, the other with HS, RTM01 or other output quantities.
Examples
In [1]: from rompy.swan.components.output import TABLE In [2]: table = TABLE( ...: sname="outpts", ...: format="noheader", ...: fname="./output_table.nc", ...: output=["hsign", "hswell", "dir", "tps", "tm01", "watlev", "qp"], ...: times=dict(tbeg="2012-01-01T00:00:00", delt="PT30M", dfmt="min"), ...: ) ...: In [3]: print(table.render()) TABLE sname='outpts' NOHEADER fname='./output_table.nc' & HSIGN & HSWELL & DIR & TPS & TM01 & WATLEV & QP & OUTPUT tbegtbl=20120101.000000 delttbl=30.0 MIN
- Fields:
- Validators:
- field format: Literal['header', 'noheader', 'indexed'] | None = None#
Indicate if the table should be written to a file as a HEADER, NOHEADER or INDEXED table format (SWAN default: HEADER)
- Validated by:
- field model_type: Literal['table', 'TABLE'] = 'table'#
Model type discriminator
- Validated by:
- field output: list[BlockOptions] [Required]#
The output variables to output to block file
- Constraints:
min_length = 1
- Validated by:
- property suffix: str#