Handle Missing Reference SMSPEC in Well Comparison Plots#7202
Open
bska wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates tests/plot_well_comparison.py to prevent ESmry from throwing when the reference .SMSPEC is missing, enabling plot generation for “new” simulation cases that don’t yet have a reference summary.
Changes:
- Refactors
run_analysis()to accept prebuilt.SMSPECfilenames instead of constructing them internally. - Adds
analyze_new_case()to generate plots from the simulation case only when the reference summary is absent. - Adds
.SMSPECexistence checks in plot mode to select compare-vs-reference vs sim-only behavior, and exits with an error when the simulation summary is missing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f8cc7dc to
94772c6
Compare
549c0e0 to
286d302
Compare
Member
Author
|
jenkins build this please |
Improve tests/plot_well_comparison.py so plot generation works when a
new case has no reference summary yet.
* Add analyze_new_case() to generate plots from the simulation case
only, skipping TIME/YEARS and empty/all-zero curves.
* In plot mode, check SMSPEC file existence before constructing ESmry:
- run_analysis() when both reference and simulation files exist
- analyze_new_case() when only simulation exists
- fail with a clear error message when simulation is missing
* Refactor analysis function signatures to accept prebuilt SMSPEC
filenames (ref_smspec/sim_smspec) from main, avoiding duplicate
filename construction inside the functions.
This avoids C++ exceptions from ESmry on missing files while keeping
the existing compare workflow unchanged when references are available.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
286d302 to
6469ad8
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.
Improve
tests/plot_well_comparison.pyso plot generation works when a new case has no reference summary yet.analyze_new_case()to generate plots from the simulation case only, skipping TIME/YEARS and empty/all-zero curves.ESmry:run_analysis()when both reference and simulation files existanalyze_new_case()when only simulation existsref_smspec/sim_smspec) from main, avoiding duplicate filename construction inside the functions.This avoids C++ exceptions from
ESmryon missing files while keeping the existing compare workflow unchanged when references are available.