Skip to content

Add between_layers to calculate_resistance, and set to False#386

Merged
rubencalje merged 2 commits intodevfrom
change_calculate_resistance
Nov 18, 2024
Merged

Add between_layers to calculate_resistance, and set to False#386
rubencalje merged 2 commits intodevfrom
change_calculate_resistance

Conversation

@rubencalje
Copy link
Collaborator

@rubencalje rubencalje commented Nov 13, 2024

Solves issue #310. This PR changes the outcome of calculate_resistance, when between_layers is set to False. This will be the new default in the future as well. When between_layers is not specified (which is the default), the user will see the following warning:

The default of between_layers=True in calculate_resistance is deprecated and will be changed to False in a future version of nlmod. Pass between_layers=True to retain current behavior or between_layers=False to adopt the future default and silence this warning.

If True, calculate the resistance between the layers, which MODFLOW uses to
calculate the flow. The resistance between two layers is then assigned to the
top layer, and the bottom model layer gets a resistance of infinity.
If False, calculate the resistance of the layers themselves. The defauls is
Copy link
Collaborator

@dbrakenhoff dbrakenhoff Nov 13, 2024

Choose a reason for hiding this comment

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

typo: default

conductivity (kv) and the thickness. The resistance between two layers is assigned
to the top layer. The bottom model layer gets a resistance of infinity.
def calculate_resistance(
ds, kv="kv", thickness="thickness", top="top", botm="botm", between_layers=False
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe set to None, warn users that to get the default they need to set between_layers=False, and the future default will be True?

Copy link
Collaborator

@dbrakenhoff dbrakenhoff left a comment

Choose a reason for hiding this comment

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

See comment

@rubencalje
Copy link
Collaborator Author

Test fail unrelated to this PR

@rubencalje rubencalje merged commit c4c3882 into dev Nov 18, 2024
@rubencalje rubencalje deleted the change_calculate_resistance branch November 18, 2024 11:05
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.

2 participants