You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2 sorting error, when distances are not sorted yet, this results in a key-errror: KeyError: 'Extraction_2'
3 stacklegend in stacked_results gives the following error: UnboundLocalError: local variable 'loc' referenced before assignment
To Reproduce
1 Run the notebook in http://localhost:8888/notebooks/pastas/doc/examples/multiple_wells.ipynb
2 In the above notebook, change line w = ps.WellModel(list(extraction_ts.values()), "Wells", distances) in: w = ps.WellModel(list(extraction_ts.values()), "Wells", distances[::-1])
3 In the above notebook, run: ml_wm.plots.stacked_results(figsize=(10, 8), stacklegend=True);
Expected behavior
1 No info message
2 No error
3 No error
The first issue is quite challenging to deal with, as discussed in How to resolve "INFO: No distance passed to HantushWellModel, assuming r=1.0." #437 and No distance passed to HantushWellModel, assuming r=1.0. #601. Whenever a call is made to ml.get_parameters(name), no distances are provided to WellModel, and it uses r=1.0. I don't think there is a clean way to distinguish between an internal call to rfunc.step and an external one without adding loads of if/else's internally. Implementing an argument to silence the warning then results in lots of unnecessary warn=False being passed around just to get rid of this message. But maybe someone has a better idea?
Describe the bug
There are three issues with the wellModel:
1 strange info message
When running the notebook http://localhost:8888/notebooks/pastas/doc/examples/multiple_wells.ipynb
During
ml_wm.solve()
I get the following info message:INFO: No distance passed to HantushWellModel, assuming r=1.0.
2 sorting error, when distances are not sorted yet, this results in a key-errror:
KeyError: 'Extraction_2'
3 stacklegend in stacked_results gives the following error:
UnboundLocalError: local variable 'loc' referenced before assignment
To Reproduce
1 Run the notebook in http://localhost:8888/notebooks/pastas/doc/examples/multiple_wells.ipynb
2 In the above notebook, change line
w = ps.WellModel(list(extraction_ts.values()), "Wells", distances)
in:w = ps.WellModel(list(extraction_ts.values()), "Wells", distances[::-1])
3 In the above notebook, run:
ml_wm.plots.stacked_results(figsize=(10, 8), stacklegend=True);
Expected behavior
1 No info message
2 No error
3 No error
Python package version
Python version: 3.9.7
NumPy version: 1.23.5
Pandas version: 1.5.3
SciPy version: 1.9.1
Matplotlib version: 3.7.1
Numba version: 0.56.4
LMfit version: 1.2.1
Latexify version: Not Installed
Pastas version: 1.1.0
The text was updated successfully, but these errors were encountered: