wavespectra 4.2.0__tar.gz → 4.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. {wavespectra-4.2.0/wavespectra.egg-info → wavespectra-4.3.0}/PKG-INFO +1 -1
  2. {wavespectra-4.2.0 → wavespectra-4.3.0}/tests/test_cli.py +1 -0
  3. {wavespectra-4.2.0 → wavespectra-4.3.0}/tests/test_specarray.py +1 -0
  4. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/__init__.py +2 -1
  5. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/cli.py +1 -0
  6. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/construct/__init__.py +1 -0
  7. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/construct/frequency.py +2 -3
  8. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/attributes.py +1 -0
  9. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/npstats.py +1 -0
  10. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/swan.py +1 -0
  11. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/utils.py +1 -0
  12. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/xrstats.py +1 -0
  13. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/__init__.py +1 -0
  14. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/dataset.py +1 -0
  15. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/era5.py +1 -0
  16. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/funwave.py +1 -0
  17. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/json.py +1 -0
  18. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/ncswan.py +1 -0
  19. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/ndbc.py +22 -5
  20. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/ndbc_ascii.py +29 -13
  21. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/netcdf.py +1 -0
  22. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/octopus.py +1 -0
  23. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/swan.py +1 -0
  24. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/wavespectra.py +1 -0
  25. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/ww3.py +1 -0
  26. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/ww3_station.py +1 -0
  27. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/wwm.py +1 -0
  28. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/xwaves.py +1 -0
  29. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/funwave.py +1 -0
  30. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/json.py +1 -0
  31. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/netcdf.py +1 -0
  32. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/octopus.py +1 -0
  33. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/orcaflex.py +1 -0
  34. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/swan.py +6 -2
  35. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/ww3.py +1 -0
  36. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/partition/partition.py +1 -0
  37. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/specarray.py +1 -0
  38. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/specdataset.py +1 -0
  39. {wavespectra-4.2.0 → wavespectra-4.3.0/wavespectra.egg-info}/PKG-INFO +1 -1
  40. {wavespectra-4.2.0 → wavespectra-4.3.0}/AUTHORS.rst +0 -0
  41. {wavespectra-4.2.0 → wavespectra-4.3.0}/LICENSE.txt +0 -0
  42. {wavespectra-4.2.0 → wavespectra-4.3.0}/README.rst +0 -0
  43. {wavespectra-4.2.0 → wavespectra-4.3.0}/pyproject.toml +0 -0
  44. {wavespectra-4.2.0 → wavespectra-4.3.0}/setup.cfg +0 -0
  45. {wavespectra-4.2.0 → wavespectra-4.3.0}/setup.py +0 -0
  46. {wavespectra-4.2.0 → wavespectra-4.3.0}/tests/test_cookiecutter_template.py +0 -0
  47. {wavespectra-4.2.0 → wavespectra-4.3.0}/tests/test_partition.py +0 -0
  48. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/construct/direction.py +0 -0
  49. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/__init__.py +0 -0
  50. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/attributes.yml +0 -0
  51. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/fitting.py +0 -0
  52. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/core/select.py +0 -0
  53. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/awac.py +0 -0
  54. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/datawell.py +0 -0
  55. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/obscape.py +0 -0
  56. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/spotter.py +0 -0
  57. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/input/triaxys.py +0 -0
  58. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/__init__.py +0 -0
  59. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/output/ww3.yml +0 -0
  60. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/partition/__init__.py +0 -0
  61. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/partition/hanson_and_phillips_2001.py +0 -0
  62. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/partition/specpart/specpart.c +0 -0
  63. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/partition/specpart/specpart.h +0 -0
  64. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/partition/specpart/specpart_wrap.c +0 -0
  65. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/partition/tracking.py +0 -0
  66. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra/plot.py +0 -0
  67. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra.egg-info/SOURCES.txt +0 -0
  68. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra.egg-info/dependency_links.txt +0 -0
  69. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra.egg-info/entry_points.txt +0 -0
  70. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra.egg-info/requires.txt +0 -0
  71. {wavespectra-4.2.0 → wavespectra-4.3.0}/wavespectra.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wavespectra
3
- Version: 4.2.0
3
+ Version: 4.3.0
4
4
  Summary: Library for ocean wave spectra
5
5
  Author-email: Wavespectra Developers <r.guedes@oceanum.science>
6
6
  Maintainer-email: Rafael Guedes <r.guedes@oceanum.science>, Tom Durrant <t.durrant@oceanum.science>
@@ -1,4 +1,5 @@
1
1
  """Test model wrapper."""
2
+
2
3
  from pathlib import Path
3
4
  import pytest
4
5
  import xarray as xr
@@ -1,4 +1,5 @@
1
1
  """Testing the SpecArray accessor."""
2
+
2
3
  import os
3
4
  import numpy as np
4
5
  import xarray as xr
@@ -4,6 +4,7 @@
4
4
  - Making reading functions available at module level
5
5
 
6
6
  """
7
+
7
8
  import warnings
8
9
 
9
10
  try:
@@ -13,7 +14,7 @@ except ImportError:
13
14
  warnings.warn("Cannot import accessors at the main module level")
14
15
 
15
16
 
16
- __version__ = "4.2.0"
17
+ __version__ = "4.3.0"
17
18
 
18
19
 
19
20
  def _import_functions(pkgname="input", prefix="read"):
@@ -1,4 +1,5 @@
1
1
  """Console script for wavespectra."""
2
+
2
3
  from pathlib import Path
3
4
  import click
4
5
  import yaml
@@ -23,6 +23,7 @@ References:
23
23
  geophysical research 69: 5181-5190.
24
24
 
25
25
  """
26
+
26
27
  import xarray as xr
27
28
  import wavespectra
28
29
  from wavespectra.core.attributes import attrs, set_spec_attributes
@@ -1,4 +1,5 @@
1
1
  """Frequency spectral shapes."""
2
+
2
3
  import numpy as np
3
4
  import xarray as xr
4
5
  from scipy.constants import g, pi
@@ -32,9 +33,7 @@ def pierson_moskowitz(freq, fp, alpha=0.0081, hs=None, **kwargs):
32
33
  if not isinstance(freq, xr.DataArray):
33
34
  freq = to_coords(freq, "freq")
34
35
 
35
- dsout = (
36
- alpha * g**2 / (2 * pi) ** 4 / freq**5 * np.exp(-1.25 * (freq / fp) ** -4)
37
- )
36
+ dsout = alpha * g**2 / (2 * pi) ** 4 / freq**5 * np.exp(-1.25 * (freq / fp) ** -4)
38
37
 
39
38
  if hs is not None:
40
39
  dsout = scaled(dsout, hs)
@@ -2,6 +2,7 @@
2
2
 
3
3
  attrs (dict): standarised names for spectral variables, standard_names and units
4
4
  """
5
+
5
6
  import os
6
7
  import yaml
7
8
  import xarray as xr
@@ -1,4 +1,5 @@
1
1
  """Wave spectra stats on numpy arrays sourced by apply_ufuncs."""
2
+
2
3
  import numpy as np
3
4
  from scipy.constants import g, pi
4
5
 
@@ -1,4 +1,5 @@
1
1
  """Read and write swan spectra files"""
2
+
2
3
  from pathlib import Path
3
4
  import re
4
5
  import gzip
@@ -1,4 +1,5 @@
1
1
  """Utility functions."""
2
+
2
3
  import copy
3
4
  import itertools
4
5
  import numpy as np
@@ -1,4 +1,5 @@
1
1
  """Peak based wave stats ufuncs."""
2
+
2
3
  import xarray as xr
3
4
 
4
5
  from wavespectra.core.attributes import attrs
@@ -9,6 +9,7 @@ All functions defined with these conventions will be dynamically
9
9
  imported at the module level
10
10
 
11
11
  """
12
+
12
13
  import xarray as xr
13
14
 
14
15
  from wavespectra.core.attributes import attrs
@@ -1,4 +1,5 @@
1
1
  """Construct the SpecArray accessor from existing dataset from known format."""
2
+
2
3
  import logging
3
4
 
4
5
  from wavespectra.input.ww3 import from_ww3
@@ -1,4 +1,5 @@
1
1
  """Read ERA5 2D Wave Spectra NetCDF files"""
2
+
2
3
  import numpy as np
3
4
  from xarray.backends import BackendEntrypoint
4
5
 
@@ -1,4 +1,5 @@
1
1
  """Read Funwave 2D Wave Maker files"""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
  import numpy as np
4
5
  import xarray as xr
@@ -1,4 +1,5 @@
1
1
  """Read ERA5 2D Wave Spectra NetCDF files"""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
  import json
4
5
  import datetime
@@ -1,4 +1,5 @@
1
1
  """Read Native SWAN netCDF spectra files."""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
  import numpy as np
4
5
 
@@ -3,6 +3,7 @@
3
3
  https://dods.ndbc.noaa.gov/
4
4
 
5
5
  """
6
+
6
7
  import logging
7
8
  from xarray.backends import BackendEntrypoint
8
9
  import xarray as xr
@@ -26,7 +27,7 @@ MAPPING = {
26
27
  }
27
28
 
28
29
 
29
- def read_ndbc(url, directional=True, dd=10.0, chunks={}):
30
+ def read_ndbc(url, directional=True, dd=10.0, chunks={}, weight_coeff: bool = False):
30
31
  """Read Spectra from NDBC netCDF format.
31
32
 
32
33
  Args:
@@ -35,6 +36,8 @@ def read_ndbc(url, directional=True, dd=10.0, chunks={}):
35
36
  - dd (float): Directional resolution for 2D spectra (deg).
36
37
  - chunks (dict): Chunk sizes for dimensions in dataset. By default
37
38
  dataset is loaded using single chunk for all dimensions.
39
+ - weight_coef (bool): Weight the coefficient to avoid negative value
40
+ in spectrum.
38
41
 
39
42
  Returns:
40
43
  - dset (SpecDataset): spectra dataset object read from NDBC file.
@@ -48,22 +51,35 @@ def read_ndbc(url, directional=True, dd=10.0, chunks={}):
48
51
 
49
52
  """
50
53
  dset = xr.open_dataset(url).chunk(chunks)
51
- return from_ndbc(dset, directional=directional, dd=dd)
54
+ return from_ndbc(dset, directional=directional, dd=dd, weight_coeff=weight_coeff)
52
55
 
53
56
 
54
- def _construct_spectra(ef, swd1, swd2, swr1, swr2, dir):
57
+ def _construct_spectra(ef, swd1, swd2, swr1, swr2, dir, weight_coeff: bool = False):
55
58
  """Construct 2D spectra."""
56
- d = 0.5 + swr1 * np.cos(D2R * (dir - swd1)) + swr2 * np.cos(2 * D2R * (dir - swd2))
59
+ if weight_coeff:
60
+ d = (
61
+ 0.5
62
+ + 2 / 3 * swr1 * np.cos(D2R * (dir - swd1))
63
+ + 1 / 6 * swr2 * np.cos(2 * D2R * (dir - swd2))
64
+ )
65
+ else:
66
+ d = (
67
+ 0.5
68
+ + swr1 * np.cos(D2R * (dir - swd1))
69
+ + swr2 * np.cos(2 * D2R * (dir - swd2))
70
+ )
57
71
  return ef * d * D2R / np.pi
58
72
 
59
73
 
60
- def from_ndbc(dset, directional=True, dd=10.0):
74
+ def from_ndbc(dset, directional=True, dd=10.0, weight_coeff: bool = False):
61
75
  """Format NDBC netcdf dataset to implement the wavespectra accessor.
62
76
 
63
77
  Args:
64
78
  - dset (xr.Dataset): Dataset created from a NDBC netcdf file.
65
79
  - directional (bool): Constructs 2D spectra if True, returns 1D if False.
66
80
  - dd (float): Directional resolution for 2D spectra (deg).
81
+ - weight_coef (bool): Weight the coefficient to avoid negative value
82
+ in spectrum.
67
83
 
68
84
  Returns:
69
85
  - Formated dataset with the SpecDataset accessor in the `spec` namespace.
@@ -103,6 +119,7 @@ def from_ndbc(dset, directional=True, dd=10.0):
103
119
  swr1=dset.wave_spectrum_r1,
104
120
  swr2=dset.wave_spectrum_r2,
105
121
  dir=xr.DataArray(dirs, dims=(attrs.DIRNAME,), coords={attrs.DIRNAME: dirs}),
122
+ weight_coeff=weight_coeff,
106
123
  )
107
124
  else:
108
125
  dset = dset.spectral_wave_density
@@ -57,22 +57,35 @@ def read_file(filename):
57
57
  return df
58
58
 
59
59
 
60
- def construct_spectra(spden, swdir1, swdir2, swr1, swr2, dirs):
60
+ def construct_spectra(
61
+ spden, swdir1, swdir2, swr1, swr2, dirs, weight_coeff: bool = False
62
+ ):
61
63
  dirmat = dirs.reshape((1, 1, -1))
62
- D_fd = (
63
- IPI
64
- * (
65
- 0.5
66
- + swr1 * np.cos(D2R * (dirmat - swdir1))
67
- + swr2 * np.cos(2 * D2R * (dirmat - swdir2))
64
+ if weight_coeff:
65
+ D_fd = (
66
+ IPI
67
+ * (
68
+ 0.5
69
+ + 2 / 3 * swr1 * np.cos(D2R * (dirmat - swdir1))
70
+ + 1 / 6 * swr2 * np.cos(2 * D2R * (dirmat - swdir2))
71
+ )
72
+ * D2R
73
+ )
74
+ else:
75
+ D_fd = (
76
+ IPI
77
+ * (
78
+ 0.5
79
+ + swr1 * np.cos(D2R * (dirmat - swdir1))
80
+ + swr2 * np.cos(2 * D2R * (dirmat - swdir2))
81
+ )
82
+ * D2R
68
83
  )
69
- * D2R
70
- )
71
84
  S = spden * D_fd
72
85
  return S
73
86
 
74
87
 
75
- def read_ndbc_ascii(filename, dirs=np.arange(0, 360, 10)):
88
+ def read_ndbc_ascii(filename, dirs=np.arange(0, 360, 10), weight_coeff: bool = False):
76
89
  """Read spectra from NDBC wave buoy ASCII files.
77
90
 
78
91
  Both the history and realtime formats are supported. Realtime formats are decribed
@@ -87,6 +100,8 @@ def read_ndbc_ascii(filename, dirs=np.arange(0, 360, 10)):
87
100
  automatically detected.
88
101
  - dirs (array): vector of directional bins for spectral reconstruction.
89
102
  - attrs (dict): additional global attributes.
103
+ - weight_coef (bool): Weight the coefficient to avoid negative value
104
+ in spectrum.
90
105
 
91
106
  Returns:
92
107
  - dset (SpecDataset): spectra dataset object read from NDBC buoy file(s).
@@ -133,6 +148,7 @@ def read_ndbc_ascii(filename, dirs=np.arange(0, 360, 10)):
133
148
  df_swr1.values.reshape(spshape),
134
149
  df_swr2.values.reshape(spshape),
135
150
  dirs,
151
+ weight_coeff=weight_coeff,
136
152
  )
137
153
  coords = OrderedDict(
138
154
  ((attrs.TIMENAME, times), (attrs.FREQNAME, freqs), (attrs.DIRNAME, dirs))
@@ -148,9 +164,9 @@ def read_ndbc_ascii(filename, dirs=np.arange(0, 360, 10)):
148
164
  dims=(attrs.TIMENAME),
149
165
  name=attrs.SPECNAME,
150
166
  )
151
- dset[
152
- "Sep_Freq"
153
- ] = sfreq # Add the NDBC defined separation frequency for realtime diagnostics
167
+ dset["Sep_Freq"] = (
168
+ sfreq # Add the NDBC defined separation frequency for realtime diagnostics
169
+ )
154
170
  dset = dset.sortby(
155
171
  "time", ascending=True
156
172
  ) # Realtime data is in reversed time order
@@ -1,4 +1,5 @@
1
1
  """Read generic netCDF spectra files."""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
 
4
5
  from wavespectra.specdataset import SpecDataset
@@ -1,4 +1,5 @@
1
1
  """Read Octopus spectra files."""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
  import gzip
4
5
  import datetime
@@ -7,6 +7,7 @@ Functions:
7
7
  read_swanow: Read SWAN nowcast from fileglob, keep overlapping dates
8
8
  from most recent files.
9
9
  """
10
+
10
11
  from xarray.backends import BackendEntrypoint
11
12
  from pathlib import Path
12
13
  import os
@@ -1,4 +1,5 @@
1
1
  """Read netCDF or ZARR formatted with wavespectra conventions."""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
 
4
5
  from wavespectra.specdataset import SpecDataset
@@ -1,4 +1,5 @@
1
1
  """Read Native WW3 spectra files."""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
 
4
5
  from wavespectra.specdataset import SpecDataset
@@ -1,4 +1,5 @@
1
1
  """Read directional spectra from WW3 station output file."""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
  from collections import OrderedDict
4
5
  import re
@@ -1,4 +1,5 @@
1
1
  """Read Native WWM netCDF spectra files."""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
  import numpy as np
4
5
 
@@ -1,4 +1,5 @@
1
1
  """Read XWaves MAT files"""
2
+
2
3
  from xarray.backends import BackendEntrypoint
3
4
  import datetime
4
5
  import xarray as xr
@@ -1,4 +1,5 @@
1
1
  """FUNWAVE output plugin."""
2
+
2
3
  import os
3
4
  from zipfile import ZipFile, ZIP_DEFLATED
4
5
  from io import StringIO
@@ -1,4 +1,5 @@
1
1
  """Json output plugin."""
2
+
2
3
  import json
3
4
 
4
5
 
@@ -1,4 +1,5 @@
1
1
  """Generic netCDF output plugin."""
2
+
2
3
  from wavespectra.core.attributes import attrs
3
4
 
4
5
 
@@ -1,4 +1,5 @@
1
1
  """OCTOPUS output plugin."""
2
+
2
3
  import gzip
3
4
  import numpy as np
4
5
  import xarray as xr
@@ -1,4 +1,5 @@
1
1
  """Orcaflex output plugin - using orcaflex API."""
2
+
2
3
  import numpy as np
3
4
 
4
5
 
@@ -1,4 +1,5 @@
1
1
  """SWAN ASCII output plugin."""
2
+
2
3
  import numpy as np
3
4
  from wavespectra.core.attributes import attrs
4
5
  from wavespectra.core.swan import SwanSpecFile
@@ -41,7 +42,8 @@ def to_swan(
41
42
  """
42
43
  # If grid reshape into site, otherwise ensure there is site dim to iterate over
43
44
  dset = self._check_and_stack_dims()
44
- ntime = min(ntime or dset.time.size, dset.time.size)
45
+ time_size = dset.time.size if "time" in dset.dims else 1
46
+ ntime = min(ntime or time_size, time_size)
45
47
 
46
48
  # Handle datasets with missing lon/lat
47
49
  for arr, name in zip((lons, lats), (attrs.LONNAME, attrs.LATNAME)):
@@ -55,7 +57,9 @@ def to_swan(
55
57
  # Ensure time dimension exists
56
58
  is_time = attrs.TIMENAME in dset[attrs.SPECNAME].dims
57
59
  if not is_time:
58
- dset = dset.expand_dims({attrs.TIMENAME: [None]})
60
+ dset[attrs.SPECNAME] = dset[attrs.SPECNAME].expand_dims(
61
+ {attrs.TIMENAME: [None]}
62
+ )
59
63
  times = dset[attrs.TIMENAME].values
60
64
  else:
61
65
  times = dset[attrs.TIMENAME].to_index().to_pydatetime()
@@ -1,4 +1,5 @@
1
1
  """Native WAVEWATCH3 output plugin."""
2
+
2
3
  import os
3
4
  import yaml
4
5
  import numpy as np
@@ -1,4 +1,5 @@
1
1
  """Partitioning interface."""
2
+
2
3
  from itertools import combinations
3
4
  import numpy as np
4
5
  import xarray as xr
@@ -23,6 +23,7 @@ Reference:
23
23
  - Phillips (1957). On the generation of waves by turbulent wind, Journal of Fluid Mechanics, 2, pp 426-434.
24
24
 
25
25
  """
26
+
26
27
  import re
27
28
  import numpy as np
28
29
  import xarray as xr
@@ -1,4 +1,5 @@
1
1
  """Wrapper around the xarray dataset."""
2
+
2
3
  import types
3
4
  import os
4
5
  import re
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wavespectra
3
- Version: 4.2.0
3
+ Version: 4.3.0
4
4
  Summary: Library for ocean wave spectra
5
5
  Author-email: Wavespectra Developers <r.guedes@oceanum.science>
6
6
  Maintainer-email: Rafael Guedes <r.guedes@oceanum.science>, Tom Durrant <t.durrant@oceanum.science>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes