Hazard Services Start-Up Checklist for New Offices
(Last Update - 8/2/2020 - dlt (patching updates/info)
OVERVIEW - WHAT NEEDS TO BE DONE BEFORE IOC
- Complete User/Focal Point TrainingFamiliarize and Train
- Complete Basic Configuration
- Complete Required Advanced Configuration
- Watches, BurnScar, DamCat, MileMarkers, DSSEvents...etc
- (Optional) Enable Option to create River Gage Hazards for NonFcstPts
- Complete Service Backup Prep Configuration
- Run initialization script (hs_export_configuration)
- Configure BackupSvc and LocalizationBackupList
- HS Overrides Project (Share and Collaborate)
- HS Interoperability behavior summary
- When ready to have hydro DB copied to HS, email whfs@noaa.gov
- In operational mode, check for invalid river flood events (may exist due to past testing).
- Review Support Links
- Hazard-Services infolist
- nwschat - hazard_services_support group
- VLab Hazard Services Community
- Focal Point Guide
- HS Quick Reference Sheets - (For operations)
- Hazard Services Common Practice Workflow (Great for new users to practice HS after taking VLab job sheets)
- DAF Resources
AWIPS 2 DR Fix List
HS Patching Scripts (GSL Strategy)
- The scripts available in the Hazard Services Patch utility are ready to go. This SCP package depends on the Hazard Services OverridesInstaller package. A list of current bug fix patches is available here.
- If you have already withdrawn your 19.3.4 bug fix patches, the main thing you want to do is
Confirm the State of the bug fix patches you still need. Some of the patches are needed until 20.2.1, and some will be needed past 20.2.1. One thing this confirm step does is assure your bug fix patches are in effect for all of your backup sites.
- Also, if you haven't done this yet, you should run the
scrub that checks your overrides for potential problems.
I. Familiarize and Train - (Online Training and Job Sheets) - All Users
- Complete User Training for Hazard Services (All Users)
- Training available in CLC
- See the "FY20 AWIPS Warning-Related System Readiness - Full" curriculum (for all AWIPS System Readiness Training)
- "FY20 AWIPS Warning-Related System Readiness - New" curriculum (for just the FY19 and FY20 training).
- Complete Focal Point Training (Focal Point and ITO. Note other users are welcome to review this information as well)
- Training available in CLC
- See the "Hazard Services IOC Focal Point Training" curriculum.
- Review Hazard Services Job Sheets (All Users)
- Training available on the Hazard Services VLab Site under the Hazard Services Job Sheets pull down menu.
- Understand what Interoperability
- Review this shared document to get a better understanding of HS Interoperability
- Practice/Familiarize locally in Practice Mode (All Users)
- A2 Build 19.3.1 comes with HS Hydro IOC installed. Users can practice HS in Practice mode.
- Note: Practice mode can be achieved in two ways.
- Option #1 - start a single session in practice mode. This is good for testing HS issues only:
- (ie /awips2/cave/cave.sh -mode practice)
- Option #2 - start an entire workstation in practice mode. Great for testing RiverPro along with HS.
- AWIPS 2 Start Up Menu->Test Mode Control Program
- Important - Open Hazard Services in operational mode to check for invalid events
- When Hazard Services is first installed, the interoperability process runs in catchup mode to load active events into the registry
- It can occasionally pull old river flood (FL.*) events into the registry as active events
- It is essential that each site open Hazard Services in operational mode with all hazards filtered in (Hydrology_All settings) and verify that all of the events that show up in the console are valid, active events.
- This must be done before transitioning to hazard services for hydro hazard operations
- If any invalid events show up, contact the NCF for removal.
II. Basic Configuration - Hazard Services for your WFO (Focal Point/ITO)
- Configure visible and possible sites
- See Hazard Services VLAB - Set Visible and Possible Sites
- Configure Backup Sites
- See Hazard Services VLAB - Define Backup Sites
- Configure Forecast Initials/Signature
- See Hazard Services VLAB - Configure Forecaster Signatures on products
- Configure Default settings for your CWA
- See Hazard Services VLAB - Change Default Settings
- Configure StartUpConfig
- Configure settings that are used when Hazard Services is first started
- Example: StartUpConfig = { “defaultsettings” : “Hydrology_All” }
- Important note about StartupConfig: Do not create any other files in the StartupConfig directory - HS will not start
- Configure Inclusion Area for Short Fused Hazards
- Option #1: Use Localization Perspective
- See Hazard Services VLAB - Configure Inclusion Area for Short Fused Hazards
- Note: The inclusion* tags specified in the WarnGen geospatialConfig_*.xml files must be propagated to Hazard Services HazardTypes.py
- Optional #2: Use verifyWgnThresholds.csh script (
See Hazard Services Focal Point Users Guide)
- cd /awips2/edex/scripts/HazardServices/
- ./verifyWgnThresholds.csh XXX (where XXX is your SITE ID)
- Use the localization perspective to update Hazard Services -> Hazard Types -> HazardTypes.py
- Configure Extension Area for Short fused Hazards
- See Hazard Services VLAB - Configure Extension Area for Short Fused Hazards
- Configure Hazard Services alerts
- See Hazard Services VLAB - Modifying Alerts
- Customize HazardTypesUtils.py
-
See Focal Point User's Guide - Getting Started Customizing HazardTypes
- Examine configuration that Hazard Services uses, but is outside of Hazard Services
- Hydro Database: Hazard Services uses a number of configurations from the hydro database that RiverPro also used.
- Here is an active list of hydro database fields to check.
- Review list of temporary overrides for bugs
III. Intermediate/Advanced Configuration - Hazard Services
- Remove watches/advisories from River Flood recommender
- See Hazard Services VLAB - Remove the potential to recommend watches and advisories from the river flood recommender
-
BURN SCAR: Configure Burn Scar Areas
-
See Hazard Services User Guide - Configure Hazard Services with predefined dams and burn scars
- (Jim Ramer Notes)
- Option #1: Configure Burn Scar Areas from WarnGen Template
- cd /awips2/edex/scripts/HazardServices/
- /awips2/python/bin/python parseWarngenTemplate.py -b
- The parseWarngenTemplate.py results in new localization files being created at the configured localization level. No shapefiles are involved.
- Option #2: Configure Burn Scar Areas from Shapefile (Need to be polygons)
- Stage Burn Scar shapefile into a working directory
- Example: cd /localapps/runtime/HazardServices/CO_BurnAreas.shp
- Jim’s ingestshapefiles.sh script assumes a default column name of NAME.
- If this is not the case, then you will need to add -a column name below.
- If unsure, you can review the dbf file (ie dam.dbf) and note the attribute name used.
- Example: WFO BOU created a DAM shapefile with the name attribute called DamName (note case matters)
- So I needed to add -c DamName
- Run ingestshapefiles.sh by itself to list all possible options.
- dx3<awips>:/awips2/edex/scripts/HazardServices/ingestshapefiles.sh
- Usage: ./ingestshapefiles.sh -e -b -u -s /localapps/runtime/HazardServices/CO_BurnAreas.shp -w XXX (Where XXX is the siteid, used for backup sites)
- The script will output /tmp/BurnScarMetaData.py.<stamp>. Copy this site to SITE version of CAVE->Hazard Services -> Utilities -> BurnScarMetaData.py.
- Modify BurnScar Recommender
- Update SITE File in CAVE->Hazard Services -> Recommenders -> BurnScarFloodRecommender.py
- DAMCAT: Configure DamCat
-
See Hazard Services User Guide - Configure Hazard Services with predefined dams and burn scars
- Option #1: Configure predefined DAM from WarnGen Template
- cd /awips2/edex/scripts/HazardServices/
- /awips2/python/bin/python parseWarngenTemplate.py -d
- The parseWarngenTemplate.py results in new localization files being created at the configured localization level.
- Option #2: Configure predefined DAM from Shapefile (Need to be polygons)
- Stage Dam Cat shapefile into a working directory
- Example: cd /localapps/runtime/HazardServices/DAM.shp
- Jim’s ingestshapefiles.sh script assumes a default column name of NAME.
- If this is not the case, then you will need to add -a column name below.
- If unsure, you can review the dbf file (ie dam.dbf) and note the attribute name used.
- Example: WFO BOU created a DAM shapefile with the name attribute called DamName (note case matters)
- So I needed to add -c DamName
- Use Jim Ramer Script to pull in DAM Shapefiles
- dx3<awips>:/awips2/edex/scripts/HazardServices/ingestshapefiles.sh
- Usage: ./ingestshapefiles.sh -c columnName (optional. Default is NAME) -e -d -u -s /localapps/runtime/HazardServices/DAM.shp -w XXX (where XXX is your SItE ID, used for backup sites)
- The script will output /tmp/DamCatMetaData.py.<stamp>. Copy this site to SITE version of CAVE->Hazard Services -> Utilities -> DamMetaData.py.
- Modify DamBreakFlood Recommender
- Update SITE File in CAVE->Hazard Services -> Recommenders -> DamBreakFloodRecommender.py
- MILE MARKERS: Convert warnGen mile markers into a form usable by Hazard Services.
-
See Hazard Services User Guide section E for detailed information - Convert warnGen information about mile makers. Since May 2020, there have been procedures documented in section E for sharing mile marker information with your service backup sites. The scripts that support this (downloadable from section E) were last updated on June 18, 2020.
- Option #1: This option assumes that you have already warngen configured to use mileMarkers and that the mileMarkers have been imported into the maps database.
- As user awips on dx3, run the commands that follow:
- cd /awips2/edex/scripts/HazardServices/
- /awips2/python/bin/python parseWarngenTemplate.py -m
- This will result in a new localization file being created at the configured localization level in:
- Hazard Services -> Event Utilities -> GeoSpatial Config -> PointMarkerConfigs.py
- Option #2: Fresh install of mileMarkers.
- Import Mile Markers into warnGen following instructions and example below:
- Import MileMarker
- cd /awips2/database/sqlScripts/share/sql/maps
- ./importMarkersInfo.sh /tmp/i495mm.id mapdata i495mm
- Verify
- Psql -U awips maps
- Select * from mapdata.i25mm;
- Rerun Option #1 above.
- BOU Mile Marker Configuration Example :
- Click here for an example of what BOU (HazardService->GeoSpatial Config-> PointMarkerConfig.py (With DSSEvents enabled)
- Code Snip below will automatically check Mile Marker checkbox
- SITE CommonMetaData.py (Override getAdditionalLocaltions(self):
- values=[]
- Above choices.append(newCheckBox) add the following line. values.append(pointConfigName)
- Under return section: “values”: values,
- WARNGEN DSS EVENTS: Configure warnGen DSS Events to work to HS ( See added; there is some information related to this in
section 3.0.6 of the Hazard Services Focal Point User’s Guide
- If a site has already configured warngen_DSS events in warngen, then adding them to Hazard Services is simple.
- Simply update PointMarkersConfig.py to include dssEvents at the top of this site level override.
- BOU WarnGen DSS Events Configuration Example
- Click the following link to see an example of how BOU configured this
- PointMarker Events: Configure Point Markers to work in HS
- This step uses the same PointMarkerConfig used for MileMarkers and DSS Events described above.
- For an example and instructions, refer the base file of PointMarkerConfig.py in HazardServices->GeoSpatialConfig -> PointMarkerConfig.py
IV. ENABLING NON FCST POINTS ON HAZARD SERVICES
- Overview: If sites wish to issue river hazards for non fcst points, the river gage needs to be associated with a Fcst Point Group Assignment. Many sites have already completed this in RiverPro. If a river gage is NOT associated with a point, Hazard Services will prompt Recommender Completed. No Recommended Hazards.
- Steps to Assign river gage to Fcst Point Group Assignment:
- Bring up Hydro Perspective
- Identify River Gage
- Under the HydroApps menu, bring up Hydro Database Manager
- Identify Gage
- From the River Gage menu, select River Gage
- On the right side, select Forecast Point Group Assignment
- Select a Fcst Group (Most likely a group assignment associated with the gage)
- Select Apply and Ok
- You should now be able to create a Hazard from the modified non fcst point above.
V. SERVICE BACKUP CONFIGURATION
- Configure Localization Service Backup FIles
- NOTE: Backup services will move files only between sites that are on the same build. If the sites are not on the same build, the changes will be held in a queue and transferred as soon as the sites are on the same build.
- Configure SITE Level backupSvc.xml (Lists the backup sites and other general configuration)
- In the Localization Perspective (EDEX->Backup Service):
- Copy backupSvc.xml from BASE TO SITE
- Change host <name> #1 to dx3-aaa (where aaa is your primary backup site)
- Change host <name> #2 to dx3-bbb (where bbb is your secondary backup site)
- Save
- Configure SITE localizationBackupList.txt (Lists which localization files to send to backup sites)
- In the Localization Perspective (EDEX->Localization Backup):
- Copy localizationBackupList.txt from BASE TO SITE
- Adjust as needed, although most offices will be able to use the standard settings listed below.
- CONFIGURED settings are included, but this functionality really does not work, since CONFIGURED files are NOT touched via Localization.
- For IOC:
- SITE:common_static/HazardServices/*
- CONFIGURED:common_static/HazardServices/*
- NOTE: 19.3.3+ will keep the following required GFE CONFIGURED files
- CONFIGURED:cave_static/gfe/userPython/textUtilities/DefaultAreaDictionary.py and DefaultCityLocation.py
- For Post IOC: Hopefully we will be able to include GFE SITE level files with BackupServices
- SITE:common_static/HazardServices/*
- SITE:cave_static/gfe/userPython/textUtilities
- CONFIGURED:common_static/HazardServices/*
- CONFIGURED:cave_static/gfe/userPython/textUtilities

- Run Hazard Services Initialization Script
- NOTE: In order for Backup Services to work correctly, your backup office needs to be on A2 19.3.1.d
- Run the PUSH SCRIPT (A2 19.3.1+) Run an initialization script that pushes your SITE’s Hazard Services configuration files to your backup sites listed in backupSites.xml:
- ssh awips@dx3
- cd /awips2/edex/scripts/HazardServices/ServiceBackup/scripts/
- ./hs_export_configuration -s <SID> -c -g -p
- (NOTE: SID is the site that is being exported, i.e. your very own WFO)
- Have the WHFS group sync your backups hydro database
- The WHFS group has a script to make sure all recently updated hydro data from your backup site is synced with your site
- Be sure to include burnScar, damcat, and mileMarker data from your backup office. If referenced from mapdata database, you will need to make sure this data has been imported into maps.mapdata.
Areas of Typical Customization - A Closer Look
Overview: There are many areas for sites to customize. Below are a number of key areas focal points will want to pay particular attention to. The baseline files for most of these files are sufficient for sites initial functional use of Hazard Services
HazardTypesUtils.py
Class HazardTypesUtils:
def countyExtension(self)
return (15,1)
def zoneExtension(self)
return (15,1)
def countyExtension(self)
return (15,1)
HazardTypes.py
- The Hazard Types file identifies all the hazards and basic information about each.
- The Hazard Types file contains almost 100 hazard types and is quite large. The incremental nature of this file at SITE makes it easier to manage this information.
- A list of hazard settings and possible overrides can be found in base.
- As a start, the inclusion/Area settings and default duration settings can be overridden in this file.
- SPECIAL NOTE: With incremental overrides, be sure to include any pre-defined variables (HOURS, MINUTES...etc) in your SITE incremental override.
- Example:
From HazardTypeUtils import HazardTypesUtils
HOURS = 3600000
MINUTEs = 60000
HazardTypes = {
‘FF.W.Convective’ : {
‘inclusionFraction’: 0.02,
‘inclusionAreaInSqKm’: 25 # MUST be a fraction, NOT Percent
‘defaultDuration’: 60 * MINUTES, # 60 * 60000
‘durationIncrement’: 15,
}
}
HazardCategories.py
- Hazard Categories make it easier to select the desired Hazard Type in the Settings dialog and Hazard Information Dialog (HID).
- For example, to move hydrology remove burn scar from the Hydrology list. The SITE override file would contain the following:
- From collections import OrderedDict
HazardCategories = {
"Hydrology": ["_override_remove_list_", ("FF", "W", "BurnScar")],
}
Note the _override_remove_list_ control...
HazardMetaData.py
MetaData_XX_Y.py
CallsToActionAndImpacts.py
- Class based file which holds calls to action and impact statement mega widget information.
- Below is an example to override and make a more description GUI for one Call To Action.
Example to override CTA verbage:
class CallsToActionAndImpacts(object):
################################################################
# Copy CTA definition from BASE that you wish to modify wording.
################################################################
def ctaFlashFloodWatchMeans(self):
return {"identifier": "FlashFloodWatch",
"displayString": "Flash Flood Watch means",
"productString": '''A Flash Flood Watch means rapidly rising water or flooding
is possible within the watch area.\n\nIf you are in the watch area, keep informed,
and be ready for quick action if flash flooding is observed or if a warning is issued.'''}
#################################################################
# Example to override cta verbage (ie. productString) Each cta in base
# is referenced by the identifier in the associated Hazard Meta Data files
#################################################################
def ctaActQuickly(self):
return {"identifier": "actQuicklyCTA",
"displayString": "Act Quickly",
"productString":
"Move to higher ground now. Act quickly to protect your life."}
HazardAlertsConfig.py
HazardAlertsConfig = {
"eventExpiration": {
"configuration": [
"_override_by_key_description_",
{
"description": "Convective Flash Flood Warning",
"criteria": [
"_override_by_key_name_",
{"name": "1st warning",
"color": {"red": 255, "green": 199, "blue": 0, "alpha": 255},
},
{"name": "2nd warning",
"color": {"red": 255, "green": 0, "blue": 255, "alpha": 255},
},
]
},
]
}
}
Example Override of how to have mileMarkers and dssEvents pre-selected (checked) by default.
class MetaData(object):
#############################################################
# Override: This override will auto select the two listed
# values in the Additional Location settings. DLT
#############################################################
def getAdditionalLocations(self):
pointConfigs = self.bridge.getPointConfigs()
choices = []
for pointConfigName in pointConfigs:
pointConfig = pointConfigs.get(pointConfigName)
newCheckbox = {
"identifier" : pointConfigName,
"displayString" : pointConfig.get('pointSpecificLabel')
}
if(newCheckbox not in choices):
choices.append(newCheckbox)
return {
"fieldType":"CheckBoxes",
"fieldName": "additionalLocations",
"showAllNoneButtons" : False,
"label": "Additional Locations:",
"choices": choices,
"lines": len(choices),
########################################################
# The line below will auto check both identifiers
# The indentifiers are listed in the PointMarkersConfig
#########################################################
"values" : ["mileMarkers", "dssEvents"]
}
Example Override of how to have a CallToAction identifier selected by default.
######################################################
# Updated 01/30/2020 DLH
# CTA OVERRIDE FOR FFW - EXAMPLE FOR OTHERS
######################################################
class MetaData(CommonMetaData.MetaData):
##################################################
# TAG: Done to remove some source choices.
##################################################
def getSourceChoices(self):
return [
self.dopplerSource(),
self.dopplerGaugesSource(),
self.trainedSpottersSource(),
self.publicSource(),
self.localLawEnforcementSource(),
self.emergencyManagementSource(),
############################################
# Comment out to turn off sources you do not want
############################################
#self.satelliteSource(),
#self.satelliteGaugesSource(),
self.gaugesSource(),
]
###############################################################
# TAG: To remove ctaImpact choices, simply comment out below
###############################################################
def getCTA_Choices(self):
rval = []
if self.generalizedKeyLookup("ibwType") == 'catastrophic':
rval.append(self.ctaImpact.ctaFFWEmergency())
rval += [
self.ctaImpact.ctaTurnAround(),
self.ctaImpact.ctaActQuickly(),
self.ctaImpact.ctaChildSafety(),
self.ctaImpact.ctaNightTime(),
self.ctaImpact.ctaUrbanFlooding(),
self.ctaImpact.ctaRuralFlooding(),
self.ctaImpact.ctaStayAway(),
self.ctaImpact.ctaLowSpots(),
self.ctaImpact.ctaArroyos(),
self.ctaImpact.ctaBurnAreas(),
self.ctaImpact.ctaCamperSafety(),
self.ctaImpact.ctaReportFlooding(),
self.ctaImpact.ctaFlashFloodWarningMeans(),
]
return rval
#################################################################
# TAG: Make sure the choice to Act Quickly CTA selected in the GUI.
# To add additional tags, simply add in the values as noted by
# example. #################################################################
def getCTAs(self, values=None):
pageFields = {
"fieldType":"CheckBoxes",
"fieldName": "cta",
"showAllNoneButtons" : False,
"useNewValueOnRefresh": True,
"choices": self.getCTA_Choices(),
"values" : [ "actQuicklyCTA" ]
#"values" : [ "actQuicklyCTA", "stayAwayCTA" ]
}
if values is not None:
pageFields["values"] = values
return {
"fieldType": "ExpandBar",
"fieldName": "CTABar",
"expandHorizontally": True,
"pages": [
{
"pageName": "Calls to Action",
"pageFields": [pageFields]
}
],
"expandedPages": ["Calls to Action"]
}
Understanding Hazard Services use of existing GFE configuration information
- Hazard Services makes use of some existing GFE configuration files. What follows are
the paths to these files after a standard A-II installation (LLL stands for a site ID):
- common_static/configured/LLL/gfe/python/SiteCFG.py
- Contains wfo site info (ie. wfoCity, wfoCityState)
- cave_static/configured/LLL/gfe/userPython/textUtilities/DefaultCityLocation.py
- Used in non-polygon products as long as “accurateCities” is not set to False for product Type in HazardTypes..py
- cave_static/configured/LLL/gfe/userPython/textUtilities/DefaultAreaDictionary.py
- Is per UGC dictionary with the following contents
- 'fullStateName': Plain language name of state, used in headlines, first bullets, and elsewhere.
- 'partOfState': Used to describe part of a state counties are in; like FE_AREA from old CitiesInfo shapefile.
- 'ugcCities': Used to list cities in non-polygon products if "accurateCities" is set to False for the product type in HazardTypes.py.
Recommenders (Information taken from
Hazard Services Focal Point Guide - Customization
Overview:
River Flood
- The River Flood Recommender (RFR) retrieves information from the Hydro Database about the forecast points within the forecast area for the given site. Hazard Events are created according to the selections made by the user. Criteria for Watches, Warnings, and Advisories are based on the observed and forecast data about each forecast point. These rules can be customized by the site through the override process.
- Note that RiverPro functionality has been separated between recommendations and product generation. RiverPro recommends Products which are adjusted by the forecaster before issuing. In contrast, the River Flood Recommender in Hazard Services recommends Hazard Events. Those Hazard Events can be adjusted by the forecaster before being transformed into Products through Hazard Services Product Generation. The forecaster can also adjust the resulting product pieces, but the ultimate intention is that most information will be captured prior to generating the products.
- NOTE: Sites may want to adjust (override) the RFR to NOT recommend FL.A’s or FL.Y’s. Another common config item for WFOs that do produce FL.Ys will be to change the watch/warning cutoff time.
- RFR Example #1:
- RFR Example #2:
- NOTE: HS uses the RiverPro settings in the IHFS database, so no extra configuration is required for river locations. Any modifications that are desired need to be made in the Hydro Database Manager (HydroBase).
Flash Flood
- The Flash Flood Recommender is dependent on having the FFMP up and running before it will function. The Flash Flood Recommender compares a source of Flash Flood Guidance (most commonly grids from the RFC) to a source of precipitation estimates (most commonly from the local WSR-88D) and identifies those FFMP small basins where the basin average precipitation exceeds the basin average adjusted guidance.
- “Adjusted guidance” means the raw guidance accounting for whatever modifications are applied in the Flash Flood Recommender GUI.
- Groups of spatially contiguous small basins so identified are used to create recommendations for Convective Flash Flood Warnings.
- Note: The Flash Flood Recommender can be challenging to test when the weather does not support recommendations (and therefore challenging to customize).
- If there are any echoes at all, the most straightforward means of forcing a recommendation to be made is to select the ratio option in the FFMP fields: selector, and then enter an absurdly low number in the Value field, such as 2.00% of guidance.
- NOTE: Initially, sites will most likely NOT have to adjust the baseline configuration.
Dam Break Flood Recommender
- The Dam Break Flood Recommender retrieves an impact area boundary from postgres for a chosen dam and creates a Flash Flood hazard event. If the user chooses “Watch” an FF.A event is created.
- If the user chooses “Warning” an FF.W.NonConvective event is created. See section
1.0.2 for information about how to configure Hazard Service to properly utilize this recommender.
BurnScar Flood Recommender
- The BurnScar Flood Recommender is similar to the DamBreak Flood Recommender.
- It retrieves the impact area boundary from postgres for a chosen burn scar and creates a Flash Flood hazard event.
- If the user chooses “Watch” an FF.A event is created. If the user chooses “Warning” an FF.W.BurnScar event is created. See section
1.0.2 for information about how to configure Hazard Service to properly utilize this recommender.
Megawidgets - Customizing User Dialogs
- Megawidgets are a set of graphical user interface (GUI) components found in use throughout Hazard Services.
- They provide an easy way for those who are modifying or building recommenders requiring user input to create dialog boxes in order to allow said recommenders to gather information from the user.
- Megawidgets are also used in other areas of Hazard Services that are configurable via localization: they populate the Details (metadata) section of the Hazard Information Dialog, and they may be used to create GUI components in the Product Staging Dialog for product generation as well.
- Most sites will override Megawidgets to add or remove them in the HID. Sites will be able to customize the “look and feel” as well as removing unneeded widgets.
- For in depth information, please see Megawidget 101 Guide (GSD)
-
For basic Megawidget Information, refer to the Hazard Services Focal Point User’s Guide
- Megawidget Example #1: (Customize a setting)
- Megawidget Example #2: (Remove an item)
VIII. Hazard Services Overrides Project
Overview: Several folks worked with the VLAB team to enable a process that allows sites to upload their HS Site Level Overrides to VLAB. The goal is for each office to have its own repository branch that is available to all offices. The entire process can take place in AWIPS on any workstation that has access to VLAB. This will allow HS focal points to share/collaborate code snips.
The process leverages GIT and may be a little convoluted for new users. Once authenticated and an initial push of content has occurred, updating future updates is rather simple. In the notes, I had a suggestion to add a basic text document that identifies unique overrides for your site. It may be worth adding a separate, searchable WIKI for that as well.
The instructions can be found here and should be done by a SITE Focal PT in AWIPS.
IX. Example - Creating a ESF Prob Product for monthly Probabilistic Hazard Outlook Steps
- BOU needed to create a second ESF product to issue a monthly probabilistic hydrologic outlook. The default HY.O ESF product included a headline that would not work correctly for NIDS for non flood products. .
- For specific details: See the
HS Focal Point Guide
- The steps to create a new ESF product (from the default ESF) are as follows: Note that users are encouraged to use the Localization Perspective. Also, in the example below, the key HY.Y was used. At the time, this was an unused key. If such a key is already in use, then use another unused key (ie. HY.Z)
- HazardTypes.py Override (Incremental) (Hazard Services->Hazard Types)
- Copy the entire HY.O dictionary section from base into SITE. If a SITE override does not exists, then create one.
- Be sure to include Variable used at the Top
- For example: Include HOURS, MINUTES and inclusionThreshold lines from Base at the top
- HazardMetaData Override (Incremental) -> (Hazard Services->Hazard Meta Data)
- Copy the dictionary line for just HY.O hazard type and change HY.O to HY.Y
- In addition, change MetaData_HY_O to MetaData_HY_Y. This will be addressed later.
- Refer to bou_HazardMetaData_Site.txt as an example.
- MetaData_HY_Y -> Hazard Services -> Hazard Meta Data
- Create a new MetaData file for HY_Y. This file creates the checklist button for the HID.
- RIght click on Hazard Meta Data and click New. Enter MetaData_HY_Y
- Copy the base contents from MetaData_HY_O to your site override of MetaData_HY_Y
- Refer to bou_MetaData_HY_Y_Site.txt for an example
- HazardCategories Override (Incremental) -> (Hazard Services -> Hazard Categories->HazardCategories.py)
- Copy the dictionary line for HY.O from base to SITE and rename to HY.Y to add to the HazardCategories dictionary.
- Refer to bou_HazardCategories_Site.txt as an example
- ProductGenerator Addition (Full Override) for ESF Prob (New File) (HazardServices->Product Generators)
- In this example, you will create a new file (ESF_Prob_ProductGenerator.py)
- To do this, right click on Product Generator Table and select New to create a new file.
- For BOU, I entered the following name: ESF_Prob_ProductGenerator. Once created, then copy to SITE.
- Copy the entire contents of base ESF_ProductGenerator file to ESF_Prob_ProductGenerator.
- In ESF_Prob_ProductGenerator, change self.ESF_ProductName to “Probabilistic Hydrologic Outlook” (Under Initialize function...near line 47)
- This is essentially changing the Productname from Hydrologic Outlook to Probabilistic Hydrologic Outlook.
- Refer to bou_ESF_Prob_ProductGenerator_Site.txt for an example.
- Note: The base file for the EFS product generator .py file you will see a method "def getPurgeHours". If you take that method and make an override and change it from 8 to 12 the default product expiration time will change from 8 to 12 for your HY.O products.
- Product Generator Table (Incremental) -> (Hazard Services -> Product Generator Table)
- Copy the ESF_ProductGenerator section from BASE to SITE. If a SITE file does not exists, then create one.
- Change ESF_ProductGenerator to ESF_Prob_ProductGenerator
- Also, change the preview/issue lines to include Legacy_ESF_Prob_Formatter
- Refer to bou_ProductGeneratorTable_Site.txt for an example
- Hydrology_All (Incremental) -> Hazard Services->Settings
- In one of these configuration files, you will want to add your new ESF key (HY.Y) so that it is available for use when loaded.
- In Hydrology_All, copy base dictionary for Hydrology_All. In the visible types, add HY.Y to make sure ESF_Prob is visibility when this category is loaded.
- Refer to bou_Hydrology_All_Site for an example
- Legacy_ESF_Prob_Formatter -> Hazard Services -> Product Formats
- Create a new Formatter (Right Click on Product Formats, then click New) Name the formatter Legacy_ESF_Prob_Formatter
- Copy the contents of base Legacy_ESF_Formatter to this site level file Legacy_ESF_Prob_Formatter
- Refer to bou_Legacy_ESF_Prob_Formatter_Site.txt for an example. This formatter will do two functions (run a script and import WRKESF from the text database.
X. DAF RESOURCES