Template:Dataset Calculator: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
Line 29: Line 29:
*All datasets where “all time steps” has been selected must have the same time steps. (See example #9)
*All datasets where “all time steps” has been selected must have the same time steps. (See example #9)
*If there is a combination of activity on cells and points between the datasets being used in a calculation, before performing calculations for activity, the calculator will find the point activity from the given cell activity and use that in the activity calculations. (See example #26)
*If there is a combination of activity on cells and points between the datasets being used in a calculation, before performing calculations for activity, the calculator will find the point activity from the given cell activity and use that in the activity calculations. (See example #26)
 
{|
|-
!Test #
!Dataset 1 value location
!Dataset 1 activity
D1 time steps
D2 value location
D2 activity
D2 Time steps
Result location
Result activity
!Result timesteps
|-
N/A
Cells
N/A
N/A
Points
N/A
N/A
Cell and values values cannot be mixed
N/A
N/A
|-
|1
|cells
|no activity
|1 time step
|cells
|no activity
|1 time step
|cells
|no activity
|1 time step
|-
|2
|cells
|no activity
|1 time step
|cells
|no activity
|all time steps
|cells
|no activity
|all time steps
|-
|3
|cells
|no activity
|all time steps
|cells
|no activity
|all time steps
|cells
|no activity
|all time steps
|-
|4
|cells
|cells activity
|1 time step
|cells
|cells activity
|1 time step
|cells
|cells activity
|1 time step
|-
|5
|cells
|cells activity
|1 time step
|cells
|cells activity
|all time steps
|cells
|cells activity
|all time steps
|-
|6
|cells
|cells activity
|all time steps
|cells
|no activity
|1 time step
|cells
|cells activity
|all time steps
|-
|7
|cells
|cells activity
|all time steps
|cells
|no activity
|all time steps
|cells
|cells activity
|all time steps
8
cells
cells activity
1 timestep
cells
no activity
1 timestep
cells
cells activity
1 timestep
9
cells
cells activity
all timesteps
cells
cells activity
all timesteps
cells
cells activity
all timesteps
10
cells
cells activity
1 timestep
cells
no activity
all timesteps
cells
cells activity
all timesteps
11
points
points activity
1 timestep
points
points activity
1 timestep
points
points activity
1 timestep
12
points
points activity
1 timestep
points
points activity
all timesteps
points
points activity
all timesteps
13
points
cells activity
all timesteps
points
no activity
all timesteps
points
cells activity
all timesteps
14
points
cells activity
all timesteps
points
points activity
1 timestep
points
points activity
all timesteps
15
points
cells activity
all timesteps
points
points activity
all timesteps
points
points activity
all timesteps
16
points
points activity
all timesteps
points
points activity
all timesteps
points
points activity
all timesteps
17
points
no activity
1 timestep
points
no activity
1 timestep
points
no activity
1 timestep
18
points
cells activity
1 timestep
points
no activity
1 timestep
points
cells activity
1 timestep
19
points
cells activity
1 timestep
points
cells activity
1 timestep
points
cells activity
1 timestep
20
points
cells activity
1 timestep
points
cells activity
all timesteps
points
cells activity
all timesteps
21
points
no activity
1 timestep
points
no activity
1 timestep
points
no activity
1 timestep
22
points
no activity
1 timestep
points
points activity
all timesteps
points
points activity
all timesteps
23
points
cells activity
1 timestep
points
no activity
all timesteps
points
cells activity
all timesteps
24
points
no activity
1 timestep
points
points activity
1 timestep
points
points activity
1 timestep
25
points
no activity
all timesteps
points
no activity
all timesteps
points
no activity
all timesteps
26
points
cells activity
1 timestep
points
points activity
1 timestep
points
points activity
1 timestep
27
points
cells activity
1 timestep
points
points activity
all timesteps
points
pionts activity
all timesteps
28
points
no activity
all timesteps
points
points activity
1 timestep
points
points activity
all timesteps
29
points
no activity
all timesteps
points
points activity
all timesteps
points
points activity
all time steps
30
points
cells activity
all time steps
points
no activity
1 time step
points
cells activity
all time steps
31
points
cells activity
all time steps
points
cells activity
all time steps
points
cells activity
all time steps
|}





Revision as of 16:50, 3 May 2024


Dataset Calculator

The Dataset Calculator tool will perform calculations on one or more dataset data and activity. The tool will produce a new dataset with the resulting values and activity of those datasets according to the provided mathematical expression

Input Parameters

  • Grid Source Selection – The source grid of any datasets to work with.
  • Data Location Selection – The allowed location of data in datasets: either on points or cells of the source grid.
  • Table
    • Dataset – The selected dataset
    • Variable Name – The name to be used to refer to the chosen dataset within the provided expression.
    • Time Step – The chosen timestep from which to use data from this dataset. Or select all timesteps to use all values within this dataset.
  • Mathematical Expression – The expression to be evaluated with the chosen datasets

Output Parameters

  • Output Dataset Name – the name of the new dataset to fill with the resulting values from the expression.

The output will be a new dataset on the chosen grid with values and activity according to the expression and chosen datasets.

Current Location in toolbox

Datasets/ Dataset Calculator

Restrictions/Rules

The values will be the result of the expression being performed on each set of values of the datasets at each time step. Datasets with point and cell values cannot be mixed in the dataset calculator.

  • If no dataset being used in a calculation has activity, the resulting dataset will also not have activity. (See example #1 in the table below)
  • In calculations with multiple datasets with one timestep selected, the resulting time step will be 0.0. (See example #4)
  • If there is a combination of different selections for time steps and there is at least one dataset with “all time steps” selected, the resulting dataset’s time steps will be that dataset’s time steps. (see example #5)
    • In any such calculations, the calculator will use the single corresponding values array from any datasets with a single time step selected for every corresponding set of values in any datasets with “all time steps” selected. time step in the multiple time step selections.
  • All datasets where “all time steps” has been selected must have the same time steps. (See example #9)
  • If there is a combination of activity on cells and points between the datasets being used in a calculation, before performing calculations for activity, the calculator will find the point activity from the given cell activity and use that in the activity calculations. (See example #26)
N/A Cells N/A N/A Points N/A N/A Cell and values values cannot be mixed N/A N/A
Test # Dataset 1 value location Dataset 1 activity

D1 time steps D2 value location D2 activity D2 Time steps Result location Result activity

Result timesteps
1 cells no activity 1 time step cells no activity 1 time step cells no activity 1 time step
2 cells no activity 1 time step cells no activity all time steps cells no activity all time steps
3 cells no activity all time steps cells no activity all time steps cells no activity all time steps
4 cells cells activity 1 time step cells cells activity 1 time step cells cells activity 1 time step
5 cells cells activity 1 time step cells cells activity all time steps cells cells activity all time steps
6 cells cells activity all time steps cells no activity 1 time step cells cells activity all time steps
7 cells cells activity all time steps cells no activity all time steps cells cells activity all time steps

8 cells cells activity 1 timestep cells no activity 1 timestep cells cells activity 1 timestep 9 cells cells activity all timesteps cells cells activity all timesteps cells cells activity all timesteps 10 cells cells activity 1 timestep cells no activity all timesteps cells cells activity all timesteps 11 points points activity 1 timestep points points activity 1 timestep points points activity 1 timestep 12 points points activity 1 timestep points points activity all timesteps points points activity all timesteps 13 points cells activity all timesteps points no activity all timesteps points cells activity all timesteps 14 points cells activity all timesteps points points activity 1 timestep points points activity all timesteps 15 points cells activity all timesteps points points activity all timesteps points points activity all timesteps 16 points points activity all timesteps points points activity all timesteps points points activity all timesteps 17 points no activity 1 timestep points no activity 1 timestep points no activity 1 timestep 18 points cells activity 1 timestep points no activity 1 timestep points cells activity 1 timestep 19 points cells activity 1 timestep points cells activity 1 timestep points cells activity 1 timestep 20 points cells activity 1 timestep points cells activity all timesteps points cells activity all timesteps 21 points no activity 1 timestep points no activity 1 timestep points no activity 1 timestep 22 points no activity 1 timestep points points activity all timesteps points points activity all timesteps 23 points cells activity 1 timestep points no activity all timesteps points cells activity all timesteps 24 points no activity 1 timestep points points activity 1 timestep points points activity 1 timestep 25 points no activity all timesteps points no activity all timesteps points no activity all timesteps 26 points cells activity 1 timestep points points activity 1 timestep points points activity 1 timestep 27 points cells activity 1 timestep points points activity all timesteps points pionts activity all timesteps 28 points no activity all timesteps points points activity 1 timestep points points activity all timesteps 29 points no activity all timesteps points points activity all timesteps points points activity all time steps 30 points cells activity all time steps points no activity 1 time step points cells activity all time steps 31 points cells activity all time steps points cells activity all time steps points cells activity all time steps