Script for CO2 containment#568
Conversation
…perimeter, and separates the result per formation and phase (gas/dissolved). Output is a table on CSV format.
alifbe
left a comment
There was a problem hiding this comment.
Please fix the order of import (using isort or vscode)
|
Have fixed some of the PR issues. Still some error from mypy-checks. Looking into that. |
Codecov Report
@@ Coverage Diff @@
## main #568 +/- ##
==========================================
- Coverage 86.16% 84.71% -1.46%
==========================================
Files 49 52 +3
Lines 7035 7492 +457
==========================================
+ Hits 6062 6347 +285
- Misses 973 1145 +172
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Looking good! 😄 Thanks a lot for adapting to the linters, a bit of a gauntlet to be sure. My last concern is with the test coverage -- it becomes our third outlier at significantly below 80% coverage and more importantly we lack the CO2 domain knowledge that may prevent us from addressing issues ourselves. I guess normally coverage is the sort of thing that increases over time as users do unexpected user things, but because we are doing a change of hands it is a bit more of a worry. Being aware that you have a time runway to work with, do you think there are any critical or highly domain specific methods that could potentially add to long-term robustness? |
|
When it comes to test coverage, I think the best thing would be to have a synthetic data set (EGRID, UNRST, INIT files) with all the required properties used for the co2 calculations. Then it would be easier to test a larger part of the code. But this is probably a bit of work to get done, so realistically this will have to be added sometime in the future I think. I added a few more tests, so the code coverage will hopefully increase slightly. |
mferrera
left a comment
There was a problem hiding this comment.
Thanks very much for considering the comments!
We will need to have a quick consensus chat on our end before taking it in so it might be a short while longer -- early next week at the very latest.
I will add co2_containment as the script invocation unless you have some other preferred command line name (doesn't make sense to add it in this PR since it will be moved in #557)
|
Sounds good! Thank you for all the feedback and fast responses, I think it improved the code. The proposed script invocation is fine! |
Script for calculating the amount of CO2 inside and outside a given perimeter, and separates the result per formation and phase (gas/dissolved). Output is a table on CSV format.
Can take both a containment polygon and a "hazardous" polygon. Result is divided into the regions inside vs outside vs hazardous, where inside means inside the containment polygon.
Can calculate either CO2 mass or a representative CO2 volume (three different calculation methods for volume). CO2 mass is the most used and tested.
The resulting CSV-file can be used as data in the CO2Leakage webviz plugin.
See (old) issue: #502