(3) FEAT Rule-Definition Guide

Forecast Event Awareness Tool 

   A CAVE GFE Data Mining Procedure
Updated April 2019

Prototype release

   Outline  
  1. ) Getting Started User Guide alt message
  2. ) Software Installation Guide alt message
  3. ) Rule-Definition Guide

  Description     

FEAT will alert the forecaster to weather events of significance within the forecast grids. The application shows significant weather events with color. The small boxes, representing gridded forecast data, show areas of the possibility of weather events occurring. Rules are used to process the forecast models grids. When the rule is satisfied, the grid box has a distinct color indication. See the Getting Started User Guide.

Two steps are needed to customize FEAT, (i) set the rules, and (ii) extract your grid edit areas from GFE into data files.

(i)   Rule-Definition     



If the user-defined rule is met, for a specific grid area, the color of the representative grid box is marked by a color.
For example: The rules are associated with an event name. Any number of rules can be added to the database of events. Each event entry includes a Name, a Description of the event, a Rule to evaluate the event, a Priority rank (1-high to 5-low), and a Category type.

Look here: ls $LOCALAPPS_RUN/Gfe/Apps/FcstEventAwareness/src/*
Edit the file FcstEventConfig.py. It's the code that preprocess the Forecaster Event Awareness data.


# List of Rules, surround each expression to be logic and/ logic or with PARENTHESIS, e.g. '(T < 30) & (Wind > 30)'.
# You can also have multiple compare operators in one expression. For example, writing '(30 < T < 50)' is valid.
# Note that the weather element is always first, on the left side.
# And remember, 'and' (&) is evaluated before 'or' (|).
# Final note: Spaces are IMPORTANT!! Space everything properly, look at examples.

eventDef = [
 { 'name' : 'HighWind',
  'Rule' : '(Wind >= 40.0) | (WindGust >= 58.0)',
  'Category' : 'Wind',
  'Priority' : 2,
  'Description' : '',
  'EditAreas': ['siteID', ],
  'EditAreas': "Entire_Domain",
  'EventWWA' : 'Warning',
},
 { 'name' : 'DenseFog',
  'Rule' : '(Visibility <= .25)',
  'Category' : 'Visibility',
  'Priority' : 3,
  'Description' : 'widespread fog to reduce visibilities to 1/4 mile or less over area',
  'EditAreas' : ['siteID', ],
  'EventWWA' : 'Warning',
},
 { 'name' : 'RedFlag',
  'Rule' : '(T > 80.0) & (Wind > 25.0) & (RH < 15.0)',
  'Category' : 'Fire Wx',
  'Priority' : 1,
  'Description' : 'a fire warning, conditions are ideal for wildland fire combustion, and rapid spread',
  'EditAreas' : ['siteID', ],
  'EventWWA' : 'Warning',
},

Use the GFE "Edit Area and Query Dialog", at the icon question mark, to test out the simpler rules you would like to add to the FEAT events definition Rules.

alt message

Figure: Image of the GFE "Edit Area and Query Dialog" to test out the simple query rules.


  Ideas for Event Rules     


"How can we find interesting events over time? ...with massive amounts of data to explore?" One answer is this tool. The following are a few ideas from an enthusiastic forecaster ...that are Not Yet Implemented. These require code enhancements. Think possibilities.

  Rules using Edit Area     


The Rules using various Edit Area options changes the answer of the grids and thus the percentage of grids that are indicated as a hazard.

(A)

alt message
alt message

Figure: FEAT: Demonstration of 'Winter Wx' rules applied on 15 Dec 2016 to a variety of domains in Colorado,
where the value for the EditAreas change. See corresponding Rule entries below (B).

(B)

Rule entries below that correspond to the image above (A), are to illustrate the connection.
eventDef = [
 { 'name' : 'Winter Wx',
  'Rule' : '(T < 32.0) & (Wind > 20.0)',
  'EditAreas : ["COZ030", "COZ031", "COZ032", "COZ033", "COZ034", "COZ035", "COZ036", "COZ037", ],
  'Category' : 'Winter',
  'Priority' : 3,
  'EventWWA' : 'Warning',
},

 { 'name' : 'Winter Wx CO',
  'Rule' : '(T < 32.0) & (Wind > 20.0)',
  'EditAreas : ["Entire_Domain", ],
  'Category' : 'Winter',
  'Priority' : 3,
  'EventWWA' : 'Warning',
},

 { 'name' : 'Winter Wx above 10,000 ft',
  'Rule' : '(T < 32.0) & (Wind > 20.0)',
  'EditAreas : ["Above_10000", ],
  'Category' : 'Winter',
  'Priority' : 3,
  'EventWWA' : 'Warning',
},

 { 'name' : 'Winter Wx above 3,500 ft',
  'Rule' : '(T < 32.0) & (Wind > 20.0)',
  'EditAreas : ["Above_3500", ],
  'Category' : 'Winter',
  'Priority' : 3,
  'EventWWA' : 'Warning',
},

 { 'name' : 'Dense Fog ',
  'Rule' : '(Visibility <= 0.25)',
  'EditAreas : ["siteID", ],
  'Category' : 'Winter',
  'Priority' : 3,
  'EventWWA' : 'Warning',
},

(ii)   Grid Edit Areas     


The installation script (csh) runs and will install the code necessary to run the tool.
Note, the edit areas for your WFO need to be extracted into a series of files for the python scripts to read on and on-giong basis. The installation script attempts to do this step for you, if no errors, then your system environment variable values and profiles are properly set for this action.

Look here to see if files are available: ls $LOCALAPPS_RUN/Gfe/Apps/FcstEventAwareness/data/editAreas/*

Sub-sample of files for Colorado zones.
  1. ls $LOCALAPPS_RUN/Gfe/Apps/FcstEventAwareness/data/editAreas/COZ00*
    COZ001.npz
    COZ002.npz
    COZ003.npz
    COZ004.npz
    COZ005.npz

If the above editAreas/ directory is empty, then this can easily be done manually.
From the GFE Edit menu, select 'Edit Areas Make Repo'. This step needs to be completed (once). However, if or when your site creates a new edit area and uses that site with the Event Rules (above) OR your domain size is changed, the 'Edit Areas Make Repo' simply needs to be re-run in the manner described here.


alt message

Figure: How to start the GFE Procedure to simply create edit area data files for FEAT.