Click or drag to resize

IResultData Interface

The result data access is the class that all producers or users of MIKE 1D results should use. The class is used for recording the results, reading results, hotstarting the Mike1D engine and extracting specific results.

Namespace:  DHI.Mike1D.ResultDataAccess
Assembly:  DHI.Mike1D.ResultDataAccess (in DHI.Mike1D.ResultDataAccess.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public interface IResultData

The IResultData type exposes the following members.

Properties
  NameDescription
Public propertyBridge
Get the bridge that was used for loading/saving
Public propertyCatchments
List of nodes
Public propertyConnection
Holder of read/write info
Public propertyDataItems
This can be used to iterate over all data items.
Public propertyDataSets
This can be used to iterate over all data sets. It will iterate the nodes, reaches, catchment and global data, but could be extended in the future.
Public propertyDeleteValue
Delete value for variables. Any double data value with this value will be treated as a missing value.
Public propertyEndTime
Data coverage start
Public propertyGlobalData
Global time series date
Public propertyMaxBufferSize
The MaxBufferSize is the limit for how many time steps that may be held in memory during file generation.
Public propertyNetworkDatas
Static data on the network.

Used for user defined markers from MIKE 11 and Critical Levels in MU.

Public propertyNetworkDataSet Obsolete.
Static data on the network.

Also used for user defined markers from MIKE 11

Public propertyNodes
List of nodes
Public propertyNumberOfTimeSteps
Number of time steps
Public propertyParameters
Parameters to use when loading results
Public propertyProjectionString
A WKT string defining the spatial reference system. See IDfsProjection for details.
Public propertyQuantities
List of the contained quantities
Public propertyReaches
List of reaches
Public propertyResultType
Result type
Public propertyStartTime
Data coverage start
Public propertyStructureTypes
List of the contained quantities. Note: This is a derived property
Public propertyTimesList
TimeStamp list data. List of DateTimes.
Public propertyUnitSystem
Unit system of the simulation that produced the result data object.

When creating a result data object and storing: Properties of ResultData objects (coordinates, bottom levels etc.) must always be set in SI units.

When loading a result data object from storage: The UnitSystem and ConvertGeometry can be used to change units of data and properties in the Result Data object. This property will maintain the original value and will not be changed by updating the IResultDataParameters

Top
Methods
  NameDescription
Public methodDispose
Dispose of ressources
Public methodFlush
Saves the contents of the class using the defined connection.
Public methodGenerateDerivedProperties
Generate derived properties: ResultData.Quantities and ResultData.StructureTypes
Public methodGetNumberOfDataItems
Total number of data items.
Public methodGetNumberOfElements
Total number of elements.
Public methodGetTimesAsArray
Gettter for the time stamps contained. The time stamps are returned in a [NumerOfTimeSteps, 7] array. A row contains year, month, day, hour, minute, second, millisecond.
Public methodGridPointsWithStructure
List of gridpoints that contain a specific structure. Note: This is a derived property
Public methodLoad
Loads results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data.
Public methodLoad(IDiagnostics)
Loads results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data.
Public methodLoadData
Loads the dynamic data of the results from a persistent media into memory. The LoadHeader(IDiagnostics) must already have been called.
Public methodLoadHeader(IDiagnostics)
Loads the header information of the results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data.
Public methodLoadHeader(Boolean, IDiagnostics)
Loads the header information of the results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data. Using the filter argument the user may choose to load only a sub-selection of the entire data.
Public methodPrepare
Prepare the result data for new data. After this is called, the result data should be ready to handle calls to Update(DateTime) and UpdateAndFlushIfNeeded(DateTime). This will usually open the file on the disc, making it ready to write to the file.
Public methodSave
Saves the contents of the class using the defined connection.
Public methodTriggerTimeStepEvent
Trigger the time step event, e.g. in case a time step has been added, updated or before writing to file.
Public methodUpdate(DateTime)
The method pulls data into the result data access module and passes the data to the dataItems.
Public methodUpdate(DateTime, Int32)
The method pulls data into the result data access module and passes the data to the dataItems, storing it at the specifed updateIndex.
Public methodUpdateAndFlushIfNeeded
The methods checks if an update is needed for this time (time step). If so, data is pulled into the result data object and passes the data to the dataItems. After this it is tested whether the number of time steps kept in the DataItems are larger or equal to MaxBufferSize. In case it is the data is flushed to persistant storage.
Top
Events
  NameDescription
Public eventTimeStepEvent
Event triggered everytime a time step has been read
Top
Extension Methods
  NameDescription
Public Extension MethodFilterLoadsAllTimes
Check if filter will load all time steps. Header must have been loaded, such that resultData knows the extent in time of the data.
(Defined by ResultDataExtensions.)
Public Extension MethodInitializeTimeData
Initialize all data items with default time-data objects. This can be used when storing data for many time steps in a result data object, typically when reading.
(Defined by ResultDataExtensions.)
Public Extension MethodQuantities
Extract all quantities of a result data object.
(Defined by ResultDataExtensions.)
Public Extension MethodQuantityDataItems
Extract all quantities and dataitems of a result data object, grouped by their quantity
(Defined by ResultDataExtensions.)
Public Extension MethodRemoveTimestep
Extract all quantities of a result data object.
(Defined by ResultDataExtensions.)
Public Extension MethodRemoveUnusedDataItems
Remove unused data items from resultData object
(Defined by Res1DExtensions.)
Top
See Also