Physics¶
The physics commands: wave generation, whitecapping, quadruplets, triads, breaking, friction, obstacles, vegetation, mud, sea ice and others.
SWAN Physics Components
This module contains components for configuring the physical processes in SWAN, including wind generation, whitecapping, quadruplet interactions, and wave breaking.
SOURCE_TERMS
module-attribute
¶
TRANSMISSION_TYPE
module-attribute
¶
TRANSMISSION_TYPE = Annotated[
Union[TRANSM, TRANS1D, TRANS2D, GODA, DANGREMOND],
Field(
description="Wave transmission",
discriminator="model_type",
),
]
REFLECTION_TYPE
module-attribute
¶
REFLECTION_TYPE = Annotated[
Union[RSPEC, RDIFF],
Field(
description="Wave reflection type",
discriminator="model_type",
),
]
OBSTACLES_TYPE
module-attribute
¶
OBSTACLES_TYPE = Annotated[
Union[OBSTACLE, OBSTACLE_FIG],
Field(discriminator="model_type"),
]
GEN1
pydantic-model
¶
GEN1(**data: Any)
Bases: BaseComponent
First generation source terms GEN1.
With this command the user indicates that SWAN should run in first-generation mode (see Scientific/Technical documentation).
Examples¶
from rompy_swan.components.physics import GEN1
gen = GEN1()
print(gen.render())
kwargs = dict(
cf10=188.0,
cf20=0.59,
cf30=0.12,
cf40=250.0,
edmlpm=0.0036,
cdrag=0.0012,
umin=1.0,
cfpm=0.13
)
gen = GEN1(**kwargs)
print(gen.render())
Fields:
-
model_type(Literal['gen1', 'GEN1']) -
cf10(Optional[float]) -
cf20(Optional[float]) -
cf30(Optional[float]) -
cf40(Optional[float]) -
edmlpm(Optional[float]) -
cdrag(Optional[float]) -
umin(Optional[float]) -
cfpm(Optional[float])
cf10
pydantic-field
¶
Controls the linear wave growth (SWAN default: 188.0)
cf20
pydantic-field
¶
Controls the exponential wave growth (SWAN default: 0.59)
cf30
pydantic-field
¶
Controls the exponential wave growth (SWAN default: 0.12)
cf40
pydantic-field
¶
Controls the dissipation rate, i.e., the time decay scale (SWAN default: 250.0)
edmlpm
pydantic-field
¶
Maximum non-dimensionless energy density of the wind sea part of the spectrum according to Pierson Moskowitz (SWAN default: 0.0036)
umin
pydantic-field
¶
Minimum wind velocity (relative to current; all wind speeds are taken at 10 m above sea level) (SWAN default: 1)
cfpm
pydantic-field
¶
Coefficient which determines the Pierson Moskowitz frequency: delta_PM = 2pi g / U_10 (SWAN default: 0.13)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
GEN2
pydantic-model
¶
GEN2(**data: Any)
Bases: GEN1
Second generation source terms GEN2.
With this command the user indicates that SWAN should run in second-generation mode (see Scientific/Technical documentation).
Examples¶
from rompy_swan.components.physics import GEN2
gen = GEN2()
print(gen.render())
kwargs = dict(
cf10=188.0,
cf20=0.59,
cf30=0.12,
cf40=250.0,
cf50=0.0023,
cf60=-0.223,
edmlpm=0.0036,
cdrag=0.0012,
umin=1.0,
cfpm=0.13
)
gen = GEN2(**kwargs)
print(gen.render())
GEN2
GEN2 cf10=188.0 cf20=0.59 cf30=0.12 cf40=250.0 cf50=0.0023 cf60=-0.223 edmlpm=0.0036 cdrag=0.0012 umin=1.0 cfpm=0.13
Fields:
-
cf10(Optional[float]) -
cf20(Optional[float]) -
cf30(Optional[float]) -
cf40(Optional[float]) -
edmlpm(Optional[float]) -
cdrag(Optional[float]) -
umin(Optional[float]) -
cfpm(Optional[float]) -
model_type(Literal['gen2', 'GEN2']) -
cf50(Optional[float]) -
cf60(Optional[float])
cf50
pydantic-field
¶
Controls the spectral energy scale of the limit spectrum (SWAN default: 0.0023)
cf60
pydantic-field
¶
Ccontrols the spectral energy scale of the limit spectrum (SWAN default: -0.223
cf10
pydantic-field
¶
Controls the linear wave growth (SWAN default: 188.0)
cf20
pydantic-field
¶
Controls the exponential wave growth (SWAN default: 0.59)
cf30
pydantic-field
¶
Controls the exponential wave growth (SWAN default: 0.12)
cf40
pydantic-field
¶
Controls the dissipation rate, i.e., the time decay scale (SWAN default: 250.0)
edmlpm
pydantic-field
¶
Maximum non-dimensionless energy density of the wind sea part of the spectrum according to Pierson Moskowitz (SWAN default: 0.0036)
umin
pydantic-field
¶
Minimum wind velocity (relative to current; all wind speeds are taken at 10 m above sea level) (SWAN default: 1)
cfpm
pydantic-field
¶
Coefficient which determines the Pierson Moskowitz frequency: delta_PM = 2pi g / U_10 (SWAN default: 0.13)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
GEN3
pydantic-model
¶
GEN3(**data: Any)
Bases: BaseComponent
Third generation source terms GEN3.
With this command the user indicates that SWAN should run in third-generation mode for wind input, quadruplet interactions and whitecapping.
Examples¶
from rompy_swan.components.physics import GEN3
gen = GEN3(
source_terms=dict(
model_type="westhuysen",
wind_drag="wu",
agrow=True,
),
)
print(gen.render())
from rompy_swan.subcomponents.physics import ST6C1
gen = GEN3(source_terms=ST6C1())
print(gen.render())
GEN3 WESTHUYSEN DRAG WU AGROW
GEN3 ST6 a1sds=4.7e-07 a2sds=6.6e-06 p1sds=4.0 p2sds=4.0 UP HWANG VECTAU U10PROXY windscaling=28.0 AGROW
Fields:
-
model_type(Literal['gen3', 'GEN3']) -
source_terms(SOURCE_TERMS)
source_terms
pydantic-field
¶
source_terms: SOURCE_TERMS
SWAN source terms to be used (SWAN default: WESTHUYSEN)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
NEGATINP
pydantic-model
¶
NEGATINP(**data: Any)
Bases: BaseComponent
Negative wind input.
With this optional command the user activates negative wind input. This is
intended only for use with non-breaking swell dissipation SSWELL ZIEGER.
Parameter rdcoef is a fraction between 0 and 1, representing the strength of
negative wind input. As an example, with [rdcoef]=0.04, for a spectral bin that is
opposed to the wind direction, the wind input factor W(k, θ) is negative, and its
magnitude is 4% of the corresponding value of the spectral bin that is in the
opposite direction (i.e. in the wind direction). See Zieger et al. (2015) eq. 11,
where a0 is their notation for [rdcoef]. Default [rdcoef]=0.0 and rdcoef=0.04 is
recommended, though as implied by Zieger et al. (2015), this value is not
well-established, so the user is encouraged to experiment with other values.
References¶
Zieger, S., Babanin, A.V., Rogers, W.E. and Young, I.R., 2015. Observation-based source terms in the third-generation wave model WAVEWATCH. Ocean Modelling, 96, pp.2-25.
Examples¶
from rompy_swan.components.physics import NEGATINP
negatinp = NEGATINP()
print(negatinp.render())
negatinp = NEGATINP(rdcoef=0.04)
print(negatinp.render())
Fields:
-
model_type(Literal['negatinp', 'NEGATINP']) -
rdcoef(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['negatinp', 'NEGATINP'] = 'negatinp'
Model type discriminator
rdcoef
pydantic-field
¶
Coefficient representing the strength of negative wind input
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SSWELL_ROGERS
pydantic-model
¶
SSWELL_ROGERS(**data: Any)
Bases: BaseComponent
Nonbreaking dissipation of Rogers et al. (2012).
References¶
Rogers, W.E., Babanin, A.V. and Wang, D.W., 2012. Observation-consistent input and whitecapping dissipation in a model for wind-generated surface waves: Description and simple calculations. Journal of Atmospheric and Oceanic Technology, 29(9), pp.1329-1346.
Examples¶
from rompy_swan.components.physics import SSWELL_ROGERS
sswell = SSWELL_ROGERS()
print(sswell.render())
sswell = SSWELL_ROGERS(cdsv=1.2, feswell=0.5)
print(sswell.render())
Fields:
model_type
pydantic-field
¶
model_type: Literal['rogers', 'ROGERS'] = 'rogers'
Model type discriminator
cdsv
pydantic-field
¶
Coefficient related to laminar atmospheric boundary layer (SWAN default: 1.2)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SSWELL_ARDHUIN
pydantic-model
¶
SSWELL_ARDHUIN(**data: Any)
Bases: BaseComponent
Nonbreaking dissipation of Ardhuin et al. (2010).
References¶
Ardhuin, F., Rogers, E., Babanin, A.V., Filipot, J.F., Magne, R., Roland, A., Van Der Westhuysen, A., Queffeulou, P., Lefevre, J.M., Aouf, L. and Collard, F., 2010. Semiempirical dissipation source functions for ocean waves. Part I: Definition, calibration, and validation. Journal of Physical Oceanography, 40(9), pp.1917-1941.
Examples¶
from rompy_swan.components.physics import SSWELL_ARDHUIN
sswell = SSWELL_ARDHUIN()
print(sswell.render())
sswell = SSWELL_ARDHUIN(cdsv=1.2)
print(sswell.render())
Fields:
-
model_type(Literal['ardhuin', 'ARDHUIN']) -
cdsv(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['ardhuin', 'ARDHUIN'] = 'ardhuin'
Model type discriminator
cdsv
pydantic-field
¶
Coefficient related to laminar atmospheric boundary layer (SWAN default: 1.2)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SSWELL_ZIEGER
pydantic-model
¶
SSWELL_ZIEGER(**data: Any)
Bases: BaseComponent
Nonbreaking dissipation of Zieger et al. (2015).
Swell dissipation of Young et al. (2013) updated by Zieger et al. (2015). The Zieger option is intended for use with negative wind input via the NEGATINP command. Zieger non-breaking dissipation follows the method used in WAVEWATCH III version 4 and does not include the steepness-dependent swell coefficient introduced in WAVEWATCH III version 5.
References¶
Zieger, S., Babanin, A.V., Rogers, W.E. and Young, I.R., 2015. Observation-based source terms in the third-generation wave model WAVEWATCH. Ocean Modelling, 96, pp.2-25.
Young, I.R., Babanin, A.V. and Zieger, S., 2013. The decay rate of ocean swell observed by altimeter. Journal of physical oceanography, 43(11), pp.2322-2333.
Examples¶
from rompy_swan.components.physics import SSWELL_ZIEGER
sswell = SSWELL_ZIEGER()
print(sswell.render())
sswell = SSWELL_ZIEGER(b1=0.00025)
print(sswell.render())
Fields:
-
model_type(Literal['zieger', 'ZIEGER']) -
b1(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['zieger', 'ZIEGER'] = 'zieger'
Model type discriminator
b1
pydantic-field
¶
Non-dimensional proportionality coefficient (SWAN default: 0.00025)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
WCAPPING_KOMEN
pydantic-model
¶
WCAPPING_KOMEN(**data: Any)
Bases: BaseComponent
Whitecapping according to Komen (1984).
Notes¶
The SWAN default for delta has been changed since version 40.91A. The setting
delta = 1 will improve the prediction of the wave energy at low frequencies, and
hence the mean wave period. The original default was delta = 0, which corresponds
to WAM Cycle 3. See the Scientific/Technical documentation for further details.
References¶
Komen, G.J., Hasselmann, S. and Hasselmann, K., 1984. On the existence of a fully developed wind-sea spectrum. Journal of physical oceanography, 14(8), pp.1271-1285.
Examples¶
from rompy_swan.components.physics import WCAPPING_KOMEN
wcapping = WCAPPING_KOMEN()
print(wcapping.render())
wcapping = WCAPPING_KOMEN(cds2=2.36e-5, stpm=3.02e-3, powst=2, delta=1, powk=2)
print(wcapping.render())
Fields:
-
model_type(Literal['komen', 'KOMEN']) -
cds2(Optional[float]) -
stpm(Optional[float]) -
powst(Optional[float]) -
delta(Optional[float]) -
powk(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['komen', 'KOMEN'] = 'komen'
Model type discriminator
cds2
pydantic-field
¶
Coefficient for determining the rate of whitecapping dissipation ($Cds$) (SWAN default: 2.36e-5)
stpm
pydantic-field
¶
Value of the wave steepness for a Pierson-Moskowitz spectrum ($s^2_{PM}$) (SWAN default: 3.02e-3)
powst
pydantic-field
¶
Power of steepness normalized with the wave steepness of a Pierson-Moskowitz spectrum (SWAN default: 2)
delta
pydantic-field
¶
Coefficient which determines the dependency of the whitecapping on wave number (SWAN default: 1)
powk
pydantic-field
¶
power of wave number normalized with the mean wave number (SWAN default: 1)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
WCAPPING_AB
pydantic-model
¶
WCAPPING_AB(**data: Any)
Bases: BaseComponent
Whitecapping according to Alves and Banner (2003).
References¶
Alves, J.H.G. and Banner, M.L., 2003. Performance of a saturation-based dissipation-rate source term in modeling the fetch-limited evolution of wind waves. Journal of Physical Oceanography, 33(6), pp.1274-1298.
Examples¶
from rompy_swan.components.physics import WCAPPING_AB
wcapping = WCAPPING_AB()
print(wcapping.render())
wcapping = WCAPPING_AB(cds2=5.0e-5, br=1.75e-3, current=True, cds3=0.8)
print(wcapping.render())
Fields:
-
model_type(Literal['ab', 'AB']) -
cds2(Optional[float]) -
br(Optional[float]) -
current(bool) -
cds3(Optional[float])
cds2
pydantic-field
¶
proportionality coefficient due to Alves and Banner (2003) (SWAN default: 5.0e-5)
current
pydantic-field
¶
current: bool = False
Indicates that enhanced current-induced dissipation as proposed by Van der Westhuysen (2012) is to be added
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
QUADRUPL
pydantic-model
¶
QUADRUPL(**data: Any)
Bases: BaseComponent
Nonlinear quadruplet wave interactions.
With this option the user can influence the computation of nonlinear quadruplet
wave interactions which are usually included in the computations. Can be
de-activated with command OFF QUAD. Note that the DIA approximation of the
quadruplet interactions is a poor approximation for long-crested waves and
frequency resolutions that are deviating much more than 10% (see command CGRID).
Note that DIA is usually updated per sweep, either semi-implicit (iquad = 1) or
explicit (iquad = 2). However, when ambient current is included, the bounds of
the directional sector within a sweep may be different for each frequency bin
(particularly the higher frequencies are modified by the current). So there may be
some overlap of frequency bins between the sweeps, implying non-conservation of
wave energy. To prevent this the user is advised to choose the integration of DIA
per iteration instead of per sweep, i.e. iquad = 3. If you want to speed up your
computation a bit more, than the choice iquad = 8 is a good choice.
Examples¶
from rompy_swan.components.physics import QUADRUPL
quadrupl = QUADRUPL()
print(quadrupl.render())
kwargs = dict(
iquad=3, lambd=0.25, cnl4=3.0e7, csh1=5.5, csh2=0.833333, csh3=-1.25
)
quadrupl = QUADRUPL(**kwargs)
print(quadrupl.render())
Fields:
-
model_type(Literal['quadrupl', 'QUADRUPL']) -
iquad(Optional[Literal[1, 2, 3, 8, 4, 51, 52, 53]]) -
lambd(Optional[float]) -
cnl4(Optional[float]) -
csh1(Optional[float]) -
csh2(Optional[float]) -
csh3(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['quadrupl', 'QUADRUPL'] = 'quadrupl'
Model type discriminator
iquad
pydantic-field
¶
Numerical procedures for integrating the quadruplets: 1 = semi-implicit per sweep, 2 = explicit per sweep, 3 = explicit per iteration, 8 = explicit per iteration, but with a more efficient implementation, 4 = multiple DIA, 51 = XNL (deep water transfer), 52 = XNL (deep water transfer with WAM depth scaling), 53 XNL (finite depth transfer) (SWAN default: 2)
lambd
pydantic-field
¶
Coefficient for quadruplet configuration in case of DIA (SWAN default: 0.25)
cnl4
pydantic-field
¶
Proportionality coefficient for quadruplet interactions in case of DIA (SWAN default: 3.0e7
csh1
pydantic-field
¶
Coefficient for shallow water scaling in case of DIA (SWAN default: 5.5)
csh2
pydantic-field
¶
Coefficient for shallow water scaling in case of DIA (SWAN default: 0.833333)
csh3
pydantic-field
¶
Coefficient for shallow water scaling in case of DIA (SWAN default: -1.25)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
BREAKING_CONSTANT
pydantic-model
¶
BREAKING_CONSTANT(**data: Any)
Bases: BaseComponent
Constant wave breaking index.
Indicates that a constant breaker index is to be used.
Examples¶
from rompy_swan.components.physics import BREAKING_CONSTANT
breaking = BREAKING_CONSTANT()
print(breaking.render())
breaking = BREAKING_CONSTANT(alpha=1.0, gamma=0.73)
print(breaking.render())
Fields:
model_type
pydantic-field
¶
model_type: Literal['constant', 'CONSTANT'] = 'constant'
Model type discriminator
alpha
pydantic-field
¶
Proportionality coefficient of the rate of dissipation (SWAN default: 1.0)
gamma
pydantic-field
¶
The breaker index, i.e. the ratio of maximum individual wave height over depth (SWAN default: 0.73)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
BREAKING_BKD
pydantic-model
¶
BREAKING_BKD(**data: Any)
Bases: BaseComponent
Variable wave breaking index.
Indicates that the breaker index scales with both the bottom slope (beta)
and the dimensionless depth (kd).
Examples¶
from rompy_swan.components.physics import BREAKING_BKD
breaking = BREAKING_BKD()
print(breaking.render())
breaking = BREAKING_BKD(alpha=1.0, gamma0=0.54, a1=7.59, a2=-8.06, a3=8.09)
print(breaking.render())
Fields:
-
model_type(Literal['bkd', 'BKD']) -
alpha(Optional[float]) -
gamma0(Optional[float]) -
a1(Optional[float]) -
a2(Optional[float]) -
a3(Optional[float])
alpha
pydantic-field
¶
Proportionality coefficient of the rate of dissipation (SWAN default: 1.0)
gamma0
pydantic-field
¶
The reference $gamma$ for horizontal slopes (SWAN default: 0.54)
a1
pydantic-field
¶
First tunable coefficient for the breaker index (SWAN default: 7.59)
a2
pydantic-field
¶
Second tunable coefficient for the breaker index (SWAN default: -8.06)
a3
pydantic-field
¶
Third tunable coefficient for the breaker index (SWAN default: 8.09)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
FRICTION_JONSWAP
pydantic-model
¶
FRICTION_JONSWAP(**data: Any)
Bases: BaseComponent
Hasselmann et al. (1973) Jonswap friction.
Indicates that the semi-empirical expression derived from the JONSWAP results for bottom friction dissipation (Hasselmann et al., 1973, JONSWAP) should be activated. This option is default.
References¶
Hasselmann, K., Barnett, T.P., Bouws, E., Carlson, H., Cartwright, D.E., Enke, K., Ewing, J.A., Gienapp, A., Hasselmann, D.E., Kruseman, P. and Meerburg, A., 1973. Measurements of wind-wave growth and swell decay during the Joint North Sea Wave Project (JONSWAP). Deutches Hydrographisches Institut, Hamburg, Germany, Rep. No. 12, 95 pp.
Examples¶
from rompy_swan.components.physics import FRICTION_JONSWAP
friction = FRICTION_JONSWAP()
print(friction.render())
friction = FRICTION_JONSWAP(cfjon=0.038)
print(friction.render())
TODO: Implement VARIABLE option?
Fields:
-
model_type(Literal['jonswap', 'JONSWAP']) -
cfjon(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['jonswap', 'JONSWAP'] = 'jonswap'
Model type discriminator
cfjon
pydantic-field
¶
Coefficient of the JONSWAP formulation (SWAN default: 0.038)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
FRICTION_COLLINS
pydantic-model
¶
FRICTION_COLLINS(**data: Any)
Bases: BaseComponent
Collins (1972) friction.
Note that cfw is allowed to vary over the computational region; in that case use
the commands INPGRID FRICTION and READINP FRICTION to define and read the friction
data. This command FRICTION is still required to define the type of friction
expression. The value of cfw in this command is then not required (it will be
ignored).
References¶
Collins, J.I., 1972. Prediction of shallow-water spectra. Journal of Geophysical Research, 77(15), pp.2693-2707.
Examples¶
from rompy_swan.components.physics import FRICTION_COLLINS
friction = FRICTION_COLLINS()
print(friction.render())
friction = FRICTION_COLLINS(cfw=0.038)
print(friction.render())
Fields:
-
model_type(Literal['collins', 'COLLINS']) -
cfw(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['collins', 'COLLINS'] = 'collins'
Model type discriminator
cfw
pydantic-field
¶
Collins bottom friction coefficient (SWAN default: 0.015)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
FRICTION_MADSEN
pydantic-model
¶
FRICTION_MADSEN(**data: Any)
Bases: BaseComponent
Madsen et al (1988) friction.
Note that kn is allowed to vary over the computational region; in that case use
the commands INPGRID FRICTION and READINP FRICTION to define and read the friction
data. This command FRICTION is still required to define the type of friction
expression. The value of kn in this command is then not required (it will be
ignored).
References¶
Madsen, O.S., Poon, Y.K. and Graber, H.C., 1988. Spectral wave attenuation by bottom friction: Theory. In Coastal engineering 1988 (pp. 492-504).
Madsen, O.S. and Rosengaus, M.M., 1988. Spectral wave attenuation by bottom friction: Experiments. In Coastal Engineering 1988 (pp. 849-857).
Examples¶
from rompy_swan.components.physics import FRICTION_MADSEN
friction = FRICTION_MADSEN()
print(friction.render())
friction = FRICTION_MADSEN(kn=0.038)
print(friction.render())
Fields:
-
model_type(Literal['madsen', 'MADSEN']) -
kn(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['madsen', 'MADSEN'] = 'madsen'
Model type discriminator
kn
pydantic-field
¶
equivalent roughness length scale of the bottom (in m) (SWAN default: 0.05)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
FRICTION_RIPPLES
pydantic-model
¶
FRICTION_RIPPLES(**data: Any)
Bases: BaseComponent
Smith et al. (2011) Ripples friction.
Indicates that the expression of Smith et al. (2011) should be activated. Here friction depends on the formation of bottom ripples and sediment size.
References¶
Smith, G.A., Babanin, A.V., Riedel, P., Young, I.R., Oliver, S. and Hubbert, G., 2011. Introduction of a new friction routine into the SWAN model that evaluates roughness due to bedform and sediment size changes. Coastal Engineering, 58(4), pp.317-326.
Examples¶
from rompy_swan.components.physics import FRICTION_RIPPLES
friction = FRICTION_RIPPLES()
print(friction.render())
friction = FRICTION_RIPPLES(s=2.65, d=0.0001)
print(friction.render())
Fields:
model_type
pydantic-field
¶
model_type: Literal['ripples', 'RIPPLES'] = 'ripples'
Model type discriminator
s
pydantic-field
¶
The specific gravity of the sediment (SWAN default: 2.65)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
TRIAD
pydantic-model
¶
TRIAD(**data: Any)
Bases: BaseComponent
Wave triad interactions.
With this command the user can activate the triad wave-wave interactions. If this command is not used, SWAN will not account for triads.
Note
This is the TRIAD specification in SWAN < 41.45.
Examples:
from rompy_swan.components.physics import TRIAD
triad = TRIAD()
print(triad.render())
triad = TRIAD(
itriad=1,
trfac=0.8,
cutfr=2.5,
a=0.95,
b=-0.75,
ucrit=0.2,
urslim=0.01,
)
print(triad.render())
Fields:
-
model_type(Literal['triad', 'TRIAD']) -
itriad(Optional[Literal[1, 2]]) -
trfac(Optional[float]) -
cutfr(Optional[float]) -
a(Optional[float]) -
b(Optional[float]) -
ucrit(Optional[float]) -
urslim(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['triad', 'TRIAD'] = 'triad'
Model type discriminator
itriad
pydantic-field
¶
Approximation method for the triad computation:
- 1: the LTA method of Eldeberky (1996)
- 2: the SPB method of Becq-Girard et al. (1999) (SWAN default: 1)
trfac
pydantic-field
¶
Proportionality coefficient (SWAN default: 0.8 in case of LTA method, 0.9 in case of SPB method)
cutfr
pydantic-field
¶
Controls the maximum frequency that is considered in the LTA computation. The value of cutfr is the ratio of this maximum frequency over the mean frequency (SWAN default: 2.5)
a
pydantic-field
¶
First calibration parameter for tuning K in Eq. (5.1) of Becq-Girard et al. (1999). This parameter is associated with broadening of the resonance condition (SWAN default: 0.95)
b
pydantic-field
¶
Second calibration parameter for tuning K in Eq. (5.1) of Becq-Girard et al. (1999). This parameter is associated with broadening of the resonance condition (SWAN default: -0.75 for 1D, 0.0 for 2D
ucrit
pydantic-field
¶
The critical Ursell number appearing in the expression for the biphase (SWAN default: 0.2)
urslim
pydantic-field
¶
The lower threshold for Ursell number, if the actual Ursell number is below this value triad interactions are be computed (SWAN default: 0.01)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
TRIAD_DCTA
pydantic-model
¶
TRIAD_DCTA(**data: Any)
Bases: BaseComponent
Triad interactions with the DCTA method of Booij et al. (2009).
References
Booij, N., Holthuijsen, L.H. and Bénit, M.P., 2009. A distributed collinear triad approximation in SWAN. In Proceedings Of Coastal Dynamics 2009: Impacts of Human Activities on Dynamic Coastal Processes (With CD-ROM) (pp. 1-10).
Note
This is the default method to compute the triad interactions in SWAN >= 41.45, it is not supported in earlier versions of the model.
Examples:
from rompy_swan.components.physics import TRIAD_DCTA
triad = TRIAD_DCTA()
print(triad.render())
triad = TRIAD_DCTA(
trfac=4.4,
p=1.3,
noncolinear=True,
biphase={"model_type": "dewit", "lpar": 0.0},
)
print(triad.render())
Fields:
-
model_type(Literal['dcta', 'DCTA']) -
trfac(Optional[float]) -
p(Optional[float]) -
noncolinear(bool) -
biphase(Optional[Union[ELDEBERKY, DEWIT]])
trfac
pydantic-field
¶
Scaling factor that controls the intensity of the triad interaction due to DCTA (SWAN default: 4.4)
p
pydantic-field
¶
Shape coefficient to force the high-frequency tail(SWAN default: 4/3)
noncolinear
pydantic-field
¶
noncolinear: bool = False
If True, the noncolinear triad interactions with the DCTA framework are accounted for
biphase
pydantic-field
¶
Defines the parameterization of biphase (self-self interaction) (SWAN default: ELDEBERKY)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
TRIAD_LTA
pydantic-model
¶
TRIAD_LTA(**data: Any)
Bases: BaseComponent
Triad interactions with the LTA method of Eldeberky (1996).
References
Eldeberky, Y., Polnikov, V. and Battjes, J.A., 1996. A statistical approach for modeling triad interactions in dispersive waves. In Coastal Engineering 1996 (pp. 1088-1101).
Note
This method to compute the triad interactions is only supported in SWAN >= 41.45.
Examples:
from rompy_swan.components.physics import TRIAD_LTA
triad = TRIAD_LTA()
print(triad.render())
triad = TRIAD_LTA(
trfac=0.8,
cutfr=2.5,
biphase={"model_type": "eldeberky", "urcrit": 0.63},
)
print(triad.render())
Fields:
-
model_type(Literal['lta', 'LTA']) -
trfac(Optional[float]) -
cutfr(Optional[float]) -
biphase(Optional[Union[ELDEBERKY, DEWIT]])
trfac
pydantic-field
¶
Scaling factor that controls the intensity of the triad interaction due to LTA (SWAN default: 0.8)
cutfr
pydantic-field
¶
Controls the maximum frequency that is considered in the LTA computation. The value of cutfr is the ratio of this maximum frequency over the mean frequency (SWAN default: 2.5)
biphase
pydantic-field
¶
Defines the parameterization of biphase (self-self interaction) (SWAN default: ELDEBERKY)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
TRIAD_SPB
pydantic-model
¶
TRIAD_SPB(**data: Any)
Bases: BaseComponent
Triad interactions with the SPB method of Becq-Girard et al. (1999).
References
Becq-Girard, F., Forget, P. and Benoit, M., 1999. Non-linear propagation of unidirectional wave fields over varying topography. Coastal Engineering, 38(2), pp.91-113.
Note
This method to compute the triad interactions is only supported in SWAN >= 41.45.
Examples:
from rompy_swan.components.physics import TRIAD_SPB
triad = TRIAD_SPB()
print(triad.render())
triad = TRIAD_SPB(
trfac=0.9,
a=0.95,
b=0.0,
biphase={"model_type": "eldeberky", "urcrit": 0.63},
)
print(triad.render())
Fields:
-
model_type(Literal['spb', 'SPB']) -
trfac(Optional[float]) -
a(Optional[float]) -
b(Optional[float]) -
biphase(Optional[Union[ELDEBERKY, DEWIT]])
trfac
pydantic-field
¶
Scaling factor that controls the intensity of the triad interaction due to SPB (SWAN default: 0.9)
a
pydantic-field
¶
First calibration parameter for tuning K in Eq. (5.1) of Becq-Girard et al. (1999). This parameter is associated with broadening of the resonance condition. The default value is 0.95 and is calibrated by means of laboratory experiments (SWAN default: 0.95)
b
pydantic-field
¶
Second calibration parameter for tuning K in Eq. (5.1) of Becq-Girard et al. (1999). This parameter is associated with broadening of the resonance condition. The default value is -0.75 and is calibrated by means of laboratory experiments. However, it may not be appropriate for true 2D field cases as it does not scale with the wave field characteristics. Hence, this parameter is set to zero (SWAN default: 0.0)
biphase
pydantic-field
¶
Defines the parameterization of biphase (self-self interaction) (SWAN default: ELDEBERKY)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
VEGETATION
pydantic-model
¶
VEGETATION(**data: Any)
Bases: BaseComponent
Vegetation dumping.
With this command the user can activate wave damping due to vegetation based on the Dalrymple's formula (1984) as implemented by Suzuki et al. (2011). This damping is uniform over the wave frequencies. An alternative is the frequency-dependent (canopy) dissipation model of Jacobsen et al. (2019). If this command is not used, SWAN will not account for vegetation effects.
The vegetation (rigid plants) can be divided over a number of vertical segments and so, the possibility to vary the vegetation vertically is included. Each vertical layer represents some characteristics of the plants. These variables as indicated below can be repeated as many vertical layers to be chosen.
References¶
Dalrymple, R.A., Kirby, J.T. and Hwang, P.A., 1984. Wave diffraction due to areas of energy dissipation. Journal of waterway, port, coastal, and ocean engineering, 110(1), pp.67-79.
Jacobsen, N.G., Bakker, W., Uijttewaal, W.S. and Uittenbogaard, R., 2019. Experimental investigation of the wave-induced motion of and force distribution along a flexible stem. Journal of Fluid Mechanics, 880, pp.1036-1069.
Suzuki, T., Zijlema, M., Burger, B., Meijer, M.C. and Narayan, S., 2012. Wave dissipation by vegetation with layer schematization in SWAN. Coastal Engineering, 59(1), pp.64-71.
Notes¶
Vertical layering of the vegetation is not yet implemented for the Jacobsen et al. (2019) method.
Examples¶
from rompy_swan.components.physics import VEGETATION
# Single layer
vegetation = VEGETATION(
height=1.2,
diamtr=0.1,
drag=0.5,
nstems=10,
)
print(vegetation.render())
# 2 vertical layers
vegetation = VEGETATION(
iveg=1,
height=[1.2, 0.8],
diamtr=[0.1, 0.1],
drag=[0.5, 0.5],
nstems=[10, 5],
)
print(vegetation.render())
VEGETATION iveg=1 height=1.2 diamtr=0.1 nstems=10 drag=0.5
VEGETATION iveg=1 height=1.2 diamtr=0.1 nstems=10 drag=0.5 height=0.8 diamtr=0.1 nstems=5 drag=0.5
Fields:
-
model_type(Literal['vegetation', 'VEGETATION']) -
iveg(Literal[1, 2]) -
height(Union[float, list[float]]) -
diamtr(Union[float, list[float]]) -
drag(Union[float, list[float]]) -
nstems(Union[int, list[int]])
Validators:
model_type
pydantic-field
¶
model_type: Literal["vegetation", "VEGETATION"] = (
"vegetation"
)
Model type discriminator
iveg
pydantic-field
¶
iveg: Literal[1, 2] = 1
Indicates the method for the vegetation computation (SWAN default: 1):
- 1: Suzuki et al. (2011)
- 2: Jacobsen et al. (2019)
diamtr
pydantic-field
¶
The diameter of each plant stand per layer (in m)
nstems
pydantic-field
¶
The number of plant stands per square meter for each layer. Note that nstems is allowed to vary over the computational region to account for the zonation of vegetation. In that case use the commands IMPGRID NPLANTS and READINP NPLANTS to define and read the vegetation density. The (vertically varying) value of nstems in this command will be multiplied by this horizontally varying plant density (SWAN default: 1)
jacomsen_layering_not_implemented
pydantic-validator
¶
jacomsen_layering_not_implemented() -> VEGETATION
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
MUD
pydantic-model
¶
MUD(**data: Any)
Bases: BaseComponent
Mud dumping.
With this command the user can activate wave damping due to mud based on Ng (2000). If this command or the commands INPGRID MUDLAY and READINP MUDLAY are not used, SWAN will not account for muddy bottom effects.
References¶
Ng, C., 2000, Water waves over a muddy bed: A two layer Stokes' boundary layer model, Coastal Eng., 40, 221-242.
Examples¶
from rompy_swan.components.physics import MUD
mud = MUD()
print(mud.render())
mud = MUD(
layer=2.0,
rhom=1300,
viscm=0.0076,
)
print(mud.render())
TODO: Validate layer must be prescribed if INPGRID MUDLAY isn't used.
Fields:
-
model_type(Literal['mud', 'MUD']) -
layer(Optional[float]) -
rhom(Optional[float]) -
viscm(Optional[float])
layer
pydantic-field
¶
The thickness of the mud layer (in m). Note that layer is allowed to vary over the computational region to account for the zonation of muddy bottom. In that case use the commands INPGRID MUDLAY and READINP MUDLAY to define and read the layer thickness of mud. The value of layer in this command is then not required (it will be ignored)
rhom
pydantic-field
¶
The density of the mud layer (in kg/m3) (SWAN default: 1300)
viscm
pydantic-field
¶
The kinematic viscosity of the mud layer (in m2/s) (SWAN default: 0.0076)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SICE
pydantic-model
¶
SICE(**data: Any)
Bases: BaseComponent
Sea ice dissipation.
Using this command, the user activates a sink term to represent the dissipation of wave energy by sea ice. The default method is R19 empirical/parametric: a polynomial based on wave frequency (Rogers, 2019). This polynomial (in 1/m) has seven dimensional coefficients; see Scientific/Technical documentation for details. If this command is not used, SWAN will not account for sea ice effects.
References¶
Doble, M.J., De Carolis, G., Meylan, M.H., Bidlot, J.R. and Wadhams, P., 2015. Relating wave attenuation to pancake ice thickness, using field measurements and model results. Geophysical Research Letters, 42(11), pp.4473-4481.
Meylan, M.H., Bennetts, L.G. and Kohout, A.L., 2014. In situ measurements and analysis of ocean waves in the Antarctic marginal ice zone. Geophysical Research Letters, 41(14), pp.5046-5051.
Rogers, W.E., Meylan, M.H. and Kohout, A.L., 2018. Frequency distribution of dissipation of energy of ocean waves by sea ice using data from Wave Array 3 of the ONR “Sea State” field experiment. Nav. Res. Lab. Memo. Rep, pp.18-9801.
Rogers, W.E., Meylan, M.H. and Kohout, A.L., 2021. Estimates of spectral wave attenuation in Antarctic sea ice, using model/data inversion. Cold Regions Science and Technology, 182, p.103198.
Notes¶
Iis also necessary to describe the ice, using the ICE command (for uniform and
stationary ice) or INPGRID/READINP commands (for variable ice).
Examples¶
from rompy_swan.components.physics import SICE
sice = SICE()
print(sice.render())
sice = SICE(aice=0.5)
print(sice.render())
TODO: Verify if the aice parameter should be used with SICE command, it is not
shown in the command tree but it is described as an option in the description.
Fields:
-
model_type(Literal['sice', 'SICE']) -
aice(Optional[float])
aice
pydantic-field
¶
Ice concentration as a fraction from 0 to 1. Note that aice is allowed to vary over the computational region to account for the zonation of ice concentration. In that case use the commands INPGRID AICE and READINP AICE to define and read the sea concentration. The value of aice in this command is then not required (it will be ignored)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SICE_R19
pydantic-model
¶
SICE_R19(**data: Any)
Bases: SICE
Sea ice dissipation based on the method of Rogers et al (2019).
The default options recover the polynomial of Meylan et al. (2014), calibrated for a case of ice floes, mostly 10 to 25 m in diameter, in the marginal ice zone near Antarctica. Examples for other calibrations can be found in the Scientific/Technical documentation.
References¶
Meylan, M.H., Bennetts, L.G. and Kohout, A.L., 2014. In situ measurements and analysis of ocean waves in the Antarctic marginal ice zone. Geophysical Research Letters, 41(14), pp.5046-5051.
Rogers, W.E., Meylan, M.H. and Kohout, A.L., 2018. Frequency distribution of dissipation of energy of ocean waves by sea ice using data from Wave Array 3 of the ONR “Sea State” field experiment. Nav. Res. Lab. Memo. Rep, pp.18-9801.
Examples¶
from rompy_swan.components.physics import SICE_R19
sice = SICE_R19()
print(sice.render())
kwargs = dict(
aice=0.5,
c0=0.0,
c1=0.0,
c2=1.06e-3,
c3=0.0,
c4=0.0,
c5=0.0,
c6=0.0,
)
sice = SICE_R19(**kwargs)
print(sice.render())
Fields:
-
aice(Optional[float]) -
model_type(Literal['r19', 'R19']) -
c0(Optional[float]) -
c1(Optional[float]) -
c2(Optional[float]) -
c3(Optional[float]) -
c4(Optional[float]) -
c5(Optional[float]) -
c6(Optional[float])
c0
pydantic-field
¶
Polynomial coefficient (in 1/m) for determining the rate of sea ice dissipation (SWAN default: 0.0)
c1
pydantic-field
¶
Polynomial coefficient (in s/m) for determining the rate of sea ice dissipation (SWAN default: 0.0)
c2
pydantic-field
¶
Polynomial coefficient (in s2/m) for determining the rate of sea ice dissipation (SWAN default: 1.06E-3)
c3
pydantic-field
¶
Polynomial coefficient (in s3/m) for determining the rate of sea ice dissipation (SWAN default: 0.0)
c4
pydantic-field
¶
Polynomial coefficient (in s4/m) for determining the rate of sea ice dissipation (SWAN default: 2.3E-2)
c5
pydantic-field
¶
Polynomial coefficient (in s5/m) for determining the rate of sea ice dissipation (SWAN default: 0.0)
c6
pydantic-field
¶
Polynomial coefficient (in s6/m) for determining the rate of sea ice dissipation (SWAN default: 0.0)
aice
pydantic-field
¶
Ice concentration as a fraction from 0 to 1. Note that aice is allowed to vary over the computational region to account for the zonation of ice concentration. In that case use the commands INPGRID AICE and READINP AICE to define and read the sea concentration. The value of aice in this command is then not required (it will be ignored)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SICE_D15
pydantic-model
¶
SICE_D15(**data: Any)
Bases: SICE
Sea ice dissipation based on the method of Doble et al. (2015).
References¶
Doble, M.J., De Carolis, G., Meylan, M.H., Bidlot, J.R. and Wadhams, P., 2015. Relating wave attenuation to pancake ice thickness, using field measurements and model results. Geophysical Research Letters, 42(11), pp.4473-4481.
Examples¶
from rompy_swan.components.physics import SICE_D15
sice = SICE_D15()
print(sice.render())
sice = SICE_D15(aice=0.2, chf=0.1)
print(sice.render())
Fields:
chf
pydantic-field
¶
A simple coefficient of proportionality (SWAN default: 0.1)
aice
pydantic-field
¶
Ice concentration as a fraction from 0 to 1. Note that aice is allowed to vary over the computational region to account for the zonation of ice concentration. In that case use the commands INPGRID AICE and READINP AICE to define and read the sea concentration. The value of aice in this command is then not required (it will be ignored)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SICE_M18
pydantic-model
¶
SICE_M18(**data: Any)
Bases: SICE
Sea ice dissipation based on the method of Meylan et al. (2018).
References¶
Meylan, M.H., Bennetts, L.G. and Kohout, A.L., 2014. In situ measurements and analysis of ocean waves in the Antarctic marginal ice zone. Geophysical Research Letters, 41(14), pp.5046-5051.
Examples¶
from rompy_swan.components.physics import SICE_M18
sice = SICE_M18()
print(sice.render())
sice = SICE_M18(aice=0.8, chf=0.059)
print(sice.render())
Fields:
chf
pydantic-field
¶
A simple coefficient of proportionality (SWAN default: 0.059)
aice
pydantic-field
¶
Ice concentration as a fraction from 0 to 1. Note that aice is allowed to vary over the computational region to account for the zonation of ice concentration. In that case use the commands INPGRID AICE and READINP AICE to define and read the sea concentration. The value of aice in this command is then not required (it will be ignored)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SICE_R21B
pydantic-model
¶
SICE_R21B(**data: Any)
Bases: SICE
Sea ice dissipation based on the method of Rogers et al. (2021).
References¶
Rogers, W.E., Meylan, M.H. and Kohout, A.L., 2021. Estimates of spectral wave attenuation in Antarctic sea ice, using model/data inversion. Cold Regions Science and Technology, 182, p.103198.
Examples¶
from rompy_swan.components.physics import SICE_R21B
sice = SICE_R21B()
print(sice.render())
sice = SICE_R21B(aice=0.8, chf=2.9, npf=4.5)
print(sice.render())
Fields:
-
aice(Optional[float]) -
model_type(Literal['r21b', 'R21B']) -
chf(Optional[float]) -
npf(Optional[float])
chf
pydantic-field
¶
A simple coefficient of proportionality (SWAN default: 2.9)
npf
pydantic-field
¶
Controls the degree of dependence on frequency and ice thickness (SWAN default: 4.5)
aice
pydantic-field
¶
Ice concentration as a fraction from 0 to 1. Note that aice is allowed to vary over the computational region to account for the zonation of ice concentration. In that case use the commands INPGRID AICE and READINP AICE to define and read the sea concentration. The value of aice in this command is then not required (it will be ignored)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
TURBULENCE
pydantic-model
¶
TURBULENCE(**data: Any)
Bases: BaseComponent
Turbulent viscosity.
With this optional command the user can activate turbulent viscosity. This physical
effect is also activated by reading values of the turbulent viscosity using the
READGRID TURB command, but then with the default value of ctb. The command
READGRID TURB is necessary if this command TURB is used since the value of the
viscosity is assumed to vary over space.
Examples¶
from rompy_swan.components.physics import TURBULENCE
turbulence = TURBULENCE(current=False)
print(turbulence.render())
turbulence = TURBULENCE(ctb=0.01, current=True, tbcur=0.004)
print(turbulence.render())
Fields:
-
model_type(Literal['turbulence', 'TURBULENCE']) -
ctb(Optional[float]) -
current(Optional[bool]) -
tbcur(Optional[float])
Validators:
model_type
pydantic-field
¶
model_type: Literal["turbulence", "TURBULENCE"] = (
"turbulence"
)
Model type discriminator
ctb
pydantic-field
¶
The value of the proportionality coefficient appearing in the energy dissipation term (SWAN default: 0.01)
current
pydantic-field
¶
If this keyword is present the turbulent viscosity will be derived from the product of the depth and the absolute value of the current velocity. If the command READGRID TURB is used, this option is ignored; the values read from file will prevail
tbcur
pydantic-field
¶
The factor by which depth x current velocity is multiplied in order to get the turbulent viscosity (SWAN default: 0.004)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
BRAGG
pydantic-model
¶
BRAGG(**data: Any)
Bases: BaseComponent
Bragg scattering.
Using this optional command, the user activates a source term to represent the scattering of waves due to changes in the small-scale bathymetry based on the theory of Ardhuin and Herbers (2002). If this command is not used, SWAN will not account for Bragg scattering.
The underlying process is related to the bed elevation spectrum that describes the
random variability of the bathymetry at the scale of the wave length on top of a
slowly varying depth. To input this spectrum in the model, two options are
available. One option is to read a spectrum from a file. This single bottom
spectrum will subsequently be applied in all active grid points. The assumption
being made here is that the inputted bottom is gently sloping. Note that the bottom
spectrum must be given as a function of the wave number k.
Another option is to compute the spectrum by a Fourier transform from x to k of
the bed modulations around a computational grid point. First, one must define a
square region with a fixed size around the grid point in order to perform the
Fourier transform. The size should correspond to a multiple of the wave length at
which refraction is resolved (i.e. consistent with the mild slope assumption).
Next, the amplitude modulation of the small-scale bathymetry is obtained by
substracting a slowly varying bed level from the inputted high-resolution
bathymetric data within this square region. Here, the smooth bed level is achieved
using a bilinear fit. During the computation, however, SWAN employs the gently
sloping bed as the mean of the original bathymetry within the given square around
each computational grid point. Finally, the corresponding bottom spectrum is
computed with an FFT.
Notes¶
The Bragg scattering source term to the action balance equation gives rise to a
fairly stiff equation. The best remedy is to run SWAN in the nonstationary mode
with a relatively small time step or in the stationary mode with some under
relaxation (see command NUM STAT [alfa]).
Examples¶
from rompy_swan.components.physics import BRAGG
bragg = BRAGG(nreg=200)
print(bragg.render())
bragg = BRAGG(ibrag=1, nreg=200, cutoff=5.0)
print(bragg.render())
Fields:
-
model_type(Literal['bragg', 'BRAGG']) -
ibrag(Optional[Literal[1, 2, 3]]) -
nreg(int) -
cutoff(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['bragg', 'BRAGG'] = 'bragg'
Model type discriminator
ibrag
pydantic-field
¶
Indicates the computation of Bragg scattering term:
- 1: source term is calculated per sweep and bottom spectrum is interpolated at the difference wave number a priori (thus requiring storage)
- 2: source term is calculated per sweep and bottom spectrum is interpolated at the difference wave number per sweep (no storage)
- 3: source term is calculated per iteration and bottom spectrum is interpolated at the difference wave number per iteration (no storage)
(SWAN default: 1)
nreg
pydantic-field
¶
nreg: int
Size of square region around computational grid point (centered) for computing the mean depth and, if desired, the bed elevation spectrum. It is expressed in terms of the number of grid points (per direction) of the inputted bottom grid
cutoff
pydantic-field
¶
Cutoff to the ratio between surface and bottom wave numbers. Note: seethe Scientific/Technical documentation for details (SWAN default: 5.0)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
BRAGG_FT
pydantic-model
¶
BRAGG_FT(**data: Any)
Bases: BRAGG
Bragg scattering with bottom spectrum computed from FFT.
If this keyword is present the bottom spectrum will be computed in each active grid point using a Fast Fourier Transform (FFT).
Notes¶
The depth in each computational grid point is computed as the average of the inputted (high-resolution) bed levels within the square region.
Examples¶
from rompy_swan.components.physics import BRAGG_FT
bragg = BRAGG_FT(nreg=350)
print(bragg.render())
bragg = BRAGG_FT(ibrag=2, nreg=350, cutoff=5.0)
print(bragg.render())
Fields:
-
ibrag(Optional[Literal[1, 2, 3]]) -
nreg(int) -
cutoff(Optional[float]) -
model_type(Literal['ft', 'FT'])
ibrag
pydantic-field
¶
Indicates the computation of Bragg scattering term:
- 1: source term is calculated per sweep and bottom spectrum is interpolated at the difference wave number a priori (thus requiring storage)
- 2: source term is calculated per sweep and bottom spectrum is interpolated at the difference wave number per sweep (no storage)
- 3: source term is calculated per iteration and bottom spectrum is interpolated at the difference wave number per iteration (no storage)
(SWAN default: 1)
nreg
pydantic-field
¶
nreg: int
Size of square region around computational grid point (centered) for computing the mean depth and, if desired, the bed elevation spectrum. It is expressed in terms of the number of grid points (per direction) of the inputted bottom grid
cutoff
pydantic-field
¶
Cutoff to the ratio between surface and bottom wave numbers. Note: seethe Scientific/Technical documentation for details (SWAN default: 5.0)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
BRAGG_FILE
pydantic-model
¶
BRAGG_FILE(**data: Any)
Bases: BRAGG
Bragg scattering with bottom spectrum from file.
The bed elevation spectrum FB(kx, ky) is read from a file.
Notes¶
This spectrum is taken to be uniform over the entire computational domain.
Examples¶
from rompy_swan.components.physics import BRAGG_FILE
bragg = BRAGG_FILE(fname="bottom_spectrum.txt", nreg=500, mkx=99, dkx=0.1)
print(bragg.render())
kwargs = dict(
ibrag=3,
nreg=500,
cutoff=5.0,
fname="bottom_spectrum.txt",
mkx=99,
mky=149,
dkx=0.1,
dky=0.1,
)
bragg = BRAGG_FILE(**kwargs)
print(bragg.render())
BRAGG nreg=500 FILE fname='bottom_spectrum.txt' mkx=99 dkx=0.1
BRAGG ibrag=3 nreg=500 cutoff=5.0 FILE fname='bottom_spectrum.txt' mkx=99 mky=149 dkx=0.1 dky=0.1
Fields:
-
ibrag(Optional[Literal[1, 2, 3]]) -
nreg(int) -
cutoff(Optional[float]) -
model_type(Literal['file', 'FILE']) -
fname(str) -
idla(Optional[IDLA]) -
mkx(int) -
mky(Optional[int]) -
dkx(float) -
dky(Optional[float])
idla
pydantic-field
¶
Order in which the values should be given in the input files
mkx
pydantic-field
¶
mkx: int
Number of cells in x-direction of the wave number grid related to bottom spectrum (this is one less than the number of points in this direction)
mky
pydantic-field
¶
Number of cells in y-direction of the wave number grid related to bottom spectrum (this is one less than the number of points in this direction)(SWAN default: mky = mkx)
dkx
pydantic-field
¶
dkx: float
Mesh size in x-direction of the wave number grid related to bottom spectrum (1/m)
dky
pydantic-field
¶
Mesh size in y-direction of the wave number grid related to bottom spectrum (1/m) (SWAN default: dky = dkx)
ibrag
pydantic-field
¶
Indicates the computation of Bragg scattering term:
- 1: source term is calculated per sweep and bottom spectrum is interpolated at the difference wave number a priori (thus requiring storage)
- 2: source term is calculated per sweep and bottom spectrum is interpolated at the difference wave number per sweep (no storage)
- 3: source term is calculated per iteration and bottom spectrum is interpolated at the difference wave number per iteration (no storage)
(SWAN default: 1)
nreg
pydantic-field
¶
nreg: int
Size of square region around computational grid point (centered) for computing the mean depth and, if desired, the bed elevation spectrum. It is expressed in terms of the number of grid points (per direction) of the inputted bottom grid
cutoff
pydantic-field
¶
Cutoff to the ratio between surface and bottom wave numbers. Note: seethe Scientific/Technical documentation for details (SWAN default: 5.0)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
LIMITER
pydantic-model
¶
LIMITER(**data: Any)
Bases: BaseComponent
Physics limiter.
With this command the user can de-activate permanently the quadruplets when
the actual Ursell number exceeds ursell. Moreover, as soon as the actual
fraction of breaking waves exceeds qb then the action limiter will not be
used in case of decreasing action density.
Examples¶
from rompy_swan.components.physics import LIMITER
limiter = LIMITER()
print(limiter.render())
limiter = LIMITER(ursell=10.0, qb=1.0)
print(limiter.render())
Fields:
model_type
pydantic-field
¶
model_type: Literal['limiter', 'LIMITER'] = 'limiter'
Model type discriminator
ursell
pydantic-field
¶
The upper threshold for Ursell number (SWAN default: 10.0)
qb
pydantic-field
¶
The threshold for fraction of breaking waves (SWAN default: 1.0)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
OBSTACLE
pydantic-model
¶
OBSTACLE(**data: Any)
Bases: BaseComponent
Subgrid obstacle.
OBSTACLE ->TRANSM|TRANS1D|TRANS2D|GODA|DANGREMOND REFL [reflc] ->RSPEC|RDIFF &
(FREEBOARD [hgt] [gammat] [gammar] QUAY) LINE < [xp] [yp] >
With this optional command the user provides the characteristics of a (line of) sub-grid obstacle(s) through which waves are transmitted or against which waves are reflected (possibly both at the same time). The obstacle is sub-grid in the sense that it is narrow compared to the spatial meshes; its length should be at least one mesh length.
The location of the obstacle is defined by a sequence of corner points of a line. The obstacles interrupt the propagation of the waves from one grid point to the next wherever this obstacle line is located between two neighbouring grid points (of the computational grid; the resolution of the obstacle is therefore equal to the computational grid spacing). This implies that an obstacle to be effective must be located such that it crosses at least one grid line. This is always the case when an obstacle is larger than one mesh length.
Notes¶
- The advise is to define obstacles with the least amount of points possible.
- SWAN checks if the criterion
reflc^2 + trcoef^2 LE 1is fulfilled.
Examples¶
from rompy_swan.components.physics import OBSTACLE
obs = OBSTACLE(
transmission=dict(model_type="transm", trcoef=0.5),
reflection=dict(reflc=0.5),
line=dict(xp=[174.1, 174.2, 174.3], yp=[-39.1, -39.1, -39.1]),
)
print(obs.render())
Fields:
-
model_type(Literal['obstacle', 'OBSTACLE']) -
transmission(Optional[TRANSMISSION_TYPE]) -
reflection(Optional[REFL]) -
reflection_type(Optional[REFLECTION_TYPE]) -
freeboard(Optional[FREEBOARD]) -
line(LINE)
Validators:
model_type
pydantic-field
¶
model_type: Literal['obstacle', 'OBSTACLE'] = 'obstacle'
Model type discriminator
hgt_consistent
pydantic-validator
¶
hgt_consistent() -> OBSTACLE
Warns if hgt has different values in DAM and FREEBOARD specifications.
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
OBSTACLE_FIG
pydantic-model
¶
OBSTACLE_FIG(**data: Any)
Bases: BaseComponent
Obstacle for free infragravity radiation.
With this optional command the user specifies the obstacles along which the free infra-gravity (FIG) energy is radiated. By placing the obstacles close to the shorelines SWAN will include the FIG source term along the coastlines according to the parametrization of Ardhuin et al. (2014).
The location of the obstacle is defined by a sequence of corner points of a line. For an obstacle line to be effective its length is at least one mesh size large. It is recommended to place the obstacles at the inner area of the computational grid, not at or through the boundaries. In particular, each obstacle line must be bordered by wet points on both sides.
In addition, the orientation of the obstacle line determines from which side of the obstacle the FIG wave energy is radiated away. If the begin point of the line is below or left of the end point, that is, pointing upwards/to the right, then FIG energy is radiated from the west/north side of the line. If the begin point is above or right of the end point (pointing downwards/to the left), then FIG energy is radiated away from the east/south side of the obstacle line.
References¶
Ardhuin, F., Rawat, A. and Aucan, J., 2014. A numerical model for free infragravity waves: Definition and validation at regional and global scales. Ocean Modelling, 77, pp.20-32.
Notes¶
Either hss or tss or both are allowed to vary over the computational domain.
In that case use the commands INPGRID HSS and READINP HSS and/or the commands
INPGRID TSS and READINP TSS to define and read the sea-swell wave height/period
It is permissible to have constant sea-swell height and non-constant sea-swell
period, or vice versa. The command OBST FIG is still required to define the
obstacles. The values of hss and/or tss in this command are then not required
(they will be ignored).
Examples¶
from rompy_swan.components.physics import OBSTACLE_FIG
obs = OBSTACLE_FIG(
alpha1=5e-4,
hss=2.5,
tss=10.3,
line=dict(xp=[174.1, 174.2, 174.3], yp=[-39.1, -39.1, -39.1]),
)
print(obs.render())
obs = OBSTACLE_FIG(
alpha1=5e-4,
hss=2.5,
tss=10.3,
reflection=dict(reflc=0.5),
line=dict(xp=[174.1, 174.2, 174.3], yp=[-39.1, -39.1, -39.1]),
)
print(obs.render())
OBSTACLE FIG alpha1=0.0005 hss=2.5 tss=10.3 LINE 174.1 -39.1 174.2 -39.1 174.3 -39.1
OBSTACLE FIG alpha1=0.0005 hss=2.5 tss=10.3 REFL reflc=0.5 LINE 174.1 -39.1 174.2 -39.1 174.3 -39.1
Fields:
-
model_type(Literal['fig', 'FIG']) -
alpha1(float) -
hss(float) -
tss(float) -
reflection(Optional[REFL]) -
line(LINE)
alpha1
pydantic-field
¶
alpha1: float
Calibration parameter (in 1/s) for determining the rate of radiating FIG energy from the shorelines, values in Table 1 of Ardhuin et al. (2014) are between 4e-4 and 8.1e-4
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
OBSTACLES
pydantic-model
¶
OBSTACLES(**data: Any)
Bases: BaseComponent
List of swan obstacles.
This group component is a convenience to allow defining and rendering a list of obstacle components.
Examples¶
from rompy_swan.components.physics import OBSTACLES, OBSTACLE, OBSTACLE_FIG
obst1 = dict(
model_type="obstacle",
reflection=dict(reflc=1.0),
line=dict(xp=[174.1, 174.2, 174.3], yp=[-39.1, -39.1, -39.1]),
)
obst2 = OBSTACLE(
transmission=dict(model_type="transm"),
line=dict(xp=[174.3, 174.3], yp=[-39.1, -39.2]),
)
obst3 = OBSTACLE_FIG(
alpha1=5e-4,
hss=2.5,
tss=10.3,
line=dict(xp=[174.1, 174.2, 174.3], yp=[-39.1, -39.1, -39.1]),
)
obstacles = OBSTACLES(obstacles=[obst1, obst2, obst3])
for obst in obstacles.render():
print(obst)
OBSTACLE REFL reflc=1.0 LINE 174.1 -39.1 174.2 -39.1 174.3 -39.1
OBSTACLE TRANSM LINE 174.3 -39.1 174.3 -39.2
OBSTACLE FIG alpha1=0.0005 hss=2.5 tss=10.3 LINE 174.1 -39.1 174.2 -39.1 174.3 -39.1
Fields:
-
model_type(Literal['obstacles', 'OBSTACLES']) -
obstacles(list[OBSTACLES_TYPE])
SETUP
pydantic-model
¶
SETUP(**data: Any)
Bases: BaseComponent
Wave setup.
If this command is given, the wave-induced set-up is computed and accounted for in
the wave computations (during the computation it is added to the depth that is
obtained from the READ BOTTOM and READ WLEVEL commands). This approximation in
SWAN can only be applied to open coast (unlimited supply of water from outside the
domain, e.g. nearshore coasts) in contrast to closed basin, e.g. lakes and
estuaries, where this option should not be used. Note that set-up is not computed
correctly with spherical coordinates.
Notes¶
- The SETUP command cannot be used in case of unstructured grids.
- Set-up is not supported in case of parallel runs using either MPI or OpenMP.
Examples¶
from rompy_swan.components.physics import SETUP
setup = SETUP()
print(setup.render())
setup = SETUP(supcor=0.5)
print(setup.render())
Fields:
-
model_type(Literal['setup', 'SETUP']) -
supcor(Optional[float])
model_type
pydantic-field
¶
model_type: Literal['setup', 'SETUP'] = 'setup'
Model type discriminator
supcor
pydantic-field
¶
By default the wave-induced set-up is computed with a constant added such that the set-up is zero in the deepest point in the computational grid. The user can modify this constant by the value of supcor. The user can thus impose a set-up in any one point (and only one) in the computational grid by first running SWAN, then reading the set-up in that point and adding or subtracting the required value of supcor (in m; positive if the set-up has to rise) (SWAN default: 0.0)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
DIFFRACTION
pydantic-model
¶
DIFFRACTION(**data: Any)
Bases: BaseComponent
Wave diffraction.
If this optional command is given, the diffraction is included in the wave computation. But the diffraction approximation in SWAN does not properly handle diffraction in harbours or in front of reflecting obstacles (see Scientific/Technical documentation). Behind breakwaters with a down-wave beach, the SWAN results seem reasonable. The spatial resolution near (the tip of) the diffraction obstacle should be 1/5 to 1/10 of the dominant wave length.
Notes¶
Without extra measures, the diffraction computations with SWAN often converge poorly or not at all. Two measures can be taken:
-
(RECOMMENDED) The user can request under-relaxation. See command
NUMERICparameteralphaand Scientific/Technical documentation (Eq. (3.31)). Very limited experience suggestsalpha = 0.01. -
Alternatively, the user can request smoothing of the wave field for the computation of the diffraction parameter (the wave field remains intact for all other computations and output). This is done with a repeated convolution filtering.
Examples¶
from rompy_swan.components.physics import DIFFRACTION
diffraction = DIFFRACTION()
print(diffraction.render())
diffraction = DIFFRACTION(idiffr=True, smpar=0.0, smnum=1.0)
print(diffraction.render())
Fields:
-
model_type(Literal['diffraction', 'DIFFRACTION']) -
idiffr(Optional[bool]) -
smpar(Optional[float]) -
smnum(Optional[int]) -
cgmod(Optional[float])
model_type
pydantic-field
¶
model_type: Literal["diffraction", "DIFFRACTION"] = (
"diffraction"
)
Model type discriminator
idiffr
pydantic-field
¶
Indicates the use of diffraction. If idiffr=0 then no diffraction is taken into account (SWAN default: 1)
smpar
pydantic-field
¶
Smoothing parameter for the calculation of ∇ · √Etot. During every smoothing step all grid points exchange smpar times the energy with their neighbours. Note that smpar is parameter a in the above text (SWAN default: 0.0)
smnum
pydantic-field
¶
Number of smoothing steps relative to smpar (SWAN default: 0)
cgmod
pydantic-field
¶
Adaption of propagation velocities in geographic space due to diffraction. If cgmod=0 then no adaption (SWAN default: 1.0)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SURFBEAT
pydantic-model
¶
SURFBEAT(**data: Any)
Bases: BaseComponent
Surfbeat.
Using this optional command, the user activates the Infragravity Energy Module (IEM) of Reniers and Zijlema (2022). Besides the energy balance equation for a sea-swell wave field, another energy balance is included to account for the transfer of sea-swell energy to the bound infragravity (BIG) wave. This infragravity energy balance also involves a nonlinear transfer, expressed by the biphase, through the phase coupling between the radiation stress forcing and the BIG wave. For the prediction of the biphase for obliquely incident waves, an evolution equation is provided under the assumption that the bottom slopes are mild and alongshore uniform.
References¶
Reniers, A. and Zijlema, M., 2022. Swan surfbeat-1d. Coastal Engineering, 172, p.104068.
Examples:¶
from rompy_swan.components.physics import SURFBEAT
surfbeat = SURFBEAT()
print(surfbeat.render())
surfbeat = SURFBEAT(df=0.01, nmax=50000, emin=0.05, spacing="logarithmic")
print(surfbeat.render())
Fields:
-
model_type(Literal['surfbeat', 'SURFBEAT']) -
df(Optional[float]) -
nmax(Optional[int]) -
emin(Optional[float]) -
spacing(Optional[Literal['uniform', 'logarithmic']])
model_type
pydantic-field
¶
model_type: Literal['surfbeat', 'SURFBEAT'] = 'surfbeat'
Model type discriminator
df
pydantic-field
¶
The constant size of BIG frequency bin (in Hz) (SWAN default: 0.01)
nmax
pydantic-field
¶
The maximum number of short-wave pairs for creating bichromatic wave groups (SWAN default: 50000)
emin
pydantic-field
¶
The energy threshold in fraction of energy spectrum peak. With this threshold one takes into account those short wave components to create bichromatic wave groups while their energy levels are larger than emin x E_max with E_max the peak of the spectrum (SWAN default: 0.05)
spacing
pydantic-field
¶
Define if frequencies for reflected ig waves are uniformly or logarithmically distributed
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
SCAT
pydantic-model
¶
SCAT(**data: Any)
Bases: BaseComponent
Scattering.
Using this optional command, the user activates a source term that allows for the generation and propagation of cross correlations between scattered waves due to variations in the bathymetry and mean currents. Such variations are rapid compared to the distancebetween the crossing waves (at the scale of 100-1000 m) and is particularly relevant for cases involving narrowband waves (swells) in coastal regions with shallow water and ambient currents. In turn, the immediate spatial effects of coherent scattering, interference, refraction and diffraction can cause large-scale changes in the wave parameters.
References¶
Smit, P.B. and Janssen, T.T., 2013. The evolution of inhomogeneous wave statistics through a variable medium. Journal of Physical Oceanography, 43(8), pp.1741-1758.
Smit, P.B., Janssen, T.T. and Herbers, T.H.C., 2015. Stochastic modeling of inhomogeneous ocean waves. Ocean Modelling, 96, pp.26-35.
Smit, P.B., Janssen, T.T. and Herbers, T.H.C., 2015. Stochastic modeling of coherent wave fields over variable depth. Journal of Physical Oceanography, 45(4), pp.1139-1154.
Akrish, G., Smit, P., Zijlema, M. and Reniers, A., 2020. Modelling statistical wave interferences over shear currents. Journal of Fluid Mechanics, 891, p.A2.
Notes¶
Implemented in SWAN 41.41.
If both alpha and qmax options are provided to truncate the infinite
convolution sum their mimimum is considered as the final limit on the sum.
Examples:¶
from rompy_swan.components.physics import SCAT
scat = SCAT()
print(scat.render())
scat = SCAT(iqcm=2, rfac=1.0, alpha=1.0)
print(scat.render())
Fields:
-
model_type(Literal['scat', 'SCAT']) -
iqcm(Optional[Literal[0, 1, 2]]) -
rfac(Optional[float]) -
alpha(Optional[float]) -
qmax(Optional[float])
Validators:
iqcm
pydantic-field
¶
Indicates the modelling and computation of QC scattering:
- 0: no scattering
- 1: scattering due to non-uniform bathymetry and currents (the latter only if applicable; see command
INPGRID CURRENT) - 2: wave-current interaction under the assumption of a slowly varying bathymetry
(SWAN default: 1)
rfac
pydantic-field
¶
The resolution factor through which the incident spectral width ismultiplied (SWAN default: 1.0)
alpha
pydantic-field
¶
The coefficient by which the mean wave number is multiplied to set thelimit on the convolution sum (SWAN default: 1.0)
check_for_typos
classmethod
¶
Suggest the closest field name for an unknown input key.
A field can be given by its name or, like in pydantic, by its alias.
render
¶
OFF
pydantic-model
¶
OFF(**data: Any)
Bases: BaseComponent
Deactivate physics commands.
This command deactivates physics commands. The command can be used to switch off the computation of a certain physics component without having to remove the command from the input file. This is useful for testing purposes.
Examples:¶
Fields:
-
model_type(Literal['off', 'OFF']) -
physics(PhysicsOff)
OFFS
pydantic-model
¶
OFFS(**data: Any)
Bases: BaseComponent
Deactivate multiple physics commands.
OFF WINDGROWTH|QUADRUPL|WCAPPING|BREAKING|REFRAC|FSHIFT|BNDCHK
OFF WINDGROWTH|QUADRUPL|WCAPPING|BREAKING|REFRAC|FSHIFT|BNDCHK
.
This group component is a convenience to allow defining and rendering
a list of OFF components.
Examples¶
from rompy_swan.components.physics import OFFS
off1 = dict(physics="windgrowth")
off2 = dict(physics="wcapping")
offs = OFFS(offs=[off1, off2])
for off in offs.render():
print(off)
Fields:
-
model_type(Literal['offs', 'OFFS']) -
offs(list[OFF])