rompy.swan.components.output.BaseWrite#
- pydantic model rompy.swan.components.output.BaseWrite[source]#
Base class for SWAN output writing.
{MODEL_TYPE} sname='sname'
This is the base class for all write components. It is not meant to be used directly.
Examples
In [1]: from rompy.swan.components.output import BaseWrite In [2]: write = BaseWrite( ...: sname="outgrid", ...: fname="./output-grid.nc", ...: times=dict( ...: tbeg="2012-01-01T00:00:00", ...: delt="PT30M", ...: tfmt=1, ...: dfmt="min", ...: suffix="", ...: ) ...: ) ...: In [3]: print(write.render())
- Fields:
- Validators:
validate_special_names
»all fields
validate_times
»all fields
- field fname: str [Required]#
Name of the data file where the output is written to The file format is defined by the file extension, use .mat for MATLAB binary (single precision) or .nc for netCDF format. If any other extension is used the ASCII format is assumed
- Validated by:
- field model_type: Literal['write', 'WRITE'] = 'write'#
Model type discriminator
- Validated by:
- field sname: str [Required]#
Name of the set of output locations in which the output is to be written
- Constraints:
max_length = 8
- Validated by:
- field times: TimeRangeOpen | None = None#
Time specification if the user requires output at various times. If this option is not specified data will be written for the last time step of the computation
- Validated by:
- property suffix: str#