Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bluemath_tk/waves/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ def series_regular_monochromatic(waves):
# waves properties
T = waves["T"]
H = waves["H"]
WL = waves["WL"]
#WL = waves["WL"]
warmup = waves["warmup"]
deltat = waves["deltat"]
tendc = waves["tendc"]
tendc = waves["comptime"]

# series duration
duration = tendc + int(warmup)
Expand Down
14 changes: 8 additions & 6 deletions bluemath_tk/wrappers/swash/swash_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import xarray as xr
from scipy.signal import find_peaks

from ...waves.series import series_TMA, waves_dispersion
from ...waves.series import series_TMA, waves_dispersion, series_regular_monochromatic
from ...waves.spectra import spectral_analysis
from ...waves.statistics import upcrossing
from .._base_wrappers import BaseModelWrapper
Expand Down Expand Up @@ -206,7 +206,9 @@ def build_case(
"gamma": case_context["gamma"],
"deltat": case_context["deltat"],
}
waves = series_TMA(waves=waves_dict, depth=self.depth_array[0])
#waves = series_TMA(waves=waves_dict, depth=self.depth_array[0])
waves = series_regular_monochromatic(waves=waves_dict)

# Save the waves to a file
self.write_array_in_file(
array=waves, filename=os.path.join(case_dir, "waves.bnd")
Expand Down Expand Up @@ -736,10 +738,10 @@ def build_case(self, case_context: dict, case_dir: str) -> None:
# Build the input vegetation file
plants = np.zeros((len(self.depth_array)))
plants[
int(self.fixed_parameters["Plants_ini"]) : int(
self.fixed_parameters["Plants_fin"]
)
] = case_context["plants_density"]
int(
case_context["Plants_end"] - case_context["Wv"]
) : int(case_context["Plants_end"])
] = case_context["Nv"]
np.savetxt(os.path.join(case_dir, "plants.txt"), plants, fmt="%.6f")


Expand Down