Closed GitPaean closed 8 years ago
Hello;
yes - this seems like a bug in opm-output. Can you:
summary.x
on the summary files.UNSMRY / SMSPEC
files?Thanks.
I just sent you the UNSMRY/SMSPEC files, which is from one example in the OPM-data.
I will try to learn some summary.x. Sorry for not having been using them.
I just sent you the UNSMRY/SMSPEC files
Yes - I have got them; thank you.
I will try to learn some summary.x
You must set the BUILD_APPLICATIONS
switch to on when building ert. Then you can invoke summary.x
as:
/path/to/ert/bin/summary.x PATH/TO/SIMUALTION FOPT FOPR WWCT:OPX
and it will load the summary results and print the vectors FOPT, FOPR
and WWCT:OPX
.
Anyway - I have tried loading the case you sent me with summary.x
- and also with the commercial application S3Graf - and that seems to work fine. Could the bug be in MRST?
Yes. I have the summary.x
and I am able to output some results.
Could you please tell me some information or practice on how to visualize based on the ert or ert-python? It will be great if there are some links or tutorial.
Could the bug be in MRST?
It could be. I can talk with someone from MRST side to see what possibly causes the problem.
The fact is that the MRST function works well with Eclipse summary file and also the old OPM summary file (in OPM-data). It is just recently (I do not know how recent it can be, weeks or one or two months?) something wrong happened.
It also can be true that not many people use both MRST and OPM. More likely, people work with MRST and ECL or OPM and ECL. I can be the one of the few people encounter this problem.
Anyway, I would like to learn some ert based plotting or visualization techiniques.
Plotting from summary files is now supported in Resinsight, just compile the dev branch from github :-)
Plotting from summary files is now supported in Resinsight, just compile the dev branch from github :-)
It is good to know about that, thanks. I have been trying to learn ResInsight from time to time. It is very good, especially for complicated simulation cases.
The reason I like MRST based plotting routine is that it gives some flexibility to customize the style, and also plotting different results for comparison, etc. , which is important for publishing.
The python based plotting routine probably also can provides some similiar features, hopefully.
Comparing curves is well supporter inn Resinsight. Please provide feed-back with specific suggestions if you miss something on the stylistic side.
Anyway, I would like to learn some ert based plotting or visualization techiniques.
The ert based stuff is mainly a toolbox; to get beautiful plots with semi-transparent nudes in the background you must still do some tinkering! Anyway - if you are interested in this you could start with the summaryplot
in opm-utilities. The absolutely simplest plotting program you could make would be something like:
#!/usr/bin/env python
import sys
from ert.ecl import EclSum
import matplotlib.pyplot as pyplot
def plot_vector(case, key):
values = case.get_values( key )
dates = case.get_mpl_dates( )
pyplot.plot_date( dates , values ,
xdate = True,
ydate = False,
color = "Red",
ls = "-",
lw = 2.0,
marker = None)
filename = "/tmp/%s_%s.png" % (case.base, key)
pyplot.savefig(filename)
print("Plot saved to: %s" % filename)
pyplot.show( )
# The script should be called as: plot /path/to/CASE key1 key2 ...
case = EclSum(sys.argv[1])
for key in sys.argv[2:]:
plot_vector( case , key )
The plotting in this example is based on matplotlib - getting the plot to look like you want is then a question of fiddling with matplotlib.
I'll close this now under the rude assumption that the initial bug was in the MRST read routine; please feel free to reopen if you disagree.
I have been using the same routine
readSummaryLocal
from MRST to read the summary file from OPM for long.Now the problem happens when reading the
.SMSPEC
file. When reading some data type information (INTE
,REAL
,DOUB
, etc.). A new type likeH
orH
appears now and it causes problem with MRST.The routine still works well with the SUMMARY files from the Eclipse.
Anyone working with output routines has any clue? or which part I should look at the output code to figure out the possible reason?
Thanks.