From ed182d4c941cf1ca7662d87944533f4642bcf231 Mon Sep 17 00:00:00 2001 From: Jesse Cusack Date: Mon, 18 May 2026 14:59:09 -0700 Subject: [PATCH] fix variables appearing in both dbd and ebd --- pyproject.toml | 2 +- src/glide/process_l1.py | 9 +++++++++ uv.lock | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5f4aded..b3d567b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "slocum-glide" -version = "0.1.2" +version = "0.1.3" description = "Process Slocum glider data" readme = "README.md" authors = [ diff --git a/src/glide/process_l1.py b/src/glide/process_l1.py index f2853ab..ac195ab 100644 --- a/src/glide/process_l1.py +++ b/src/glide/process_l1.py @@ -316,6 +316,15 @@ def merge( _log.debug("Skipping %s; QC flags are re-initialized after merge", v) continue + if v in ds.data_vars: + _log.warning( + "Variable %s is present in both flight and science files; " + "keeping the %s version", + v, + times_from, + ) + continue + try: # Only drop variables if the flag is explicitly set drop = config["variables"][v]["drop_from_l2"] if drop: diff --git a/uv.lock b/uv.lock index e3b611a..a7a72ff 100644 --- a/uv.lock +++ b/uv.lock @@ -1951,7 +1951,7 @@ wheels = [ [[package]] name = "slocum-glide" -version = "0.1.2" +version = "0.1.3" source = { editable = "." } dependencies = [ { name = "bottleneck" },