-
Notifications
You must be signed in to change notification settings - Fork 35
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
[fmuobs] Add naive support for GENERAL_OBSERVATIONs in yaml #352
Conversation
a2be5c3
to
ab77c75
Compare
Codecov Report
@@ Coverage Diff @@
## master #352 +/- ##
==========================================
+ Coverage 87.27% 87.30% +0.03%
==========================================
Files 41 41
Lines 5657 5673 +16
==========================================
+ Hits 4937 4953 +16
Misses 720 720
Continue to review full report at Codecov.
|
Also ensure that integer values are printed as integes in ert-obs output
ab77c75
to
009ccd0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect the parser to read the obsfile, fetch the observation values and stds corrending to indexlist, and internalize these as two lists. Leaving behind a reference to a file does not serve much purpose. The format for these files is well defined, so it seems realistic to fetch the numbers. Sorry, if I missed something obvious :)
Good point, parsing that text file is the original request. I am not yet sure if such parsing can be done in a reversible manner and it at least requires more thinking for how to convert back to ERT observation format. Should it create its own OBS_FILE on disk if it is converting from yaml back to ert-obs? The current implementation is the obvious implementation by naivety. Parsing the OBS_FILE should be an extension of this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objections to the code, and can approve. However, I am unsure if I like the proposed yml- data structure;
- The restart entry in ERT does really refer to restart numbering, but a required identifier that in may refer to restart (I think it did in good old EnKF days). Should we consider a generic name for this to avoid confusion, or will this only add on to the mess?
- Should the index list be a string and not a list?
- Will we have to change the structure if functionality to parse numbers are added?
Another thought, is it feasible to output this into a format that can be used with eg WebViz or Resinsight?
Converted to draft PR. It is not important to merge this as it would be of no use currently. We should think through what we want from this, and what is possible to achieve from a format converter. |
Implements the most obvious/naive way of converting ert observations to the yaml format, meaning that
is translated (in both directions) to: