From 6b2042e4d34065f44efd836e9d937d81abd5a7be Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Mon, 15 Dec 2025 21:26:09 -0800 Subject: [PATCH 1/5] Use pygmt==0.16 as it supports GMT version 6.4.0 in docker. --- pyproject.toml | 2 +- uv.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 90bd7e1..6bbed1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ dependencies = [ "numpy>=2.2.6", "pooch>=1.8.2", "pyarrow>=20.0.0", - "pygmt>=0.17.0", + "pygmt==0.16", "pyproj>=3.7.1", "pysolar>=0.13", "rolling>=0.5.0", diff --git a/uv.lock b/uv.lock index 0bbf808..dbb6fec 100644 --- a/uv.lock +++ b/uv.lock @@ -227,7 +227,7 @@ requires-dist = [ { name = "numpy", specifier = ">=2.2.6" }, { name = "pooch", specifier = ">=1.8.2" }, { name = "pyarrow", specifier = ">=20.0.0" }, - { name = "pygmt", specifier = ">=0.17.0" }, + { name = "pygmt", specifier = "==0.16" }, { name = "pyproj", specifier = ">=3.7.1" }, { name = "pysolar", specifier = ">=0.13" }, { name = "rolling", specifier = ">=0.5.0" }, @@ -1903,7 +1903,7 @@ wheels = [ [[package]] name = "pygmt" -version = "0.17.0" +version = "0.16.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "numpy" }, @@ -1911,9 +1911,9 @@ dependencies = [ { name = "pandas" }, { name = "xarray" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c0/6e/a973f55dbe085713a0f705561fc4214593e11a2e4d25248f6502511bec7b/pygmt-0.17.0.tar.gz", hash = "sha256:06d7581bc35641db318c418aba02163bc519ba267a5a60b5cc419eee40390503", size = 228512, upload-time = "2025-10-02T22:51:40.781Z" } +sdist = { url = "https://files.pythonhosted.org/packages/bc/a2/05d13c4814aef83d6fe3c19d03215d44a260090e85bbb724c1b9902ca20d/pygmt-0.16.0.tar.gz", hash = "sha256:5921db8cd71d0da5d60afee36eaba496c953797e38b53b32583ed4ae61fab640", size = 217717, upload-time = "2025-06-18T12:32:07.724Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/11/e5/e249f42f47ca6ac7f88cad10d539334b04d77a76dc9d11b58b6a72b8b702/pygmt-0.17.0-py3-none-any.whl", hash = "sha256:846f93aef999be8f9d6de806e1aeebddc70ed59c33757c16bbb236678d0f3b6c", size = 320982, upload-time = "2025-10-02T22:51:39.077Z" }, + { url = "https://files.pythonhosted.org/packages/a2/f4/42f2bf9150380ba2aaa9afb90c7d454f212b5a73a9361dcf8282d429e139/pygmt-0.16.0-py3-none-any.whl", hash = "sha256:b7d88c8c89180dde33992d3d07aaacda245111feadfb19f61cea420e11a25f27", size = 301299, upload-time = "2025-06-18T12:32:05.727Z" }, ] [[package]] From 39ff9ac19df9b7b8c0521b090e459663a865135e Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Mon, 15 Dec 2025 21:29:18 -0800 Subject: [PATCH 2/5] Install libgmt-dev for the libgmt.so file. --- docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 15af84f..81a1e6f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,6 +20,7 @@ RUN apt-get update \ rsync \ # GMT6 dependencies gmt \ + libgmt-dev \ gmt-dcw \ gmt-gshhg \ && rm -rf /var/lib/apt/lists/* From 7fea854bb1d9084fe197b8a2161a1da374ef7879 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Mon, 15 Dec 2025 21:29:57 -0800 Subject: [PATCH 3/5] Add setting for GMT_LIBRARY_PATH, where libgmt.so is. --- README.md | 1 + docker-compose.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c03b2b8..9106816 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ First time use with Docker on a server using a service account: `CALIBRATION_VOL=` `WORK_VOL=/data` `HOST_NAME=` + `GMT_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/` After installation and when logging into the server again mission data can be processed thusly: * Setting up environment and printing help message: `sudo -u docker_user -i` diff --git a/docker-compose.yml b/docker-compose.yml index b8f5c50..746348b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,8 @@ # LRAUV_VOL=/Volumes/LRAUV # CALIBRATION_VOL=/Volumes/DMO # WORK_VOL=/opt/docker_auv-python_vols/data -# HOST_NAME=MBARI2597.shhore.mbari.org +# HOST_NAME=MBARI2597.shore.mbari.org +# GMT_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/ # Required in shell environment: # export DOCKER_USER_ID=$(id -u) From ef99e8dbb243804dec95c426fc261ac56ead7eac Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Mon, 15 Dec 2025 21:30:32 -0800 Subject: [PATCH 4/5] Log warning if pygmt is not available. --- src/data/create_products.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/create_products.py b/src/data/create_products.py index 2d1798d..646be42 100755 --- a/src/data/create_products.py +++ b/src/data/create_products.py @@ -321,7 +321,7 @@ def _get_bathymetry(self, lons: np.ndarray, lats: np.ndarray) -> np.ndarray: Array of bathymetry depths (positive down) in meters, or None if pygmt unavailable """ if not PYGMT_AVAILABLE: - self.logger.debug("pygmt not available, cannot retrieve bathymetry") + self.logger.warning("pygmt not available, will not be plotting bottom depths") return None # Use local Monterey Bay grid if available and coordinates are in range @@ -1342,5 +1342,5 @@ def process_command_line(self): p_start = time.time() cp.plot_2column() cp.plot_biolume() - # cp.gulper_odv() + cp.gulper_odv() cp.logger.info("Time to process: %.2f seconds", (time.time() - p_start)) From ac2145fd503f2cf53e8b1dbe0b03e51736435a6e Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Mon, 15 Dec 2025 21:30:50 -0800 Subject: [PATCH 5/5] Do the 2column and biolume plots. --- src/data/process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/process.py b/src/data/process.py index b98a781..756eddc 100755 --- a/src/data/process.py +++ b/src/data/process.py @@ -673,8 +673,8 @@ def create_products(self, mission: str) -> None: cp.logger.setLevel(self._log_levels[self.config["verbose"]]) cp.logger.addHandler(self.log_handler) - # cp.plot_biolume() - # cp.plot_2column() + cp.plot_biolume() + cp.plot_2column() if "dorado" in cp.auv_name.lower(): cp.gulper_odv() cp.logger.removeHandler(self.log_handler)