Update field_statistics to use individual ertbox per zone - #858
Conversation
8777229 to
0512285
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #858 +/- ##
==========================================
- Coverage 84.51% 84.28% -0.23%
==========================================
Files 49 49
Lines 7349 7528 +179
==========================================
+ Hits 6211 6345 +134
- Misses 1138 1183 +45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c7630cf to
335b994
Compare
c2443be to
a7fdb52
Compare
alifbe
left a comment
There was a problem hiding this comment.
Not quite sure if the files in ensemble/share/grid_statistics/ are all needed.
In general, we should avoid code repetitions.
cddfb7c to
8771364
Compare
8771364 to
7d5966f
Compare
There was a problem hiding this comment.
Pull request overview
Extends field statistics to support zone-specific ERTBOX grids and temporary fields.
Changes:
- Adds per-zone/default ERTBOX configuration and processing.
- Updates RMS loading and statistics generation.
- Expands test data and reference outputs.
Reviewed changes
Copilot reviewed 5 out of 61 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/subscript/field_statistics/field_statistics.py |
Implements per-zone ERTBOX support. |
tests/test_field_statistics.py |
Expands statistics tests and fixtures. |
tests/testdata_field_statistics/config_example.yml |
Demonstrates the new configuration. |
tests/testdata_field_statistics/ensemble/share/grid_statistics/referencedata2/result_field_files.txt |
Lists expected geogrid outputs. |
tests/testdata_field_statistics/ensemble/share/grid_statistics/referencedata2/temporary_field_files.txt |
Lists expected temporary-field outputs. |
Suppressed comments (2)
src/subscript/field_statistics/field_statistics.py:1353
- The default grid is read earlier using the configured name verbatim, but this copy step uppercases it. A valid custom default such as
ertbox_global.EGRIDtherefore passes sizing and then fails here looking forERTBOX_GLOBAL.EGRID. Use the configured filename consistently.
ertbox_file = Path(ertbox_config_path) / Path(ertbox_default.upper() + ".EGRID")
src/subscript/field_statistics/field_statistics.py:1924
initial_relative_pathcomes from YAML as a string, so using/on it raisesTypeErrorbefore any iteration-0 field can be read (the test config also supplies a string). Convert it toPathbefore joining.
full_param_filename = init_path / Path(param_filename)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
7d5966f to
5752d09
Compare
alifbe
left a comment
There was a problem hiding this comment.
The code is rather huge so it's a bit hard to do prop review. But looks good from what I can see. 👍
Suggest to replace assertion with exception.
Some model file changes from previous version was required Documentation is updated.
5752d09 to
42744f6
Compare
Closes: #842