Updates to pressure freeze calculations in hydrology model#157
Open
matthewhoffman wants to merge 4 commits into
Open
Updates to pressure freeze calculations in hydrology model#157matthewhoffman wants to merge 4 commits into
matthewhoffman wants to merge 4 commits into
Conversation
62320de to
8a86a39
Compare
There is an option to apply the pressure freeze term which limits its application to the channel opening term. However, this option logic was never applied to the mass balance equation, so pressure freeze has always been included in that equation even whtn pressure freeze is disabled. This commit fixes that.
I'm concerned there is a sign bug and combining the sheet and channel terms together masks that. Further, it's not obvious that the sheet flow should be included in the pressure freeze calculation, as in principle it's meant to be perpendicular to the channel, meaning it would have a different derivative thatn used here. The sheet term is included in Werder et al (2013) but excluded from de Fleurian et al (2018).
Pw is zero outside the domain, so the gradient is erroneously huge there.
8a86a39 to
867dd68
Compare
Author
Testing - bug fixI first tested the bug fix commit b9fa8ad by itself for the 4 standard compass tests that include hydrology using: Note that the two hydro_radial tests have channels off. The two Humboldt tests have channels on and pressure-freeze off. Results are as expected - the bug fix has no impact when channels are off but it does change answers for the tests where channels are on but pressure-freeze is set to off. |
Author
Testing: remaining changes when channels are offI next tested using the standard tests for the head of this branch vs the bug-fix commit. As expected, all tests pass, because pressure-freeze is disabled in these tests and after the bug fix, adjustments to the pressure-freeze calculations should not affect the tests because they all have that option disabled. These tests were run with: |
867dd68 to
8d3b9d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adjustments to calculations related to the melting/freezing necessary to keep subglacial water at the pressure-melting temperature.
In progress/testing.
todo: