Flag Rule Examples

This article demonstrates the use of flag rules through the use of several examples. The screenshots in this article show the Flag Rule Properties window and the Flag With Rules window.

Tip: Windographer allows you to create flag rules only if you have the Professional or higher edition of Windographer. Please visit www.windographer.com for information on the pricing and capability of each edition.

Example 1 - Icing In One Wind Speed Sensor

You can use a flag rule to find and flag icing events. For example, imagine you want to search for and flag all data segments in which a wind speed sensor 'flatlines', meaning its output stays the same for a long time, while the temperature is in the freezing range. The flag rule in the screenshot below does just that. It tells Windographer to search for data segments in which the wind speed sensor named 'Speed 60m NE' reports values that change less than 0.25 m/s over a two-hour period, at the same time as the data column named 'Air Temp.' reports a value below 1°C.

Using the Test Flag Rules feature, you can examine the segments flagged by this rule. It does indeed look like an icing event, since all the wind sensors, not just the 'Speed 60m NE' sensor, flatlined for a time, then when the temperature rose they started reporting normal-looking data again:

Example 2 - Icing In Any Wind Speed Sensor

Now imagine you want to flag such flatline icing events in any wind speed sensor, not just one of them. You could create several additional rules like the one we saw in Example 1, but that would take a lot of work because you would have to create one rule for every wind speed sensor in the dataset. Luckily, Windographer lets you specify flag rules in a more general way, referring to data columns types, rather than to specific data column names.

The screenshot below shows a flag rule that flags flatline events in any wind speed data column. Note the choice of data column types in the top right corner. This flag rule tells Windographer to find time intervals of two hours or more where any wind speed data column changes less than 0.25 m/s, and to apply the 'Icing' flag to that wind speed sensor. The choice of <relevant mean WS column> in the flag application section means that the flag will apply to whichever wind speed data column gets caught by the search criteria.

Example 3 - Icing In Any Wind Direction Sensor

The flag rule in the screenshot below tells Windographer to look for events in which any wind direction standard deviation column drops below 1.5° for twelve time steps or more, while the temperature drops below 1°C. In the search criteria, the <any WD SD column> specification means any wind direction standard deviation column, which is to say any data column that you have specified in the Configure Dataset window as containing the standard deviation of wind direction. In the flag application section, the <all WS columns> and <all WD columns> specifications mean to apply the flag to all wind speed and wind direction data columns in the dataset. This is a very conservative approach because it means that in a time interval that any wind direction sensor appears to freeze, all wind speed and wind direction data will get flagged as icing.

Example 4 - Icing via Negative Wind Shear

The highest wind speed sensors on the met tower often experience more severe icing conditions than those mounted lower on the tower. So another way to detect icing would be to search for incidents of negative wind shear , where an anemometer close to the ground records faster winds than another anemometer higher up the met tower.

The flag rule shown in the screenshot below does exactly that. It searches for data segments in which the temperature falls below 1°C and any wind speed sensor reports a value less than 90% of that of any lower wind speed sensor. In such a data segment, it applies the 'Icing' flag to the higher wind speed sensor. For example, if the 50m anemometer reported a wind speed less than 90% of the wind speed reported by the 30m anemometer, this rule would flag the 50m anemometer.

Tip: Any number of flag rules can apply the same flag. If you executed all the flag rules described above, Windographer would apply the 'Icing' flag to data segments that contain a flatline in a wind speed sensor, or a flatline in a wind direction sensor, or a negative wind shear event.

Example 5 - Invalid Data In Any Data Column

If your dataset contains error codes such as -999 to mean missing data points, you could use a simple flag rule to flag all such data points appropriately. You could, for example, set the search criteria as follows:

And the flag application specifications as follows:

Note that you can also flag all -999 (or other) values as invalid from the Dataset tab of the Configure Dataset window.

Example 6 - Low Quality

If your dataset contains one or more quality data columns, you can create a rule to flag all measurements of insufficient quality. The following search criteria, for example, will find all quality values below 95%:

And in any time step in which a quality data column reports a value below 95%, the following flag application settings will apply the 'Low quality' flag to each of the data columns that you have associated with that quality data column:

Note that you can designate quality data columns and their associated data columns in the Configure Dataset window.

Example 7 - Tower Shading

You never have to create a flag rule to flag tower shading events, because Windographer can do it for you automatically in the Flag Tower Shading window. But if you did choose to write your own rule to flag tower shading, its search criteria might look something like this:

And its flag application settings would look something like this:

Tip: You can make a flag rule available in all your Windographer documents by adding it to the list of favorite flag rules. This is especially useful for rules that refer to data column types, but it also works for rules that refer to specific data column names. See the article on favorite flag rules for more information.

Example 8 - Multiple Flags

If you are flagging your data to mark a number of different problems, a portion of the data may have multiple problems. For example, wind speed data might be shaded by the tower and flatlined because of icing. Windographer flag rules assume that once a data point is flagged to exclude it from calculations, that data should not be considered for in any further rule criteria.

When Wind Speed 50m B is already flagged with Tower Shading,

and the Tower Shading flag is to be excluded by default,

then all the wind speed data tagged with Tower Shading will be excluded from consideration in this icing flag rule. The criteria will not consider the period between noon and 18:00 because it has been flagged to exclude.

Note that the Flag Rules Test Results window will show these points as flagged because it doesn't consider existing flagging.

Executing this flag rule results in Icing flags from 0 to 12. The period from 12 to 16 is already flagged with Tower Shading.

This does not prevent these data points from being flagged with Icing by another means. For example, if your flag rule searched for icing Wind Speed 50m B and then flagged both 50m B and 50m A.

See also

Flag Rule definition

Favorite Flag Rules definition

Flagging data

Flag Rule Properties window

Flag With Rules window

Flag Tower Shading window

Define Flags window

Configure Dataset window

Quality Data Column definition

Using flag rules across multiple datasets


Written by: Tom Lambert
Contact: windographer.support@ul.com
Last modified: November 4, 2014