|
7 | 7 | import xarray as xr |
8 | 8 | from scipy.signal import find_peaks |
9 | 9 |
|
10 | | -from ...waves.series import series_TMA, waves_dispersion |
| 10 | +from ...waves.series import series_TMA, waves_dispersion, series_regular_monochromatic |
11 | 11 | from ...waves.spectra import spectral_analysis |
12 | 12 | from ...waves.statistics import upcrossing |
13 | 13 | from .._base_wrappers import BaseModelWrapper |
@@ -206,7 +206,9 @@ def build_case( |
206 | 206 | "gamma": case_context["gamma"], |
207 | 207 | "deltat": case_context["deltat"], |
208 | 208 | } |
209 | | - waves = series_TMA(waves=waves_dict, depth=self.depth_array[0]) |
| 209 | + #waves = series_TMA(waves=waves_dict, depth=self.depth_array[0]) |
| 210 | + waves = series_regular_monochromatic(waves=waves_dict) |
| 211 | + |
210 | 212 | # Save the waves to a file |
211 | 213 | self.write_array_in_file( |
212 | 214 | array=waves, filename=os.path.join(case_dir, "waves.bnd") |
@@ -736,10 +738,10 @@ def build_case(self, case_context: dict, case_dir: str) -> None: |
736 | 738 | # Build the input vegetation file |
737 | 739 | plants = np.zeros((len(self.depth_array))) |
738 | 740 | plants[ |
739 | | - int(self.fixed_parameters["Plants_ini"]) : int( |
740 | | - self.fixed_parameters["Plants_fin"] |
741 | | - ) |
742 | | - ] = case_context["plants_density"] |
| 741 | + int( |
| 742 | + case_context["Plants_end"] - case_context["Wv"] |
| 743 | + ) : int(case_context["Plants_end"]) |
| 744 | + ] = case_context["Nv"] |
743 | 745 | np.savetxt(os.path.join(case_dir, "plants.txt"), plants, fmt="%.6f") |
744 | 746 |
|
745 | 747 |
|
|
0 commit comments