ResInsight/ThirdParty/Ert/docs/course/config/jobs/snake_oil_diff.py
Jacob Støren f5d1d2d1f9 #1396 Update libEcl to 06a39878636af0bc52582430ad0431450e51139c
To include phase split well connection rates and some summary intersect support. Supposedly Final update before release.
2017-05-08 13:37:39 +02:00

25 lines
714 B
Python

#!/usr/bin/env python
from ecl.ecl import EclSum
def writeDiff(filename, vector1, vector2):
with open(filename, "w") as f:
for index in range(len(vector1)):
node1 = vector1[index]
node2 = vector2[index]
diff = node1.value - node2.value
f.write("%f\n" % diff)
if __name__ == '__main__':
ecl_sum = EclSum("SNAKE_OIL_FIELD")
report_step = 199
writeDiff("snake_oil_opr_diff_%d.txt" % report_step, ecl_sum["WOPR:OP1"], ecl_sum["WOPR:OP2"])
writeDiff("snake_oil_wpr_diff_%d.txt" % report_step, ecl_sum["WWPR:OP1"], ecl_sum["WWPR:OP2"])
writeDiff("snake_oil_gpr_diff_%d.txt" % report_step, ecl_sum["WGPR:OP1"], ecl_sum["WGPR:OP2"])