Navigation Menu

Combining Marine Zones

Purpose:

This jobsheet will walk the Focal Point through combining marine zones in Hazard Services.

Tasks:

AT-A-GLANCE:

  • What? Marine zone names can be combined by a class-based override of localWherePhraseConfiguration within LocalVariables.py.   

  • Why? Combining marine zones results in shorter, more intuitive marine locations in the First Bullet of hazard product text. For example, rather than saying "Special Marine Warning for... Waters from South Santee River SC to Edisto Beach SC out 20 NM... Waters from Edisto Beach SC to Savannah GA out 20 NM...", combining marine zones could give the simpler "Special Marine Warning for... Waters from South Santee River SC to Savannah GA out 20 NM..."

  • WarnGen Marine Combinations. If your site already has combined marine zones in WarnGen, you can find the list by opening the Localization perspective, navigating to D2D –> Warngen –> marineCombo.vm and opening the SITE override. That list can be used as the basis for your Hazard Services marine zone combination overrides.

Follow the steps below for more detailed guidance.

  1. To find your site list of UGC codes and names, open the Localization perspective and navigate to GFE –> Text Utilities –> DefaultAreaDictionary.py (top image). If your site has overridden any of the UGC names in DefaultAreaDictionary.py, they can be found by navigating to GFE –> Text Utilities –> AreaDictionary.py and opening the SITE override (bottom image). 

  2. Navigate to Hazard Services –> Utilities –> LocalVariables.py and open the BASE file.

  3. If a USER override for LocalVariables.py does not already exist, create one by right-clicking BASE –> Create Override File and selecting User. Open the USER override file.

  4. In the BASE file, use Ctrl+F to launch the Find/Replace tool and search for localWherePhraseConfiguration. Copy the entire function definition into the USER override file. 

  5. The subList list (red box in above image) contains dictionaries for your marine zone combinations. Each dictionary contains: 

    "vtecCriteria" contains a list of hazard types to which the marine zone combination should be applied. To apply marine zone combinations to all hazard types, leave "vtecCriteria" as an empty pair of brackets [ ]. If you have different marine zone combinations for different hazard types, you need to create a separate dictionary within subList for each different "vtecCriteria".

    “zoneGroupCriteria” contains a list of zone name substitutions. The first object in each substitution is a list of UGC codes that you would like a combined name for, with the desired name string as the second object. 

    For a marine zone combination to be displayed in the product, the hazard segment must correspond to a hazard within “vtecCriteria” and contain all corresponding UTCs in the “zoneGroupCriteria” tuple.

    *NOTE: When Hazard Services checks for combinations, it starts with the first one listed and proceeds sequentially down the list. Once a substitution is triggered, the zones that were combined will no longer be considered for further substitutions down the list. Therefore, it is best to place the substitutions that combine the most zones highest within the “zoneGroupCriteria” list.

    For example, see the below dictionary:

    Without including those combinations, a MA.W would look like this:

    However, with the above override the zones will appear like this:

  6. Enter your desired substitutions as dictionaries within subList.

  7. Save the USER override file using Ctrl+S. Merge if it asks you to.

  8. To test your new marine zone combinations, open the D2D perspective and launch Hazard Services. Create a hazard segment that includes multiple marine zones that you combined. Enter your parameters in the Hazard Information Dialog window and select the Preview… button. Verify that the desired output appears correctly in the First Bullet within the Product Editor. Continue testing a variety of marine zone combinations and hazard types until you are comfortable the combinations are working as desired.

  9. When you are comfortable that the USER override is working as you want, return to the Localization perspective. Promote the USER override to a SITE override by right-clicking USER under LocalVariables.py in the File Browser and selecting Copy To –> Site.

Congratulations, you've configured your marine zone combinations.