rompy.swan.components.boundary.BOUNDNEST3#

pydantic model rompy.swan.components.boundary.BOUNDNEST3[source]#

Boundary spectra from WAVEWATCHIII.

BOUNDNEST3 WW3 'fname' FREE|UNFORMATTED ->CLOSED|OPEN [xgc] [ygc]

With this optional command a nested SWAN run can be carried out with the boundary conditions obtained from a coarse grid WAVEWATCH III run. The spectral frequencies and directions of the coarse grid run do not have to coincide with the frequencies and directions used in the nested SWAN run; SWAN will interpolate to these frequencies and directions in the nested run (see Section 2.6.3). The output files of WAVEWATCH III have to be created with the post-processor of WAVEWATCH III as output transfer files (formatted or unformatted) with WW_3 OUTP (output type 1 sub type 3) at the locations along the nest boundary (i.e. computational grid points in WAVEWATCH III). These locations are equal to the corner points of the SWAN nested grid and optionally also distributed between the corner points of the SWAN nested grid (the boundary of the WAVEWATCH III nested grid need not be closed and may cover land). The locations should be output by WAVEWATCH III in sequence (going along the nest boundary, clockwise or counterclockwise). Note that SWAN will accept output of a WAVEWATCH III output location only if the SWAN grid point on the nest boundary lies within a rectangle between two consecutive WAVEWATCH III output locations with a width equal to 0.1 times the distance between these output locations on either side of the line between these WAVEWATCH III output locations. This BOUNDNEST3 command is not available for 1D computations. A nested SWAN run may use either Cartesian or spherical coordinates. A curvilinear grid may be used in the nested grid but the boundaries of this nest should conform to the rectangular course grid nest boundaries.

Examples

In [8]: from rompy.swan.components.boundary import BOUNDNEST3

In [9]: boundary = BOUNDNEST3(
   ...:     fname="boundary.ww3",
   ...:     format="free",
   ...:     rectangle="closed",
   ...: )
   ...: 

In [10]: print(boundary.render())
BOUNDNEST3 WW3 fname='boundary.ww3' FREE CLOSED
Fields:
field fname: str [Required]#

The name of the file that contains the spectra computed by WAVEWATCH III

Constraints:
  • min_length = 1

  • max_length = 36

field format: Literal['unformatted', 'free'] [Required]#

Format of the WW3 file. unformatted: The input WW3 files are binary, free: The input WW3 files are formatted

field model_type: Literal['boundnest3', 'BOUNDNEST3'] = 'boundnest3'#

Model type discriminator

field rectangle: Literal['closed', 'open'] = 'closed'#

Boundary is defined over a closed (default) or an open rectangle. Boundary generated from the NESTOUT command is aways closed

field xgc: float | None = None#

If SWAN is used with Cartesian coordinates: longitude of south-west corner of SWAN computational grid (in degrees); if the south-west corner of the nest in the WAM computation is on land this value is required. If SWAN is used with spherical coordinates then xgc is ignored by SWAN (SWAN default: the location of the first spectrum encountered in the nest file.

field ygc: float | None = None#

If SWAN is used with Cartesian coordinates: latitude of south-west corner of SWAN computational grid (in degrees); if the south-west corner of the nest in the WAM computation is on land this value is required. If SWAN is used with spherical coordinates then ygc is ignored by SWAN (SWAN default: the location of the first spectrum encountered in the nest file.

cmd() str[source]#

Return the string or list of strings to render the component to the CMD.