Navigation Menu

Basis Text

Purpose:

This jobsheet will walk the Focal Point through configuring the Basis Text field when using the Storm Track Tool in Hazard Services.

Tasks:

AT-A-GLANCE:

  • What? Perform an incremental override of SpatialQueryConfigs.py to change Basis Text location settings. Perform a class-based override of basisUseOrAbout within TextProductCommon.py to turn off use of secondary locations in the Basis Text. Perform class-based overrides of shortFuseNearOverPhraseConfig within TextProductCommon.py to change settings for when a storm is denoted as "near" or "over" a location in the Basis Text. 

  • Why? The Basis Text field appears near the top of the public hazard product and provides important information about storm location and motion. Customizing it allows you to control the specificity of the information you provide partners and the public. 

  • Storm Motion Language. There are a few simple functions within TextProductCommon.py that you can override to configure the storm motion language in the Basis Text. While this jobsheet doesn't provide detailed directions for the storm motion language configuration, you can customize it using class-based overrides of the following functions:

    • basisIsStationarySpeed: the forward storm speed threshold below which the storm will be reported as stationary. Note that the default is 5 mph in WarnGen (found in config.vm as the variables landStationary and marineStationary) while in Hazard Services the default is 0.5 mph, so you will want to consider what value you wish to use if you don’t have a WarnGen override value.

    • basisRoundSpeedBy: the amount that the forward storm speed will be rounded by. The default rounds to the nearest 5 mph.

    • basisNumCompassPts: the number of bearings that can appear in the Basis Text. A value of 4 gives N, E, S, W; 8 gives N, NE, E, SE, S, SW, W, NW; and so on. The default is for 8 cardinal directions.

  • Current WarnGen settings. Your current WarnGen geospatial settings can be found in the Localization perspective by navigating to D2D –> Warngen. You can find settings for county hazards in geospatialConfig_COUNTY.xml, settings for marine hazards in geospatialConfig_MARINE.xml, and settings for zone hazards in geospatialConfig_ZONE.xml. This jobsheet will focus on county hazards, but the process for marine or zone hazards will be the same. Some settings are also found under config.vm, and those will be pointed out in this jobsheet when applicable.

Follow the steps below for more detailed guidance.

 

SECTIONS

  1. Basis Text Location Settings
  2. Basis Text Secondary Location Turnkey
  3. Basis Text “Near” and “Over” Settings

 

1. Basis Text Location Settings

  1. To see your current WarnGen Basis Text location settings in the Localization perspective, navigate to D2D –> Warngen –> geospatialConfig_COUNTY.xml and double click on SITE to load your overrides.

  2. Navigate to Hazard Services –> GeoSpatial Config –> SpatialQueryConfigs.py and double click on BASE to load.

  3. Within both geospatialConfig_COUNTY.xml and the SpatialQueryConfigs dictionary, “ClosestPoints” contains the settings for the primary location in the Basis Text, while “OtherClosestPoints” contains the settings for the secondary location(s). There’s a one-to-one relationship between the WarnGen and Hazard Services settings, making it simple to take your WarnGen overrides and map them to corresponding Hazard Services overrides.

  4. Some of the main things you can control in SpatialQueryConfigs.py are the WarnGen levels, land/water parameters, and distance thresholds for the locations that appear in Basis Text, as well as the maximum number of locations

    1. WarnGen levels are set by “warngenlev” within the “constraints” dictionary. The default values are 1 and 2 for primary locations and 1 for secondary locations.

    2. Land/water parameters are set by “landwater” within the “constraints” dictionary. The default values are “L”, “LW”, and “LC”.

    3. Distance thresholds are set by “distanceThreshold”, with values in miles. The default value is 100 miles.

    4. Maximum number of locations is set by “maxResults”. The default values are 1 primary location and 5 secondary locations.

  5. To override some of these values, create a USER override for SpatialQueryConfigs.py (if one does not already exist) by right-clicking BASE –> Create Override File and selecting User. Open the USER override file.

  6. Copy the SpatialQueryConfigs dictionary into your USER override file with the keys you wish to override based on your current WarnGen overrides within geospatialConfig_COUNTY.xml.

  7. Change the values of each key to match your WarnGen override values.

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

  9. Test your new settings in the D2D perspective using the Storm Track Tool. 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 SpatialQueryConfigs.py in the File Browser and selecting Copy To –> Site.

    *NOTE: There is no simple override that will allow you to have different SpatialQueryConfigs for different hazard types or categories.

2. Basis Text Secondary Location Turnkey

  1. A secondary location will appear in the Basis Text by default in Hazard Services. If you wish to turn it off so only the primary location will appear, navigate to Hazard Services –> Utilities –> TextProductCommon.py and double click on BASE to load.

    *NOTE: You can find your current setting in WarnGen by navigating to D2D –> Warngen –> config.vm and opening your SITE override. You can determine whether you use a secondary location by checking the boolean values of useSecondReferenceCell and useSecondReferenceLine. True means secondary locations are enabled; False means they are not.

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

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

  4. Note that the function simply returns a boolean value. To turn off the secondary location in the Basis Text, switch the boolean to False.

  5. Test your new settings in the D2D perspective using the Storm Track Tool. 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 TextProductCommon.py in the File Browser and selecting Copy To –> Site.

3. Basis Text “Near” and “Over” Settings

  1. You should also review your distance thresholds for denoting a storm as “near” or “over” a location in the Basis Text. The WarnGen settings can be found by navigating to D2D –> Warngen –> config.vm and opening your SITE override, if you have one. The values are set using maxLandNearDistance and maxMarineNearDistance for the “near” threshold and maxLandOverDistance and maxMarineOverDistance for the “over” threshold. If you did not override the WarnGen default values, note that the default values have changed from WarnGen to Hazard Services:
     
       WarnGen default:  Hazard Services default:
     "near"  Within 6 miles  Within 5 miles
     "over"  Within 2 miles  Within 3 miles

    To change the Hazard Services default distance values, navigate to Hazard Services –> Utilities –> TextProductCommon.py and double click on BASE to load.
  2. If a USER override for TextProductCommon.py does not already exist, create one by right-clicking BASE –> Create Override File and selecting User. Open the USER override file.

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

  4. Change the values of “near” and “over” within thresholdDict to your preferred distances.

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

  6. Test your new settings in the D2D perspective using the Storm Track Tool. 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 TextProductCommon.py in the File Browser and selecting Copy To –> Site.

Congratulations, you've configured the Basis Text field when using the Storm Track Tool.