rompy.swan.components.numerics.PROP#
- pydantic model rompy.swan.components.numerics.PROP[source]#
Propagation scheme.
PROP BSTB|GSE
Notes
The scheme defaults to S&L and SORDUP for nonstationary and stationary simulations if not specified.
All schemes (BSBT, SORDUP and S&L) can be used in combination with curvilinear grids. With the higher order schemes (S&L and SORDUP) it is important to use a gradually varying grid otherwise there may be a severe loss of accuracy. If sharp transitions in the grid cannot be avoided it is safer to use the BSBT scheme.
In the computation with unstructured meshes, a lowest order upwind scheme will be employed. This scheme is very robust but rather diffusive. This may only be significant for the case when swell waves propagate over relative large distances (in the order of thousands of kilometers) within the model domain. However and most fortunately, in such a case this will alleviate the garden-sprinkler effect.
Alleviating the garden-sprinkler effect by adding some diffusion makes the SWAN computation conditionally stable. You can either use (i) a smaller time step, (ii) a lower value of waveage, (iii) better resolution in the directional space, or (iv) worse resolution in the geographic space, in order of preference, to make the model stable when necessary.
Examples
In [9]: from rompy.swan.components.numerics import PROP In [10]: prop = PROP() In [11]: print(prop.render()) PROP In [12]: prop = PROP(scheme=dict(model_type="bsbt")) In [13]: print(prop.render()) PROP BSBT In [14]: prop = PROP( ....: scheme=dict( ....: model_type="gse", ....: waveage=dict(delt="PT5H", dfmt="hr"), ....: ), ....: ) ....: In [15]: print(prop.render()) PROP GSE waveage=5.0 HR
Show JSON schema
{ "title": "PROP", "description": "Propagation scheme.\n\n.. code-block:: text\n\n PROP BSTB|GSE\n\nNotes\n-----\n* The scheme defaults to `S&L` and `SORDUP` for nonstationary and stationary\n simulations if not specified.\n* All schemes (BSBT, SORDUP and S&L) can be used in combination with curvilinear\n grids. With the higher order schemes (S&L and SORDUP) it is important to use a\n gradually varying grid otherwise there may be a severe loss of accuracy. If sharp\n transitions in the grid cannot be avoided it is safer to use the BSBT scheme.\n* In the computation with unstructured meshes, a lowest order upwind scheme will be\n employed. This scheme is very robust but rather diffusive. This may only be\n significant for the case when swell waves propagate over relative large distances\n (in the order of thousands of kilometers) within the model domain. However and\n most fortunately, in such a case this will alleviate the garden-sprinkler effect.\n* Alleviating the garden-sprinkler effect by adding some diffusion makes the SWAN\n computation conditionally stable. You can either use (i) a smaller time step,\n (ii) a lower value of `waveage`, (iii) better resolution in the directional\n space, or (iv) worse resolution in the geographic space, in order of preference,\n to make the model stable when necessary.\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.components.numerics import PROP\n prop = PROP()\n print(prop.render())\n prop = PROP(scheme=dict(model_type=\"bsbt\"))\n print(prop.render())\n prop = PROP(\n scheme=dict(\n model_type=\"gse\",\n waveage=dict(delt=\"PT5H\", dfmt=\"hr\"),\n ),\n )\n print(prop.render())", "type": "object", "properties": { "model_type": { "default": "prop", "description": "Model type discriminator", "enum": [ "prop", "PROP" ], "title": "Model Type", "type": "string" }, "scheme": { "anyOf": [ { "description": "Propagation scheme", "discriminator": { "mapping": { "BSBT": "#/$defs/BSBT", "GSE": "#/$defs/GSE", "bsbt": "#/$defs/BSBT", "gse": "#/$defs/GSE" }, "propertyName": "model_type" }, "oneOf": [ { "$ref": "#/$defs/BSBT" }, { "$ref": "#/$defs/GSE" } ] }, { "type": "null" } ], "default": null, "description": "Propagation scheme, by default S&L for nonstationary and SORDUP for stationary computation.", "title": "Scheme" } }, "$defs": { "BSBT": { "additionalProperties": false, "description": "BSBT first order propagation scheme.\n\n.. code-block:: text\n\n BSTB\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.subcomponents.numerics import BSBT\n scheme = BSBT()\n print(scheme.render())", "properties": { "model_type": { "default": "bsbt", "description": "Model type discriminator", "enum": [ "bsbt", "BSBT" ], "title": "Model Type", "type": "string" } }, "title": "BSBT", "type": "object" }, "Delt": { "additionalProperties": false, "description": "Time interval specification in SWAN.\n\n.. code-block:: text\n\n [delt] SEC|MIN|HR|DAY\n\nNote\n----\nThe `tdelta` field can be specified as:\n\n* existing timedelta object\n* int or float, assumed as seconds\n* ISO 8601 duration string, following formats work:\n\n * `[-][DD ][HH:MM]SS[.ffffff]`\n * `[\u00b1]P[DD]DT[HH]H[MM]M[SS]S` (ISO 8601 format for timedelta)\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.subcomponents.time import Delt\n from datetime import timedelta\n delt = Delt(delt=timedelta(minutes=30))\n print(delt.render())\n delt = Delt(delt=\"PT1H\", dfmt=\"hr\")\n print(delt.render())", "properties": { "model_type": { "const": "delt", "default": "delt", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "delt": { "description": "Time interval", "format": "duration", "title": "Delt", "type": "string" }, "dfmt": { "default": "sec", "description": "Format to render time interval specification", "enum": [ "sec", "min", "hr", "day" ], "title": "Dfmt", "type": "string" } }, "required": [ "delt" ], "title": "Delt", "type": "object" }, "GSE": { "additionalProperties": false, "description": "Garden-sprinkler effect.\n\n.. code-block:: text\n\n GSE [waveage] Sec|MIn|HR|DAy\n\nGarden-sprinkler effect is to be counteracted in the S&L propagation scheme\n(default for nonstationary regular grid computations) or in the propagation\nscheme for unstructured grids by adding a diffusion term to the basic equation.\nThis may affect the numerical stability of SWAN.\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.subcomponents.numerics import GSE\n scheme = GSE(waveage=dict(delt=86400, dfmt=\"day\"))\n print(scheme.render())", "properties": { "model_type": { "default": "gse", "description": "Model type discriminator", "enum": [ "gse", "GSE" ], "title": "Model Type", "type": "string" }, "waveage": { "anyOf": [ { "$ref": "#/$defs/Delt" }, { "type": "null" } ], "default": null, "description": "The time interval used to determine the diffusion which counteracts the so-called garden-sprinkler effect. The default value of `waveage` is zero, i.e. no added diffusion. The value of `waveage` should correspond to the travel time of the waves over the computational region." } }, "title": "GSE", "type": "object" } }, "additionalProperties": false }
- Fields:
- field model_type: Literal['prop', 'PROP'] = 'prop'#
Model type discriminator