rompy.swan.components.cgrid.CURVILINEAR#

pydantic model rompy.swan.components.cgrid.CURVILINEAR[source]#

SWAN curvilinear computational grid.

CGRID CURVILINEAR [mxc] [myc] (EXCEPTION [xexc] [yexc])
    ->CIRCLE|SECTOR [mdc] [flow] [fhigh] [msc]
READGRID COORDINATES [fac] 'fname' [idla] [nhedf] [nhedvec] &
    FREE|FORMAT ('form'|[idfm])

This is a group component that includes a CGRID and a READGRID component.

Examples

In [21]: from rompy.swan.components.cgrid import CURVILINEAR

In [22]: cgrid = CURVILINEAR(
   ....:     mxc=199,
   ....:     myc=199,
   ....:     readcoord=dict(fname="./coords.txt"),
   ....:     spectrum=dict(mdc=36, flow=0.04, fhigh=1.0),
   ....: )
   ....: 

In [23]: print(cgrid.render())
CGRID CURVILINEAR mxc=199 myc=199 CIRCLE mdc=36 flow=0.04 fhigh=1.0
READGRID COORDINATES fac=1.0 fname='./coords.txt' idla=1 nhedf=0 nhedvec=0 FREE
Fields:
Validators:
field model_type: Literal['curvilinear', 'CURVILINEAR'] = 'curvilinear'#

Model type discriminator

Validated by:
field mxc: int [Required]#

Number of meshes in computational grid in ξ-direction (this number is one less than the number of grid points in this domain).

Validated by:
field myc: int [Required]#

Number of meshes in computational grid in η-direction (this number is one less than the number of grid points in this domain).

Validated by:
field readcoord: READCOORD [Required]#

Grid coordinates reader.

Validated by:
field spectrum: SPECTRUM [Required]#

Spectrum subcomponent

Validated by:
field xexc: float | None = None#

the value which the user uses to indicate that a grid point is to be ignored in the computations (this value is provided by the user at the location of the x-coordinate considered in the file of the x-coordinates, see command READGRID COOR).

Validated by:
field yexc: float | None = None#

the value which the user uses to indicate that a grid point is to be ignored in the computations (this value is provided by the user at the location of the y-coordinate considered in the file of the y-coordinates, see command READGRID COOR).

Validated by:
cmd() str[source]#

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

validator xexc_and_yexc_or_neither  »  all fields[source]#
property exception#
property format_repr#