download
the latest version
 

User-Defined Calculated Columns

In Windographer, a user-defined calculated data column is a data column that you define yourself, as some combination of other columns. You could define a calculated column as the ratio of one data column to another, for example, or the average of two data columns. You can create any number of user-defined calculated data columns, and they can refer to original data columns or to other user-defined calculated data columns.

To create a user-defined calculated column, go to the Calculated Columns tab of the Configure Data Set window:

Calculated Columns tab of the Configure Data Set window

You can define several different types of user-defined calculated data columns:

Average

A column that you define as the average of columns A and B will be equal to:

  • (A+B) / 2 when both columns report valid values
  • A when the value in B is missing or flagged to exclude
  • B when the value in A is missing or flagged to exclude
  • a gap when the values in A and B are missing or flagged to exclude

In a met tower data set, you can use this approach to combine two co-located wind speed sensors into a single selectively averaged speed column, as in the screenshot below:

Example of calculated data column defined as average of two other columns

If you flag tower shading events in 'Speed 60m W' and 'Speed 60m SE', then the calculated column will exclude the shaded values, and average the two sensors when neither is shaded. You can flag the tower shading events (and other problem data segments) either before or after you define the calculated columns, since Windographer regenerates calculated data columns whenever you make any change to their source columns.

Note that when you define this type of calculated column, Windographer requires you to choose two data columns that have the same units. It lists in the second drop-down box only those data columns that match the units of the column you have chosen in the first drop-down box.

Primary-Backup

Use this type to combine two data columns when you consider one to be more important or more reliable than the other. The calculated column will be equal to:

  • the primary column except when it is missing or flagged to exclude
  • the secondary column otherwise

This provides another way to combine two co-located wind speed sensors into a single data column, as in the screenshot below:

Example of primary-backup calculated data column

Note that Windographer requires the backup column to have the same units as the primary column.

Maximum

A column that you define as the maximum of columns A and B will be equal to:

  • MAX(A,B) when both columns report valid values
  • A when the value in B is missing or flagged to exclude
  • B when the value in A is missing or flagged to exclude
  • a gap when the values in A and B are missing or flagged to exclude

Windographer requires both source columns to have the same units, and it forces the calculated column to have those same units.

Minimum

A column that you define as the minimum of columns A and B will be equal to:

  • MIN(A,B) when both columns report valid values
  • A when the value in B is missing or flagged to exclude
  • B when the value in A is missing or flagged to exclude
  • a gap when the values in A and B are missing or flagged to exclude

Windographer requires both source columns to have the same units, and it forces the calculated column to have those same units.

Difference

A column that you define as the difference between column A and column B will be equal to A - B in time steps in which both columns report valid values, or a gap otherwise. It can therefore take on both positive and negative values.

Example of calculated data column defined as difference between two other columns

Windographer requires both source columns to have the same units, and it forces the calculated column to have those same units.

Absolute Difference

A column that you define as the absolute difference between column A and column B will be equal to the absolute value of (A - B) in time steps in which both columns report valid values, or a gap otherwise. It can therefore take on only positive values.

Windographer requires both source columns to have the same units, and it forces the calculated column to have those same units.

Ratio

A column that you define as the ratio of column A to column B will be equal to (A / B) in time steps in which both columns report valid values and B is nonzero, or a gap otherwise.

You could, for example, define the ratio of two speed columns as in the screenshot below:

Example of calculated data column defined as ratio of two other columns

If the numerator and denominator columns have the same units, Windographer will know that the ratio column is unitless and it will disable the units input box. Otherwise it will let you enter the units of the ratio column.

Product

A column that you define as the product of column A to column B will be equal to A * B in time steps in which both columns report valid values, or a gap otherwise.