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: 3 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@
// File "/src/data/resample.py", line 736, IndexError: index -1 is out of bounds for axis 0 with size 0
// "args": ["-v", "1", "--mission", "2006.338.11", "--noinput", "--no_cleanup" ],
// File "/src/data/create_products.py", line 997, in _plot_var AttributeError: 'NoneType' object has no attribute 'get_index'
"args": ["-v", "1", "--mission", "2010.257.00", "--noinput", "--no_cleanup" ],
//"args": ["-v", "1", "--mission", "2010.257.00", "--noinput", "--no_cleanup" ],
// File "/src/data/create_products.py", line 806, ValueError: max() iterable argument is empty
"args": ["-v", "1", "--mission", "2013.079.00", "--noinput", "--no_cleanup" ],

},
{
Expand Down
4 changes: 2 additions & 2 deletions src/data/create_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def _grid_dims(self) -> tuple:
"Cannot compute mean longitude for UTM zone calculation, "
"longitude data may be empty or contain NaNs",
)
return None, None, None
return np.array([]), np.array([]), xr.DataArray()
MAX_LONGITUDE_VALUES = 400
n_subsample = 200 if len(self.ds.cf["longitude"].to_numpy()) > MAX_LONGITUDE_VALUES else 1
lon_sub_intrp = np.interp(
Expand Down Expand Up @@ -1125,7 +1125,7 @@ def plot_2column(self) -> str: # noqa: C901, PLR0912, PLR0915
self._open_ds()

idist, iz, distnav = self._grid_dims()
if idist is None or iz is None or distnav is None:
if idist.size == 0 or iz.size == 0 or distnav.size == 0:
self.logger.warning("Skipping plot_2column due to missing gridding dimensions")
return None

Expand Down