rompy.swan.components.inpgrid.CURVILINEAR#

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

SWAN curvilinear input grid.

INPGRID [grid_type] CURVILINEAR [stagrx] [stagry] [mxinp] [myinp] &
    (EXCEPTION [excval]) &
    (NONSTATIONARY [tbeginp] [deltinp] ->SEC|MIN|HR|DAY [tendinp])
READGRID [grid_type] [fac] 'fname1' [idla] [nhedf] ([nhedt]) ([nhedvec]) &
    ->FREE|FORMAT|UNFORMATTED ('form'|[idfm])

This is a group component that includes an INPGRID and a READGRID component.

Examples

In [63]: from rompy.swan.components.inpgrid import CURVILINEAR

In [64]: inpgrid = CURVILINEAR(
   ....:     grid_type="wind",
   ....:     stagrx=0.0,
   ....:     stagry=0.0,
   ....:     mxinp=199,
   ....:     myinp=199,
   ....:     excval=-99.0,
   ....:     readinp=dict(fname1="wind.txt"),
   ....:     nonstationary=dict(
   ....:         tbeg="2019-01-01T00:00:00",
   ....:         tend="2019-01-07 00:00:00",
   ....:         delt=3600,
   ....:         dfmt="hr",
   ....:     ),
   ....: )
   ....: 

In [65]: print(inpgrid.render())
INPGRID WIND CURVILINEAR stagrx=0.0 stagry=0.0 mxinp=199 myinp=199  EXCEPTION excval=-99.0 NONSTATIONARY tbeginp=20190101.000000 deltinp=1.0 HR tendinp=20190107.000000
READINP WIND fac=1.0 fname1='wind.txt' idla=1 nhedf=0 nhedt=0 nhedvec=0 FREE

TODO: Handle (or not) setting default values for mxinp and myinp from cgrid.

Fields:
Validators:

field excval: float | None = None#

Exception value to allow identifying and ignoring certain point inside the given grid during the computation. If fac != 1, excval must be given as fac times the exception value

Validated by:
  • set_nonstat_suffix

field grid_type: GridOptions [Required]#

Type of the swan input grid, e.g, ‘bottom’, ‘wind’, etc

Validated by:
  • set_nonstat_suffix

field model_type: Literal['curvilinear', 'CURVILINEAR'] = 'curvilinear'#

Model type discriminator

Validated by:
  • set_nonstat_suffix

field mxinp: int [Required]#

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

Validated by:
  • set_nonstat_suffix

field myinp: int [Required]#

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

Validated by:
  • set_nonstat_suffix

field nonstationary: NONSTATIONARY | None = None#

Nonstationary time specification

Validated by:
  • set_nonstat_suffix

field readinp: READINP [Required]#

SWAN input grid file reader specification

Validated by:
  • set_nonstat_suffix

field stagrx: float = 0.0#

Staggered x’-direction with respect to computational grid, e.g., stagrx=0.5 means that the input grid points are shifted a half step in x’-direction; in many flow models x-velocities are defined in points shifted a half step in x’-direction

Validated by:
  • set_nonstat_suffix

field stagry: float = 0.0#

Staggered y’-direction with respect to computational grid, e.g., stagry=0.5 means that the input grid points are shifted a half step in y’-direction; in many flow models y-velocities are defined in points shifted a half step in y’-direction

Validated by:
  • set_nonstat_suffix

cmd() str[source]#

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