Activities¶
MIKE OPERATIONS comes with a set of dedicated ELSA activities for interacting with MIKE OPERATIONS jobs, scenarios and time series. Standard ELSA activities (control flow, HTTP, scheduling, etc.) are also available - see the ELSA documentation for those.
Most activities need a Connection String to the MIKE OPERATIONS database, in the same format used
elsewhere in MIKE OPERATIONS, e.g. host=localhost;port=5432;database=MIKE_OPERATIONS;dbflavour=PostgreSQL.
Command Prompt¶
- Category: Workflow Manager
- Description: Runs a command line locally using the system command prompt.
| Property | Description |
|---|---|
| Command | The command line to execute (e.g. an exe, script or batch file with arguments). |
| Output | The standard output of the executed command. |
| Exit Code | The exit code of the executed command. |
Run Python Script¶
MIKE OPERATIONS 2027
This release fixed two issues: the activity now logs and fails the workflow when the script errors, instead of failing silently with no information, and script paths containing quotes are no longer truncated.
- Category: Workflow Manager
- Description: Executes a Python script with optional arguments.
| Property | Description |
|---|---|
| Script Path | The full path to the Python script to execute. |
| Script Arguments | Optional arguments to pass to the script. |
| Python Executable Path | Path to the Python executable. Defaults to python. |
| Timeout (seconds) | Maximum time in seconds to wait for the script to complete. Default 300. |
| Standard Output | The standard output produced by the script. |
| Standard Error | The standard error output produced by the script. |
| Exit Code | The exit code returned by the Python process. |
| Success | True if the script completed with exit code 0. |
If the script exits with a non-zero code, the activity logs the standard error output and fails the workflow, instead of continuing silently.
SendGrid Email¶
MIKE OPERATIONS 2027
This activity is new in this release.
- Category: Workflow Manager
- Description: Sends an email via SendGrid.
| Property | Description |
|---|---|
| Recipients | Comma or semicolon separated recipient email addresses. |
| Subject | Email subject. |
| Body | Email body (HTML permitted). |
| SendGrid Response | Response status code or error message from SendGrid. |
The sender address and the SendGrid API key are configured centrally (the API key is stored against the MIKE Workflows server, not entered per-activity) - only the recipients, subject and body are set per use.
Manage simulation¶
- Category: Scenario Manager
- Description: Exports and/or deletes old simulations of a scenario.
| Property | Description |
|---|---|
| Connection String | Connection string to the MIKE OPERATIONS database. |
| User | MIKE OPERATIONS user to run as. |
| WorkSpace | MIKE OPERATIONS workspace to run under. |
| Scenario | The scenario Id or path. |
| Export | Whether to export simulations before deleting them. |
| Export Folder | The export folder path where simulations will be exported. Defaults to C:\temp if left empty. |
| Older Than (hours) | Simulations older (in hours) than this value will be managed. Set to 0 to delete all. Defaults to 48 hours if left empty. |
| Force Delete | Delete even though the status indicates the simulation is running. |
Run MIKE+ Scenario¶
MIKE OPERATIONS 2027
Renamed from "Run Scenario" this release. Rainfall Data Sources and SimulationStatus are new; Approve
now reliably approves the simulation; StartTime, EndTime and TimeOfForeCast are optional - if left
unset, the scenario's own configured dates are used.
- Category: Scenario Manager
- Description: Runs a MIKE+ scenario.
| Property | Description |
|---|---|
| Connection String | Connection string to the MIKE OPERATIONS database. |
| User | MIKE OPERATIONS user to run as. |
| WorkSpace | MIKE OPERATIONS workspace to run under. |
| ScenarioPath | Full path of the scenario in MIKE Workbench Scenario Manager. |
| Approve | Approve the scenario after it has run. |
| StartTime | Simulation start. Optional - the scenario's own configured start date is used if left unset. |
| EndTime | Simulation end. Optional - the scenario's own configured end date is used if left unset. |
| TimeOfForeCast | Time of forecast. Optional - the scenario's own configured time of forecast is used if left unset. |
| Rainfall Data Sources | Comma-delimited rainfall data source names to concatenate, in order, into each catchment's boundary condition series immediately before running. Recognized names: era5-single-level, gpm-late (each a single time series), and ECMWF-IFS Forecast (a folder - the most recently imported series inside it is used). Leave empty to skip. |
| SimulationPath | Output: full path of the simulation in MIKE Workbench Scenario Manager. |
| SimulationStatus | Output: the simulation's status after running (e.g. OUTPUT_DATA_OK, OUTPUT_DATA_ERROR). |
Run MIKE HYDRO Basin Scenario¶
MIKE OPERATIONS 2027
New this release, as the MIKE HYDRO Basin counterpart of Run MIKE+ Scenario.
- Category: Scenario Manager
- Description: Runs a MIKE HYDRO Basin scenario.
| Property | Description |
|---|---|
| Connection String | Connection string to the MIKE OPERATIONS database. |
| User | MIKE OPERATIONS user to run as. |
| WorkSpace | MIKE OPERATIONS workspace to run under. |
| Scenario Path | The scenario Id or path. |
| Approve | Approve the simulation when it completes successfully. |
| StartTime | Simulation start. Leave Start and End unset (or End not after Start) to use the dates configured on the scenario. |
| EndTime | Simulation end. |
| SimulationPath | Output: full path of the simulation in MIKE Workbench Scenario Manager. |
MIKE HYDRO Basin has no forecast-time concept, so unlike Run MIKE+ Scenario this activity has no
TimeOfForeCast input, and no rainfall-combination input either.
Download rainfall for MIKE+¶
MIKE OPERATIONS 2027
New this release. This is the activity behind combining ERA5, GPM and ECMWF rainfall sources into a
scenario's catchments before running - see Run MIKE+ Scenario's Rainfall Data Sources input for applying
already-imported series at run time; this activity is what fetches and imports the raw data in the first
place.
- Category: Scenario Manager
- Description: Downloads rainfall data from Earth Observation sources for a scenario's catchment boundary conditions, then imports the resulting time series into the database.
| Property | Description |
|---|---|
| Connection String | Connection string to the MIKE OPERATIONS database. |
| User | MIKE OPERATIONS user to run as. |
| WorkSpace | MIKE OPERATIONS workspace to run under. |
| Scenario Path | The scenario Id or path. |
| Provider | The data provider (e.g. ERA5, GPM, ECMWF). Selecting one narrows the Product and Variable options below. |
| Product | Product for the selected provider. Select None if not applicable. |
| Variable | Variable for the selected provider. Select None if not applicable. |
| Credentials Path | Path to a credentials.ini file for provider authentication. |
| Buffer Percent | Buffer the area of interest by this percentage of its bounding box diagonal. Default 10. |
| Timeout (seconds) | Maximum time in seconds for each download command. Default 1800 (30 minutes). |
| Imported Paths | Output: paths of the time series groups that new data was imported into. |
| Catchment Results | Output: per-catchment import outcome (Succeeded/AlreadyPresent/NoNewData/Failed) and reason, visible in the workflow monitor without checking the application log. |
Import ascii¶
- Category: Timeseries Manager
- Description: Imports one or more ASCII (text) files into the database as time series.
| Property | Description |
|---|---|
| Connection String | Connection string to the MIKE OPERATIONS database. |
| User | MIKE OPERATIONS user to run as. |
| WorkSpace | MIKE OPERATIONS workspace to run under. |
| First Data Row | The first data row number. Default 2. |
| Item Name Row | The row number containing the item names. Default 0 (row before the first data row). |
| Separator | The column separator in the file (Tab, Comma, SemiColon or Space). Default Tab. |
| Value Column | The value column number. Default 2. |
| Decimal Separator | The decimal separator (RegionalSetting, Dot, or Comma). |
| Convert To Time Zone | Whether to convert the date/time to the specified time zone. |
| Date Column | The date column number. Default 1. |
| Date Time Format | The date format of the date column. Default yyyy-MM-dd HH:mm:ss. |
| Time Column | The column for time of time steps. Default 0 (disabled). |
| Time Format | The time format for the time column. Default HH:mm:ss. |
| Allow Duplicate Dates | Whether duplicate dates in the file are allowed. |
| File Extension | The extension(s) of the time series files. Default csv,txt. |
| File Path | The path to the ASCII file for a single-file or batch import. |
| Import From Option | Import from a Single File, a Folder, or a Batch. |
| Group | The destination group path in the database. |
| Import As Option | Import as Time Series or Ensemble. |
| Import To Database | Whether to import the time series into the database. Default true. |
| Variable | The DHI EUM variable for the time series. |
| Unit | The DHI EUM unit of the time series. |
| Value Type | The type of value of the time series (e.g. Instantaneous, Accumulated, MeanStepBackward, MeanStepForward, StepAccumulated). |
| Time series overwrite option | What to do if a time series with the same name already exists (CreateAndReplace, DontCreate, CreateButRename). |
| Group By Column | The column to group time steps by. Default 0 (disabled). |
| Ignore Missing Values | Whether time steps with missing values should be ignored. |
| Invalid Value As Missing Value | Whether values that cannot be parsed should be treated as missing values. |
| Missing Value | The value used for missing values in the file. Default -1e-30. |
| Naming Option | The naming option for imported time series. |
| Output Paths | Output: the paths of the imported time series. |
Resample time series¶
- Category: Timeseries Manager
- Description: Resamples a time series to a new time step.
| Property | Description |
|---|---|
| Connection String | Connection string to the MIKE OPERATIONS database. |
| User | MIKE OPERATIONS user to run as. |
| WorkSpace | MIKE OPERATIONS workspace to run under. |
| Timeseries | The time series' Id or fully qualified path. |
| Destination Group | The destination group where the resampled time series is created. |
| interpolate across Gaps | Whether to interpolate across gaps during resampling. |
| Max Allowed Gap Duration | Maximum allowed gap duration, in the format days.hours:minutes:seconds. |
| Max Number Of Missing Values Per Gap | Maximum number of missing values allowed per gap. |
| Overwrite | Whether to overwrite an existing time series. |
| Years / Months / Days / Hours / Minutes / Seconds | The components of the new (resampled) time step. |
| Start Time | The date and time of the first step to resample. |
| ResampledTimeseries | Output: the resulting resampled time series. |