-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Add calculation of water zone volumes #925
Conversation
908fb35
to
8e25e9f
Compare
e40f73d
to
ce54b0c
Compare
table_index = [ | ||
col for col in _enums.InplaceVolumes.index_columns() if col in table | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was also given as input argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
if not total_columns: | ||
raise RuntimeError( | ||
"Found no 'Totals' volumes in the table. Please ensure 'Totals' " | ||
"are reported and rerun the volumetric job before export." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also be captured more upfront by evaluation the job settings which already are read
(this example from Drogon)
myjob = rmsjobs.Job.get_job(
owner=["Grid models", "Geogrid", "Grid"],
type="Volumetrics",
name="geogrid_volumes",
)
print("USE TOTALS", mydict["Output"][0]["UseTotals"])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I know, did initially check several things on the job settings e.g. required calculations.. but found it difficult to write tests, had to mock so much. I'll keep it here for now and we can move later if we want 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.