2019-08-19 13:46:14 +02:00
|
|
|
###################################################################################
|
|
|
|
|
# This example will connect to ResInsight, retrieve a list of cases and print info
|
2019-09-02 11:44:17 +02:00
|
|
|
#
|
2019-08-19 13:46:14 +02:00
|
|
|
###################################################################################
|
|
|
|
|
|
|
|
|
|
# Import the ResInsight Processing Server Module
|
2019-06-03 14:33:16 +02:00
|
|
|
import rips
|
2019-05-20 13:21:02 +02:00
|
|
|
|
2019-08-19 13:46:14 +02:00
|
|
|
# Connect to ResInsight
|
2019-09-19 13:25:04 +02:00
|
|
|
resinsight = rips.Instance.find()
|
|
|
|
|
if resinsight is not None:
|
2019-08-19 13:46:14 +02:00
|
|
|
# Get a list of all cases
|
2019-09-19 13:25:04 +02:00
|
|
|
cases = resinsight.project.cases()
|
2019-06-03 14:33:16 +02:00
|
|
|
|
|
|
|
|
print ("Got " + str(len(cases)) + " cases: ")
|
|
|
|
|
for case in cases:
|
2019-10-09 09:21:28 +02:00
|
|
|
print("Case id: " + str(case.case_id))
|
2019-08-19 13:46:14 +02:00
|
|
|
print("Case name: " + case.name)
|
2019-10-09 09:21:28 +02:00
|
|
|
print("Case type: " + case.type)
|
2019-09-19 11:14:40 +02:00
|
|
|
print("Case grid path: " + case.grid_path())
|
2020-01-23 14:43:51 +01:00
|
|
|
print("Case reservoir bounding box:", case.reservoir_boundingbox())
|
2019-09-02 11:44:17 +02:00
|
|
|
|
2019-09-19 11:14:40 +02:00
|
|
|
timesteps = case.time_steps()
|
2019-09-02 11:44:17 +02:00
|
|
|
for t in timesteps:
|
|
|
|
|
print("Year: " + str(t.year))
|
|
|
|
|
print("Month: " + str(t.month))
|
|
|
|
|
|
2019-08-23 11:25:00 +02:00
|
|
|
|
2019-08-19 13:46:14 +02:00
|
|
|
|