rompy.swan.components.startup.PROJECT#
- pydantic model rompy.swan.components.startup.PROJECT[source]#
SWAN Project.
PROJECT 'name' 'nr' 'title' 'title2 'title3'
With this required command the user defines a number of strings to identify the SWAN run (project name e.g., an engineering project) in the print and plot file.
Examples
In [225]: from rompy.swan.components.startup import PROJECT In [226]: proj = PROJECT(nr="01") In [227]: print(proj.render()) PROJECT nr='01' In [228]: proj = PROJECT( .....: name="waus", .....: nr="001", .....: title1="Western Australia", .....: title2="Perth Nest" .....: ) .....: In [229]: print(proj.render()) PROJECT name='waus' nr='001' title1='Western Australia' title2='Perth Nest'
Show JSON schema
{ "title": "PROJECT", "description": "SWAN Project.\n\n.. code-block:: text\n\n PROJECT 'name' 'nr' 'title' 'title2 'title3'\n\nWith this required command the user defines a number of strings to identify the\nSWAN run (project name e.g., an engineering project) in the print and plot file.\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.components.startup import PROJECT\n proj = PROJECT(nr=\"01\")\n print(proj.render())\n proj = PROJECT(\n name=\"waus\",\n nr=\"001\",\n title1=\"Western Australia\",\n title2=\"Perth Nest\"\n )\n print(proj.render())", "type": "object", "properties": { "model_type": { "default": "project", "description": "Model type discriminator", "enum": [ "project", "PROJECT" ], "title": "Model Type", "type": "string" }, "name": { "anyOf": [ { "maxLength": 16, "type": "string" }, { "type": "null" } ], "default": null, "description": "Is the name of the project, at most 16 characters long", "title": "Name" }, "nr": { "description": "Is the run identification (to be provided as a character string; e.g. the run number) to distinguish this run among other runs for the same project; it is at most 4 characters long. It is the only required information in this command.", "maxLength": 4, "title": "Nr", "type": "string" }, "title1": { "anyOf": [ { "maxLength": 72, "type": "string" }, { "type": "null" } ], "default": null, "description": "A string of at most 72 characters provided by the user to appear in the output of the program for the user's convenience (SWAN default: blanks)", "title": "Title1" }, "title2": { "anyOf": [ { "maxLength": 72, "type": "string" }, { "type": "null" } ], "default": null, "description": "Same as 'title1'", "title": "Title2" }, "title3": { "anyOf": [ { "maxLength": 72, "type": "string" }, { "type": "null" } ], "default": null, "description": "Same as 'title1'", "title": "Title3" } }, "additionalProperties": false, "required": [ "nr" ] }
- Fields:
- field model_type: Literal['project', 'PROJECT'] = 'project'#
Model type discriminator
- field name: str | None = None#
Is the name of the project, at most 16 characters long
- Constraints:
max_length = 16
- field nr: str [Required]#
Is the run identification (to be provided as a character string; e.g. the run number) to distinguish this run among other runs for the same project; it is at most 4 characters long. It is the only required information in this command.
- Constraints:
max_length = 4
- field title1: str | None = None#
A string of at most 72 characters provided by the user to appear in the output of the program for the user’s convenience (SWAN default: blanks)
- Constraints:
max_length = 72
- field title2: str | None = None#
Same as ‘title1’
- Constraints:
max_length = 72
- field title3: str | None = None#
Same as ‘title1’
- Constraints:
max_length = 72