From 190f5e15be5aacd4b0f59ead1ff5279dd1b60eb3 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Thu, 28 May 2026 18:57:14 -0700 Subject: [PATCH 1/2] Fix edge case where NaNs were at the end of the profile_number array. --- .vscode/launch.json | 4 ++-- src/data/create_products.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 2e05de9..0bf9dec 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -503,9 +503,9 @@ // Test a month with fewer plots to make //"args": ["--auv_name", "daphne", "--start", "20260101", "--end", "20260131", "-v", "2", "--clobber"] // Test pyxis and cbit_amphoursused plot - //"args": ["--auv_name", "pyxis", "--start", "20260501", "--end", "20260531", "-v", "1", "--clobber"] + "args": ["--auv_name", "pyxis", "--start", "20260526", "--end", "20260531", "-v", "1", "--clobber"] // Test --current_month - "args": ["--current_month", "-v", "1"] + //"args": ["--current_month", "-v", "1"] // Test reading downwelling_photosynthetic // _photon_flux_in_sea_water from the root group of the netCDF file instead of the instrument group, which was the case for some early daphne log files //"args": ["--auv_name", "daphne", "--start", "20260501", "--end", "20260531", "-v", "1", "--clobber"] diff --git a/src/data/create_products.py b/src/data/create_products.py index d5be003..b446dd2 100755 --- a/src/data/create_products.py +++ b/src/data/create_products.py @@ -1074,7 +1074,7 @@ def _grid_dims(self, plot_vars: list[str] | None = None) -> tuple: idist = np.linspace( distnav.to_numpy()[0], distnav.to_numpy()[-1], - int(3 * self.ds["profile_number"].to_numpy()[-1]), + int(3 * np.nanmax(self.ds["profile_number"].to_numpy())), ) # Vertical gridded to .5 m, rounded down to nearest 10m (minimum 10m) # Use only depths where at least one sensor variable has valid data to From acf0e4b24696e22901f8318e7ec9a58dcaeecf73 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Thu, 28 May 2026 19:39:38 -0700 Subject: [PATCH 2/2] Update EXPECTED_SIZE_GITHUB, again. --- src/data/test_process_i2map.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/test_process_i2map.py b/src/data/test_process_i2map.py index ae0f524..59ec198 100644 --- a/src/data/test_process_i2map.py +++ b/src/data/test_process_i2map.py @@ -30,7 +30,7 @@ def test_process_i2map(complete_i2map_processing): # but it will alert us if a code change unexpectedly changes the file size. # If code changes are expected to change the file size then we should # update the expected size here. - EXPECTED_SIZE_GITHUB = 63128 + EXPECTED_SIZE_GITHUB = 63136 EXPECTED_SIZE_ACT = 63106 EXPECTED_SIZE_LOCAL = 64650 if str(proc.args.base_path).startswith("/home/runner"):