Skip to content

Tools

Properties of a tool (if any) can be specified in the Properties window in MIKE WORKBENCH.

Accumulation

This tool calculates the accumulation of all values in a time series. Note this is not the same as summing the values. For rates and instantaneous values, accumulation is calculated by multiplying the values by the time period they are applicable.

Tool Info Accumulation
Tools Explorer /Basic statistics/Accumulation
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IAccumulationTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Accumulation") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.AccumulationTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
double value = (double)outputItem.TabularData.Rows[0][1];

Annual Maximum

This tool extracts the annual maximum. The start of the year can be set to any day and month.

Tool Info Annual Maximum
Tools Explorer /Extreme value extraction/Annual Maximum
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ExtremeValues
API Reference DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.IAnnualMaximumTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Day StartDay Gets or sets start day of water year
Month StartMonth Gets or sets start month of water year

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Annual Maximum") as DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.AnnualMaximumTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts);
tool.StartDay = 1;
tool.StartMonth = 5;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Annual maximum series (seasonal)

In the annual maximum series (AMS) method the maximum value in each year of the record are extracted for the extreme value analysis.

Tool Info Annual maximum series (seasonal)
Tools Explorer /Basic statistics/Annual maximum series (seasonal)
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.ISeasonalAnnualMaximumTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Day StartDay Gets or sets start day of water year
Month StartMonth Gets or sets start month of water year
Day SeasonStartDay Gets or sets start day of season
Month SeasonStartMonth Gets or sets start month of season
Day SeasonEndDay Gets or sets end day of season
Month SeasonEndMonth Gets or sets end month of season

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Annual maximum series (seasonal)") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.ISeasonalAnnualMaximumTool;
# Get the tool.
tool = app.Tools.CreateNew("Annual maximum series (seasonal)")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.ISeasonalAnnualMaximumTool(app.Tools.CreateNew("Annual maximum series (seasonal)"))

Annual N-Day Minimum

Tool for calulating the annual day minimum of a time series.

Tool Info Annual N-Day Minimum
Tools Explorer /Extreme value extraction/Annual N-Day Minimum
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ExtremeValues
API Reference DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.IAnnualNDayMinimumTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Day StartDay Gets or sets start day of water year
Month StartMonth Gets or sets start month of water year
Number of days (n) to average AverageLength Gets or sets length of averaging

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Annual N-Day Minimum") as DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.AnnualNDayMinimumTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts);
tool.StartDay = 1;
tool.StartMonth = 1;
tool.AverageLength = 10;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Append

The Append tool is used to append a time series or a value to an existing time series. The following methods are available: - Append_timeseries – One time series is appended to the other, at a user specified date(Master time series / Date settings appear when selected). If both time series contains a time step at the append date, the value from the master time series will be used. - Append_value – Adds a specified single value at a user specified date(value / date tool setting appears when selected). - Append_last_value – Adds the last value of a time series to a new time step at a user specified date(Date setting appear when selected).

Tool Info Append
Tools Explorer /Time series processing/Append
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IAppendTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Append option AppendOption Gets or sets the Append option.
Date AppendDate Gets or sets a value indicating the DateTime value the append cuts between timeseries. All steps in the master timeseries before and on AppendDate are copied to the output timeseries. All steps in the other timeseries after AppendDate are copied to the output timeseries. If the other timeseries has a step on AppendDate - and the master did not - it is copied to the output timeseries.
Date AppendDateValue Gets or sets a value indicating the time for which the specified value shall be inserted.
Value AppendValue Gets or sets the value that shall be appended at the specified AppendDateValue.
Master Timeseries MasterTimeseries Gets or sets the name of the master time series to append time steps to.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Append") as DHI.Solutions.TimeseriesManager.Tools.Processing.AppendTool;

// Set the tool properties and execute.
tool.AppendOption = DHI.Solutions.TimeseriesManager.Tools.Processing.AppendOption.Append_last_value;
tool.InputItems.Add(ts1);
tool.InputItems.Add(ts2);
tool.MasterTimeseries = "TsName1";
tool.AppendDate = new DateTime(2000, 1, 5, 0, 0, 0, 0);
tool.AppendDateValue = new DateTime(2018, 8, 30);
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Append values

This tool is used for appending values on an existing time series in the database.

Tool Info Append values
Tools Explorer /Import Tools/Append values
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.IAppendValuesTools
Input Items A single time series
Output Items A time series

Tool Properties

Display Name Name Description
File path FilePath Gets or sets the csv file names.
IsOutOfPlatform Gets or sets a value indicating whether tool is out of platform
Template TemplateName Gets or sets the template of the previous chart
Flag file path FlagFilePath Gets or sets the path of flag file
Mapping file path FlagMappingFilePath Gets or sets the path of mapping flag file
Overwrite exist value OverwriteExistingValues Gets or sets a value indicating whether over write the existing value
OverwriteExistingFlags Gets or sets a value indicating whether over write the existing flags
Delimiter Delimiter Gets or sets the delimiter of the input file
Decimal separator DecimalSeparator Gets or sets the decimal separator
Time format TimeFormat Gets or sets the time format
Use default time format UseDefaultTimeFormat Gets or sets a value indicating whether use default time format
Time column TimeColumn Gets or sets the time column
Data column DataColumn Gets or sets the data column
Data start row DataStartRow Gets or sets the data start row

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Append values") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.AppendValuesTools;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.AutoUIExecute = false;
tool.FilePath = @"c:\temp\spreadsheet1.xlsx";
tool.IsOutOfPlatform = true;
tool.FlagMappingFilePath = @"c:\temp\MappingSpreadsheet.xlsx";
tool.OverwriteExistingFlags = true;
tool.DecimalSeparator = ".";
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Auto-correlation

This tool calculates the auto-correlation value of a time series.

Tool Info Auto-correlation
Tools Explorer /Advanced statistics/Auto-correlation
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IAutoCorrelationTool
Input Items A single time series
Output Items An X-Y data series

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Auto-correlation") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.AutoCorrelationTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Average

The Average tool is used to calculate the simple mean and/or time weighted average of one or more time series.

Tool Info Average
Tools Explorer /Basic statistics/Average
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.ITimeWeighedAverageValueTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
Time weighted average TimeBasedAverageValue Gets or sets a value indicating whether the type of average.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Average") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.TimeWeighedAverageValueTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.TimeBasedAverageValue = true;
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = (double)outputItem.TabularData.Rows[0][1];

BasicAvgNumEvent

The Count per year (average) tool returns the average number of time steps per year that contains values.

Tool Info BasicAvgNumEvent
Tools Explorer /Basic statistics/BasicAvgNumEvent
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IBasicAvgNumEventTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("BasicAvgNumEvent") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.BasicAvgNumEventTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
double actual = (double)outputItem.TabularData.Rows[0][1];

BasicLMoments

L-moments are statistics used to summarize the shape of a probability distribution. They are analogous to ordinary moments in that they can be used to calculate quantities analogous to standard deviation, skewness and kurtosis, termed the L-scale, L-skewness and L-kurtosis respectively (the L-mean is identical to the conventional mean). L-moments differ from conventional moments in that they are calculated using linear combinations of the ordered data; the "l" in "linear" is what leads to the name being "L-moments". Just as for conventional moments, a theoretical distribution has a set of population L-moments.

Output contains a table containing five columns with one row for each input item:

  • Name of input time series
  • L1
  • L2
  • L_Skewness
  • L_Kurtosis
Tool Info BasicLMoments
Tools Explorer /Advanced statistics/BasicLMoments
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IBasicLMomentsTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("BasicLMoments") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.BasicLMomentsTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = outputItem.TabularData.Rows[0];

BasicOrdinaryMoments

The Ordinary moments tool calculates the ordinary moments of one or more time series. The ordinary moments are: - Mean - Variance - Skewness - Kurtosis

Tool Info BasicOrdinaryMoments
Tools Explorer /Basic statistics/BasicOrdinaryMoments
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IBasicOrdinaryMomentsTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("BasicOrdinaryMoments") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.BasicOrdinaryMomentsTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = outputItem.TabularData.Rows[0];

BasicSampleSize

The Basic Sample Size tool returns the number of time steps that contains values in a time series (number of time steps minus missing values).

Tool Info BasicSampleSize
Tools Explorer /Basic statistics/BasicSampleSize
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IBasicSampleSizeTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("BasicSampleSize") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.BasicSampleSizeTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
int result = (int)outputItem.TabularData.Rows[0][1];

Check time series tool

The Check time series tool checks the values of one or more time series, according to a specified criterion, and returns back a boolean with the result of the check.

Tool Info Check time series tool
Tools Explorer /QA-QC/Check time series tool
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.ICheckTimeseriesTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
Method CheckMethod Gets or sets the CheckMethod. The check method determines which check that will be applied to the input items.
Period PeriodOption Gets or sets the PeriodOption. The period option determines if the check shall be applied to the entire time series, or to a sub-period only
Start date StartDate Gets or sets the StartDate. The start date determines the start of the sub-period for which the check will be applied.
End date EndDate Gets or sets the EndDate. The end date determines the end of the sub-period for which the check will be applied.
Value CheckValue Gets or sets the CheckValue. The check value is the value that will be searched for if CheckMethod = Value_exists.
Max gap MaxGap Gets or sets the MaxGap. The max gap is the maximum acceptable gap in a time series. If a gap that exceeds the MaxGap is found in a time series, true is returned.
Range max RangeMax Gets or sets RangeMax. Range max is the minimum value of the range that will be checked for if CheckMethod = WithinRange.
Range min RangeMin Gets or sets RangeMin. Range min is the minimum value of the range that will be checked for if CheckMethod = WithinRange.
Max rate of change MaxRateOfChange Gets or sets the MaxRateOfChange. This is the value that defines the maximum acceptable rate of change. If this rate is exceeded in one or more time steps, true will be returned. Relevant if CheckMethod = Max_rate_of_change.
Rate of change unit RateOfChangeUnit Gets or sets the RateOfChangeUnit. The rate of change unit defines the unit of the specified MaxRateOfChange.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Check time series tool") as DHI.Solutions.TimeseriesManager.Tools.Processing.CheckTimeseriesTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds);
tool.CheckMethod = DHI.Solutions.TimeseriesManager.Tools.Processing.CheckMethod.Within_range;
tool.PeriodOption = DHI.Solutions.TimeseriesManager.Tools.Processing.CheckTimeseriesTool_PeriodOption.Entire_timeseries;
tool.RangeMax = 100;
tool.RangeMin = 5;
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
bool valueExists = (bool)outputItem.TabularData.Rows[0][1];

Convert to ensemble

Tool for converting two or more time series into a single ensemble time series.

Tool Info Convert to ensemble
Tools Explorer /Time series processing/Convert to ensemble
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IConvertToEnsembleTool
Input Items Two or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Ensemble name EnsembleName Gets or sets the name of ensemble name to the selected series
Target group TargetGroup Gets or sets a value indicating the selected series. to the selected series
Overwrite option DuplicateNameOption Gets or sets the option when a time series with the same name is already existed in the group

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Convert to ensemble") as DHI.Solutions.TimeseriesManager.Tools.Processing.ConvertToEnsembleTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds1);
tool.InputItems.Add(ds2);
tool.TargetGroup = "/test";
tool.EnsembleName = "EnsembleTest";
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Coverage

This tool calculates coverage of time series.

Tool Info Coverage
Tools Explorer /Advanced statistics/Coverage
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.ITimeSeriesCoverageTool
Input Items One or more time series
Output Items No output items

Tool Properties

Display Name Name Description
IsOutOfPlatform Gets or sets a value indicating whether tool is out of platform

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Coverage") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.ITimeSeriesCoverageTool;
# Get the tool.
tool = app.Tools.CreateNew("Coverage")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.ITimeSeriesCoverageTool(app.Tools.CreateNew("Coverage"))

Create timeseries

The Create time series tool is used to create a new time series based on a template time series. Optionally, a constant value can be inserted in each time step.

Tool Info Create timeseries
Tools Explorer /Time series processing/Create timeseries
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.ICreateTimeseries
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Start time StartTime Gets or sets the the start date of the new time series
End time EndTime Gets or sets the end date of the new time series
Value Value Gets or sets the value that will be inserted at all time steps.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Create timeseries") as DHI.Solutions.TimeseriesManager.Tools.Processing.CreateTimeseries;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.StartTime = new DateTime(2017, 12, 20);
tool.EndTime = new DateTime(2018, 1, 26);
tool.Value = 168;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Cross-correlation

The Cross-correlation tool measures the similarity between a time series and lagged versions of another time series as a function of the lag.

Tool Info Cross-correlation
Tools Explorer /Advanced statistics/Cross-correlation
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.ICrossCorrelationTool
Input Items Two or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Cross-correlation") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.CrossCorrelationTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds1_in);
tool.InputItems.Add(ds2_in);
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
string name = ds_out.TabularData.Rows[0][0].ToString();
double value = (double)ds_out.TabularData.Rows[0][1];

Cumulative distribution function

Cumulative distribution function tool, calculating the probability that a random variable, from a particular distribution, is less than a certain value.

Tool Info Cumulative distribution function
Tools Explorer /Probability distribution/Cumulative distribution function
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.CumulativeDistribution
API Reference DHI.Solutions.TimeseriesManager.Tools.CDFTool.ICDFTool
Input Items One or more estimation of distribution parameters
Output Items An X-Y data series

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Cumulative distribution function") as DHI.Solutions.TimeseriesManager.Tools.CDFTool.ICDFTool;
# Get the tool.
tool = app.Tools.CreateNew("Cumulative distribution function")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.CDFTool.ICDFTool(app.Tools.CreateNew("Cumulative distribution function"))

Data quantile

This tool calculates the data quantile. The data quantile is the value that a specified fraction of all raw data are less than. For a fraction of 0.5 the data quantile is the same as the median.

Tool Info Data quantile
Tools Explorer /Advanced statistics/Data quantile
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IDataQuantileTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
Fraction Fraction Gets or sets the fraction for which the data quantile shall be calculated for. For a fraction of 0.5 the data quantile is the same as the median.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Data quantile") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.DataQuantileTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Fraction = 0.25;
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = (double)outputItem.TabularData.Rows[0][1];    

Delta Change Factors

The Delta Change Factor tool downscales one or multiple climate parameter time series (precipitation, temperature, evaporation or potential evapotranspiration) using monthly delta change factors (CFs) given in NetCDF format. The tool can either generate delta change factors from control and scenario climate data or be given the delta change factors directly. Delta change factors are relative (precipitation, potential evapotranspiration) or absolute (temperature) changes of monthly averages derived from the comparison between scenario and control period. The monthly CFs are multiplied (added) by every value in the respective month of the observation time series in order to derive the downscaled and projected timeseries. Climate data is given in NetCDF format for the control and scenario period.If the periods span across several NetCDF files, then a CSV file can be used as input that lists the files in chronological order.

Tool Info Delta Change Factors
Tools Explorer /Downscaling/Delta Change Factors
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ClimateDeltaChangeDownscaling
API Reference DHI.Solutions.TimeseriesManager.UI.Tools.DeltaChangeDownscalingTool.IDeltaChangeDownscalingTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Minimum Rainfall Threshold (mm/month) MinimumRainfallThreshold Gets or sets a value indicating the minimum threshold for average monthly rainfall, below which the value is not considered in the calculation for Delta Change Factor for the month
Time Period Representative IsPeriodRepresentative Gets or sets a value indicating whether the data is representive of a time duration instead of the exact date or time. ie. if the data is daily data at 12pm (or any hour of the day), the data represents that entire day. If the data is monthly data and the date falls on the 15th day of the month (or any other day of the month), the data represents the entire month.
Calculate Delta Change Factor CalculateDeltaChangeFactors Gets or sets a value indicating whether delta change factors shall be calculated. If true, ControlDataFilePath, ScenarioDataFilePath and ChangeFactorFilePath (path to file to be created) shall be provided If false, only ChangeFactorFilePath is required
Calculate Delta Change for Observed Data only CalculateDeltaChangeFactorsOnlyForObservedData Gets or sets a value indicating whether delta change factors shall be calculated only for spatial grids in which the observed data resides If true, ControlDataFilePath, ScenarioDataFilePath and ChangeFactorsFilePath shall be provided
Output Suffix OutputSuffix Gets or sets the suffix to be added to the name of the input dataseries when naming output dataseries
Control Data File Path ControlDataFilePath Gets or sets the path for the control data NetCDF file In case control data splits across multiple files, pass the CSV file listing the multiple NetCDF files in chronological order Only required if CalculateDeltaChangeFactors is true
Scenario Data File Path ScenarioDataFilePath Gets or sets the path for the scenario data NetCDF file In case scenario data splits across multiple files, pass the CSV file listing the multiple NetCDF files in chronological order Only required if CalculateDeltaChangeFactors is true
Delta Change Factors File Path DeltaChangeFactorsFilePath Gets or sets the path for the delta change factors If CalculateDeltaChangeFactors is set to true, it represents the path for the file to be created Delta change factors file is generated if CalculateDeltaChangeFactors is true
Keep Timestep As Observed Data KeepTimestepAsObservedData Gets or sets a value indicating whether to keep the future timesteps the same as observed data. If KeepTimestepAsObservedData is set to true, the future timesteps will be the same as the observed timesteps. Else, it will be the same as the scenario timesteps

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Delta Change Factors") as DHI.Solutions.TimeseriesManager.UI.Tools.DeltaChangeDownscalingTool.IDeltaChangeDownscalingTool;
# Get the tool.
tool = app.Tools.CreateNew("Delta Change Factors")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.UI.Tools.DeltaChangeDownscalingTool.IDeltaChangeDownscalingTool(app.Tools.CreateNew("Delta Change Factors"))

Differences

A Timeseries Difference tool that can calculate residual time series from a master time series.

Tool Info Differences
Tools Explorer /Time series processing/Differences
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Differences
API Reference DHI.Solutions.TimeseriesManager.Tools.TSeriesDifferenceTool.ITimeseriesDifferenceTool
Input Items Two or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Master Timeseries MasterSeries Gets or sets a value indicating the selected series. All time series will be subtracted to the selected series

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Differences") as DHI.Solutions.TimeseriesManager.Tools.TSeriesDifferenceTool.TimeseriesDifferenceTool;

// Set the tool properties and execute.
tool.InputItems.Add(differenceTest_Ts_Master);
tool.InputItems.Add(differenceTest_Ts_Input);
tool.MasterSeries = differenceTest_Ts_Master.Name;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Distribution

Distribution Functions tool supporting distribution functions:

  • Cumulative (CDF) - The probability that a random variable, from a particular distribution, is less than a certain value.
  • Probability (PDF) - The probability of the random variable falling within a particular range of values.
Tool Info Distribution
Tools Explorer /Basic statistics/Distribution
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IDistributionTool
Input Items One or more time series
Output Items An X-Y data series

Tool Properties

Display Name Name Description
Distribution Type DistributionType Gets or sets the distribution Type.
Interval length IntervalLength Gets or sets the interval length
Start value StartValue Gets or sets the start value

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Distribution") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.DistributionTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.DistributionType = DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.DistributionType.CDF;
tool.IntervalLength = 214;
tool.StartValue = -28;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Double mass

The Double mass tool is used to determine whether there is a need for corrections to the data to account for changes in data collection procedures or other local conditions. The tool is configured in a dialog that appears when executing the tool.

Tool Info Double mass
Tools Explorer /Time series processing/Double mass
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.DoubleMass
API Reference DHI.Solutions.TimeseriesManager.UI.Tools.DoubleMassTool.IDoubleMassTool
Input Items Two or more time series
Output Items A time series

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Double mass") as DHI.Solutions.TimeseriesManager.UI.Tools.DoubleMassTool.IDoubleMassTool;
# Get the tool.
tool = app.Tools.CreateNew("Double mass")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.UI.Tools.DoubleMassTool.IDoubleMassTool(app.Tools.CreateNew("Double mass"))

Drought Duration and Volume

Drought duration and volume tool.

Tool Info Drought Duration and Volume
Tools Explorer /Advanced statistics/Drought Duration and Volume
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IDroughtTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Threshold Threshold Gets or sets threshold level for computation
Volume Unit VolumeUnit Gets or sets the volume unit.
Variable Variable Gets or sets variable.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Drought Duration and Volume") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.DroughtTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Threshold = 300;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Duration curve

A duration curve is based on the calculated exceedance probability for the range of values found in the time series being analyzed. A duration curve shows the range of data values found in the time series as a function of the exceedance probability. An exceedance probability of zero means that the value is exceeded at all times and a value of one indicates that the value is not exceeded in the time span covered by the time series.

Special case for instantaneous data, which are treated with EventsToScalarOperator. Slow, but correct, because: With interpolation for instantaneous data, where several thresholds may be crossed during a single time step, e.g., so the duration above those thresholds must also be counted (whereas a naive algorithm would only count the duration above the lowest of the two adjacent values in the single time step currently examined). Sketch:

Tool Info Duration curve
Tools Explorer /Advanced statistics/Duration curve
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IDurationCurveTool
Input Items One or more time series
Output Items An X-Y data series

Tool Properties

Display Name Name Description
X-axis Unit XAxisUnit Gets or sets the X-axis unit

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Duration curve") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.DurationCurveTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.XAxisUnit = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.XAxisUnitType.Fraction;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

EnsembleStatisticsTool

The ensemble statistics tool calculates a user specified statics for each input ensemble time series. The tool will return the calculated result as an ordinary time series with one value for each time step in the input ensemble time series. The tool calculates the statistics of the remaining elements once missing values are removed.

Tool Info EnsembleStatisticsTool
Tools Explorer /Ensemble/EnsembleStatisticsTool
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IEnsembleStatisticsTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Statistics StatOption Gets or sets the statistics option.
Probability Probability Gets or sets the probability for the quantile statistics option
Exceedance value ExceedanceConstant Gets or sets the Exceedance Constant value option
Non-exceedance value NonExceedanceConstant Gets or sets the Non Exceedance Constant value option

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("EnsembleStatisticsTool") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.EnsembleStatisticsTool;

// Set the tool properties and execute.
tool.StatOption = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.StatOption.Maximum;
tool.Execute();    

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Exceedance Duration and Volume

Exceedance duration and volume.

Tool Info Exceedance Duration and Volume
Tools Explorer /Advanced statistics/Exceedance Duration and Volume
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IExceedanceTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Threshold Threshold Gets or sets threshold level for computation

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Exceedance Duration and Volume") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.ExceedanceTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Threshold = 2000;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Extract ensemble members

A tool that can take an ensemble (multi-item) time series and produce a single item time series for each member.

Tool Info Extract ensemble members
Tools Explorer /Ensemble/Extract ensemble members
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IExtractEnsembleMembersTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Target group TargetGroup Gets or sets a value indicating the selected series. All time series will be subtracted to the selected series
Overwrite option DuplicateNameOption Gets or sets the option when a time series with the same name is already existed in the group
Save to database SaveToDatabase Gets or sets a value indicating whether the ensemble members should be saved to the database.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Extract ensemble members") as DHI.Solutions.TimeseriesManager.Tools.Processing.ExtractEnsembleMembers;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.TargetGroup = "/";
tool.DuplicateNameOption = DHI.Solutions.TimeseriesManager.Tools.Processing.DuplicateNameOption.CreateAndReplace;
tool.SaveToDatabase = true;
tool.Execute();

// Get the output of the tool.
var ds_member1 = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;
var ds_member2 = tool.OutputItems[1] as DHI.Solutions.Generic.IDataSeries;

Extract time period

Cuts all time series before start and beyond end date. This is done at the exact start and end dates, ie, if a TS does not have a time step at the start/end times, add it/them, and synchronize appropriately. The tool returns the extracted time series (clones).

Tool Info Extract time period
Tools Explorer /Time series processing/Extract time period
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IExtractPeriodTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Period Begin PeriodBegin Gets or sets the start time for the cut.
Period End PeriodEnd Gets or sets the end time for the cut.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Extract time period") as DHI.Solutions.TimeseriesManager.Tools.Processing.ExtractPeriodTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.PeriodBegin = new DateTime(2010, 1, 3, 12, 0, 0, 0);
tool.PeriodEnd = new DateTime(2010, 1, 8, 12, 0, 0, 0);
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Flag outliers

This tool adds a user specified flag to the values in a time series that falls within a specified criterion. Flags can be added to the original input time series, or a copy of the series. By default, Days=1.

Tool Info Flag outliers
Tools Explorer /QA-QC/Flag outliers
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IFlagOutlierTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Range max UpperLimit Gets or sets the upper limit of the data series.
Range min LowerLimit Gets or sets the lower limit of the data series.
Add flags to copy AddFlagsToCopy Gets or sets a value indicating whether the flags shall be added to a copy of the data series. If true, the flags shall be added to a copy of the data series. If false,the flags shall be added directly to the input time series.
Flag outliers FlagOutliers Gets or sets the flag selected.
Replace existing flags ReplaceExisting Gets or sets a value indicating whether the flags replace the existing one If the value is true, the tool will always flag a value identified as outliers, even if the time step already has been flagged (and hence existing flags will be overwritten). If false, the tool will not add flags to time steps that has already been flagged.
Criteria Option Option Gets or sets a value criteria for flagging
Maximum rate MaxRate Gets or sets a value of maximum allowed rate
Minimum rate MinRate Gets or sets a value of minimum allowed rate
Days Days Gets or sets a value of change of rate per days
Hours Hours Gets or sets a value of change of rate per hours
Minutes Minutes Gets or sets a value of change of rate per minutes
Seconds Seconds Gets or sets a value of change of rate per seconds
Smoothing Smoothing Gets or sets a value of smoothing
Unit Unit Gets or sets the unit.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Flag outliers") as DHI.Solutions.TimeseriesManager.Tools.Processing.IFlagOutlierTool;
# Get the tool.
tool = app.Tools.CreateNew("Flag outliers")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.Processing.IFlagOutlierTool(app.Tools.CreateNew("Flag outliers"))

Forecast statistics

Forecast statistics tool

Tool Info Forecast statistics
Tools Explorer /Advanced statistics/Forecast statistics
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IForecastStatisticsTool
Input Items A single time series group
Output Items An X-Y data series

Tool Properties

Display Name Name Description
Statistics Statistics Gets or sets the value of Statistics
Hindcast period HindCast Gets or sets the value of HindCast
Observation time series ObservationTimeseries Gets or sets the value of ObservationTimeseries
Forecast time series ForecastTimeseries Gets or sets the value of ForecastTimeseries

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Forecast statistics") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IForecastStatisticsTool;
# Get the tool.
tool = app.Tools.CreateNew("Forecast statistics")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IForecastStatisticsTool(app.Tools.CreateNew("Forecast statistics"))

Gap filler

Fill gaps in time series Y by: 1. finding the most closely correlated other time series X in the analysis that has data; 2. use linear regression to get Y(X) = mX + b. The coefficients m and b can be found along with the correlations (to save time, although logically, they don't have anything to do with each other in the logic of this tool) Note there is no requirement on data type or unit consistency between X and Y. In that sense, this approach is similar to co-kriging. (Strictly speaking, the m parameter includes any unit conversion.) Example for why the approach makes sense: It is ok to infer discharge from rainfall.

Tool Info Gap filler
Tools Explorer /Time series processing/Gap filler
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.GapFiller
API Reference DHI.Solutions.TimeseriesManager.UI.Tools.GapFillerTool.IGapFillerTool
Input Items Two or more time series
Output Items A time series

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Gap filler") as DHI.Solutions.TimeseriesManager.UI.Tools.GapFillerTool.IGapFillerTool;
# Get the tool.
tool = app.Tools.CreateNew("Gap filler")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.UI.Tools.GapFillerTool.IGapFillerTool(app.Tools.CreateNew("Gap filler"))

Goodness-of-fit Chi-Squared

The Chi-square goodness of fit test is a statistical hypothesis test used to determine whether a variable is likely to come from a specified distribution or not. It is often used to evaluate whether sample data is representative of the full population.

Tool Info Goodness-of-fit Chi-Squared
Tools Explorer /Probability distribution/Goodness-of-fit Chi-Squared
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.GoodnessOfFit.ChiSquared
API Reference DHI.Solutions.TimeseriesManager.Tools.FitChiSquaredTool.IFitChiSquaredTool
Input Items One or more estimation of distribution parameters
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Goodness-of-fit Chi-Squared") as DHI.Solutions.TimeseriesManager.Tools.FitChiSquaredTool.IFitChiSquaredTool;
# Get the tool.
tool = app.Tools.CreateNew("Goodness-of-fit Chi-Squared")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.FitChiSquaredTool.IFitChiSquaredTool(app.Tools.CreateNew("Goodness-of-fit Chi-Squared"))

Goodness-of-fit Kolmogorov-Smirnov

The Kolmogorov-Smirnov Goodness of Fit Test (K-S test) compares distribution data with a known distribution to determine if the data have the same distribution.

Tool Info Goodness-of-fit Kolmogorov-Smirnov
Tools Explorer /Probability distribution/Goodness-of-fit Kolmogorov-Smirnov
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.GoodnessOfFit.KolmogorovSmirnov
API Reference DHI.Solutions.TimeseriesManager.Tools.FitKSTool.IFitKSTool
Input Items One or more estimation of distribution parameters
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Goodness-of-fit Kolmogorov-Smirnov") as DHI.Solutions.TimeseriesManager.Tools.FitKSTool.IFitKSTool;
# Get the tool.
tool = app.Tools.CreateNew("Goodness-of-fit Kolmogorov-Smirnov")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.FitKSTool.IFitKSTool(app.Tools.CreateNew("Goodness-of-fit Kolmogorov-Smirnov"))

Goodness-of-fit Log-Likelihood

Tool for calculating the log-likelihood value of a regression model. It is a way to measure the goodness of fit for a model. The higher the value of the log-likelihood, the better a model fits a dataset.

Tool Info Goodness-of-fit Log-Likelihood
Tools Explorer /Probability distribution/Goodness-of-fit Log-Likelihood
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.GoodnessOfFit.LogLikelihood
API Reference DHI.Solutions.TimeseriesManager.Tools.FitLogLikelihoodTool.IFitLogLikelihoodTool
Input Items One or more estimation of distribution parameters
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Goodness-of-fit Log-Likelihood") as DHI.Solutions.TimeseriesManager.Tools.FitLogLikelihoodTool.IFitLogLikelihoodTool;
# Get the tool.
tool = app.Tools.CreateNew("Goodness-of-fit Log-Likelihood")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.FitLogLikelihoodTool.IFitLogLikelihoodTool(app.Tools.CreateNew("Goodness-of-fit Log-Likelihood"))

Goodness-of-fit Probability plot correlation coefficient

Tool for calculationg the correlation coefficient of a set of distribution parameters. The coefficient provides a measure of how good a linear prediction of the value of one of the two random variables can be formed based on an observed value of the other.

Tool Info Goodness-of-fit Probability plot correlation coefficient
Tools Explorer /Probability distribution/Goodness-of-fit Probability plot correlation coefficient
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.GoodnessOfFit.ProbabilityPlot
API Reference DHI.Solutions.TimeseriesManager.Tools.FitPPCCTool.IFitPPCCTool
Input Items One or more estimation of distribution parameters
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Goodness-of-fit Probability plot correlation coefficient") as DHI.Solutions.TimeseriesManager.Tools.FitPPCCTool.IFitPPCCTool;
# Get the tool.
tool = app.Tools.CreateNew("Goodness-of-fit Probability plot correlation coefficient")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.FitPPCCTool.IFitPPCCTool(app.Tools.CreateNew("Goodness-of-fit Probability plot correlation coefficient"))

ImportFromASCII

Import one or more time series from ASCII files. The ASCII file can contain multiple columns with time series. The name of the time series are specified in the first row of the file.

Only data consisting of a date and a value will be read. There may be other text in the file, but it will not be read. The exception is the optional title of the value column, which must be placed next to the DateTime-column. This will be the title of the time series.

Tool Info ImportFromASCII
Tools Explorer /Import Tools/ImportFromASCII
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.IImportFromASCIITool
Input Items No or a single time series group
Output Items A time series

Tool Properties

Display Name Name Description
File path FilePath Gets or sets the file name. Enabled when ImportFromOption = SingleFile.
Group Group Gets or sets the Group to which the time series / ensemble will be imported.
Folder Folder Gets or sets the Folder from which the time series / ensemble will be imported from. Enabled when ImportFromOption = Folder.
Import from ImportFromOption Gets or sets the import option. The import option determines if a single file, or all files in a specified folder shall be imported.
Import as ImportAsOption Gets or sets the import option. The import option determines if the items in the selected file(s) shall be imported as time series or time series ensembles.
Ensemble name EnsembleName Gets or sets the name of the imported ensemble. Enabled when ImportAsOption = Ensemble.
To Database ImportToDatabase Gets or sets a value indicating whether the imported series shall be written to the database. Default is true, but for unit test, it shall be false.
Time zone TimeZone Gets or sets the value of timezone
Naming option NamingOption Gets or sets the time series naming option.
Import specification format BatchImportFormat Gets or sets the specification format of batch importing.
Spreadsheet SpreadsheetPath Gets or sets the path of the Spreadsheet that contains an optional import specification for importing more time series with varying properties. The spreadsheet can contain the following columns: "File name" (required), - "Item no.", "Group" (required), "Feature class (path)", "Feature (display attribute)", "Variable" (required for ASCII import), "Unit" (required for ASCII import), "ValueType" (required for ASCII import).
Variable Variable Gets or sets the DHI EUM variable for the time series.
Unit Unit Gets or sets the DHI EUM unit of the time series.
Value type ValueType Gets or sets the type of value of the time series.
Separator Separator Gets or sets the column separator in the ASCII file (Tab (\t), Comma ",", SemiColon ";" or Space " "). The default is Tab (\t).
Date Column DateColumn Gets or sets the date column. The default date column is the first column of the file (1).
Value Column ValueColumn Gets or sets the value column. The default is the second column (2)
First Data Row FirstDataRow Gets or sets the first data row. The default is the second row (2). Note that the first row (1) in the file can contain unit and variable of the time series to import in the following format. "Discharge[m^3/s]:Instantaneous". In this case the first data row will be 3.
Date time format DateTimeFormat Gets or sets the time format of the DateColumn column. Default is "yyyy-MM-dd HH:mm:ss".
Decimal separator DecimalSeparator Gets or sets the decimal separator.
Missing Value MissingValue Gets or sets the value used for missing values in the file.

Code Sample

// Get the tool assuming that the tool is already loaded.
var tool = application.Tools.CreateNew("ImportFromASCII") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromASCIITool;

tool.ImportFromOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromOption.SingleFile;
// Set column separator of the file (default=Tab).
tool.Separator = "Comma";
// Setting the file path will parse the file header using the separator.
tool.FilePath = @"c:\temp\TimeSeriesToImport.txt";
tool.Variable = "1st order rate AD model";
tool.Unit = "/h";
tool.Group = "/";
tool.ImportAsOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportAsOption.TimeSeries;

// Execute the tool
tool.Execute();

// Get the output of the tool.
var importedTsList = tool.OutputItems;

ImportFromDfs0

This tool will import dfs0 files to the DSS. The following import options are available: 1. Import a single dfs0 file 2. Import all dfs0 files in a specified folder to the dss. The tool can import the items in the selected dfs0 file(s) to a (number of) single item IDataSeries, or to a single multi item IDataSeries.

Tool Info ImportFromDfs0
Tools Explorer /Import Tools/ImportFromDfs0
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.IImportFromDfs0Tool
Input Items No or a single time series group
Output Items A time series

Tool Properties

Display Name Name Description
File path FilePath Gets or sets the file name. Enabled when ImportFromOption = SingleFile.
Group Group Gets or sets the Group to which the time series / ensemble will be imported.
Folder Folder Gets or sets the Folder from which the time series / ensemble will be imported from. Enabled when ImportFromOption = Folder.
Import from ImportFromOption Gets or sets the import option. The import option determines if a single file, or all files in a specified folder shall be imported.
Import as ImportAsOption Gets or sets the import option. The import option determines if the items in the selected file(s) shall be imported as time series or time series ensembles.
Ensemble name EnsembleName Gets or sets the name of the imported ensemble. Enabled when ImportAsOption = Ensemble.
To Database ImportToDatabase Gets or sets a value indicating whether the imported series shall be written to the database. Default is true, but for unit test, it shall be false.
Time zone TimeZone Gets or sets the value of timezone
Naming option NamingOption Gets or sets the time series naming option.
Import specification format BatchImportFormat Gets or sets the specification format of batch importing.
Spreadsheet SpreadsheetPath Gets or sets the path of the Spreadsheet that contains an optional import specification for importing more time series with varying properties. The spreadsheet can contain the following columns: "File name" (required), - "Item no.", "Group" (required), "Feature class (path)", "Feature (display attribute)", "Variable" (required for ASCII import), "Unit" (required for ASCII import), "ValueType" (required for ASCII import).

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("ImportFromDfs0") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromDfs0Tool;

// Set the tool properties and execute.
tool.ImportFromOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromOption.SingleFile;
tool.FilePath = @"c:\temp\discharge_station1.dfs0";
tool.Group = "/";
tool.ImportAsOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportAsOption.TimeSeries;
tool.NamingOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.NamingOption.FileNameAndItemName;
tool.ImportToDatabase = false;
tool.Execute();

// Get the output of the tool.
var importedTsList = tool.OutputItems;

ImportFromExcel

This tool is used for importing time series from Microsoft Excel.

Tool Info ImportFromExcel
Tools Explorer /Import Tools/ImportFromExcel
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.IImportFromExcelTool
Input Items No or a single time series group
Output Items A time series

Tool Properties

Display Name Name Description
Variable Variable Gets or sets the value of variable.
Unit Unit Gets or sets the value of unit.
Value type ValueType Gets or sets the list of value types supported.
Group TimeSeriesGroup Gets or sets the value of TS group or TS path in the MO database where the time series are placed. If a folder is specified, the time series name to use is the sensor name.
To Database ToDatabase Gets or sets a value indicating whether the time series should be imported into the time series database (true). False means that the time series can be found as output items of the tool only.
From Date FromDate Gets or sets the value of date from where data (time steps) should be taken.
To Date ToDate Gets or sets the value of date from where data (time steps) should be taken.
File path ExcelFilePath Gets or sets the Excel file name.
Sheet name SheetName Gets or sets the Excel Sheet name containing data to import.
Data start row DataStartRow Gets or sets the Excel start row number.
Date column DateColumn Gets or sets the Excel date column: Use letters(A, B, C etc).
Value column ValueColumn Gets or sets the Excel value column: Use letters(A, B, C etc).
Date format DateFormat Gets or sets the Excel date format, in case the value of the cell is not a DateTime. Default "MM/dd/yy".
Time series name OutputDataSeriesName Gets or sets output data series Name.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("ImportFromExcel") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromExcelTool;

// Set properties and execute the tool.
tool.ExcelFilePath = @"c:\temp\ts1.xlsx";
tool.SheetName = "Sheet1";
tool.DataStartRow = 2;
tool.DateColumn = "A";
tool.ValueColumn = "B";
tool.Variable = "Water Level";
tool.Unit = "m";
tool.ValueType = "Instantaneous";
tool.TimeSeriesGroup = "/";
tool.ToDatabase = false;
tool.Execute();

// Get the output of the tool.
var importedTsList = tool.OutputItems;

ImportFromGRIB

This tool is used for extracting time series from raster’s with the GRIB format. The time series for at single point can be imported or for all points.

Tool Info ImportFromGRIB
Tools Explorer /Import Tools/ImportFromGRIB
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportTsFromGRIBTool
Input Items No or a single time series group
Output Items A time series

Tool Properties

Display Name Name Description
File path FilePath Gets or sets the file path
Variable Variable Gets or sets the variable
Group Group Gets or sets the group
Time series overwrite option DuplicateNameOption Gets or sets the option when a time series with the same name is already present in the group
Extraction option ExtractionOption Gets or sets the extraction option
Latitude Latitude Gets or sets the latitude of the interested point
Longitude Longitude Gets or sets the longitude of the interested point
Import as ImportAsOption Gets or sets the import as option
Time series name OutputDataSeriesName Gets or sets the name of the output data series
Variable TargetVariable Gets or sets the target variable
Unit Unit Gets or sets the unit
Value type ValueType Gets or sets the type of value
Time type TimeVariableType Gets or sets the type of temporal axis
Zone layer Zone Gets or sets the feature class for the required zone
Recalculate Weights CalculateWeights Gets or sets a value indicating whether weights shall be recalculate
Grid feature class overwrite option for GridFeatureClassDuplicateNameOption Gets or sets the option when a grid feature class with the same name is already present in the group
IsZonePropertyActive Gets a value indicating whether the Zone property shall be visible
Zone feature Feature Gets or sets a feature from the feature class
Weights layer IntersectLayer Gets or sets intersect layer
Time zone TimeZone Gets or sets the time zone

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("ImportFromGRIB") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportTsFromGRIBTool;

// Set the tool properties and execute.
tool.FilePath = @"c:\temp\nah.hs.200008.grb";
tool.Variable = "Significantheightofcombinedwindwavesandswell";
tool.DataProvider = DHI.Solutions.TimeseriesManager.Tools.ImportTools.GRIBDataProvider.DMI;
tool.ExtractionOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.ExtractionOption.SinglePoint;
tool.ImportAsOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportAsOption.TimeSeries;
tool.Longitude = 300.0;
tool.OutputDataSeriesName = " GRIBTest";
tool.TimeVariableType = "Equidistant_Calendar";
tool.ValueType = "Instantaneous";
tool.TargetVariable = "1st order rate AD model";
tool.Unit = "/h";
tool.Group = "/";
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

ImportFromNetCdf

This tool is used for extracting time series from raster’s with the NetCDF format. The time series for a single point can be imported or for all points.

Tool Info ImportFromNetCdf
Tools Explorer /Import Tools/ImportFromNetCdf
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportTsFromNetCdfTool
Input Items No or a single time series group
Output Items A time series

Tool Properties

Display Name Name Description
File path FilePath Gets or sets the file path
Variable Variable Gets or sets the variable
Group Group Gets or sets the group
Time series overwrite option DuplicateNameOption Gets or sets the option when a time series with the same name is already present in the group
Extraction option ExtractionOption Gets or sets the extraction option
Latitude Latitude Gets or sets the latitude of the interested point
Longitude Longitude Gets or sets the longitude of the interested point
Import as ImportAsOption Gets or sets the import as option
Time series name OutputDataSeriesName Gets or sets the name of the output data series
Variable TargetVariable Gets or sets the target variable
Unit Unit Gets or sets the unit
Value type ValueType Gets or sets the type of value
Time type TimeVariableType Gets or sets the type of temporal axis
Zone layer Zone Gets or sets the feature class for the required zone
Recalculate Weights CalculateWeights Gets or sets a value indicating whether weights shall be recalculate
Grid feature class overwrite option for GridFeatureClassDuplicateNameOption Gets or sets the option when a grid feature class with the same name is already present in the group
IsZonePropertyActive Gets a value indicating whether the Zone property shall be visible
Zone feature Feature Gets or sets a feature from the feature class
Weights layer IntersectLayer Gets or sets intersect layer
Time zone TimeZone Gets or sets the time zone

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("ImportFromNetCdf") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportTsFromNetCdfTool;

// Set the tool properties and execute.
tool.FilePath = @"c:\temp\Annual_temperature_32.nc";
tool.Variable = "temperature_at_1-5m";
tool.ExtractionOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.ExtractionOption.SinglePoint;
tool.ImportAsOption = DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportAsOption.TimeSeries;
tool.Latitude = 51.280002593994141;
tool.Longitude = 63.799999237060547;
tool.OutputDataSeriesName = " NetCdfTest";
tool.TimeVariableType = "Equidistant_Calendar";
tool.ValueType = "Instantaneous";
tool.TargetVariable = "1st order rate AD model";
tool.Unit = "/h";
tool.Group = "/";
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

ImportFromNOAA

This tool is used for importing time series from NOAA’s National Centers for Environmental Information (NCEI). NCEI is responsible for preserving, monitoring, assessing, and providing public access to the Nation's treasure of climate and historical weather data and information. https://www.ncdc.noaa.gov/cdo-web

Tool Info ImportFromNOAA
Tools Explorer /Import Tools/ImportFromNOAA
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.IImportFromNOAATool
Input Items No or a single time series group
Output Items A time series

Tool Properties

Display Name Name Description
Variable Variable Gets or sets the value of variable.
Unit Unit Gets or sets the value of unit.
Value type ValueType Gets or sets the list of value types supported.
Group TimeSeriesGroup Gets or sets the value of TS group or TS path in the MO database where the time series are placed. If a folder is specified, the time series name to use is the sensor name.
To Database ToDatabase Gets or sets a value indicating whether the time series should be imported into the time series database (true). False means that the time series can be found as output items of the tool only.
From Date FromDate Gets or sets the value of date from where data (time steps) should be taken.
To Date ToDate Gets or sets the value of date from where data (time steps) should be taken.
Token Token Gets or sets User specific token. To gain access to NCDC CDO Web Services, register with your email address to get a access token. https://www.ncdc.noaa.gov/cdo-web/token
Dataset Id DatasetId Gets or sets all of the CDO data are in datasets. The containing dataset must be known before attempting to access its data.
Data types DataTypes Gets or sets type of data, acts as a label.
Stations Stations Gets or sets stations are where the data comes from (for most datasets) and can be considered the smallest granual of location data.
Data selection DataSelection Gets or sets the result data selection (dataset id, data types, locations and stations).

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("ImportFromNOAA") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromNOAATool;

// Set the tool properties and execute.
tool.Token = "[token]";
tool.Variable = "Undefined";
tool.Unit = "()";
tool.ValueType = "Instantaneous";
tool.DatasetId = "GH_HLY";
tool.Stations = " COOP:010063";
tool.DataTypes = "HPCP";
tool.TimeSeriesGroup = "/";
tool.ToDatabase = false;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

ImportFromRes1d

This tool will import res1d files to the DSS.

Tool Info ImportFromRes1d
Tools Explorer /Import Tools/ImportFromRes1d
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromRes1dTool
Input Items No or a single time series group
Output Items A time series

Tool Properties

Display Name Name Description
File path FilePath Gets or sets the file name. Enabled when ImportFromOption = SingleFile.
Group Group Gets or sets the Group to which the time series / ensemble will be imported.
Folder Folder Gets or sets the Folder from which the time series / ensemble will be imported from. Enabled when ImportFromOption = Folder.
Import from ImportFromOption Gets or sets the import option. The import option determines if a single file, or all files in a specified folder shall be imported.
Import as ImportAsOption Gets or sets the import option. The import option determines if the items in the selected file(s) shall be imported as time series or time series ensembles.
Ensemble name EnsembleName Gets or sets the name of the imported ensemble. Enabled when ImportAsOption = Ensemble.
To Database ImportToDatabase Gets or sets a value indicating whether the imported series shall be written to the database. Default is true, but for unit test, it shall be false.
Time zone TimeZone Gets or sets the value of timezone
Naming option NamingOption Gets or sets the time series naming option.
Import specification format BatchImportFormat Gets or sets the specification format of batch importing.
Spreadsheet SpreadsheetPath Gets or sets the path of the Spreadsheet that contains an optional import specification for importing more time series with varying properties. The spreadsheet can contain the following columns: "File name" (required), - "Item no.", "Group" (required), "Feature class (path)", "Feature (display attribute)", "Variable" (required for ASCII import), "Unit" (required for ASCII import), "ValueType" (required for ASCII import).

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("ImportFromRes1d") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromRes1dTool;
# Get the tool.
tool = app.Tools.CreateNew("ImportFromRes1d")

ImportFromSensemetricsTool

This tool is used for importing time series from Sensemetrics.

Tool Info ImportFromSensemetricsTool
Tools Explorer /Import Tools/ImportFromSensemetricsTool
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.IImportFromSensemetricsTool
Input Items No input items required
Output Items A time series

Tool Properties

Display Name Name Description
Variable Variable Gets or sets the value of variable.
Unit Unit Gets or sets the value of unit.
Value Type ValueType Gets or sets the list of value types supported.
Time Series Group TimeSeriesGroup Gets or sets the value of TS group or TS path in the MO database where the time series are placed. If a folder is specified, the time series name to use is the sensor name.
To Database ToDatabase Gets or sets a value indicating whether the time series should be imported into the time series database (true). False means that the time series can be found as output items of the tool only.
From Date FromDate Gets or sets the value of date from where data (time steps) should be taken.
To Date ToDate Gets or sets the value of date from where data (time steps) should be taken.
API Key APIKey Gets or sets the value of API Key for getting access to connections, devices and sensors.
Node/Connection Connection Gets or sets the value of a connection contains devices. It is possible to query a connection to get available devices.
Devices Devices Gets or sets the value of Devices.
Sensors Sensors Gets or sets the sensors to import.
Host Host Gets or sets the value of Host.
Metrics Metrics Gets or sets the metrics to import.
Retrieval parameters RetrievalParamsXml Gets or sets the retrieval parameters XML.

Tool Methods

  • GetNodeIds(): Gets the node ids/connections available using the API Key
  • GetDeviceIds(System.String nodeId): Gets the device ids of a node
  • GetSensorIds(): Gets a list of all sensor ids
  • GetSensorIds(System.String nodeId ,System.String deviceId): Gets a list of sensor ids for the specified device
  • GetSensors(): Gets a list of sensors.
  • GetMetrics(System.String sensorId): Gets a list of metrics of the specified sensor
  • GetMetrics(System.String nodeId ,System.String deviceId ,System.String sensorId): Gets a list of metrics of the specified node, device and sensor

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("ImportFromSensemetricsTool") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromSensemetricsTool;

// Set the tool properties and execute.
tool.APIKey = "[API Key]";
tool.Connection = "/n1/n2";
tool.Devices = "/d1/d2";
tool.Sensors = "/sensor";
tool.Metrics = "metrics";
tool.Variable = "Rainfall";
tool.Unit = "m";
tool.ValueType = "Instantaneous";
tool.ToDatabase = false;
tool.TimeSeriesGroup = "/";
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

ImportFromUSGS

The import from USGS tool is used to import time series data provided by the United States Geological Survey (USGS). Specifically, the tool downloads data from the USGS Daily Values Site Web Service (https://waterservices.usgs.gov/rest/DV-Service.html) and stores them in the selected time series group. The tool is designed to allow repeated execution in order to append more recent data to time series that already exist in the selected time series group.

Tool Info ImportFromUSGS
Tools Explorer /Import Tools/ImportFromUSGS
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ImportTools
API Reference DHI.Solutions.TimeseriesManager.Tools.ImportTools.IImportFromUSGSTool
Input Items No or a single time series group
Output Items A time series

Tool Properties

Display Name Name Description
Site Number SiteNo Gets or sets the site number of the station to download data from
Parameter Code ParameterCode Gets or sets the parameter code of time serie to download for the station
Statistics Type StatisticsType Gets or sets the type of time serie statistics to download for the station
Start Date StartDate Gets or sets the Start Date of downloaded data
End Date EndDate Gets or sets the End Date of downloaded data
Time Series Group TimeSeriesGroup Gets or sets the name of directory where time series will be stored
To Database ImportToDatabase Gets or sets a value indicating whether the imported series shall be written to the database. Default is true, but for unit test, it shall be false.
Ensure Euidistant Time Step EnsureEquidistant Gets or sets a value indicating whether it should be ensured that the time series imported are equidistant.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("ImportFromUSGS") as DHI.Solutions.TimeseriesManager.Tools.ImportTools.ImportFromUSGSTool;

// Set the tool properties and execute.
tool.StartDate = DateTime.MinValue;
tool.EndDate = DateTime.MinValue;
tool.SiteNo = "11456000,11458000";
tool.TimeSeriesGroup = "/";
tool.ImportToDatabase = false;
tool.ParameterCode = "00060";
tool.StatisticsType = "00003";
tool.EnsureEquidistant = true;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

MannKendall

The Mann-Kendall test is used for testing monotonic trend of a time series.

Tool Info MannKendall
Tools Explorer /Advanced statistics/MannKendall
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IMannKendallTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("MannKendall") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IMannKendallTool;
# Get the tool.
tool = app.Tools.CreateNew("MannKendall")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IMannKendallTool(app.Tools.CreateNew("MannKendall"))

Mann-Whitney test

The Mann-Whitney test is used for testing shift in the mean between two sub-samples defined from a time series.

Tool Info Mann-Whitney test
Tools Explorer /Advanced statistics/Mann-Whitney test
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IMannWhitneyTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
Split date SplitDate Gets or sets the date that splits data in 2 samples

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Mann-Whitney test") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IMannWhitneyTool;
# Get the tool.
tool = app.Tools.CreateNew("Mann-Whitney test")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IMannWhitneyTool(app.Tools.CreateNew("Mann-Whitney test"))

Maximum value

The Maximum Value Tool get the maximum value of the input time series, and returns it as a scalar value. The tool will return one value per input item.

Tool Info Maximum value
Tools Explorer /Basic statistics/Maximum value
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IMaximumValueTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Maximum value") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.MaximumValueTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = (double)outputItem.TabularData.Rows[0][1];

Minimum value

The Minimum Value Tool get the minimum value of the input time series, and returns it as a scalar value. The tool will return one value per input item.

Tool Info Minimum value
Tools Explorer /Basic statistics/Minimum value
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IMinimumValueTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Maximum value") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.MaximumValueTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = (double)outputItem.TabularData.Rows[0][1];

Mode

The Model value tool calculates the mode of the specified input series. The Mode is the value that occurs the most frequently in a sample. The mode is not necessarily unique, since the same maximum frequency may be attained at different values. The most ambiguous case occurs in uniform distributions, wherein all values are equally likely, and for samples drawn from continuous distributions where all values tend to occur only once. Since the latter is a very common, the Mode tool has been extended such that the user can specify a tolerance within which two values can be considered equal. In the case where the tolerance is set to low when mode is calculated for samples drawn from continuous distribution, the number of mode values will approach the number of values in the sample. When this happens, the concept becomes useless. To indicate when this happens, the user may set a limit to the number of values the tool can return. If this value is exceeded, the tool returns a single double.NaN.

Tool Info Mode
Tools Explorer /Advanced statistics/Mode
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IModeValueTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
Tolerance Tolerance Gets or sets the Tolerance. For samples drawn from discrete distributions, the tolerance should be set to zero. For samples drawn from continuous distributions the tolerance should be a positive number.
Max. no. of mode values MaxNoOfModeValuesReturned Gets or sets the Maximum number of mode values the tool may return. If this number is exceeded, the tool will return a single double.NaN.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Mode") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.ModeValueTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Tolerance = 0.1;
tool.MaxNoOfModeValuesReturned = 5;
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = (double)outputItem.TabularData.Rows[0][1];

Monthly Statistics

This tool calculates statistics for each specified month. This can be a single month or a range of months. For a timeseries containing several years, a calculation is made for each month in each year. In addition to the chosen statistic, it is possible to get monthly and yearly mean, maximum, and minimum. Note that these values are also based on the chosen time series.

Tool Info Monthly Statistics
Tools Explorer /Basic statistics/Monthly Statistics
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IMonthlyStatisticsTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
Tool to apply Tool Gets or sets the tool to use to calculate statistics. Only tools having scalars as output are supported
First Month FirstMonth Gets or sets the first month to calculate statistics.
Last Month LastMonth Gets or sets the last month to calculate statistics.
Average YearlyAverage Gets or sets a value indicating whether calculate yearly average statistics
Maximum YearlyMaximum Gets or sets a value indicating whether calculate yearly maximum
Minimum YearlyMinimum Gets or sets a value indicating whether calculate yearly minimum
Average MonthlyAverage Gets or sets a value indicating whether calculate monthly average
Maximum MonthlyMaximum Gets or sets a value indicating whether calculate monthly maximum
Minimum MonthlyMinimum Gets or sets a value indicating whether calculate monthly minimum
Statistics data StatisticsData Gets or sets the calculate statistics data

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Monthly Statistics") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IMonthlyStatisticsTool;
# Get the tool.
tool = app.Tools.CreateNew("Monthly Statistics")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IMonthlyStatisticsTool(app.Tools.CreateNew("Monthly Statistics"))

Moving Average

The Moving average tool calculates the moving average for a number of input time series. If the tool is configured to interpolate across gaps in the input time series, the user can specify a maximum duration / missing value count across interpolation shall take place. If interpolation across gaps is not allowed, or if the gaps in the input series exceeds the criteria defined by the user, gaps will be transferred to the output series.

Tool Info Moving Average
Tools Explorer /Time series processing/Moving Average
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IMovingAverageTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Averaging window position WindowPosition Gets or sets a value indicating the window position.
Interpolate across gaps InterpolateAcrossGaps Gets or sets a value indicating whether the algorithm shall interpolate across gaps in the input series or not. If set to true, the algorithm will interpolate across gaps that are less than a specified duration/number. If set to false, gaps in the input series will result in gaps in the output series.
Max. allowed gap duration MaxAllowedGapDuration Gets or sets a value indicating the no of missing values the algorithm shall interpolate across. (it has an effect when property InterpolateAcrossGaps is false).
Max. missing values per gap MaxNumberOfMissingValuesPerGap Gets or sets a value indicating the maximum duration a gap the algorithm shall interpolate across. (it has an effect when property InterpolateAcrossGaps is false).
Days TimeStepDay Gets or sets the Day part of the averaging window
Hours TimeStepHour Gets or sets the Hour part of the averaging window
Minutes TimeStepMinute Gets or sets the Minute part of the averaging window
Seconds TimeStepSecond Gets or sets the Second part of the averaging window

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Moving Average") as DHI.Solutions.TimeseriesManager.Tools.Processing.IMovingAverageTool;
# Get the tool.
tool = app.Tools.CreateNew("Moving Average")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.Processing.IMovingAverageTool(app.Tools.CreateNew("Moving Average"))

Nearest neighbour resampling

The “NearestNeighbourResampling” tool is type of weather generator used to generate daily time series ensembles of weather variables based on historical time series. The tool analyses historical time series from one or more locations of different variable types and shuffled the historical record to produce ensembles of time series with consistent spatiotemporal statistics.

Tool Info Nearest neighbour resampling
Tools Explorer /Weather generators/Nearest neighbour resampling
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.NearestNeighbourResampling
API Reference DHI.Solutions.TimeseriesManager.Tools.NearestNeighbourResampling.INearestNeighbourResampling
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Number of ensemble members to generate. NumberOfEnsembles Gets or sets the Day part of the resampling time span
Start year for generation StartDateYear Gets or sets the Month part of the resampling time span
Number of years to generate NumberOfYears Gets or sets the Day part of the resampling time span
Number of days within search window. DayWindow Gets or sets parameter _dayWindow. Where _dayWindow is the number of days within the search window. Default is 61 (same as the paper).
Number of nearest neighbours in feature vector (k) K Gets or sets parameter K. Where K is the number of nearest neighbors from which to select.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Nearest neighbour resampling") as DHI.Solutions.TimeseriesManager.Tools.NearestNeighbourResampling.INearestNeighbourResampling;
# Get the tool.
tool = app.Tools.CreateNew("Nearest neighbour resampling")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.NearestNeighbourResampling.INearestNeighbourResampling(app.Tools.CreateNew("Nearest neighbour resampling"))

Partial Duration Series

This tool is used to extract extreme events from a time series.

Tool Info Partial Duration Series
Tools Explorer /Extreme value extraction/Partial Duration Series
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ExtremeValues
API Reference DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.IPartialDurationSeriesTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
PDS Type PDSType Gets or sets type of PDS analysis
Threshold Level Threshold Gets or sets threshold level
Avg. Annual No of Exceed. AvgExceed Gets or sets average annual number of exceedances
Record Length [years] RecordLength Gets or sets record Length
Use Inter Event Time UseInterEventTime Gets or sets a value indicating whether use inter event time
Inter Event Time [hours] InterEventTime Gets or sets inter event time (in hours)
Use Inter Event Level UseInterEventLevel Gets or sets a value indicating whether use inter event level
Inter Event Level InterEventLevel Gets or sets inter event level

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Partial Duration Series") as DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.IPartialDurationSeriesTool;
# Get the tool.
tool = app.Tools.CreateNew("Partial Duration Series")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.IPartialDurationSeriesTool(app.Tools.CreateNew("Partial Duration Series"))

Partial duration series (seasonal)

This tool is used to extract extreme events from a time series on a seasonal basis.

Tool Info Partial duration series (seasonal)
Tools Explorer /Extreme value extraction/Partial duration series (seasonal)
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ExtremeValues
API Reference DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.ISeasonalPartialDurationSeriesTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
PDS Type PDSType Gets or sets type of PDS analysis
Threshold Level Threshold Gets or sets threshold level
Avg. Annual No of Exceed. AvgExceed Gets or sets average annual number of exceedances
Record Length [years] RecordLength Gets or sets Record Length
Use Inter Event Time UseInterEventTime Gets or sets a value indicating whether use inter event time
Inter Event Time [hours] InterEventTime Gets or sets inter event time (in hours)
Use Inter Event Level UseInterEventLevel Gets or sets a value indicating whether use inter event level
Inter Event Level InterEventLevel Gets or sets inter event level
Day SeasonStartDay Gets or sets start day of season
Month SeasonStartMonth Gets or sets start month of season
Day SeasonEndDay Gets or sets end day of season
Month SeasonEndMonth Gets or sets end month of season

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Partial duration series (seasonal)") as DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.ISeasonalPartialDurationSeriesTool;
# Get the tool.
tool = app.Tools.CreateNew("Partial duration series (seasonal)")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.ExtremeValues.ISeasonalPartialDurationSeriesTool(app.Tools.CreateNew("Partial duration series (seasonal)"))

Period Statistics

This tool calculates statistics for a specified period (daily, monthly etc.).

Tool Info Period Statistics
Tools Explorer /Basic statistics/Period Statistics
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.PeriodStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.PeriodStatisticsTool.IPeriodStatisticsTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Period Period Gets or sets the period to calculate statistics
Tool to apply Tool Gets or sets the tool to use to calculate statistics. Only tools having scalars as output are supported
Output Value Type ItemValueType Gets or sets the target Item Value Type.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Period Statistics") as DHI.Solutions.TimeseriesManager.Tools.PeriodStatisticsTool.IPeriodStatisticsTool;
# Get the tool.
tool = app.Tools.CreateNew("Period Statistics")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.PeriodStatisticsTool.IPeriodStatisticsTool(app.Tools.CreateNew("Period Statistics"))

Quality flag filter

The quality flag filter tool can be used to process the flagged values of the input time series.

Tool Info Quality flag filter
Tools Explorer /QA-QC/Quality flag filter
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IQualityFlagFilterTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Filter Mode FlagOption Gets or sets a value flag option. It can be "Skip" or "Substitute"
Flag selection QualityFlag Gets or sets a value Quality Flag. Comma separated string contains integers
Value ValueToInsert Gets or sets the value to insert.
Process Copy ProcessCopy Gets or sets a value indicating whether process the input items' copy.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Quality flag filter") as DHI.Solutions.TimeseriesManager.Tools.Processing.IQualityFlagFilterTool;
# Get the tool.
tool = app.Tools.CreateNew("Quality flag filter")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.Processing.IQualityFlagFilterTool(app.Tools.CreateNew("Quality flag filter"))

Quantile estimates

Quantile Estimation Tool.

Tool Info Quantile estimates
Tools Explorer /Probability distribution/Quantile estimates
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.QuantileEstimates
API Reference DHI.Solutions.TimeseriesManager.Tools.QuantileEstimateTool.IQuantileEstimateTool
Input Items One or more estimation of distribution parameters
Output Items A data table

Tool Properties

Display Name Name Description
Return Period ReturnPeriod Gets or sets definition of return periods

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Quantile estimates") as DHI.Solutions.TimeseriesManager.Tools.QuantileEstimateTool.IQuantileEstimateTool;
# Get the tool.
tool = app.Tools.CreateNew("Quantile estimates")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.QuantileEstimateTool.IQuantileEstimateTool(app.Tools.CreateNew("Quantile estimates"))

Quantile Perturbation

The Quantile Perturbation tool downscales one or multiple climate parameter time series (precipitation, temperature, evaporation or potential evapotranspiration) using change factor quantile mapping (see Sunyer et. al. (2015) for a more detailed description). The change factor quantile mapping approach derives monthly, empirical cumulative distribution functions(CDF) for control and scenario climate data. Observations are projected, bias corrected and downscaled by mapping the probability of the observed value, determined from the CDF of the control period, to the scenario probability and corresponding value. This approach is also referred to as empirical quantile mapping.The graph under the “Quantile Quantile” tool illustrates the principle of quantile mapping. While the central part of the CDF is typically well described empirically, the extreme tail of the distribution is not.If the data in the observed record and the control data allow, i. e.there are at least 20 data points above the 95th percentile, then the tail of the distribution is parameterized using a Gamma/Pearson Type 3 distribution. This parametrization is also used to extrapolate projected values falling outside the range of the control data. Climate data is given in NetCDF format for the control and scenario period.If the periods span across several NetCDF files, then a CSV file can be used as input that lists the files in chronological order.

Tool Info Quantile Perturbation
Tools Explorer /Downscaling/Quantile Perturbation
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ClimateQuantilePerturbation
API Reference DHI.Solutions.TimeseriesManager.UI.Tools.QuantilePerturbationDownscalingTool.IQuantilePerturbationDownscalingTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Minimum Rainfall Threshold (mm/month) MinimumRainfallThreshold Gets or sets a value indicating the minimum threshold for average monthly rainfall in mm/mth, below which the value is not considered in the calculation for quantile perturbation for the month
Output Suffix OutputSuffix Gets or sets the suffix to be added to the name of the input dataseries when naming output dataseries
Control Data File Path ControlDataFilePath Gets or sets the path for the control data NetCDF file
Scenario Data File Path ScenarioDataFilePath Gets or sets the path for the scenario data NetCDF file
Keep Timestep As Observed Data KeepTimestepAsObservedData Gets or sets a value indicating whether to keep the future timesteps the same as observed data. If KeepTimestepAsObservedData is set to true, the future timesteps will be the same as the observed timesteps. Else, it will be the same as the scenario timesteps

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Quantile Perturbation") as DHI.Solutions.TimeseriesManager.UI.Tools.QuantilePerturbationDownscalingTool.IQuantilePerturbationDownscalingTool;
# Get the tool.
tool = app.Tools.CreateNew("Quantile Perturbation")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.UI.Tools.QuantilePerturbationDownscalingTool.IQuantilePerturbationDownscalingTool(app.Tools.CreateNew("Quantile Perturbation"))

Quantile Quantile

The Quantile Quantile tool downscales one or multiple climate parameter time series (precipitation, temperature, evaporation or potential evapotranspiration) using bias correction quantile mapping (see Sunyer et. al. (2015) for a more detailed description). The bias correction quantile mapping approach derives monthly, empirical cumulative distribution functions(CDF) for observations and control climate data. Scenario climate data are bias corrected and downscaled by mapping the probability of the scenario value, determined from the CDF of the control period, to the observed probability and corresponding value. This approach is also referred to as empirical quantile mapping.The graph below illustrates the principle of quantile mapping.

Tool Info Quantile Quantile
Tools Explorer /Downscaling/Quantile Quantile
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ClimateQuantileQuantile
API Reference DHI.Solutions.TimeseriesManager.UI.Tools.QuantileQuantileDownscalingTool.IQuantileQuantileDownscalingTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Minimum Rainfall Threshold (mm/month) MinimumRainfallThreshold Gets or sets a value indicating the minimum threshold for average monthly rainfall in mm/mth, below which the value is not considered in the calculation for quantile quantile for the month
Output Suffix OutputSuffix Gets or sets the suffix to be added to the name of the input dataseries when naming output dataseries
Control Data File Path ControlDataFilePath Gets or sets the path for the control data NetCDF file
Scenario Data File Path ScenarioDataFilePath Gets or sets the path for the scenario data NetCDF file

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Quantile Quantile") as DHI.Solutions.TimeseriesManager.UI.Tools.QuantileQuantileDownscalingTool.IQuantileQuantileDownscalingTool;
# Get the tool.
tool = app.Tools.CreateNew("Quantile Quantile")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.UI.Tools.QuantileQuantileDownscalingTool.IQuantileQuantileDownscalingTool(app.Tools.CreateNew("Quantile Quantile"))

Rate of change

The Rate of change tool calculates the slope (rate of change) of a input time series.

Tool Info Rate of change
Tools Explorer /Time series processing/Rate of change
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IRateChangeTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Suffix Suffix Gets or sets a value of the name suffix for output time series.
Unit Unit Gets or sets a value of time unit. Change (Per_second, Per_minute, Per_hour, Per_day)

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Rate of change") as DHI.Solutions.TimeseriesManager.Tools.Processing.RateChangeTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.Unit = DHI.Solutions.TimeseriesManager.Tools.Processing.Units.Per_hour;
tool.Suffix = "hour";
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Regression statistics

This tool performs polynomial regression between two time series.

Tool Info Regression statistics
Tools Explorer /Time series processing/Regression statistics
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.PolynomialRegression
API Reference DHI.Solutions.TimeseriesManager.Tools.EOAnalysis.IPolynomialRegression
Input Items Two time series
Output Items An X-Y data series

Tool Properties

Display Name Name Description
Mode ToolMode Gets or sets the tool mode. The tool mode can be either Analyze or Predict. In Analyze mode, the tool will calculate the regression line, and in Predict mode, the tool will use the specified parameters to predict the empty values in the dependent series.
a0 a0 Gets or sets the Intercept in the regression line. In Analyze mode, this value will be calculated. In Predict mode, this value will be used to predict the empty values in the dependent series.
a1 a1 Gets or sets the first-order parameter in the regression line. In Analyze mode, this value will be calculated. In Predict mode, this value will be used to predict the empty values in the dependent series.
a2 a2 Gets or sets the second-order parameter in the regression line. In Analyze mode, this value will be calculated. In Predict mode, this value will be used to predict the empty values in the dependent series.
a3 a3 Gets or sets the third-order parameter in the regression line. In Analyze mode, this value will be calculated. In Predict mode, this value will be used to predict the empty values in the dependent series.
a4 a4 Gets or sets the fourth-order parameter in the regression line. In Analyze mode, this value will be calculated. In Predict mode, this value will be used to predict the empty values in the dependent series.
a5 a5 Gets or sets the fifth-order parameter in the regression line. In Analyze mode, this value will be calculated. In Predict mode, this value will be used to predict the empty values in the dependent series.
R2 R2 Gets the R2 of the regression line. The R2 value indicates the ratio of variation that is explained by the model to the total variation in the model. Its value is always between 0 and 1, where 0 indicates the model explains nothing, and 1 means the model explains the data perfectly.
Sum of squares SumOfSquares Gets the Sum of squares of the residuals of the model.
Standard error StandardError Gets the Standard error of the model. The standard error is the root-mean-square of the residuals.
Akaike information criterion AkaikeCriterion Gets the Akaike criterion of the model. The Akaike information criterion is a measure of the relative goodness of fit of a statistical model. It can be said to describe the tradeoff between bias and variance in model construction, or loosely speaking between accuracy and complexity of the model.
Bayesian information criterion BayesianCriterion Gets the Bayesian criterion for the model. The Bayesian criterion is similar to the Akaike criterion, but generally has a higher penalty term for introduction of additional parameters in a model.
Degree Degree Gets the degree of the regression polynomial (1 - 5). Notice that when Degree is set to one, linear regression will be used.
Independent variable IndependentVariable Gets or sets the independent variable (time series). The independent variable shall be one of the two input time series.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Regression statistics") as DHI.Solutions.TimeseriesManager.Tools.EOAnalysis.IPolynomialRegression;
# Get the tool.
tool = app.Tools.CreateNew("Regression statistics")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.EOAnalysis.IPolynomialRegression(app.Tools.CreateNew("Regression statistics"))

Replace value tool

The Replace values tool can be used to replace any given value (“Replace value”) or range of values in a time series by a new value (“Replace with”) (e.g. the user can specify that all values = 5 shall be replaced with the value 2.5).

Tool Info Replace value tool
Tools Explorer /Time series processing/Replace value tool
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IReplaceValuesTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Method ReplaceValueMethod Gets or sets the ReplaceValueMethod. ReplaceValueMethod determines what shall replace the specified ReplaceValue.
Replace value ReplaceValue Gets or sets the ReplaceValue. The ReplaceValue is the value that will be replaced according to the selected ReplaceValueOption.
Replace with ReplaceByValue Gets or sets the ReplaceByValue. If ReplaceValueToolOption is With_constant, the ReplaceByValue will be inserted instead of the ReplaceValue.
Range maximum RangeMax Gets or sets RangeMax. If ReplaceValueMethod = Replace_range_with_constant, RangeMax defines the max value of the range.
Range minimum RangeMin Gets or sets RangeMin. If ReplaceValueMethod = Replace_range_with_constant, RangeMax defines the minimum value of the range.
Max rate of change MaxRateOfChange Gets or sets the MaxRateOfChange. If ReplaceValueMethod = Limit_rate_of_change, the time series will be corrected such that the specified MaxRateOfChange is never exceeded.
Rate of change unit RateOfChangeUnit Gets or sets the RateOfChangeUnit. The rate of change unit defines the unit of the specified max rate of change.
Rate of change option RateOfChangeOption Gets or sets how values outside the allowed rate of change should be set.
Replace option ReplaceOption Gets or sets the ReplaceOption. The Replace option determines of all or only the first occurrence of the ReplaceValue shall be replaced.
Max gap unit MaxGapUnit Gets or sets the MaxGapUnit. The max gap unit defines the unit of the specified max gap.
Max gap MaxGap Gets or sets the MaxGap. The max gap defines the maximum gap allowed in a time series.
Period PeriodOption Gets or sets the period option of the tool. The period option determines if the tool shall be applied on the entire time series, or on a sub-period.
Process option ProcessOption Gets or sets the process option. The process option determines if the tool shall process the input series or a copy of the input series.
Start date StartDate Gets or sets the start date from where the values should be replaced.
End date EndDate Gets or sets the end date to where the values should be replaced.
Replace with ReplaceByValueForExceededRate Gets or sets value to be replace with for ReplaceOption Limit_rate_of_change and With_constant.
Range option RangeOption Gets or sets the replace option. The range option determines if the values inside, or outside the specified range shall be replaced. Only relevant when ReplaceValueMethod = Replace_range_with_constant

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Replace value tool") as DHI.Solutions.TimeseriesManager.Tools.Processing.ReplaceValuesTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.ReplaceValueMethod = DHI.Solutions.TimeseriesManager.Tools.Processing.ReplaceValueMethod.With_constant;
tool.ReplaceOption = DHI.Solutions.TimeseriesManager.Tools.Processing.ReplaceOption.Replace_all_hits;
tool.ReplaceValue = 1;
tool.ReplaceByValue = 100;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Resample

The resample tool is used for changing the time step of a time series into a user specified time step. It is possible to resample into larger and smaller time steps. The tool will not update the the input time series directly, but will create clones of the input time series, to by found in the tools output items after resampling. Set the time step for year, month, day, hour, minute, second. Note that the tool is by default using a 1 day interval (TimeStepDay=1).

Tool Info Resample
Tools Explorer /Time series processing/Resample
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IResampleTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Years TimeStepYear Gets or sets the Day part of the resampling time span
Months TimeStepMonth Gets or sets the Month part of the resampling time span
Days TimeStepDay Gets or sets the Day part of the resampling time span. The default value is 1 day.
Hours TimeStepHour Gets or sets the Hour part of the resampling time span.
Minutes TimeStepMinute Gets or sets the Minute part of the resampling time span.
Seconds TimeStepSecond Gets or sets the second part of the resampling time span.
Interpolate across gaps InterpolateAcrossGaps Gets or sets a value indicating whether the algorithm shall interpolate across gaps in the input series or not. If set to true, the algorithm will interpolate across gaps that are less than a specified duration/number. If set to false, gaps in the input series will result in gaps in the output series.
Max. allowed gap duration MaxAllowedGapDuration Gets or sets a value indicating the no of missing values the algorithm shall interpolate across. (it has an effect when property InterpolateAcrossGaps is false).
Max. missing values per gap MaxNumberOfMissingValuesPerGap Gets or sets a value indicating the maximum duration a gap the algorithm shall interpolate across. (it has an effect when property InterpolateAcrossGaps is false).
Start Date Offset Type StartDateOffset Gets or sets the offset used for the resampling
Start Time Offset StartTimeOffset Gets or sets the start time used in conjunction with the start Start Date Offset
Start Time StartTime Gets or sets the start date time used in conjunction with the Start Date Offset = SpecificDateTime

Code Sample

// Get the tool assuming that the tool is already loaded.
var tool = application.Tools.CreateNew("Resample") as DHI.Solutions.TimeseriesManager.Tools.Processing.ResampleTool;

// Add a time series to the input items (the tool support 1 or more input time series).
tool.InputItems.Add(ts);

// Default of TimeStepDay=1
tool.TimeStepDay = 0;
tool.TimeStepMinute = 30;

// Execute the tool
tool.Execute();

// Get the output of the tool.
var resampledTs = tool.OutputItems[0];

Residual mass

The Residual mass is calculated by first converting the input series to value type Step_Accumulated, and then:

Res_n = Xn - Avg + Xn-1

where Res_n is the residual mass, and X are the step accumulated values. The Item Type of the output will be Accumulated. The Residual mass tool uses the Convert value tool.

Tool Info Residual mass
Tools Explorer /Advanced statistics/Residual mass
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IResidualMassTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Residual mass") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IResidualMassTool;
# Get the tool.
tool = app.Tools.CreateNew("Residual mass")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IResidualMassTool(app.Tools.CreateNew("Residual mass"))

RunTest

RunTestTool - General non-parametric test for testing independence and homogeneity of a time series.

Tool Info RunTest
Tools Explorer /Advanced statistics/RunTest
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IRunTestTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("RunTest") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IRunTestTool;
# Get the tool.
tool = app.Tools.CreateNew("RunTest")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IRunTestTool(app.Tools.CreateNew("RunTest"))

SelectTsTool

Tool for selecting time series in one or more time series groups.

Tool Info SelectTsTool
Tools Explorer /Time series processing/SelectTsTool
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.ISelectTsTool
Input Items One or more time series groups
Output Items A time series

Tool Properties

Display Name Name Description
Value Type ValueType Gets or sets the Item Value Type (All, Instantaneous, Accumulated, Step_Accumulated, Mean_Step_Accumulated or Reverse_Mean_Step_Accumulated).
Timeseries name TimeseriesName Gets or sets the value of the timeseries name pattern, e.g. MyTs, Ts* (any time series starting with Ts), Ts? (matching single character).

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("SelectTsTool") as DHI.Solutions.TimeseriesManager.Tools.Processing.SelectTsTool;

// Set the tool properties and execute.
tool.InputItems.Add(tsGroup);
tool.ValueType = "All";
tool.TimeseriesName = "t*";
tool.Execute();

// Output items contains a list of time series satisfying the name pattern.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Standard deviation

Standard Deviation tool calculates the standard deviation of a time series, or XY Series. The tool handles multiple input items, and returns a single value for each input item. If provided with an empty time series, double.NaN is returned.

Tool Info Standard deviation
Tools Explorer /Basic statistics/Standard deviation
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.IStandardDeviationTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Standard deviation") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.StdDevTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = (double)outputItem.TabularData.Rows[0][1];

Sum

This tool calculates the sum of all the values in a timeseries.

Tool Info Sum
Tools Explorer /Basic statistics/Sum
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.BasicStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.ISumTool
Input Items One or more time series
Output Items A data table

Tool Properties

Display Name Name Description
The tool has no properties.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Sum") as DHI.Solutions.TimeseriesManager.Tools.BasicStatistics.SumTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.Execute();

// Get the output of the tool.
var outputItem = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var result = (double)outputItem.TabularData.Rows[0][1];

Synchronize

The Synchronize tool is used to resample a set of time series into a common time axis. The new common time axis is defined by combining the axes of all input time series. One synchronized time series will be produced for each time series.

Tool Info Synchronize
Tools Explorer /Time series processing/Synchronize
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.ISynchronizeTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Interpolate across gaps InterpolateAcrossGaps Gets or sets a value indicating whether the algorithm shall interpolate across gaps in the input series or not. If set to true, the algorithm will interpolate across gaps that are less than a specified duration/number. If set to false, gaps in the input series will result in gaps in the output series.
Max. allowed gap duration MaxAllowedGapDuration Gets or sets a value indicating the no of missing values the algorithm shall interpolate across. (it has an effect when property InterpolateAcrossGaps is false).
Max. missing values per gap MaxNumberOfMissingValuesPerGap Gets or sets a value indicating the maximum duration a gap the algorithm shall interpolate across. (it has an effect when property InterpolateAcrossGaps is false).
Allow Time Step Merging AllowTimeStepMerging Gets or sets a value indicating whether Time step merging is allowed or not.
Concurrency tolerance ConcurrencyTolerance Gets or sets a value indicating the minimum concurrency time step. The adjacent time steps which are separated by less than this value they will be merged into a single time step, it has an effect when property AllowTimeStepMerging is true.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Synchronize") as DHI.Solutions.TimeseriesManager.Tools.Processing.SynchronizeTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds1_in);
tool.InputItems.Add(ds2_in);
tool.InterpolateAcrossGaps = true;
tool.MaxAllowedGapDuration = TimeSpan.FromMinutes(10);
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Time series query

QueryToolTool class

Tool Info Time series query
Tools Explorer /Data tools/Time series query
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Query
API Reference DHI.Solutions.TimeseriesManager.Tools.QueryTool.QueryTool
Input Items No input items required
Output Items No output items

Tool Properties

The tool has no properties.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Time series query") as DHI.Solutions.TimeseriesManager.Tools.QueryTool.QueryTool;
# Get the tool.
tool = app.Tools.CreateNew("Time series query")

Time Shift

Tool to shift X or Y values

Tool Info Time Shift
Tools Explorer /Time series processing/Time Shift
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IShiftAndLagTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Shift X LagXDateTime Gets or sets a value which shifts all values of X by a specified value. This property with type timespan is used when the XValue type is date time.
Shift X LagXDouble Gets or sets a value which shifts all values of X by a specified value. This property with type double is used when the XValue type is scalar.
Shift Y ShiftY Gets or sets a value which shifts all values of Y by a specified value.
Replace Values ReplaceValues Gets or sets a value indicating whether the original dataseries has to be replaced or a new cloned dataseries has to be sent as output.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Time Shift") as DHI.Solutions.TimeseriesManager.Tools.Processing.ShiftAndLagTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.ShiftY = 10;
tool.LagXDateTime = new TimeSpan(0, 2, 0);
tool.ReplaceValues = false;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Timeseries Calculator

Tool for performing raster math on one or more input rasters.

Tool Info Timeseries Calculator
Tools Explorer /Time series processing/Timeseries Calculator
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.ITimeseriesCalculatorTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Formula Formula Gets or sets the formula to be used for calculating rasters The formula syntax is based on SpreadsheetGear (which itself is based on Microsoft Excel). Instead of cell references, however, formulas are to be entered using timeseries names in brackets. (e.g. "[mytimeseries]"). The link between the timeseries names and the timeseries rasters are to be mapped in the Mapping property.
Name Mapping NameMapping Gets or sets the mapping of names used in the formula to the input rasters.

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Timeseries Calculator") as DHI.Solutions.TimeseriesManager.Tools.Processing.ITimeseriesCalculatorTool;
# Get the tool.
tool = app.Tools.CreateNew("Timeseries Calculator")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.Processing.ITimeseriesCalculatorTool(app.Tools.CreateNew("Timeseries Calculator"))

Timeseries Query

The time series query tool retrieves a set of data series based on a query specified by the user.

Tool Info Timeseries Query
Tools Explorer /Query Tools/Timeseries Query
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.TimeseriesQuery
API Reference DHI.Solutions.TimeseriesManager.Tools.TimeseriesQueryTool.ITimeseriesQueryTool
Input Items No input items required
Output Items A time series

Tool Properties

Display Name Name Description
Queries
Query Query

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Timeseries Query") as DHI.Solutions.TimeseriesManager.Tools.TimeseriesQueryTool.ITimeseriesQueryTool;
# Get the tool.
tool = app.Tools.CreateNew("Timeseries Query")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.TimeseriesQueryTool.ITimeseriesQueryTool(app.Tools.CreateNew("Timeseries Query"))

To chart

Class for ToChart tool.

Tool Info To chart
Tools Explorer /Output Tools/To chart
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ToChart
API Reference DHI.Solutions.TimeseriesManager.UI.Tools.ToChart.IToChartTool
Input Items One or more time series or one or more time series
Output Items No output items

Tool Properties

Display Name Name Description
Chart option ChartDisplayOptions Gets or sets the DisplayOption for the chart New Chart New or active chart
Chart area option ChartAreaOptions Gets or sets the DisplayOption for the chart area New Chart Area New or First Compliant Chart Area
Output chart name ChartOutputName Gets or sets the name of chart if Specified Chart option is selected for ChartDisplayOptions

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("To chart") as DHI.Solutions.TimeseriesManager.UI.Tools.ToChart.IToChartTool;
# Get the tool.
tool = app.Tools.CreateNew("To chart")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.UI.Tools.ToChart.IToChartTool(app.Tools.CreateNew("To chart"))

To database

This tool takes one or more timeseries and saves it directly to the database.

Tool Info To database
Tools Explorer /Output Tools/To database
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ToDatabase
API Reference DHI.Solutions.TimeseriesManager.Tools.ToDatabaseTool.IToDatabaseTool
Input Items One or more time series
Output Items No output items

Tool Properties

Display Name Name Description
Save to group Group Gets or sets the group in which to save the timeseries
Name suffix NamePostFix Gets or sets the postfix string to be added to the timeseries name.e.g. TimeseriesA Postfix
Save with new name TimeseriesName Gets or sets the name to be added to the timeseries, e.g. MyTs, MyTs (1), MyTs(2) etc
Overwrite option DuplicateNameOption Gets or sets the option to be chosen when a timeseres with the same name is already present in the group

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("To database") as DHI.Solutions.TimeseriesManager.Tools.ToDatabaseTool.IToDatabaseTool;
# Get the tool.
tool = app.Tools.CreateNew("To database")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.ToDatabaseTool.IToDatabaseTool(app.Tools.CreateNew("To database"))

To feature class

This tool takes one or more timeseries and saves it directly to the database.

Tool Info To feature class
Tools Explorer /Output Tools/To feature class
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ToFeatureClass
API Reference DHI.Solutions.TimeseriesManager.Tools.ToFeatureClass.IToFeatureClassTool
Input Items One or more time series
Output Items A feature class

Tool Properties

Display Name Name Description
Column Name ColumnName Gets or sets the name of the column to be added to feature class(es) to contain scalar values
Tool to apply Tool Gets or sets the tool to use to calculate scalars. Only tools having scalars as output are supported
Output option OutputOption Gets or sets the output option for the tool
Feature class FeatureClass Gets or sets the value of selected feature class

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("To feature class") as DHI.Solutions.TimeseriesManager.Tools.ToFeatureClass.IToFeatureClassTool;
# Get the tool.
tool = app.Tools.CreateNew("To feature class")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.ToFeatureClass.IToFeatureClassTool(app.Tools.CreateNew("To feature class"))

To file

The “To file” tool is used to export one or more time series, ensemble and/or group to files on the disk.

Tool Info To file
Tools Explorer /Output Tools/To file
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.TimeseriesExport
API Reference DHI.Solutions.TimeseriesManager.Tools.TimeseriesExportTool.ITimeseriesExportTool
Input Items One or more time series or one or more time series groups
Output Items No output items

Tool Properties

Display Name Name Description
Export directory ExportDirectory Gets or sets the export directory
Export format ExportFormat Gets or sets the export format
Directory structure option DirectoryStructure Gets or sets the export directory structure
Export Flags ExportFlags Gets or sets a value indicating whether the flags should be export or not
Delimiter character Delimiter Gets or sets the delimiter format.
Date time format DateTimeFormat Gts or sets the date time format.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("To file") as DHI.Solutions.TimeseriesManager.Tools.TimeseriesExportTool.TimeseriesExportTool;

// Set the tool properties and execute.
tool.InputItems.Add(ds_in);
tool.ExportFormat = DHI.Solutions.TimeseriesManager.Tools.TimeseriesExportTool.ExportFormatOptions.dfs0;
tool.ExportDirectory = @"c:\Temp";
tool.Execute();

To timeseries table

The To time series table tool opens the input series in a time series table.

Tool Info To timeseries table
Tools Explorer /Output Tools/To timeseries table
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ToTimeseriesTable
API Reference DHI.Solutions.TimeseriesManager.UI.Tools.ToTimeseriesTable.ToTimeseriesTable
Input Items One or more time series
Output Items A time series table

Tool Properties

Display Name Name Description
Table option TableDisplayOptions
Output table name. TableOutputName

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("To timeseries table") as DHI.Solutions.TimeseriesManager.UI.Tools.ToTimeseriesTable.ToTimeseriesTable;
# Get the tool.
tool = app.Tools.CreateNew("To timeseries table")

To XY table

The ToXYTable tool opens the input XY series to an XY Table.

Tool Info To XY table
Tools Explorer /Output Tools/To XY table
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.ToTimeseriesTable
API Reference DHI.Solutions.TimeseriesManager.UI.Tools.ToTimeseriesTable.ToXYTable
Input Items No input items required
Output Items No output items

Tool Properties

Display Name Name Description
Table option TableDisplayOptions
Output table name. TableOutputName

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("To XY table") as DHI.Solutions.TimeseriesManager.UI.Tools.ToTimeseriesTable.ToXYTable;
# Get the tool.
tool = app.Tools.CreateNew("To XY table")

Unit conversion

The Unit conversion tool converts a time series into a new variable/unit. The operation is performed on a clone of the input item, and hence no changes are made to the input items. If multiple input items are selected, they will all be converted to the same variable/unit. When the target variable has been set, the target unit has to be set to one of the valid units for the selected variable.

Tool Info Unit conversion
Tools Explorer /Time series processing/Unit conversion
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IUnitConversionTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Target Unit TargetUnit Gets or sets the unit that the input items shall be converted to. The unit shall be a valid unit for the selected target variable.
Variable type VariableType Gets or sets the common variable type for the input items.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Unit conversion") as DHI.Solutions.TimeseriesManager.Tools.Processing.UnitConversionTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.TargetUnit = "/d";
tool.VariableType = "Rainfall";
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Value type conversion

The Convert To Value tool allows the user to convert the value type of a Time Series between the five possible value types: Instantaneous, Mean Step Accumulated, Reverse Mean Step Accumulated and Step Accumulated. When a series is converted from either I, MSA, RMSA to either A or SA, the tool attempts to integrate the unit as well (e.g. m3/s -> m3). When going from A, SA to I, MSA or RMSA the tool will attempt to differentiate the unit as well (m3 -> m3/s). If this conversion is not successful, the unit will be set to undefined. ///

Tool Info Value type conversion
Tools Explorer /Time series processing/Value type conversion
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.Processing
API Reference DHI.Solutions.TimeseriesManager.Tools.Processing.IConvertToValueTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
ItemValueType_DisplayName ItemValueType Gets or sets the target Item Value Type.

Code Sample

// Get the tool
var tool = application.Tools.CreateNew("Value type conversion") as DHI.Solutions.TimeseriesManager.Tools.Processing.ConvertToValueTool;

// Set the tool properties and execute.
tool.InputItems.Add(ts_in);
tool.ItemValueType = DHI.Solutions.Generic.DataSeriesValueType.Instantaneous;
tool.Execute();

// Get the output of the tool.
var ds_out = tool.OutputItems[0] as DHI.Solutions.Generic.IDataSeries;

Within Year Statistic

The Within-year statistics tool calculates the specified statics for a relative time period (Analysis time step). The output is a time series that covers a single year with the statistics calculated on the specified time step. The tool can be used to calculate e.g. the average flow for Jan, feb, ... Dec based on a time series that spans several years. The input series must cover at least one full year.

Tool Info Within Year Statistic
Tools Explorer /Advanced statistics/Within Year Statistic
NuGet Package DHI.MikeOperations.TimeseriesManager.Tools.AdvancedStatistics
API Reference DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IWithinYearStatsTool
Input Items One or more time series
Output Items A time series

Tool Properties

Display Name Name Description
Output time step unit PeriodUnit Gets or sets period unit
Time step length PeriodLenght Gets or sets period length
First day in output TS StartDate Gets or sets start date
Within-year statistic StatisticalMethod Gets or sets statistical method
Output time series suffix Surffix Gets or sets the value of suffix
Quantile % Quantile Gets or sets the value of quantile
Lower Boundary for Quantile LowerBoundary Gets or sets the value of lower boundary
Upper Boundary for Quantile UpperBoundary Gets or sets the value of upper boundary
Use quantile boundary UseBoundary Gets or sets the value of use boundary

Code Sample

// Get the tool.
var tool = application.Tools.CreateNew("Within Year Statistic") as DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IWithinYearStatsTool;
# Get the tool.
tool = app.Tools.CreateNew("Within Year Statistic")
# Get the tool.
tool = DHI.Solutions.TimeseriesManager.Tools.AdvancedStatistics.IWithinYearStatsTool(app.Tools.CreateNew("Within Year Statistic"))