From d8ac2d868c7c4613d74afcd2285bcefb04c0ea3d Mon Sep 17 00:00:00 2001 From: "brandon s. tober" Date: Mon, 10 Nov 2025 21:38:51 -0500 Subject: [PATCH 1/2] Swap sign of flux divergence --- oggm/core/flowline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oggm/core/flowline.py b/oggm/core/flowline.py index b66e8b36d..a5990dca8 100644 --- a/oggm/core/flowline.py +++ b/oggm/core/flowline.py @@ -1347,7 +1347,7 @@ def run_until_and_store(self, y1, surface_h_previous[fl_id] = fl.surface_h if 'flux_divergence' in ovars_fl and (yr > self.y0): # calculated after the formula dhdt = mb + flux_div - val = ds['dhdt'].data[i, :] - ds['climatic_mb'].data[i, :] + val = ds['climatic_mb'].data[i, :] - ds['dhdt'].data[i, :] # special treatment for retreating: If the glacier # terminus is getting ice free it means the # climatic mass balance is more negative than the From 610d6847f300788b670ba99e71abe038484bd7c9 Mon Sep 17 00:00:00 2001 From: "brandon s. tober" Date: Mon, 10 Nov 2025 21:45:01 -0500 Subject: [PATCH 2/2] Added to whats-new.rst --- docs/whats-new.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/whats-new.rst b/docs/whats-new.rst index 56f7f0a25..358d83229 100644 --- a/docs/whats-new.rst +++ b/docs/whats-new.rst @@ -8,7 +8,8 @@ v1.6.x (not released) Enhancements ~~~~~~~~~~~~ - +- Resolved inverted sign of flowline diagnostics flux divergence (:pull:`1815`). + By `Brandon Tober `_ - Added ``tasks.compute_fl_diagnostics_quantiles``, this task is designed to calculate quantiles from multiple fl_diagnostic files. It enables users to compute metrics such as the median flowline across various GCM projections