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 @@ -348,7 +348,9 @@
// File "/src/data/calibrate.py", line 698, in global_metadata f"{self.nudge_total_minutes:.1f} minutes nudged toward GPS fixes."
//"args": ["-v", "1", "--mission", "2003.191.00", "--noinput", "--no_cleanup" ],
// 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" ],
// "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" ],

},
{
Expand Down
41 changes: 21 additions & 20 deletions src/data/create_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,26 +992,27 @@ def _plot_var( # noqa: C901, PLR0912, PLR0913, PLR0915
levels=np.linspace(v2_5, v97_5, num_colors),
)

# Blank out the countoured data below the bottom of the profiles
xb = np.append(
profile_bottoms.get_index("dist").to_numpy(),
[
curr_ax.get_xlim()[1],
curr_ax.get_xlim()[1],
curr_ax.get_xlim()[0],
curr_ax.get_xlim()[0],
],
)
yb = np.append(
profile_bottoms.to_numpy(),
[
profile_bottoms.to_numpy()[-1],
curr_ax.get_ylim()[0],
curr_ax.get_ylim()[0],
profile_bottoms.to_numpy()[0],
],
)
curr_ax.fill(list(reversed(xb)), list(reversed(yb)), "w")
if profile_bottoms is not None:
# Blank out the countoured data below the bottom of the profiles
xb = np.append(
profile_bottoms.get_index("dist").to_numpy(),
[
curr_ax.get_xlim()[1],
curr_ax.get_xlim()[1],
curr_ax.get_xlim()[0],
curr_ax.get_xlim()[0],
],
)
yb = np.append(
profile_bottoms.to_numpy(),
[
profile_bottoms.to_numpy()[-1],
curr_ax.get_ylim()[0],
curr_ax.get_ylim()[0],
profile_bottoms.to_numpy()[0],
],
)
curr_ax.fill(list(reversed(xb)), list(reversed(yb)), "w")

# Add bathymetry as grey filled contour if available
if bottom_depths is not None:
Expand Down