Focal Point Winter Weather Jobsheets

Adding LE.W as a Valid Hazard

Purpose:

This jobsheet configures Hazard Services to use LE.W instead of WS.W.LakeEffect

Tasks:

 

  1. Create a hazard and view the options in the "type" menu in the HID. Notice that WS.W.LakeEffect is an option. 
  2. Open the Localization Perspective and find the HazardCategories.py file, in the Hazard Categories folder of Hazard Services.
  3. 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)
  4. We need to remove WS.W.LakeEffect from the winter category, and add LE.W instead. Copy and paste the following lines into your user override file: 
    from collections import OrderedDict
     
    HazardCategories = OrderedDict(
        {
        "Winter Weather": [("LE", "W"), "_override_remove_", ("WS", "W", "LakeEffect")],    
         }
        )
    
    1. Note: Be sure to include the import line in your override file!
    2. If you already have overrides in this file, just include the "Winter Weather" overrides as another line within the { } brackets, making sure a comma separates each item in these { } brackets
    3. HOW IT WORKS:​​​​​​​ From Override training, recall that overrides merge new, unique items with the base version, which is what will happen with ("LE","W").  But removing items requires a control string before it, such as "_override_remove_", to indicate special handling of the subsequent item(s), which in this case says to remove ("WS","W","LakeEffect") from the base version.
  5. Save the file and return back to your GFE or D2D perspective to view the HID again. You may need to close and relaunch Hazard Services before the change is visible.
  6. Notice now that the drop down menu for Type no longer includes WS.W.LakeEffect​​​​​​​ but does include LE.W. â€‹â€‹â€‹â€‹â€‹â€‹â€‹
    1. NOTE the default override behavior of placing LE.W at the end of the list.  If you want LE.W to appear after WS.W, in the same position previously occupied by WS.W.LakeEffect, alter your override to use a more specific command, shown below.  This "_override_insert_after_" control string is followed by two arguments, the first being which item to insert our item after (WS.W), and the second argument being the item to insert (LE.W).
      from collections import OrderedDict
       
      HazardCategories = OrderedDict(
          {
          "Winter Weather": ["_override_insert_after_", ("WS", "W"), ("LE", "W"), "_override_remove_", ("WS", "W", "LakeEffect")],
           }
          )
      If using the above override, you should see LE.W correctly moved to appear after WS.W as shown below.
      ​​​​​​​ 
  7. Task complete!