rompy.swan.components.output.NGRID_UNSTRUCTURED#

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

Output locations for a nested grid.

NGRID 'sname' UNSTRUCTURED ->TRIANGLE|EASYMESH 'fname'

If the user wishes to carry out nested SWAN runs, a separate coarse-grid SWAN run is required. With this optional command NGRID, the user defines in the present coarse-grid run, a set of output locations along the boundary of the subsequent nested computational grid. The set of output locations thus defined is of the type NGRID.

With this option the user indicates that the subsequent nested grid is unstructured Only grids generated by Triangle and Easymesh are supported by SWAN.

Note

Command NESTOUT is required after this command NGRID to generate some data for the (subsequent) nested run.

Examples

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

In [2]: loc = NGRID_UNSTRUCTURED(sname="outnest", kind="triangle", fname="ngrid.txt")

In [3]: print(loc.render())
NGRID sname='outnest' UNSTRUCTURED TRIANGLE fname='ngrid.txt'
Fields:
Validators:

field fname: str [Required]#

Basename of the required files, i.e. without extension

Constraints:
  • max_length = 32

field kind: Literal['triangle', 'easymesh'] | None = 'triangle'#

Indicate if nested grid is generated by Triangle or Easymesh. The base name of the grid specified in the fname parameter is used internally by SWAN to define the .node and .ele files in case of the former or the .n and .e files in case of the latter.

field model_type: Literal['ngrid_unstructured', 'NGRID_UNSTRUCTURED'] = 'ngrid_unstructured'#

Model type discriminator

cmd() str[source]#

Command file string for this component.