Skip to content

Commit 5170e79

Browse files
committed
Remove legacy boundary module from physics
1 parent ccb83ca commit 5170e79

File tree

4 files changed

+1
-299
lines changed

4 files changed

+1
-299
lines changed

src/rompy_xbeach/components/physics/physics.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from pydantic import Field, model_validator
77

8-
from rompy_xbeach.components.physics.wbc import WaveBoundaryConditions
98
from rompy_xbeach.components.physics.constants import Coriolis, PhysicalConstants
109
from rompy_xbeach.components.physics.wci import (
1110
WaveCurrentInteraction,
@@ -174,12 +173,6 @@ class Physics(XBeachBaseModel):
174173
default=None,
175174
description="Wave numerical parameters (scheme, maxiter, maxerror, wavint)",
176175
)
177-
wave_boundary: Optional[WaveBoundaryConditions] = Field(
178-
default=None,
179-
description=(
180-
"Wave boundary condition parameters (nmax, wbcevarreduce, bclwonly, etc.)"
181-
),
182-
)
183176
nonhydrostatic_numerics: Optional[NonHydrostaticNumerics] = Field(
184177
default=None,
185178
description=(
@@ -246,6 +239,7 @@ def log_default_enabled_processes(self) -> "Physics":
246239
"avalanching",
247240
"flow",
248241
"lwave",
242+
# "sedtrans",
249243
"single_dir",
250244
"swave",
251245
"viscosity",

src/rompy_xbeach/components/physics/wbc.py

Lines changed: 0 additions & 254 deletions
This file was deleted.

tests/test_config.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@ physics:
9595
cats: 4.0
9696
hwci: 0.1
9797
hwcimax: 100.0
98-
wave_boundary:
99-
nmax: 0.8
100-
wbcevarreduce: 1.0
101-
bclwonly: False
102-
swkhmin: -0.01
103-
wbcRemoveStokes: 1
104-
wbcScaleEnergy: 1
105-
cyclicdiradjust: 0
10698
wave_numerics:
10799
scheme: warmbeam
108100
maxiter: 500

tests/test_physics_extended.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import pytest
44
from rompy_xbeach.components.physics import Physics
5-
from rompy_xbeach.components.physics.wbc import WaveBoundaryConditions
65
from rompy_xbeach.components.physics.constants import Coriolis, PhysicalConstants
76
from rompy_xbeach.components.physics.friction import HorizontalViscosity
87
from rompy_xbeach.components.physics.wci import WaveCurrentInteraction
@@ -79,27 +78,6 @@ def test_wave_numerics():
7978
assert params["wavint"] == 300.0
8079

8180

82-
def test_wave_boundary_conditions():
83-
"""Test WaveBoundaryConditions model."""
84-
wave_bc = WaveBoundaryConditions(
85-
nmax=0.7,
86-
wbcevarreduce=0.8,
87-
bclwonly=True,
88-
swkhmin=0.01,
89-
wbcRemoveStokes=False,
90-
wbcScaleEnergy=True,
91-
cyclicdiradjust=False,
92-
)
93-
params = wave_bc.params
94-
assert params["nmax"] == 0.7
95-
assert params["wbcevarreduce"] == 0.8
96-
assert params["bclwonly"] == 1
97-
assert params["swkhmin"] == 0.01
98-
assert params["wbcRemoveStokes"] == 0
99-
assert params["wbcScaleEnergy"] == 1
100-
assert params["cyclicdiradjust"] == 0
101-
102-
10381
def test_nonhydrostatic_numerics():
10482
"""Test NonHydrostaticNumerics model."""
10583
nh_num = NonHydrostaticNumerics(
@@ -180,10 +158,6 @@ def test_physics_with_all_new_components():
180158
maxiter=500,
181159
maxerror=0.0005,
182160
),
183-
wave_boundary=WaveBoundaryConditions(
184-
nmax=0.8,
185-
wbcScaleEnergy=True,
186-
),
187161
constants=PhysicalConstants(
188162
g=9.81,
189163
rho=1025.0,
@@ -218,10 +192,6 @@ def test_physics_with_all_new_components():
218192
assert params["maxiter"] == 500
219193
assert params["maxerror"] == 0.0005
220194

221-
# Check wave boundary
222-
assert params["nmax"] == 0.8
223-
assert params["wbcScaleEnergy"] == 1
224-
225195
# Check constants
226196
assert params["g"] == 9.81
227197
assert params["rho"] == 1025.0

0 commit comments

Comments
 (0)