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

Difference between EclSumKeyWordVector and eclsum.keys() #816

Open
anders-kiaer opened this issue Jun 22, 2021 · 2 comments
Open

Difference between EclSumKeyWordVector and eclsum.keys() #816

anders-kiaer opened this issue Jun 22, 2021 · 2 comments

Comments

@anders-kiaer
Copy link

from ecl.summary import EclSum, EclSumKeyWordVector


eclsum = EclSum("./SOME.UNSMRY", lazy_load=False)

column_names1 = list(EclSumKeyWordVector(eclsum, add_keywords = True))
column_names2 = list(eclsum.keys())

print(len(column_names1))
print(len(set(column_names1)))

print(len(column_names2))
print(len(set(column_names2)))

gives on a test model:

11260
10731
12895
12895

I.e. EclSumKeyWordVector gives fewer vectors than eclsum.keys() - especially when duplicate keys are removed 🤔

It looks like EclSumKeyWordVector is the one used in pandas.DataFrame export function, while the keys() function is used in the CSV export function.
https://github.com/equinor/ecl/blob/3d6d17e1470419fc5af0c891560fb2211b2eda0d/python/ecl/summary/ecl_sum.py#L469-L525 https://github.com/equinor/ecl/blob/3d6d17e1470419fc5af0c891560fb2211b2eda0d/python/ecl/summary/ecl_sum.py#L1515-L1535

@anders-kiaer
Copy link
Author

anders-kiaer commented Jun 22, 2021

We investigated this a bit further:

  • The vectors in .keys() but not in EclSumKeyWordVector ends with :INTEGER, where INTEGER is probably an integer representing total grid cell index. Corresponding vectors on the format :I,J,K are in both.
  • The duplicated vectors in EclSumKeyWordVector appears to be due to user requesting them twice in the SUMMARY section of the Eclipse model.

@markusdregi
Copy link
Contributor

Thanks for reporting @anders-kiaer :)

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

2 participants