Skip to content

Swap sign of flux divergence#1815

Open
btobers wants to merge 5 commits into
OGGM:masterfrom
btobers:1814_flux_div_sign
Open

Swap sign of flux divergence#1815
btobers wants to merge 5 commits into
OGGM:masterfrom
btobers:1814_flux_div_sign

Conversation

@btobers

@btobers btobers commented Nov 11, 2025

Copy link
Copy Markdown

Closes #1814

This PR addresses an issue with the sign of the flux divergence stored within the flowline diagnostics.

  • Tests added/passed
  • Fully documented
  • Entry in whats-new.rst

@fmaussion

Copy link
Copy Markdown
Member

Thanks @btobers ! Much appreciated. Given the nature of the change I'll hold off merging right now and will wait for the after the next minor release (very soon)

@fmaussion

Copy link
Copy Markdown
Member

@pat-schmitt are you fine with this? We will have to adapt the tests and the documentation / tutorials as well.

Comment thread oggm/core/flowline.py Outdated
@@ -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

@pat-schmitt pat-schmitt Apr 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this to '# calculated after the formula mb = dhdt + flux_div'

@pat-schmitt

Copy link
Copy Markdown
Member

Thanks @btobers for spotting this. I used the wrong equation. I just added a comment to also change the comment above the new calculation. I can have a look at the tests the next weeks.

@pat-schmitt

Copy link
Copy Markdown
Member

I just changed the comment to run the tests again

@pat-schmitt

Copy link
Copy Markdown
Member

Beside of changing documentation and tutorials this is ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flux divergence sign convention (currently inverted)

3 participants