rompy.swan.components.output.FRAME#
- pydantic model rompy.swan.components.output.FRAME[source]#
Output locations on a regular grid.
FRAME 'sname' [xpfr] [ypfr] [alpfr] [xlenfr] [ylenfr] [mxfr] [myfr]
With this optional command the user defines output on a rectangular, uniform grid in a regular frame.
If the set of output locations is identical to a part of the computational grid, then the user can use the alternative command GROUP.
Note
Cannot be used in 1D-mode.
Examples
In [1]: from rompy.swan.components.output import FRAME In [2]: loc = FRAME( ...: sname="outgrid", ...: grid=dict(xp=173, yp=-40, xlen=2, ylen=2, mx=19, my=19), ...: ) ...: In [3]: print(loc.render()) FRAME sname='outgrid' xpfr=173.0 ypfr=-40.0 alpfr=0.0 xlenfr=2.0 ylenfr=2.0 mxfr=19 myfr=19
Show JSON schema
{ "title": "FRAME", "description": "Output locations on a regular grid.\n\n.. code-block:: text\n\n FRAME 'sname' [xpfr] [ypfr] [alpfr] [xlenfr] [ylenfr] [mxfr] [myfr]\n\nWith this optional command the user defines output on a rectangular, uniform grid\nin a regular frame.\n\nIf the set of output locations is identical to a part of the computational grid,\nthen the user can use the alternative command GROUP.\n\nNote\n----\nCannot be used in 1D-mode.\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.components.output import FRAME\n loc = FRAME(\n sname=\"outgrid\",\n grid=dict(xp=173, yp=-40, xlen=2, ylen=2, mx=19, my=19),\n )\n print(loc.render())", "type": "object", "properties": { "model_type": { "default": "frame", "description": "Model type discriminator", "enum": [ "frame", "FRAME" ], "title": "Model Type", "type": "string" }, "sname": { "description": "Name of the set of output locations defined by this command", "maxLength": 8, "title": "Sname", "type": "string" }, "grid": { "$ref": "#/$defs/GRIDREGULAR", "description": "Frame grid definition" } }, "$defs": { "GRIDREGULAR": { "additionalProperties": false, "description": "SWAN Regular Grid subcomponent.\n\n.. code-block:: text\n\n xp yp alp xlen ylen mx my\n\nNote\n----\nThe direction of the x-axis `alp` must be 0 in case of spherical coordinates\n\nNote\n----\nAll coordinates and distances should be given in m when Cartesian coordinates are\nused or degrees when Spherical coordinates are used (see command COORD).\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.subcomponents.readgrid import GRIDREGULAR\n kwargs = dict(xp=173, yp=-40, alp=0, xlen=2, ylen=2, mx=199, my=199)\n grid = GRIDREGULAR(suffix=\"c\", **kwargs)\n print(grid.render())\n grid = GRIDREGULAR(suffix=\"inp\", **kwargs)\n print(grid.render())", "properties": { "model_type": { "default": "gridregular", "description": "Model type discriminator", "enum": [ "gridregular", "GRIDREGULAR" ], "title": "Model Type", "type": "string" }, "xp": { "description": "The x-coordinate of the origin in problem coordinates", "title": "Xp", "type": "number" }, "yp": { "description": "The y-coordinate of the origin in problem coordinates", "title": "Yp", "type": "number" }, "alp": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": 0.0, "description": "Direction of the xaxis in degrees", "title": "Alp" }, "xlen": { "description": "Length of the computational grid in the x-direction", "title": "Xlen", "type": "number" }, "ylen": { "description": "Length of the computational grid in the y-direction", "title": "Ylen", "type": "number" }, "mx": { "description": "Number of meshes in computational grid in x-direction (this number is one less than the number of grid points in this domain)", "title": "Mx", "type": "integer" }, "my": { "description": "Number of meshes in computational grid in y-direction (this number is one less than the number of grid points in this domain)", "title": "My", "type": "integer" }, "suffix": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "description": "Suffix for rendering with each output grid parameter.", "title": "Suffix" } }, "required": [ "xp", "yp", "xlen", "ylen", "mx", "my" ], "title": "GRIDREGULAR", "type": "object" } }, "additionalProperties": false, "required": [ "sname", "grid" ] }
- Fields:
- Validators:
- field grid: GRIDREGULAR [Required]#
Frame grid definition
- Validated by:
- field model_type: Literal['frame', 'FRAME'] = 'frame'#
Model type discriminator