rompy.swan.components.output.BaseLocation#

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

Base class for SWAN output locations.

{MODEL_TYPE} sname='sname'

This is the base class for all locations components. It is not meant to be used directly.

Note

The name of the set of output locations sname cannot be longer than 8 characters and must not match any SWAN special names such as BOTTGRID (define output over the bottom/current grid) or COMPGRID (define output over the computational grid).

Examples

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

In [2]: loc = BaseLocation(sname="outsites")

In [3]: print(loc.render())
LOCATIONS sname='outsites'

Show JSON schema
{
   "title": "BaseLocation",
   "description": "Base class for SWAN output locations.\n\n.. code-block:: text\n\n    {MODEL_TYPE} sname='sname'\n\nThis is the base class for all locations components. It is not meant to be used\ndirectly.\n\nNote\n----\nThe name of the set of output locations `sname` cannot be longer than 8 characters\nand must not match any SWAN special names such as `BOTTGRID` (define output over\nthe bottom/current grid) or `COMPGRID` (define output over the computational grid).\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.components.output import BaseLocation\n    loc = BaseLocation(sname=\"outsites\")\n    print(loc.render())",
   "type": "object",
   "properties": {
      "model_type": {
         "default": "locations",
         "description": "Model type discriminator",
         "enum": [
            "locations",
            "LOCATIONS"
         ],
         "title": "Model Type",
         "type": "string"
      },
      "sname": {
         "description": "Name of the set of output locations defined by this command",
         "maxLength": 8,
         "title": "Sname",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "sname"
   ]
}

Fields:
Validators:
field model_type: Literal['locations', 'LOCATIONS'] = 'locations'#

Model type discriminator

field sname: str [Required]#

Name of the set of output locations defined by this command

Constraints:
  • max_length = 8

Validated by:
cmd() str[source]#

Command file string for this component.

validator not_special_name  »  sname[source]#

Ensure sname is not defined as one of the special names.