# Data Calculator

The *Data Calculator* can be used to perform mathematical operations with datasets to create new datasets. The *Data Calculator* is accessed by selecting the **Data Calculator** command from the *Data* or *Edit* menu. The components of the *Data Calculator* are as follows:

## Contents

### Expression Field

The most important part of the *Data Calculator* is the *Expression* field. This is where the mathematical expression is entered. The expression should be formulated using the same rules that are used in formulating equations in a spreadsheet. Parentheses should be used to clearly indicate the preferred order of evaluation. There is no limit on the length of the expression. The operators in the expression should be limited to the operators shown in the middle of the *Data Calculator*. The operands in the expression should consist of user-defined constants (e.g., 3.14159), or datasets.

### List of Datasets

All of the datasets associated with the active object (TIN, Grid, Mesh, or Scatter Point Set) are listed at the top of the Data Calculator. If a transient dataset is highlighted, the time steps are listed on the right side of the Data Calculator. When a dataset is used in an expression, the name of the dataset should NOT be used. Rather, the letter associated with the dataset should be used. For example, if a dataset is listed as "b. head1", the dataset is referenced in the expression simply as "b"

When a transient dataset is used in an expression, either a single time step or the entire sequence of time steps may be used. For example, the expression "abs(d:100)" creates a single (steady state) dataset representing the absolute value of the dataset at time = 100.0. However, the expression "abs(d:all)" creates a transient dataset representing the absolute value of each of the time steps in the original dataset.

### Result Name

When an expression is evaluated, a new dataset is created and the name of the new dataset is designated in the *Result* field.

### Operators

The allowable operators are listed in the middle of the dialog. Selecting one of the operator buttons adds the selected operator to the end of the expression. However, the operators can also be typed directly in the expression field. The function of each of the operators is as follows:

Operator | Function |
---|---|

Add | |

Subtract | |

Multiply | |

Divide | |

Left parenthesis | |

Right parenthesis | |

The base 10 logarithm of a dataset | |

The natural logarithm of a dataset | |

(x) raised to the (a) power. (x) and
(a) can be any mixture of constants and datasets | |

The absolute value of a dataset | |

The square root of a dataset | |

The average of two datasets | |

The minimum of two datasets | |

The maximum of two datasets | |

Truncates a dataset (x) so that all
values are >= a and <= b | |

The inverse of (x) - Only available in SMS |

#### Operating With Transient Datasets

Each argument in the operators listed in the table above may be:

- A steady state (1 time step) dataset
- A specified time step of a transient dataset (i.e., x:#). In this case the # represents the index of the time step as specified in the time step window.
- A transient time step (i.e., x:all). These operations are only valid if all arguments have matching time step values. In this case, the result will be a new transient dataset with identical time values as the arguments.

The data calculator supports an alternate format for computing attributes of a transient dataset. This alternate format applies to three of the operators. These operators compute a single time step (steady state) dataset representing the spatially varied attribute operating on all the time steps.

Operator | Function |
---|---|

The average at each location of all time steps in the dataset | |

The minimum at each location of all time steps in the dataset | |

The maximum at each location of all time steps in the dataset |

### Compute Button

Once an expression is formulated and a name for the resulting dataset has been specified, the expression can be evaluated by selecting the **Compute** button. At this point, the dataset is created and the name of the new dataset should appear in the list of datasets.

## Related Links

GMS – Groundwater Modeling System | ||
---|---|---|

Modules: | 2D Grid • 2D Mesh • 2D Scatter Point • 3D Grid • 3D Mesh • 3D Scatter Point • Boreholes • GIS • Map • Solid • TINs • UGrids | |

Models: | FEFLOW • FEMWATER • MODAEM • MODFLOW • MODPATH • mod-PATH3DU • MT3DMS • MT3D-USGS • PEST • PHT3D • RT3D • SEAM3D • SEAWAT • SEEP2D • T-PROGS • ZONEBUDGET | |

Aquaveo |

WMS – Watershed Modeling System | ||
---|---|---|

Modules: | Terrain Data • Drainage • Map • Hydrologic Modeling • River • GIS • 2D Grid • 2D Scatter | |

Models: | CE-QUAL-W2 • GSSHA • HEC-1 • HEC-HMS • HEC-RAS • HSPF • MODRAT • NSS • OC Hydrograph • OC Rational • Rational • River Tools • Storm Drain • SMPDBK • SWMM • TR-20 • TR-55 | |

Toolbars: | Modules • Macros • Units • Digitize • Static Tools • Dynamic Tools • Drawing • Get Data Tools | |

Aquaveo |