Class DFS0
- Namespace
- BlueM.Wave.Fileformats
- Assembly
- Wave.dll
Class for importing the DHI MIKE Dfs0 format
Requires the DHI.DFS Nuget package: https://www.nuget.org/packages/DHI.DFS/
Docs:
- https://docs.mikepoweredbydhi.com/core_libraries/dfs/dfs_api/
- https://docs.mikepoweredbydhi.com/core_libraries/dfs/dfs-file-formats/#dfs0-file
- https://docs.mikepoweredbydhi.com/SDK_UserGuide/#eum-quantity
Code is loosely based on the following examples: https://github.com/DHI/MIKECore-Examples/blob/master/Examples/CSharp/ExamplesDfs0.cs
public class DFS0 : TimeSeriesFile
- Inheritance
-
DFS0
- Inherited Members
Remarks
Only works in x64
Constructors
DFS0(string, bool)
public DFS0(string FileName, bool ReadAllNow = false)
Parameters
Properties
UseImportDialog
Flag indicating whether to show the import dialog
public override bool UseImportDialog { get; }
Property Value
Methods
InterpretationToDataValueType(InterpretationEnum)
Converts a TimeSeries.Interpretation to a DHI.Generic.MikeZero.DFS.DataValueType
public static DataValueType InterpretationToDataValueType(TimeSeries.InterpretationEnum interpretation)
Parameters
interpretation
TimeSeries.InterpretationEnumthe interpretation to convert
Returns
- DataValueType
the corresponding DataValueType, defaults to DataValueType.Instantaneous
UnitToEUMUnit(string)
Converts a string unit to a DHI.Generic.MikeZero.eumUnit
public static eumUnit UnitToEUMUnit(string unit)
Parameters
unit
stringunit
Returns
- eumUnit
the corresponding eumUnit, defaults to eumUUnitUndefined
Write_File(ref List<TimeSeries>, string)
Writes one or more timeseries to a DFS0 file Displays a dialog for setting EUM Item and Unit
public static void Write_File(ref List<TimeSeries> tsList, string path)
Parameters
tsList
List<TimeSeries>list of TimeSeries
path
stringpath to file
readFile()
Reads the file
public override void readFile()
readSeriesInfo()
Reads series info
public override void readSeriesInfo()