rompy.swan.subcomponents.numerics.ACCUR#
- pydantic model rompy.swan.subcomponents.numerics.ACCUR[source]#
Stop the iterative procedure.
ACCUR [drel] [dhoval] [dtoval] [npnts] ->STAT|NONSTAT [limiter]
With this option the user can influence the criterion for terminating the iterative procedure in the SWAN computations (both stationary and non-stationary modes). SWAN stops the iterations if (a), (b) and (c) are all satisfied:
The change in the local significant wave height Hs from one iteration to the next is less than (1) fraction drel of that height or (2) fraction dhoval of the average Hs over all grid points.
The change in the local mean wave period Tm01 from one iteration to the next is less than (1) fraction drel of that period or (2) fraction dtoval of the average mean wave period over all wet grid points.
Conditions (a) and (b) are fulfilled in more than fraction npnts% of all wet grid points.
Note
This command has become obsolete in SWAN 41.01. The command STOPC should be used.
Examples
In [276]: from rompy.swan.subcomponents.numerics import ACCUR In [277]: accur = ACCUR() In [278]: print(accur.render()) ACCUR In [279]: accur = ACCUR( .....: drel=0.01, .....: dhoval=0.02, .....: dtoval=0.02, .....: npnts=98.0, .....: mode=dict(model_type="nonstat", mxitns=1), .....: limiter=0.1, .....: ) .....: In [280]: print(accur.render()) ACCUR drel=0.01 dhoval=0.02 dtoval=0.02 npnts=98.0 NONSTATIONARY mxitns=1 limiter=0.1
Show JSON schema
{ "title": "ACCUR", "description": "Stop the iterative procedure.\n\n.. code-block:: text\n\n ACCUR [drel] [dhoval] [dtoval] [npnts] ->STAT|NONSTAT [limiter]\n\nWith this option the user can influence the criterion for terminating the iterative\nprocedure in the SWAN computations (both stationary and non-stationary modes).\nSWAN stops the iterations if (a), (b) and (c) are all satisfied:\n\na) The change in the local significant wave height Hs from one iteration to the\n next is less than (1) fraction `drel` of that height or (2) fraction `dhoval`\n of the average Hs over all grid points.\n\nb) The change in the local mean wave period Tm01 from one iteration to the next is\n less than (1) fraction `drel` of that period or (2) fraction `dtoval` of the\n average mean wave period over all wet grid points.\n\nc) Conditions (a) and (b) are fulfilled in more than fraction `npnts%` of all wet\n grid points.\n\nNote\n----\nThis command has become obsolete in SWAN 41.01. The command STOPC should be used.\n\nExamples\n--------\n\n.. ipython:: python\n :okwarning:\n\n from rompy.swan.subcomponents.numerics import ACCUR\n accur = ACCUR()\n print(accur.render())\n accur = ACCUR(\n drel=0.01,\n dhoval=0.02,\n dtoval=0.02,\n npnts=98.0,\n mode=dict(model_type=\"nonstat\", mxitns=1),\n limiter=0.1,\n )\n print(accur.render())", "type": "object", "properties": { "model_type": { "default": "accur", "description": "Model type discriminator", "enum": [ "accur", "ACCUR" ], "title": "Model Type", "type": "string" }, "drel": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Maximum relative change in Hs or Tm01 from one iteration to the next (SWAN default: 0.02)", "title": "Drel" }, "dhoval": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Fraction of the average Hs over all wet grid points below which the the stopping criteria needs to be satisfied (SWAN default: 0.02)", "title": "Dhoval" }, "dtoval": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Fraction of the average Tm01 over all wet grid points below which the the stopping criteria needs to be satisfied (SWAN default: 0.02)", "title": "Dtoval" }, "npnts": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Percentage of points in the computational grid above which the stopping criteria needs to be satisfied (SWAN default: 98)", "title": "Npnts" }, "mode": { "anyOf": [ { "discriminator": { "mapping": { "NONSTAT": "#/$defs/NONSTAT", "STAT": "#/$defs/STAT", "nonstat": "#/$defs/NONSTAT", "stat": "#/$defs/STAT" }, "propertyName": "model_type" }, "oneOf": [ { "$ref": "#/$defs/STAT" }, { "$ref": "#/$defs/NONSTAT" } ] }, { "type": "null" } ], "default": null, "description": "Termination criteria for stationary or nonstationary runs", "title": "Mode" }, "limiter": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Determines the maximum change per iteration of the energy density per spectral-bin given in terms of a fraction of the omni-directional Phillips level (SWAN default: 0.1)", "title": "Limiter" } }, "$defs": { "NONSTAT": { "additionalProperties": false, "description": "Computation parameters in nonstationary computation.", "properties": { "model_type": { "default": "nonstat", "description": "Model type discriminator", "enum": [ "nonstat", "NONSTAT" ], "title": "Model Type", "type": "string" }, "mxitns": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The maximum number of iterations per time step for nonstationary computations. The computation moves to the next time step when this number is exceeded (SWAN default: `mxitns = 1`", "title": "Mxitns" } }, "title": "NONSTAT", "type": "object" }, "STAT": { "additionalProperties": false, "description": "Computation parameters in stationary computation.", "properties": { "model_type": { "default": "stat", "description": "Model type discriminator", "enum": [ "stat", "STAT" ], "title": "Model Type", "type": "string" }, "mxitst": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The maximum number of iterations for stationary computations. The computation stops when this number is exceeded (SWAN default: 50)", "title": "Mxitst" }, "alfa": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Proportionality constant used in the frequency-dependent under-relaxation technique. Based on experiences, a suggestion for this parameter is `alfa = 0.01`. In case of diffraction computations, the use of this parameter is recommended (SWAN default: 0.00)", "title": "Alfa" } }, "title": "STAT", "type": "object" } }, "additionalProperties": false }
- Fields:
- field dhoval: float | None = None#
Fraction of the average Hs over all wet grid points below which the the stopping criteria needs to be satisfied (SWAN default: 0.02)
- field drel: float | None = None#
Maximum relative change in Hs or Tm01 from one iteration to the next (SWAN default: 0.02)
- field dtoval: float | None = None#
Fraction of the average Tm01 over all wet grid points below which the the stopping criteria needs to be satisfied (SWAN default: 0.02)
- field limiter: float | None = None#
Determines the maximum change per iteration of the energy density per spectral-bin given in terms of a fraction of the omni-directional Phillips level (SWAN default: 0.1)
- field model_type: Literal['accur', 'ACCUR'] = 'accur'#
Model type discriminator
- field npnts: float | None = None#
Percentage of points in the computational grid above which the stopping criteria needs to be satisfied (SWAN default: 98)