You are not logged in. Click here to log in.

Application Lifecycle Management

Search In Project

Search inClear

Analysis #17072/HEAD / v10
Tags:  not added yet

DSL Element - analysis{}

An analysis elements provides for post run analysis by means of plotting/graphing features. It is an optional part of a simulation. Performing an analysis will usually result in graphs. The following basic types of analysis plots are available:
  • Time series plots
  • Flow duration plots
  • Scatter plots

An analysis can contain any number of those plots as sub-elements as shown below:

sim(name:"Efcarson") {
   ...
   analysis(title:"Simulation Output") {
      timeseries(title:"East Fork Carson") {
         x(file:"%last/out1.csv", column:"date")
         y(file:"%last/out1.csv", column:"basin_cfs")
         y(file:"%last/out1.csv", column:"runoff[0]")
      }
      timeseries(title:"Error") {
         x(file:"%last/out1.csv", column:"date")
         calc(eq:"simulated - observed") {
            simulated(file:"%last/out1.csv", column:"basin_cfs")
            observed(file:"%last/out1.csv", column:"runoff[0]")
         }
         calc(eq:"simulated - observed", acc:true) {
            simulated(file:"%last/out1.csv", column:"basin_cfs")
            observed(file:"%last/out1.csv", column:"runoff[0]")
         }
      }
      flowduration {
         y(file:"%last/out1.csv", column:"basin_cfs")
         y(file:"%last/out1.csv", column:"runoff[0]")
       }
      scatter {
         x(file:"%last/out1.csv", column:"basin_cfs")
         y(file:"%last/out1.csv", column:"runoff[0]")
       }
   }
   ...
}

The configuration as shown above will result in output graphs as shown below. The whole analysis will appear as a separate window, each plot will have its own tab and graph. The figures below actually show the same window with different tab being activated.

Example Analysis

You must login to see this link. Register now, if you have no user account yet.

General Rules for Referencing Data Sets

All plots are referencing data sets that are stored as CSV tabular data. To identify a column a (i) file name, (ii) table name, and (iii) column name have to be provided. However, the analysis can handle some shortcuts in context of the simulation. Here are some examples:
x(file:"c:/tmp/SIM/0003/out1.csv", table"efc", column:"runoff")

For the example above, a column is referenced fully by its file, table, and column name. The file name is absolute.

x(file:"c:/tmp/SIM/%last/out1.csv", table"efc", column:"runoff")

A column is referenced fully by its file, table, and column name. The file name is absolute but references the last simulation run. The meaning of 'last' depends on the chosen output strategy.

x(file:"%last/out1.csv", table"efc", column:"runoff")

Now the file reference is in context to the simulation. It points to a file in the last output folder for this simulation.

x(file:"%last/out1.csv", column:"runoff")

If the table name is not provided, the name of the simulation is assumed. The last variant is preferred, since it provides the most flexibility for referencing data path independent.

OMS defines three 'variables' to refer to s simulation run context. They can be used in a file value as shown above. Note that for a SIMPLE output strategy, they all refer to the same output folder.

Simulation Run Context Variable Description
%first The first simulation output in this run sequence. (For numbered outputs is the folder with the lowest number, for timed output the oldest simulation time)
%previous The previous previous simulation output in this run sequence. (For numbered output this is the folder with the highest number - 1, for timed output the second recent simulation time).
%last The last simulation output in this sequence (For numbered output this is the folder with the highest number, for timed output the most recent simulation time)

Using those variables has several benefits. A analysis configuration needs to created once and can always reference the most recent output of a simulation after each run (use %last). In addition, someone can always compare the last run's output with the previous output and analyse the effect of model parameter changes. In another scenario a modeller might want to compare the last run's output against a baseline data set, that is being referenced with a full qualified absolute path name. Again, no analysis file needs to be adjusted after each run. %first, %previous, and %last are supporting therefore the modeller's work flow.

Element analysis{}

Specification

Name
analysis - perform time series, scatterplot, flow duration, or ad hoc analysis of model output

Properties Description Type Required
title Title of analysis String No

Sub-elements Description Type Default Occurrences
timeseries{} Time series chart Zero to many
scatter{} Scatter plot Zero to many
flowduration{} Flow duration chart Zero to many

Parent(s)
model{}