User report: reading values from grid with lgr
- Dominant language
- C++
- Stars
- 127
- Forks
- 103
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 18
Description
Users have reported that reading data from runs with lgr seems unintuitive. They were interested in finding the values from the _main_ grid in the case with lgr included. Although the _main_ grid is not used for simulation, averaged values are still stored for book keeping, and it is therefore possible to extract comparable values in both scenarios.
Approach:
```
# Simulation case without lgr
original_grid = ecl.EclGrid('ORIGINAL.DATA')
original_rest = ecl.EclFile('ORIGINAL.UNRST')
original_init = ecl.EclFile('ORIGINAL.INIT')
# Simulation case with lgr
lgr_grid = ecl.EclGrid('LGR.DATA')
lgr_rest = ecl.EclFile('LGR.UNRST')
lgr_init = ecl.EclFile('LGR.INIT')
tstep = 10
x = 1
y = 1
# Read saturation for both runs
original_soil = original_rest.iget_named_kw("SOIL", tstep)
lgr_soil = lgr_rest.iget_named_kw("SOIL", tstep)
assert (original_soil != lgr_soil)
lgr_soil = lgr_rest.iget_named_kw("SOIL", tstep * 2)
assert (original_soil == lgr_soil)
```
They found that length of `lgr_soil` is twice the length of `original_soil` (likely n-times the length, where n is number of lgr's + 1). What is a bit curious though is that the values where tstep is the same, didn't make much sense. They did not compare correctly with the values in the `lgr` grid. Still, reading from cells in the `lgr` grid, from what I can recollect, should be performed by fetching the `lgr` and then retrieving values from that. I have not looked any more into this.
Hopefully easy to reproduce.
Contributor guide
Assessment
This issue has not been assessed yet.