From 95a281d208405a12622d228c4973e08df6f2be1b Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Wed, 3 Dec 2025 15:00:29 -0800 Subject: [PATCH 1/6] Add comment attribute to profile_number. --- .vscode/launch.json | 4 ++-- src/data/resample.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index c3f3aa1..b1c27c1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -192,8 +192,8 @@ //"args": ["--auv_name", "dorado", "--mission", "2023.123.00", "-v", "1"], //"args": ["-v", "2", "--log_file", "brizo/missionlogs/2025/20250916_20250922/20250916T230652/202509162306_202509180305.nc4"] //"args": ["--auv_name", "dorado", "--mission", "2025.316.02", "-v", "1"], - //"args": ["-v", "1", "--log_file", "pontus/missionlogs/2025/20250604_20250616/20250608T020852/202506080209_202506081934.nc4"], - "args": ["-v", "1", "--log_file", "ahi/missionlogs/2025/20250414_20250418/20250414T205440/202504142054_202504150400.nc4"], + "args": ["-v", "1", "--log_file", "pontus/missionlogs/2025/20250604_20250616/20250608T020852/202506080209_202506081934.nc4"], + //"args": ["-v", "1", "--log_file", "ahi/missionlogs/2025/20250414_20250418/20250414T205440/202504142054_202504150400.nc4"], }, { "name": "5.0 - archive.py", diff --git a/src/data/resample.py b/src/data/resample.py index 5e1cf4a..4483541 100755 --- a/src/data/resample.py +++ b/src/data/resample.py @@ -630,6 +630,12 @@ def add_profile(self, depth_threshold: float) -> None: self.resampled_nc["profile_number"].attrs["coordinates"] = "time depth latitude longitude" self.resampled_nc["profile_number"].attrs = { "long_name": "Profile number", + "comment": ( + f"Sequential profile counter identifying individual vertical casts. " + f"Profiles are detected from depth vertices using scipy.signal.find_peaks " + f"with prominence={depth_threshold}m threshold. Increments when vehicle " + f"transitions between upcast and downcast with sufficient vertical displacement." + ), } def set_proxy_parameters(self, mission_start: datetime) -> tuple[float, float]: From c662684f36cd855b77ebe0dc5dcd0459fe5f7807 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Wed, 3 Dec 2025 15:21:18 -0800 Subject: [PATCH 2/6] Omit LRAUV "instruments" whose coordinates are confusing to have in the final resampled file. --- src/data/resample.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/data/resample.py b/src/data/resample.py index 4483541..0ae2aef 100755 --- a/src/data/resample.py +++ b/src/data/resample.py @@ -1717,6 +1717,11 @@ def resample_mission( # noqa: C901, PLR0912, PLR0915, PLR0913 for icount, (instr, variables) in enumerate( self.instruments_variables(nc_file).items(), ): + # Omit LRAUV "instruments" whose coordinates are confusing + # to have in the final resampled file + if instr in ("deadreckonusingmultiplevelocitysources", "nal9602", "nudged"): + self.logger.info("Skipping resampling for instrument %s", instr) + continue if icount == 0: self.df_o = pd.DataFrame() # original dataframe self.df_r = pd.DataFrame() # resampled dataframe From 84dc96fd1b2ab67d256de31644fe5f95419d97ba Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Wed, 3 Dec 2025 15:21:54 -0800 Subject: [PATCH 3/6] Update testing values due to new comment for profile_number. --- src/data/test_process_dorado.py | 6 +++--- src/data/test_process_i2map.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/data/test_process_dorado.py b/src/data/test_process_dorado.py index cc8f7e9..f63fd0f 100644 --- a/src/data/test_process_dorado.py +++ b/src/data/test_process_dorado.py @@ -32,8 +32,8 @@ def test_process_dorado(complete_dorado_processing): # If code changes are expected to change the file size then we should # update the expected size here. EXPECTED_SIZE_GITHUB = 621408 - EXPECTED_SIZE_ACT = 621406 - EXPECTED_SIZE_LOCAL = 621456 + EXPECTED_SIZE_ACT = 621714 + EXPECTED_SIZE_LOCAL = 621764 if str(proc.args.base_path).startswith("/home/runner"): # The size is different in GitHub Actions, maybe due to different metadata assert nc_file.stat().st_size == EXPECTED_SIZE_GITHUB # noqa: S101 @@ -52,7 +52,7 @@ def test_process_dorado(complete_dorado_processing): # Check that the MD5 hash has not changed EXPECTED_MD5_GITHUB = "7c7a3e844988d3bb6ec2a951824bc0d5" EXPECTED_MD5_ACT = "fac632c321b4956b6015d6de97958f8a" - EXPECTED_MD5_LOCAL = "c4a13d6e7ec7f35ae5aafa97ea9a2279" + EXPECTED_MD5_LOCAL = "aec48d0abb58d9e831e5b22180eebd8f" if str(proc.args.base_path).startswith("/home/runner"): # The MD5 hash is different in GitHub Actions, maybe due to different metadata assert hashlib.md5(open(nc_file, "rb").read()).hexdigest() == EXPECTED_MD5_GITHUB # noqa: PTH123, S101, S324, SIM115 diff --git a/src/data/test_process_i2map.py b/src/data/test_process_i2map.py index d465e8e..ef7edc5 100644 --- a/src/data/test_process_i2map.py +++ b/src/data/test_process_i2map.py @@ -31,8 +31,8 @@ def test_process_i2map(complete_i2map_processing): # If code changes are expected to change the file size then we should # update the expected size here. EXPECTED_SIZE_GITHUB = 52686 - EXPECTED_SIZE_ACT = 52656 - EXPECTED_SIZE_LOCAL = 52786 + EXPECTED_SIZE_ACT = 52964 + EXPECTED_SIZE_LOCAL = 53094 if str(proc.args.base_path).startswith("/home/runner"): # The size is different in GitHub Actions, maybe due to different metadata assert nc_file.stat().st_size == EXPECTED_SIZE_GITHUB # noqa: S101 From 44f4d3f19be58b0d6a93c39caf90cf204ebd0eb9 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Wed, 3 Dec 2025 15:26:37 -0800 Subject: [PATCH 4/6] Update EXPECTED_SIZE_GITHUB. --- src/data/test_process_dorado.py | 2 +- src/data/test_process_i2map.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/test_process_dorado.py b/src/data/test_process_dorado.py index f63fd0f..ec800e3 100644 --- a/src/data/test_process_dorado.py +++ b/src/data/test_process_dorado.py @@ -31,7 +31,7 @@ def test_process_dorado(complete_dorado_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 = 621408 + EXPECTED_SIZE_GITHUB = 621716 EXPECTED_SIZE_ACT = 621714 EXPECTED_SIZE_LOCAL = 621764 if str(proc.args.base_path).startswith("/home/runner"): diff --git a/src/data/test_process_i2map.py b/src/data/test_process_i2map.py index ef7edc5..121382a 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 = 52686 + EXPECTED_SIZE_GITHUB = 52994 EXPECTED_SIZE_ACT = 52964 EXPECTED_SIZE_LOCAL = 53094 if str(proc.args.base_path).startswith("/home/runner"): From 1e34bd49bd90db1148e6b5e84dea319a7835a7d8 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Wed, 3 Dec 2025 15:28:46 -0800 Subject: [PATCH 5/6] Update EXPECTED_MD5_GITHUB. --- src/data/test_process_dorado.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/test_process_dorado.py b/src/data/test_process_dorado.py index ec800e3..d7ed7f6 100644 --- a/src/data/test_process_dorado.py +++ b/src/data/test_process_dorado.py @@ -50,7 +50,7 @@ def test_process_dorado(complete_dorado_processing): check_md5 = True if check_md5: # Check that the MD5 hash has not changed - EXPECTED_MD5_GITHUB = "7c7a3e844988d3bb6ec2a951824bc0d5" + EXPECTED_MD5_GITHUB = "bbb9e7e9129c19e39895218d35cc474f" EXPECTED_MD5_ACT = "fac632c321b4956b6015d6de97958f8a" EXPECTED_MD5_LOCAL = "aec48d0abb58d9e831e5b22180eebd8f" if str(proc.args.base_path).startswith("/home/runner"): From 358475e80bfaf66d9e1b4d87cb15aa268dba9475 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Wed, 3 Dec 2025 15:31:12 -0800 Subject: [PATCH 6/6] Update EXPECTED_MD5_ACT. --- src/data/test_process_dorado.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/test_process_dorado.py b/src/data/test_process_dorado.py index d7ed7f6..aa8c06b 100644 --- a/src/data/test_process_dorado.py +++ b/src/data/test_process_dorado.py @@ -51,7 +51,7 @@ def test_process_dorado(complete_dorado_processing): if check_md5: # Check that the MD5 hash has not changed EXPECTED_MD5_GITHUB = "bbb9e7e9129c19e39895218d35cc474f" - EXPECTED_MD5_ACT = "fac632c321b4956b6015d6de97958f8a" + EXPECTED_MD5_ACT = "1fb192c144f6f4f8f06b555a339587ed" EXPECTED_MD5_LOCAL = "aec48d0abb58d9e831e5b22180eebd8f" if str(proc.args.base_path).startswith("/home/runner"): # The MD5 hash is different in GitHub Actions, maybe due to different metadata