rompy.swan.components.group.PHYSICS#

pydantic model rompy.swan.components.group.PHYSICS[source]#

Physics group component.

The physics group component is a convenience to allow specifying several individual components in a single command and check for consistency between them.

Exemples#

In [49]: from rompy.swan.components.group import PHYSICS

In [50]: gen = {"model_type": "gen3", "source_terms": {"model_type": "komen"}}

In [51]: phys = PHYSICS(gen=gen)

In [52]: print(phys.render())
GEN3 KOMEN DRAG WU

In [53]: phys = PHYSICS(
   ....:     gen=dict(model_type="gen3", source_terms={"model_type": "st6c1"}),
   ....:     negatinp={"model_type": "negatinp", "rdcoef": 0.04},
   ....:     sswell={"model_type": "zieger"},
   ....:     breaking={"model_type": "constant", "alpha": 1.0, "gamma": 0.73},
   ....:     friction={"model_type": "jonswap", "cfjon": 0.038},
   ....: )
   ....: 

In [54]: print(phys.render())
GEN3 ST6 a1sds=4.7e-07 a2sds=6.6e-06 p1sds=4.0 p2sds=4.0 UP HWANG VECTAU U10PROXY windscaling=28.0 AGROW

SSWELL ZIEGER

NEGATINP rdcoef=0.04

BREAKING CONSTANT alpha=1.0 gamma=0.73

FRICTION JONSWAP CONSTANT cfjon=0.038
Fields:
Validators:
field bragg: BRAGG | BRAGG_FT | BRAGG_FILE | None = None#
Validated by:
field breaking: BREAKING_CONSTANT | BREAKING_BKD | None = None#
Validated by:
field deactivate: OFFS | None = None#
Validated by:
field diffraction: DIFFRACTION | None = None#
Validated by:
field friction: FRICTION_JONSWAP | FRICTION_COLLINS | FRICTION_MADSEN | FRICTION_RIPPLES | None = None#
Validated by:
field gen: GEN1 | GEN2 | GEN3 | None = None#
Validated by:
field limiter: LIMITER | None = None#
Validated by:
field model_type: Literal['physics', 'PHYSICS'] = 'physics'#

Model type discriminator

Validated by:
field mud: MUD | None = None#
Validated by:
field negatinp: NEGATINP | None = None#
Validated by:
field obstacle: OBSTACLES | None = None#
Validated by:
field quadrupl: QUADRUPL | None = None#
Validated by:
field scat: SCAT | None = None#
Validated by:
field setup: SETUP | None = None#
Validated by:
field sice: SICE | SICE_R19 | SICE_D15 | SICE_M18 | SICE_R21B | None = None#
Validated by:
field sswell: SSWELL_ROGERS | SSWELL_ARDHUIN | SSWELL_ZIEGER | None = None#
Validated by:
field surfbeat: SURFBEAT | None = None#
Validated by:
field triad: TRIAD | TRIAD_DCTA | TRIAD_LTA | TRIAD_SPB | None = None#
Validated by:
field turbulence: TURBULENCE | None = None#
Validated by:
field vegetation: VEGETATION | None = None#
Validated by:
field wcapping: WCAPPING_KOMEN | WCAPPING_AB | None = None#
Validated by:
cmd()[source]#

Return the string or list of strings to render the component to the CMD.

validator deactivate_physics  »  deactivate[source]#

Convert OFF to OFFS so list is rendered.

validator negatinp_only_with_zieger  »  all fields[source]#

Log a warning if NEGATINP is used with a non-ZIEGER SSWELL.