mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Python doc : Add more doc and example for timestep class
This commit is contained in:
parent
236b0cb3d4
commit
ca644ba477
@ -128,7 +128,21 @@ class Case (PdmObject):
|
||||
return receivedActiveCells
|
||||
|
||||
def timeSteps(self):
|
||||
"""Get a list containing time step strings for all time steps"""
|
||||
"""Get a list containing all time steps
|
||||
|
||||
The time steps are defined by the class **TimeStepDate** :
|
||||
|
||||
Type | Name
|
||||
--------- | ----------
|
||||
int | year
|
||||
int | month
|
||||
int | day
|
||||
int | hour
|
||||
int | minute
|
||||
int | second
|
||||
|
||||
|
||||
"""
|
||||
return self.stub.GetTimeSteps(self.request).dates
|
||||
|
||||
def daysSinceStart(self):
|
||||
|
@ -1,6 +1,6 @@
|
||||
###################################################################################
|
||||
# This example will connect to ResInsight, retrieve a list of cases and print info
|
||||
# Also creates a new view for all cases
|
||||
#
|
||||
###################################################################################
|
||||
|
||||
# Import the ResInsight Processing Server Module
|
||||
@ -16,7 +16,11 @@ if resInsight is not None:
|
||||
for case in cases:
|
||||
print("Case name: " + case.name)
|
||||
print("Case grid path: " + case.gridPath())
|
||||
# Create a new view
|
||||
view = case.createView()
|
||||
|
||||
timesteps = case.timeSteps()
|
||||
for t in timesteps:
|
||||
print("Year: " + str(t.year))
|
||||
print("Month: " + str(t.month))
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user