Focal Point Winter Weather Jobsheets

Grid Based Thresholds and Impact Phrasing

Purpose:

This jobsheet demonstrates the adjustment of element-specific, grid-based impacts phrasing, in this case for ice impacts but easily mirrored for other weather elements.

Tasks:

AT-A-GLANCE:

  • What? Change the zones, wording, and thresholds dictating impacts automatically triggered by a specific weather element, through element-specific "[element]ImpactThresholds" method in an override of LocalVariables.py
  • Flexible. Logic evaluating thresholds is open and can be re-worked as needed. 

Follow the steps below for more detailed guidance.

*** OTHER CONFIGURATIONS WITH IDENTICAL WORKFLOW *** The methodology in this jobsheet can be very closely mirrored for any "[element]ImpactThresholds" method in LocalVariables.py, where specific thresholds over specific zones (if configured) are set to provide specific impacts.

 

  1. [OPTIONAL] Create a hazard for your area to preview the current effect of your thresholds on the impact statements (you will need real or test data for this step)
    1. Launch Hazard Services in the GFE perspective
    2. Draw a hazard in an area with grid data (in this case ice accumulation) you plan to use in testing thresholds, using the freehand polygon or other method
    3. Select a category (e.g. Winter) and hazard (e.g. BZ.W), then click "Preview" to generate a product
    4. Look in the "Impacts" text field for messaging corresponding to the snow amounts and baseline thresholds.  For example:
      1. Six inches triggers a "Travel could be difficult to impossible" impact
      2. A foot triggers "Travel could be very difficult"
      3. Any measurable snow less than these should trigger "Plan on slippery road conditions"
  2. Switch to the Localization Perspective by clicking on the "Open Perspective" icon at the top-right of your CAVE window, and choosing "Localization"
  3. In the Localization Perspective, navigate to the Utilities sub-directory under the Hazard Services folder.
  4. Double click on LocalVariables.py to show the available versions
  5. Create a user override version if none exists (user override is best practice for testing changes):
    1. If there is only a BASE version: right click on BASE and select Create Override File, then select User
    2. If there is another version (e.g. SITE) you wish to use: right click on that file and select Copy To, then select User (this lets you work on an updated SITE version to replace the original when you're finished)
  6. Double click on the USER version of LocalVariables.py to open it for editing
  7. Open a reference copy of the existing LocalVariables.py file, which will be used for comparing to and copying existing code for overrides.
    1. It's typically best to open the BASE version because most methods have not already been overridden in a higher-level override
  8. In the reference file you opened, scroll or search to find the "iceImpactThresholds" method (whose first line appears as "def iceImpactThresholds(self, zones):" in LocalVariables.py)
    1. If following this jobsheet for a different weather element, find the "[element]ImpactThresholds" method corresponding to that element and use instead of iceImpactThresholds in subsequent steps
  9. Once found, select the entire iceImpactThresholds method by clicking and dragging from (and including) the
    "def iceImpactThresholds(self, zones):" line which begins the function, all the way to (and including) the last line of the function which has the "return impactPhraseDict, lowIceThreshold" statement
  10. Copy the selected contents by right-clicking and selecting "Copy" from the pop-up menu, or by hitting CTRL-C on your keyboard
  11. Switch back to the USER override you were working on
  12. Paste the iceImpactThresholds method into your USER override on a blank line after the "class..." and "pass" lines (or after any pre-existing override methods in the file), by right-clicking and selecting "Paste" from the pop-up menu, or by hitting CTRL-V on your keyboard
  13. In the USER copy of the iceImpactThresholds method you just pasted in, inline comments describe how to adjust the impactPhraseDict to set the thresholds for each impact statement as well as how to set different thresholds for different zones.
    impactPhraseDict = OrderedDict([
                (2.0, ("The potential exists for catastrophic failure to the power grid "
                       "due to the ice. Power could be out for many days. Extensive tree "
                       "damage is possible, and travel could be impossible.")),
                (1.5, ("Expect power outages that last for days and extensive "
                       "tree damage due to the ice. Travel could be impossible.")),
                (1.2, ("Expect power outages that last more than a day and extensive "
                       "tree damage due to the ice. Travel could be impossible.")),
                (0.6, ("Expect power outages and tree damage due to the ice. "
                       "Travel could be impossible.")),
                (0.24, ("Power outages and tree damage are likely due to the ice. "
                        "Travel could be nearly impossible.")),
                (0.05, "Difficult travel conditions are possible."),
                (0, "Very slippery sidewalks, roads and bridges are possible."),
            ])
    
            lowIceThreshold = 0.24
    
    1. Edit the quoted phrases, the threshold values, or even define a different Dict for different zones to set messaging suitable to your CWA,
      1. NOTE: For elements other than ice, there may be additional variables returned besides the the impactPhraseDict. Carefully read the inline documentation in each method for additional guidance.
  14. When finished, save the file by hitting Ctrl+S, or selecting Save from the File menu
    1. If a "File Version Conflict" is encountered, click OK to accept merge
    2. In the two-panel "Merge" tab that opens, make no changes, once again save the file by hitting Ctrl+s, then close the "Merge" tab
    3. When a "File Changed" message appears,  click Yes.
    4. This behavior will only be encountered each time a new override file that did not exist before is created and saved
  15. [NO ACTION REQUIRED] Reflection: How is this used?
    1. Methods defining impact thresholds are usually called by a "getGridBasedImpacts" method in the WSW_PhraseMethods.py file, which compares forecast weather (e.g. snow) to these thresholds to determine the severity of impacts phrasing.
  16. [OPTIONAL, RECOMMENDED] Verify your thresholds are reflected by generating a product (you will need suitable real or test data in your grids for this to work)
    1. Return to GFE and create a BZ.W hazard over an area with suitable grids (e.g. ice in this case) to trigger your new thresholds
    2. Click Preview to generate a product
    3. Review the "Impacts" text for auto-generated impacts suitable to your thresholds.  Do they match your new phrasing and thresholds?
  17. Finished!