Skip to content
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

User report: reading values from grid with lgr #644

Open
lars-petter-hauge opened this issue Aug 16, 2019 · 2 comments
Open

User report: reading values from grid with lgr #644

lars-petter-hauge opened this issue Aug 16, 2019 · 2 comments

Comments

@lars-petter-hauge
Copy link
Contributor

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.

@pinkwah pinkwah added this to the Requires investigation milestone Dec 17, 2020
@alifbe
Copy link

alifbe commented Dec 6, 2022

@lars-petter-hauge do you have any update on this issue? Is there any easy way to access main grid which contains LGR e.g. average value of LGR?

@lars-petter-hauge
Copy link
Contributor Author

Hi,

It's been a while since this issue was created, I must admit I don't recall everything here.

I thought this issue was reporting problems finding the values from the lgr grid itself. If one would want to find the values from the main grid one would call grid.iget_named_kw("KEYWORD", tstep * n+1), where n = number of lgr. Given the description in the issue it looks like the assertion on comparing main grid values are consistent. Does this provide you with expected output?

As long as the values are stored in the UNRST files from the simulator it is likely possible to fetch. Haven't looked into this though..

@eivindjahren eivindjahren added the christmas-review Issues and PRs for Christmas review label Dec 13, 2024
@eivindjahren eivindjahren removed the christmas-review Issues and PRs for Christmas review label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants