Skip to content

Commit

Permalink
Implement changes requested by @dbrakenhoff
Browse files Browse the repository at this point in the history
  • Loading branch information
rubencalje committed Nov 18, 2024
1 parent a656e69 commit 6ab5312
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions nlmod/dims/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def calculate_transmissivity(


def calculate_resistance(
ds, kv="kv", thickness="thickness", top="top", botm="botm", between_layers=False
ds, kv="kv", thickness="thickness", top="top", botm="botm", between_layers=None
):
"""Calculate vertical resistance (c) of model layers from the vertical conductivity
(kv) and the thickness.
Expand All @@ -147,14 +147,26 @@ def calculate_resistance(
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
If False, calculate the resistance of the layers themselves. The default is
True. However, in a future version of nlmod the default will be changed to
False.
Returns
-------
c : xarray.DataArray
DataArray containing vertical resistance (c). NaN where layer thickness is zero
"""
if between_layers is None:
logger.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."
)
)
between_layers = True # will be changed to False in future version of nlmod
if thickness in ds:
thickness = ds[thickness]
else:
Expand Down Expand Up @@ -1198,7 +1210,7 @@ def remove_layer_dim_from_top(
model DataSet
check : bool, optional
If True, checks for inconsistencies in the layer model and report to logger as
warning. The defaults is True.
warning. The default is True.
set_non_existing_layers_to_nan bool, optional
If True, sets the value of the botm-variable to NaN for non-existent layers.
This is not recommended, as this might break some procedures in nlmod. The
Expand Down

0 comments on commit 6ab5312

Please sign in to comment.