Omaha #4027 Convert all GFE text products to mixed case

Change-Id: I94275b65e8733d5bed1242f78503f1613b2e0aff

Former-commit-id: 07088e71d78d6302da23683894d96d72e4f69a96
This commit is contained in:
Ron Anderson 2015-03-25 11:44:02 -05:00
parent f961e64ca4
commit ea0b02bedd
85 changed files with 1999 additions and 1974 deletions

View file

@ -739,8 +739,8 @@ class TextProduct(GenericHazards.TextProduct):
# startTime = startTime - 24*3600
todayFlag = currentTime.day == startTime.day
if todayFlag:
if partOfDay.upper().find("MIDNIGHT")>0: todayWord = "tonight"
else: todayWord = "THIS"
if partOfDay.lower().find("midnight")>0: todayWord = "tonight"
else: todayWord = "this"
weekday = todayWord
else:
weekday = labels["Weekday"][startTime.weekday()]
@ -757,7 +757,7 @@ class TextProduct(GenericHazards.TextProduct):
if hour < 3:
prevDay = True
partOfDay = "early <weekday> morning"
# partOfDay = "AFTER MIDNIGHT"
# partOfDay = "after midnight"
elif hour < 6:
partOfDay = "early <weekday> morning"
elif hour < 9:
@ -775,7 +775,7 @@ class TextProduct(GenericHazards.TextProduct):
else:
if hour < 6:
prevDay = True
# partOfDay = "AFTER MIDNIGHT"
# partOfDay = "after midnight"
partOfDay = "early <weekday> morning"
elif hour < 12: partOfDay = "morning"
elif hour < 18: partOfDay = "afternoon"

View file

@ -1,19 +1,19 @@
##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
##
@ -36,6 +36,7 @@
# __warnETNduplication() and
# __highestETNActiveTable.
# 11/11/14 4953 randerso Changed type of endTime from float to int
# 01/22/2015 4027 randerso Fix comparison of in __getCities
# 02/05/15 4099 randerso Fixed exception handling in __getActiveTable
#
@ -235,7 +236,7 @@ class HazardsTable(VTECTableUtil.VTECTableUtil):
returnStr = returnStr + s + '\n'
return returnStr
# Returns the cities associted with the hazards that could afflict
# Returns the cities associated with the hazards that could afflict
# the cities in cityList
def getCities(self, cityList, zoneHazards):
if self.__cityHazards is None:
@ -286,7 +287,7 @@ class HazardsTable(VTECTableUtil.VTECTableUtil):
cities = []
for city in cityList:
for p in hazardList:
if p['id'].upper() == city:
if p['id'].upper() == city.upper():
cities.append(city)
break
return cities

View file

@ -73,8 +73,8 @@ class CallToActions:
# returns list of generic call to action statements
def genericCTAs(self):
return [
"""MONITOR NOAA WEATHER RADIO FOR THE LATEST INFORMATION...FORECASTS...AND WARNINGS.""",
"""LISTEN TO NOAA WEATHER RADIO OR YOUR LOCAL MEDIA FOR THE LATEST UPDATES ON THIS SITUATION.""",
"""Monitor NOAA Weather Radio for the latest information...forecasts...and warnings.""",
"""Listen to NOAA Weather Radio or your local media for the latest updates on this situation.""",
]
@ -238,18 +238,18 @@ class CallToActions:
#------------------------------------------------------------------------
def winterWScta(self):
return [
("***HEAVY SNOW", """A WINTER STORM WARNING FOR HEAVY SNOW MEANS SEVERE WINTER WEATHER CONDITIONS ARE EXPECTED OR OCCURRING. SIGNIFICANT AMOUNTS OF SNOW ARE FORECAST THAT WILL MAKE TRAVEL DANGEROUS. ONLY TRAVEL IN AN EMERGENCY. IF YOU MUST TRAVEL...KEEP AN EXTRA FLASHLIGHT...FOOD...AND WATER IN YOUR VEHICLE IN CASE OF AN EMERGENCY."""),
("***SLEET", """A WINTER STORM WARNING FOR SLEET MEANS THAT A WINTER STORM SYSTEM IS IMPACTING THE AREA WITH SIGNIFICANT AMOUNTS OF SLEET. TRAVEL IS LIKELY TO BE SEVERELY IMPACTED."""),
("***MIXED PRECIP", """A WINTER STORM WARNING MEANS SIGNIFICANT AMOUNTS OF SNOW...SLEET...AND ICE ARE EXPECTED OR OCCURRING. STRONG WINDS ARE ALSO POSSIBLE. THIS WILL MAKE TRAVEL VERY HAZARDOUS OR IMPOSSIBLE."""),
("***HEAVY SNOW", """A Winter Storm Warning for heavy snow means severe winter weather conditions are expected or occurring. Significant amounts of snow are forecast that will make travel dangerous. Only travel in an emergency. If you must travel...keep an extra flashlight...food...and water in your vehicle in case of an emergency."""),
("***SLEET", """A Winter Storm Warning for sleet means that a winter storm system is impacting the area with significant amounts of sleet. Travel is likely to be severely impacted."""),
("***MIXED PRECIP", """A Winter Storm Warning means significant amounts of snow...sleet...and ice are expected or occurring. Strong winds are also possible. This will make travel very hazardous or impossible."""),
]
def winterWWcta(self):
return [
("***BLOWING SNOW", """A WINTER WEATHER ADVISORY FOR BLOWING SNOW MEANS THAT VISIBILITIES WILL BE LIMITED DUE TO STRONG WINDS BLOWING SNOW AROUND. USE CAUTION WHEN TRAVELING...ESPECIALLY IN OPEN AREAS."""),
("***SLEET", """A WINTER WEATHER ADVISORY FOR SLEET MEANS PERIODS OF SLEET ARE IMMINENT OR OCCURRING. SLEET MAY CAUSE DRIVING TO BECOME EXTREMELY DANGEROUS...SO BE PREPARED TO USE CAUTION WHEN TRAVELING."""),
("***SNOW AND BLOWING SNOW", """A WINTER WEATHER ADVISORY FOR |*LAKE EFFECT*| SNOW AND BLOWING SNOW MEANS THAT VISIBILITIES WILL BE LIMITED DUE TO A COMBINATION OF FALLING AND BLOWING SNOW. USE CAUTION WHEN TRAVELING...ESPECIALLY IN OPEN AREAS."""),
("***SNOW", """A WINTER WEATHER ADVISORY FOR SNOW MEANS THAT PERIODS OF SNOW WILL CAUSE PRIMARILY TRAVEL DIFFICULTIES. BE PREPARED FOR SNOW COVERED ROADS AND LIMITED VISIBILITIES...AND USE CAUTION WHILE DRIVING."""),
("***MIXED PRECIP", """A WINTER WEATHER ADVISORY MEANS THAT PERIODS OF SNOW...SLEET...OR FREEZING RAIN WILL CAUSE TRAVEL DIFFICULTIES. BE PREPARED FOR SLIPPERY ROADS AND LIMITED VISIBILITIES...AND USE CAUTION WHILE DRIVING."""),
("***BLOWING SNOW", """A Winter Weather Advisory for blowing snow means that visibilities will be limited due to strong winds blowing snow around. Use caution when traveling...especially in open areas."""),
("***SLEET", """A Winter Weather Advisory for sleet means periods of sleet are imminent or occurring. Sleet may cause driving to become extremely dangerous...so be prepared to use caution when traveling."""),
("***SNOW AND BLOWING SNOW", """A Winter Weather Advisory for |*lake effect*| snow and blowing snow means that visibilities will be limited due to a combination of falling and blowing snow. Use caution when traveling...especially in open areas."""),
("***SNOW", """A Winter Weather Advisory for snow means that periods of snow will cause primarily travel difficulties. Be prepared for snow covered roads and limited visibilities...and use caution while driving."""),
("***MIXED PRECIP", """A Winter Weather Advisory means that periods of snow...sleet...or freezing rain will cause travel difficulties. Be prepared for slippery roads and limited visibilities...and use caution while driving."""),
]
#------------------------------------------------------------------------
# CALL TO ACTIONS - individual functions for each phen/sig
@ -259,26 +259,26 @@ class CallToActions:
def ctaAFW(self):
return [
"""AN ASHFALL WARNING MEANS THAT SIGNIFICANT ACCUMULATION OF VOLCANIC ASH IS EXPECTED OR OCCURRING DUE TO A VOLCANIC ERUPTION OR RESUSPENSION OF PREVIOUSLY DEPOSITED ASH.
"""An Ashfall Warning means that significant accumulation of volcanic ash is expected or occurring due to a volcanic eruption or resuspension of previously deposited ash.
SEAL WINDOWS AND DOORS. PROTECT ELECTRONICS AND COVER AIR INTAKES AND OPEN WATER SOURCES. AVOID DRIVING. REMAIN INDOORS UNLESS ABSOLUTELY NECESSARY. USE EXTREME CAUTION CLEARING ROOFTOPS OF ASH.
Seal windows and doors. Protect electronics and cover air intakes and open water sources. Avoid driving. Remain indoors unless absolutely necessary. Use extreme caution clearing rooftops of ash.
LISTEN TO NOAA WEATHER RADIO OR LOCAL MEDIA FOR FURTHER INFORMATION.""",
Listen to NOAA Weather Radio or local media for further information.""",
]
def ctaAFY(self):
return [
"""AN ASHFALL ADVISORY MEANS THAT LARGE AMOUNTS OF ASH WILL BE DEPOSITED IN THE ADVISORY AREA. PERSONS WITH RESPIRATORY ILLNESSES SHOULD REMAIN INDOORS TO AVOID INHALING THE ASH PARTICLES...AND ALL PERSONS OUTSIDE SHOULD COVER THEIR MOUTH AND NOSE WITH A MASK OR CLOTH.""",
"""An Ashfall Advisory means that large amounts of ash will be deposited in the advisory area. Persons with respiratory illnesses should remain indoors to avoid inhaling the ash particles...and all persons outside should cover their mouth and nose with a mask or cloth.""",
]
def ctaASO(self):
return [
"""AN AIR STAGNATION OUTLOOK IS ISSUED WHEN AN EXTENDED PERIOD OF WEATHER CONDITIONS ARE ANTICIPATED THAT COULD CONTRIBUTE TO POOR VENTILATION...AND THUS POTENTIALLY POOR AIR QUALITY. BE PREPARED FOR THESE CONDITIONS TO DEVELOP IN THE NEXT 2 TO 3 DAYS...AND FOR THE ISSUANCE OF AIR STAGNATION ADVISORIES AS THE SITUATION BECOMES IMMINENT.""",
"""An Air Stagnation Outlook is issued when an extended period of weather conditions are anticipated that could contribute to poor ventilation...and thus potentially poor air quality. Be prepared for these conditions to develop in the next 2 to 3 days...and for the issuance of air stagnation advisories as the situation becomes imminent.""",
]
def ctaASY(self):
return [
"""AN AIR STAGNATION ADVISORY INDICATES THAT DUE TO LIMITED MOVEMENT OF AN AIR MASS ACROSS THE ADVISORY AREA...POLLUTION WILL INCREASE TO DANGEROUS LEVELS. PERSONS WITH RESPIRATORY ILLNESS SHOULD FOLLOW THEIR PHYSICIANS ADVICE FOR DEALING WITH HIGH LEVELS OF AIR POLLUTION.""",
"""An Air Stagnation Advisory indicates that due to limited movement of an air mass across the advisory area...pollution will increase to dangerous levels. Persons with respiratory illness should follow their physicians advice for dealing with high levels of air pollution.""",
]
def ctaBHS(self):
@ -288,379 +288,379 @@ LISTEN TO NOAA WEATHER RADIO OR LOCAL MEDIA FOR FURTHER INFORMATION.""",
def ctaBWY(self):
return [
"""A BRISK WIND ADVISORY MEANS THAT WINDS WILL REACH SMALL CRAFT ADVISORY CRITERIA IN AREAS THAT ARE PRIMARILY ICE COVERED. MOVING ICE FLOES COULD DAMAGE SMALL CRAFT.""",
"""A Brisk Wind Advisory means that winds will reach Small Craft Advisory criteria in areas that are primarily ice covered. Moving ice floes could damage small craft.""",
]
def ctaBZA(self):
return [
"""A BLIZZARD WATCH MEANS THERE IS A POTENTIAL FOR FALLING AND/OR BLOWING SNOW WITH STRONG WINDS AND EXTREMELY POOR VISIBILITIES. THIS CAN LEAD TO WHITEOUT CONDITIONS AND MAKE TRAVEL VERY DANGEROUS.""",
"""A Blizzard Watch means there is a potential for falling and/or blowing snow with strong winds and extremely poor visibilities. This can lead to whiteout conditions and make travel very dangerous.""",
]
def ctaBZW(self):
return [
"""A BLIZZARD WARNING MEANS SEVERE WINTER WEATHER CONDITIONS ARE EXPECTED OR OCCURRING. FALLING AND BLOWING SNOW WITH STRONG WINDS AND POOR VISIBILITIES ARE LIKELY. THIS WILL LEAD TO WHITEOUT CONDITIONS...MAKING TRAVEL EXTREMELY DANGEROUS. DO NOT TRAVEL. IF YOU MUST TRAVEL...HAVE A WINTER SURVIVAL KIT WITH YOU. IF YOU GET STRANDED...STAY WITH YOUR VEHICLE.""",
"""A Blizzard Warning means severe winter weather conditions are expected or occurring. Falling and blowing snow with strong winds and poor visibilities are likely. This will lead to whiteout conditions...making travel extremely dangerous. Do not travel. If you must travel...have a winter survival kit with you. If you get stranded...stay with your vehicle.""",
]
def ctaCFA(self):
return [
"""A COASTAL FLOOD WATCH MEANS THAT CONDITIONS FAVORABLE FOR FLOODING ARE EXPECTED TO DEVELOP. COASTAL RESIDENTS SHOULD BE ALERT FOR LATER STATEMENTS OR WARNINGS...AND TAKE ACTION TO PROTECT PROPERTY.""",
"""A Coastal Flood Watch means that conditions favorable for flooding are expected to develop. Coastal residents should be alert for later statements or warnings...and take action to protect property.""",
]
def ctaCFW(self):
return [
"""A COASTAL FLOOD WARNING MEANS THAT FLOODING IS OCCURRING OR IMMINENT. COASTAL RESIDENTS IN THE WARNED AREA SHOULD BE ALERT FOR RISING WATER...AND TAKE APPROPRIATE ACTION TO PROTECT LIFE AND PROPERTY.""",
"""A Coastal Flood Warning means that flooding is occurring or imminent. Coastal residents in the warned area should be alert for rising water...and take appropriate action to protect life and property.""",
]
def ctaCFY(self):
return [
"""A COASTAL FLOOD ADVISORY INDICATES THAT ONSHORE WINDS AND TIDES WILL COMBINE TO GENERATE FLOODING OF LOW AREAS ALONG THE SHORE.""",
"""A Coastal Flood Advisory indicates that onshore winds and tides will combine to generate flooding of low areas along the shore.""",
]
def ctaDSW(self):
return [
"""A DUST STORM WARNING MEANS SEVERELY LIMITED VISIBILITIES ARE EXPECTED WITH BLOWING DUST. TRAVEL COULD BECOME EXTREMELY DANGEROUS. PERSONS WITH RESPIRATORY PROBLEMS SHOULD MAKE PREPARATIONS TO STAY INDOORS UNTIL THE STORM PASSES.""",
"""A Dust Storm Warning means severely limited visibilities are expected with blowing dust. Travel could become extremely dangerous. Persons with respiratory problems should make preparations to stay indoors until the storm passes.""",
]
def ctaDUY(self):
return [
"""A BLOWING DUST ADVISORY MEANS THAT BLOWING DUST WILL RESTRICT VISIBILITIES. TRAVELERS ARE URGED TO USE CAUTION.""",
"""A Blowing Dust Advisory means that blowing dust will restrict visibilities. Travelers are urged to use caution.""",
]
def ctaECA(self):
return [
"""AN EXTREME COLD WATCH MEANS THAT PROLONGED PERIODS OF VERY COLD TEMPERATURES ARE EXPECTED. ENSURE THAT OUTDOOR ANIMALS HAVE WARM SHELTER...AND THAT CHILDREN WEAR A HAT AND GLOVES.""",
"""An Extreme Cold Watch means that prolonged periods of very cold temperatures are expected. Ensure that outdoor animals have warm shelter...and that children wear a hat and gloves.""",
]
def ctaECW(self):
return [
"""AN EXTREME COLD WARNING MEAN THAT DANGEROUSLY LOW TEMPERATURES ARE EXPECTED FOR A PROLONGED PERIOD OF TIME. FROSTBITE AND HYPOTHERMIA ARE LIKELY IF EXPOSED TO THESE TEMPERATURES...SO MAKE SURE A HAT...FACEMASK...AND HEAVY GLOVES OR MITTENS ARE AVAILABLE.""",
"""An Extreme Cold Warning means that dangerously low temperatures are expected for a prolonged period of time. Frostbite and hypothermia are likely if exposed to these temperatures...so make sure a hat...facemask...and heavy gloves or mittens are available.""",
]
def ctaEHA(self):
return [
"""AN EXCESSIVE HEAT WATCH MEANS THAT A PROLONGED PERIOD OF HOT TEMPERATURES IS EXPECTED. THE COMBINATION OF HOT TEMPERATURES AND HIGH HUMIDITY WILL COMBINE TO CREATE A DANGEROUS SITUATION IN WHICH HEAT ILLNESSES ARE POSSIBLE. DRINK PLENTY OF FLUIDS...STAY IN AN AIR-CONDITIONED ROOM...STAY OUT OF THE SUN...AND CHECK UP ON RELATIVES AND NEIGHBORS.""",
"""YOUNG CHILDREN AND PETS SHOULD NEVER BE LEFT UNATTENDED IN VEHICLES UNDER ANY CIRCUMSTANCES. THIS IS ESPECIALLY TRUE DURING WARM OR HOT WEATHER WHEN CAR INTERIORS CAN REACH LETHAL TEMPERATURES IN A MATTER OF MINUTES.""",
"""An Excessive Heat Watch means that a prolonged period of hot temperatures is expected. The combination of hot temperatures and high humidity will combine to create a dangerous situation in which heat illnesses are possible. Drink plenty of fluids...stay in an air-conditioned room...stay out of the sun...and check up on relatives and neighbors.""",
"""Young children and pets should never be left unattended in vehicles under any circumstances. This is especially true during warm or hot weather when car interiors can reach lethal temperatures in a matter of minutes.""",
]
def ctaEHW(self):
return [
"""TAKE EXTRA PRECAUTIONS...IF YOU WORK OR SPEND TIME OUTSIDE. WHEN POSSIBLE...RESCHEDULE STRENUOUS ACTIVITIES TO EARLY MORNING OR EVENING. KNOW THE SIGNS AND SYMPTOMS OF HEAT EXHAUSTION AND HEAT STROKE. WEAR LIGHT WEIGHT AND LOOSE FITTING CLOTHING WHEN POSSIBLE AND DRINK PLENTY OF WATER.\n\n
TO REDUCE RISK DURING OUTDOOR WORK...THE OCCUPATIONAL SAFETY AND HEALTH ADMINISTRATION RECOMMENDS SCHEDULING FREQUENT REST BREAKS IN SHADED OR AIR CONDITIONED ENVIRONMENTS. ANYONE OVERCOME BY HEAT SHOULD BE MOVED TO A COOL AND SHADED LOCATION. HEAT STROKE IS AN EMERGENCY...CALL 9 1 1.\n\n
AN EXCESSIVE HEAT WARNING MEANS THAT A PROLONGED PERIOD OF DANGEROUSLY HOT TEMPERATURES WILL OCCUR. THE COMBINATION OF HOT TEMPERATURES AND HIGH HUMIDITY WILL COMBINE TO CREATE A DANGEROUS SITUATION IN WHICH HEAT ILLNESSES ARE LIKELY. DRINK PLENTY OF FLUIDS...STAY IN AN AIR-CONDITIONED ROOM...STAY OUT OF THE SUN...AND CHECK UP ON RELATIVES AND NEIGHBORS.\n\n
YOUNG CHILDREN AND PETS SHOULD NEVER BE LEFT UNATTENDED IN VEHICLES UNDER ANY CIRCUMSTANCES. THIS IS ESPECIALLY TRUE DURING WARM OR HOT WEATHER WHEN CAR INTERIORS CAN REACH LETHAL TEMPERATURES IN A MATTER OF MINUTES.""",
"""Take extra precautions...if you work or spend time outside. When possible...reschedule strenuous activities to early morning or evening. Know the signs and symptoms of heat exhaustion and heat stroke. Wear light weight and loose fitting clothing when possible and drink plenty of water.\n\n
To reduce risk during outdoor work...the occupational safety and health administration recommends scheduling frequent rest breaks in shaded or air conditioned environments. Anyone overcome by heat should be moved to a cool and shaded location. Heat stroke is an emergency...call 9 1 1.\n\n
An Excessive Heat Warning means that a prolonged period of dangerously hot temperatures will occur. The combination of hot temperatures and high humidity will combine to create a dangerous situation in which heat illnesses are likely. Drink plenty of fluids...stay in an air-conditioned room...stay out of the sun...and check up on relatives and neighbors.\n\n
Young children and pets should never be left unattended in vehicles under any circumstances. This is especially true during warm or hot weather when car interiors can reach lethal temperatures in a matter of minutes.""",
]
def ctaFAA(self):
return [
"""A FLOOD WATCH MEANS THERE IS A POTENTIAL FOR FLOODING BASED ON CURRENT FORECASTS.\n\nYOU SHOULD MONITOR LATER FORECASTS AND BE ALERT FOR POSSIBLE FLOOD WARNINGS. THOSE LIVING IN AREAS PRONE TO FLOODING SHOULD BE PREPARED TO TAKE ACTION SHOULD FLOODING DEVELOP.""",
"""A Flood Watch means there is a potential for flooding based on current forecasts.\n\nYou should monitor later forecasts and be alert for possible Flood Warnings. Those living in areas prone to flooding should be prepared to take action should flooding develop.""",
]
def ctaFFA(self):
return [
"""A FLASH FLOOD WATCH MEANS THAT CONDITIONS MAY DEVELOP THAT LEAD TO FLASH FLOODING. FLASH FLOODING IS A VERY DANGEROUS SITUATION.\n\nYOU SHOULD MONITOR LATER FORECASTS AND BE PREPARED TO TAKE ACTION SHOULD FLASH FLOOD WARNINGS BE ISSUED.""",
"""A Flash Flood Watch means that conditions may develop that lead to flash flooding. Flash flooding is a very dangerous situation.\n\nYou should monitor later forecasts and be prepared to take action should Flash Flood Warnings be issued.""",
]
def ctaFGY(self):
return [
"""A DENSE FOG ADVISORY MEANS VISIBILITIES WILL FREQUENTLY BE REDUCED TO LESS THAN ONE QUARTER MILE. IF DRIVING...SLOW DOWN...USE YOUR HEADLIGHTS...AND LEAVE PLENTY OF DISTANCE AHEAD OF YOU.""",
"""A Dense Fog Advisory means visibilities will frequently be reduced to less than one quarter mile. If driving...slow down...use your headlights...and leave plenty of distance ahead of you.""",
]
def ctaFRY(self):
return [
"""A FROST ADVISORY MEANS THAT WIDESPREAD FROST IS EXPECTED. SENSITIVE OUTDOOR PLANTS MAY BE KILLED IF LEFT UNCOVERED.""",
"""A Frost Advisory means that widespread frost is expected. Sensitive outdoor plants may be killed if left uncovered.""",
]
def ctaFWA(self):
return [
"""A FIRE WEATHER WATCH MEANS THAT CRITICAL FIRE WEATHER CONDITIONS ARE FORECAST TO OCCUR. LISTEN FOR LATER FORECASTS AND POSSIBLE RED FLAG WARNINGS.""",
"""A Fire Weather Watch means that critical fire weather conditions are forecast to occur. Listen for later forecasts and possible Red Flag Warnings.""",
]
def ctaFWW(self):
return [
"""A RED FLAG WARNING MEANS THAT CRITICAL FIRE WEATHER CONDITIONS ARE EITHER OCCURRING NOW...OR WILL SHORTLY. A COMBINATION OF STRONG WINDS...LOW RELATIVE HUMIDITY...AND WARM TEMPERATURES WILL CREATE EXPLOSIVE FIRE GROWTH POTENTIAL.""",
"""A Red Flag Warning means that critical fire weather conditions are either occurring now...or will shortly. A combination of strong winds...low relative humidity...and warm temperatures will create explosive fire growth potential.""",
]
def ctaFZA(self):
return [
"""A FREEZE WATCH MEANS SUB-FREEZING TEMPERATURES ARE POSSIBLE. THESE CONDITIONS COULD KILL CROPS AND OTHER SENSITIVE VEGETATION.""",
"""A Freeze Watch means sub-freezing temperatures are possible. These conditions could kill crops and other sensitive vegetation.""",
]
def ctaFZW(self):
return [
"""A FREEZE WARNING MEANS SUB-FREEZING TEMPERATURES ARE IMMINENT OR HIGHLY LIKELY. THESE CONDITIONS WILL KILL CROPS AND OTHER SENSITIVE VEGETATION.""",
"""A Freeze Warning means sub-freezing temperatures are imminent or highly likely. These conditions will kill crops and other sensitive vegetation.""",
]
def ctaGLA(self):
return [
"""A GALE WATCH IS ISSUED WHEN THE RISK OF GALE FORCE WINDS OF 34 TO 47 KNOTS HAS SIGNIFICANTLY INCREASED...BUT THE SPECIFIC TIMING AND/OR LOCATION IS STILL UNCERTAIN. IT IS INTENDED TO PROVIDE ADDITIONAL LEAD TIME FOR MARINERS WHO MAY WISH TO CONSIDER ALTERING THEIR PLANS.""",
"""A Gale Watch is issued when the risk of gale force winds of 34 to 47 knots has significantly increased...but the specific timing and/or location is still uncertain. It is intended to provide additional lead time for mariners who may wish to consider altering their plans.""",
]
def ctaGLW(self):
return [
"""A GALE WARNING MEANS WINDS OF 34 TO 47 KNOTS ARE IMMINENT OR OCCURING. OPERATING A VESSEL IN GALE CONDITIONS REQUIRES EXPERIENCE AND PROPERLY EQUIPPED VESSELS. IT IS HIGHLY RECOMMENDED THAT MARINERS WITHOUT THE PROPER EXPERIENCE SEEK SAFE HARBOR PRIOR TO THE ONSET OF GALE CONDITIONS.""",
"""A Gale Warning means winds of 34 to 47 knots are imminent or occuring. Operating a vessel in gale conditions requires experience and properly equipped vessels. It is highly recommended that mariners without the proper experience seek safe harbor prior to the onset of gale conditions.""",
]
def ctaHFA(self):
return [
"""A HURRICANE FORCE WIND WATCH IS ISSUED WHEN THE RISK OF HURRICANE FORCE WINDS OF 64 KNOTS OR GREATER HAS SIGNIFICANTLY INCREASED...BUT THE SPECIFIC TIMING AND/OR LOCATION IS STILL UNCERTAIN. IT IS INTENDED TO PROVIDE ADDITIONAL LEAD TIME FOR MARINERS WHO MAY WISH TO CONSIDER ALTERING THEIR PLANS.""",
"""A Hurricane Force Wind Watch is issued when the risk of hurricane force winds of 64 knots or greater has significantly increased...but the specific timing and/or location is still uncertain. It is intended to provide additional lead time for mariners who may wish to consider altering their plans.""",
]
def ctaHFW(self):
return [
"""A HURRICANE FORCE WIND WARNING MEANS WINDS OF 64 KNOTS OR GREATER ARE IMMINENT OR OCCURING. ALL VESSELS SHOULD REMAIN IN PORT...OR TAKE SHELTER AS SOON AS POSSIBLE...UNTIL WINDS AND WAVES SUBSIDE.""",
"""A Hurricane Force Wind Warning means winds of 64 knots or greater are imminent or occuring. All vessels should remain in port...or take shelter as soon as possible...until winds and waves subside.""",
]
def ctaHTY(self):
return [
"""TAKE EXTRA PRECAUTIONS...IF YOU WORK OR SPEND TIME OUTSIDE. WHEN POSSIBLE...RESCHEDULE STRENUOUS ACTIVITIES TO EARLY MORNING OR EVENING. KNOW THE SIGNS AND SYMPTOMS OF HEAT EXHAUSTION AND HEAT STROKE. WEAR LIGHT WEIGHT AND LOOSE FITTING CLOTHING WHEN POSSIBLE AND DRINK PLENTY OF WATER.\n\n
TO REDUCE RISK DURING OUTDOOR WORK...THE OCCUPATIONAL SAFETY AND HEALTH ADMINISTRATION RECOMMENDS SCHEDULING FREQUENT REST BREAKS IN SHADED OR AIR CONDITIONED ENVIRONMENTS. ANYONE OVERCOME BY HEAT SHOULD BE MOVED TO A COOL AND SHADED LOCATION. HEAT STROKE IS AN EMERGENCY...CALL 9 1 1.\n\n
A HEAT ADVISORY MEANS THAT A PERIOD OF HOT TEMPERATURES IS EXPECTED. THE COMBINATION OF HOT TEMPERATURES AND HIGH HUMIDITY WILL COMBINE TO CREATE A SITUATION IN WHICH HEAT ILLNESSES ARE POSSIBLE. DRINK PLENTY OF FLUIDS...STAY IN AN AIR-CONDITIONED ROOM...STAY OUT OF THE SUN...AND CHECK UP ON RELATIVES AND NEIGHBORS.""",
"""Take extra precautions...if you work or spend time outside. When possible...reschedule strenuous activities to early morning or evening. Know the signs and symptoms of heat exhaustion and heat stroke. Wear light weight and loose fitting clothing when possible and drink plenty of water.\n\n
To reduce risk during outdoor work...the occupational safety and health administration recommends scheduling frequent rest breaks in shaded or air conditioned environments. Anyone overcome by heat should be moved to a cool and shaded location. Heat stroke is an emergency...call 9 1 1.\n\n
A Heat Advisory means that a period of hot temperatures is expected. The combination of hot temperatures and high humidity will combine to create a situation in which heat illnesses are possible. Drink plenty of fluids...stay in an air-conditioned room...stay out of the sun...and check up on relatives and neighbors.""",
]
def ctaHUA(self):
return [
"""A HURRICANE WATCH IS ISSUED WHEN SUSTAINED WINDS OF |* 64 KTS OR 74 MPH *| OR HIGHER ASSOCIATED WITH A HURRICANE ARE POSSIBLE WITHIN 48 HOURS.""",
"""A Hurricane Watch is issued when sustained winds of |* 64 kts or 74 mph *| or higher associated with a hurricane are possible within 48 hours.""",
]
def ctaHUW(self):
return [
"""A HURRICANE WARNING MEANS SUSTAINED WINDS OF |* 64 KTS OR 74 MPH *| OR HIGHER ASSOCIATED WITH A HURRICANE ARE EXPECTED WITHIN 36 HOURS. A HURRICANE WARNING CAN REMAIN IN EFFECT WHEN DANGEROUSLY HIGH WATER OR A COMBINATION OF DANGEROUSLY HIGH WATER AND EXCEPTIONALLY HIGH WAVES CONTINUE...EVEN THOUGH WINDS MAY BE LESS THAN HURRICANE FORCE.""",
"""A Hurricane Warning means sustained winds of |* 64 kts or 74 mph *| or higher associated with a hurricane are expected within 36 hours. A Hurricane Warning can remain in effect when dangerously high water or a combination of dangerously high water and exceptionally high waves continue...even though winds may be less than hurricane force.""",
]
def ctaHWA(self):
return [
"""A HIGH WIND WATCH MEANS THERE IS THE POTENTIAL FOR A HAZARDOUS HIGH WIND EVENT. SUSTAINED WINDS OF AT LEAST 40 MPH...OR GUSTS OF 58 MPH OR STRONGER MAY OCCUR. CONTINUE TO MONITOR THE LATEST FORECASTS.""",
"""A High Wind Watch means there is the potential for a hazardous high wind event. Sustained winds of at least 40 mph...or gusts of 58 mph or stronger may occur. Continue to monitor the latest forecasts.""",
]
def ctaHWW(self):
return [
"""A HIGH WIND WARNING MEANS A HAZARDOUS HIGH WIND EVENT IS EXPECTED OR OCCURRING. SUSTAINED WIND SPEEDS OF AT LEAST 40 MPH OR GUSTS OF 58 MPH OR MORE CAN LEAD TO PROPERTY DAMAGE.""",
"""A High Wind Warning means a hazardous high wind event is expected or occurring. Sustained wind speeds of at least 40 mph or gusts of 58 mph or more can lead to property damage.""",
]
def ctaHZA(self):
return [
"""A HARD FREEZE WATCH MEANS SUB-FREEZING TEMPERATURES ARE POSSIBLE. THESE CONDITIONS COULD KILL CROPS AND OTHER SENSITIVE VEGETATION.""",
"""A Hard Freeze Watch means sub-freezing temperatures are possible. These conditions could kill crops and other sensitive vegetation.""",
]
def ctaHZW(self):
return [
"""A HARD FREEZE WARNING MEANS SUB-FREEZING TEMPERATURES ARE IMMINENT OR HIGHLY LIKELY. THESE CONDITIONS WILL KILL CROPS AND OTHER SENSITIVE VEGETATION.""",
"""A Hard Freeze Warning means sub-freezing temperatures are imminent or highly likely. These conditions will kill crops and other sensitive vegetation.""",
]
def ctaISW(self):
return [
"""AN ICE STORM WARNING MEANS SEVERE WINTER WEATHER CONDITIONS ARE EXPECTED OR OCCURRING. SIGNIFICANT AMOUNTS OF ICE ACCUMULATIONS WILL MAKE TRAVEL DANGEROUS OR IMPOSSIBLE. TRAVEL IS STRONGLY DISCOURAGED. COMMERCE WILL LIKELY BE SEVERELY IMPACTED. IF YOU MUST TRAVEL...KEEP AN EXTRA FLASHLIGHT...FOOD...AND WATER IN YOUR VEHICLE IN CASE OF AN EMERGENCY. ICE ACCUMULATIONS AND WINDS WILL LIKELY LEAD TO SNAPPED POWER LINES AND FALLING TREE BRANCHES THAT ADD TO THE DANGER.""",
"""An Ice Storm Warning means severe winter weather conditions are expected or occurring. Significant amounts of ice accumulations will make travel dangerous or impossible. Travel is strongly discouraged. Commerce will likely be severely impacted. If you must travel...keep an extra flashlight...food...and water in your vehicle in case of an emergency. Ice accumulations and winds will likely lead to snapped power lines and falling tree branches that add to the danger.""",
]
def ctaLEA(self):
return [
"""A LAKE EFFECT SNOW WATCH MEANS THERE IS A POTENTIAL FOR A LARGE AMOUNT OF SNOW IN ONLY A FEW HOURS. VISIBILITIES AND DEPTH OF SNOW CAN VARY GREATLY...IMPACTING TRAVEL SIGNIFICANTLY. CONTINUE TO MONITOR THE LATEST FORECASTS.""",
"""A Lake Effect Snow Watch means there is a potential for a large amount of snow in only a few hours. Visibilities and depth of snow can vary greatly...impacting travel significantly. Continue to monitor the latest forecasts.""",
]
def ctaLEW(self):
return [
"""A LAKE EFFECT SNOW WARNING MEANS SIGNIFICANT AMOUNTS OF LAKE-EFFECT SNOW ARE FORECAST THAT WILL MAKE TRAVEL VERY HAZARDOUS OR IMPOSSIBLE. LAKE-EFFECT SNOW SHOWERS TYPICALLY ALIGN THEMSELVES IN BANDS AND WILL LIKELY BE INTENSE ENOUGH TO DROP 1 TO SEVERAL INCHES OF SNOW PER HOUR FOR SEVERAL HOURS. VISIBILITIES VARY GREATLY AND CAN DROP TO ZERO WITHIN MINUTES. TRAVEL IS STRONGLY DISCOURAGED. COMMERCE COULD BE SEVERELY IMPACTED. IF YOU MUST TRAVEL...KEEP AN EXTRA FLASHLIGHT...FOOD...AND WATER IN YOUR VEHICLE IN CASE OF AN EMERGENCY.""",
"""A Lake Effect Snow Warning means significant amounts of lake-effect snow are forecast that will make travel very hazardous or impossible. Lake-effect snow showers typically align themselves in bands and will likely be intense enough to drop 1 to several inches of snow per hour for several hours. Visibilities vary greatly and can drop to zero within minutes. Travel is strongly discouraged. Commerce could be severely impacted. If you must travel...keep an extra flashlight...food...and water in your vehicle in case of an emergency.""",
]
def ctaLEY(self):
return [
"""A LAKE EFFECT SNOW ADVISORY MEANS LAKE-EFFECT SNOW IS FORECAST THAT WILL MAKE TRAVEL DIFFICULT IN SOME AREAS. LAKE-EFFECT SNOW SHOWERS TYPICALLY ALIGN THEMSELVES IN BANDS AND WILL LIKELY BE INTENSE ENOUGH TO DROP SEVERAL INCHES IN LOCALIZED AREAS. USE CAUTION WHEN TRAVELING.""",
"""A Lake Effect Snow Advisory means lake-effect snow is forecast that will make travel difficult in some areas. Lake-effect snow showers typically align themselves in bands and will likely be intense enough to drop several inches in localized areas. Use caution when traveling.""",
]
def ctaLOY(self):
return [
"""A LOW WATER ADVISORY MEANS WATER LEVELS ARE EXPECTED TO BE SIGNIFICANTLY BELOW AVERAGE. MARINERS SHOULD USE EXTREME CAUTION AND TRANSIT AT THE SLOWEST SAFE NAVIGABLE SPEED TO MINIMIZE IMPACT.""",
"""A Low Water Advisory means water levels are expected to be significantly below average. Mariners should use extreme caution and transit at the slowest safe navigable speed to minimize impact.""",
]
def ctaLSA(self):
return [
"""A LAKESHORE FLOOD WATCH MEANS THAT CONDITIONS FAVORABLE FOR LAKESHORE FLOODING ARE EXPECTED TO DEVELOP. RESIDENTS ON OR NEAR THE SHORE SHOULD TAKE ACTION TO PROTECT PROPERTY...AND LISTEN FOR LATER STATEMENTS OR WARNINGS.""",
"""A Lakeshore Flood Watch means that conditions favorable for lakeshore flooding are expected to develop. Residents on or near the shore should take action to protect property...and listen for later statements or warnings.""",
]
def ctaLSW(self):
return [
"""A LAKESHORE FLOOD WARNING MEANS THAT FLOODING IS OCCURRING OR IMMINENT ALONG THE LAKE. RESIDENTS ON OR NEAR THE SHORE IN THE WARNED AREA SHOULD BE ALERT FOR RISING WATER...AND TAKE APPROPRIATE ACTION TO PROTECT LIFE AND PROPERTY.""",
"""A Lakeshore Flood Warning means that flooding is occurring or imminent along the lake. Residents on or near the shore in the warned area should be alert for rising water...and take appropriate action to protect life and property.""",
]
def ctaLSY(self):
return [
"""A LAKESHORE FLOOD ADVISORY INDICATES THAT ONSHORE WINDS WILL GENERATE FLOODING OF LOW AREAS ALONG THE LAKESHORE.""",
"""A Lakeshore Flood Advisory indicates that onshore winds will generate flooding of low areas along the lakeshore.""",
]
def ctaLWY(self):
return [
"""A LAKE WIND ADVISORY INDICATES THAT WINDS WILL CAUSE ROUGH CHOP ON AREA LAKES. SMALL BOATS WILL BE ESPECIALLY PRONE TO CAPSIZING.""",
"""A Lake Wind Advisory indicates that winds will cause rough chop on area lakes. Small boats will be especially prone to capsizing.""",
]
def ctaMHW(self):
return [
"""AN ASHFALL WARNING MEANS THAT SIGNIFICANT ACCUMULATION OF ASHFALL IS EXPECTED ON VESSELS. IT IS RECOMMENDED THAT VESSELS BE PREPARED TO TAKE THE NECESSARY COUNTER MEASURES BEFORE PUTTING TO SEA OR ENTERING THE WARNING AREA.""",
"""An Ashfall Warning means that significant accumulation of ashfall is expected on vessels. It is recommended that vessels be prepared to take the necessary counter measures before putting to sea or entering the warning area.""",
]
def ctaMFY(self):
return [
"""A DENSE FOG ADVISORY MEANS VISIBILITIES WILL FREQUENTLY BE REDUCED TO LESS THAN ONE MILE. INEXPERIENCED MARINERS...ESPECIALLY THOSE OPERATING SMALLER VESSELS SHOULD AVOID NAVIGATING IN THESE CONDITIONS. """,
"""A Dense Fog Advisory means visibilities will frequently be reduced to less than one mile. Inexperienced mariners...especially those operating smaller vessels should avoid navigating in these conditions. """,
]
def ctaMHY(self):
return [
"""AN ASHFALL ADVISORY MEANS THAT A LIGHT ACCUMULATION OF ASHFALL IS EXPECTED ON VESSELS. IT IS RECOMMENDED THAT VESSELS BE PREPARED TO TAKE APPROPRIATE COUNTER MEASURES BEFORE PUTTING TO SEA OR ENTERING THE ADVISORY AREA.""",
"""An Ashfall Advisory means that a light accumulation of ashfall is expected on vessels. It is recommended that vessels be prepared to take appropriate counter measures before putting to sea or entering the advisory area.""",
]
def ctaMSY(self):
return [
"""A DENSE SMOKE ADVISORY MEANS WIDESPREAD FIRES WILL CREATE SMOKE...LIMITING VISIBILITIES. INEXPERIENCED MARINERS...ESPECIALLY THOSE OPERATING SMALLER VESSELS SHOULD AVOID NAVIGATING IN THESE CONDITIONS.""",
"""A Dense Smoke Advisory means widespread fires will create smoke...limiting visibilities. Inexperienced mariners...especially those operating smaller vessels should avoid navigating in these conditions.""",
]
def ctaRBY(self):
return [
"""A SMALL CRAFT ADVISORY FOR ROUGH BAR MEANS THAT WAVE CONDITIONS ARE EXPECTED TO BE HAZARDOUS TO SMALL CRAFT IN OR NEAR HARBOR ENTRANCES.""",
"""A Small Craft Advisory for rough bar means that wave conditions are expected to be hazardous to small craft in or near harbor entrances.""",
]
def ctaRPS(self):
return [
"""THERE IS A HIGH RISK OF RIP CURRENTS.
"""There is a high risk of rip currents.
RIP CURRENTS ARE POWERFUL CHANNELS OF WATER FLOWING QUICKLY AWAY FROM SHORE...WHICH OCCUR MOST OFTEN AT LOW SPOTS OR BREAKS IN THE SANDBAR AND IN THE VICINITY OF STRUCTURES SUCH AS GROINS...JETTIES AND PIERS. HEED THE ADVICE OF LIFEGUARDS...BEACH PATROL FLAGS AND SIGNS.
Rip currents are powerful channels of water flowing quickly away from shore...which occur most often at low spots or breaks in the sandbar and in the vicinity of structures such as groins...jetties and piers. Heed the advice of lifeguards...beach patrol flags and signs.
IF YOU BECOME CAUGHT IN A RIP CURRENT...YELL FOR HELP. REMAIN CALM...do not exhaust yourself and stay afloat while waiting for help. If you have to swim out of a rip current...SWIM PARALLEL TO SHORE and back toward the beach when possible. DO NOT ATTEMPT TO SWIM DIRECTLY AGAINST A RIP CURRENT as you will tire quickly. """,
If you become caught in a rip current...yell for help. Remain calm...do not exhaust yourself and stay afloat while waiting for help. If you have to swim out of a rip current...swim parallel to shore and back toward the beach when possible. Do not attempt to swim directly against a rip current as you will tire quickly. """,
]
def ctaSCY(self):
return [
"""A SMALL CRAFT ADVISORY MEANS THAT WIND SPEEDS OF 21 TO 33 KNOTS ARE EXPECTED TO PRODUCE HAZARDOUS WAVE CONDITIONS TO SMALL CRAFT. INEXPERIENCED MARINERS...ESPECIALLY THOSE OPERATING SMALLER VESSELS SHOULD AVOID NAVIGATING IN THESE CONDITIONS.""",
"""A Small Craft Advisory means that wind speeds of 21 to 33 knots are expected to produce hazardous wave conditions to small craft. Inexperienced mariners...especially those operating smaller vessels should avoid navigating in these conditions.""",
]
def ctaSEA(self):
return [
"""A HAZARDOUS SEAS WATCH IS ISSUED WHEN THE RISK OF HAZARDOUS SEAS HAS SIGNIFICANTLY INCREASED...BUT THE SPECIFIC TIMING AND/OR LOCATION IS STILL UNCERTAIN. IT IS INTENDED TO PROVIDE ADDITIONAL LEAD TIME FOR MARINERS WHO MAY WISH TO CONSIDER ALTERING THEIR PLANS.""",
"""A Hazardous Seas Watch is issued when the risk of hazardous seas has significantly increased...but the specific timing and/or location is still uncertain. It is intended to provide additional lead time for mariners who may wish to consider altering their plans.""",
]
def ctaSEW(self):
return [
"""A HAZARDOUS SEAS WARNING MEANS HAZARDOUS SEA CONDITIONS ARE IMMINENT OR OCCURING. RECREATIONAL BOATERS SHOULD REMAIN IN PORT...OR TAKE SHELTER UNTIL WAVES SUBSIDE. COMMERCIAL VESSELS SHOULD PREPARE FOR ROUGH SEAS AND CONSIDER REMAINING IN PORT OR TAKING SHELTER IN PORT UNTIL HAZARDOUS SEAS SUBSIDE.""",
"""A Hazardous Seas Warning means hazardous sea conditions are imminent or occurring. Recreational boaters should remain in port...or take shelter until waves subside. Commercial vessels should prepare for rough seas and consider remaining in port or taking shelter in port until hazardous seas subside.""",
]
def ctaSIY(self):
return [
"""A SMALL CRAFT ADVISORY FOR WIND MEANS THAT WIND SPEEDS OF 21 TO 33 KNOTS ARE EXPECTED. INEXPERIENCED MARINERS...ESPECIALLY THOSE OPERATING SMALLER VESSELS SHOULD AVOID NAVIGATING IN THESE CONDITIONS.""",
"""A Small Craft Advisory for wind means that wind speeds of 21 to 33 knots are expected. Inexperienced mariners...especially those operating smaller vessels should avoid navigating in these conditions.""",
]
def ctaSMY(self):
return [
"""A DENSE SMOKE ADVISORY MEANS WIDESPREAD FIRES WILL CREATE SMOKE...LIMITING VISIBILITIES. IF DRIVING...SLOW DOWN...USE YOUR HEADLIGHTS...AND LEAVE PLENTY OF DISTANCE AHEAD OF YOU IN CASE A SUDDEN STOP IS NEEDED.""",
"""A Dense Smoke Advisory means widespread fires will create smoke...limiting visibilities. If driving...slow down...use your headlights...and leave plenty of distance ahead of you in case a sudden stop is needed.""",
]
def ctaSRA(self):
return [
"""A STORM WATCH IS ISSUED WHEN THE RISK OF STORM FORCE WINDS OF 48 TO 63 KNOTS HAS SIGNIFICANTLY INCREASED...BUT THE SPECIFIC TIMING AND/OR LOCATION IS STILL UNCERTAIN. IT IS INTENDED TO PROVIDE ADDITIONAL LEAD TIME FOR MARINERS WHO MAY WISH TO CONSIDER ALTERING THEIR PLANS.""",
"""A Storm Watch is issued when the risk of storm force winds of 48 to 63 knots has significantly increased...but the specific timing and/or location is still uncertain. It is intended to provide additional lead time for mariners who may wish to consider altering their plans.""",
]
def ctaSRW(self):
return [
"""A STORM WARNING MEANS WINDS OF 48 TO 63 KNOTS ARE IMMINENT OR OCCURING. RECREATIONAL BOATERS SHOULD REMAIN IN PORT...OR TAKE SHELTER UNTIL WINDS AND WAVES SUBSIDE. COMMERCIAL VESSELS SHOULD PREPARE FOR VERY STRONG WINDS AND DANGEROUS SEA CONDITIONS...AND CONSIDER REMAINING IN PORT OR TAKING SHELTER IN PORT UNTIL WINDS AND WAVES SUBSIDE.""",
"""A Storm Warning means winds of 48 to 63 knots are imminent or occuring. Recreational boaters should remain in port...or take shelter until winds and waves subside. Commercial vessels should prepare for very strong winds and dangerous sea conditions...and consider remaining in port or taking shelter in port until winds and waves subside.""",
]
def ctaSUW(self):
return [
"""A HIGH SURF WARNING INDICATES THAT DANGEROUS...BATTERING WAVES WILL POUND THE SHORELINE. THIS WILL RESULT IN LIFE-THREATENING CONDITIONS.""",
"""A High Surf Warning indicates that dangerous...battering waves will pound the shoreline. This will result in life-threatening conditions.""",
]
def ctaSUY(self):
return [
"""A HIGH SURF ADVISORY MEANS THAT HIGH SURF WILL AFFECT BEACHES IN THE ADVISORY AREA...PRODUCING LOCALIZED BEACH EROSION AND DANGEROUS SWIMMING CONDITIONS.""",
"""A High Surf Advisory means that high surf will affect beaches in the advisory area...producing localized beach erosion and dangerous swimming conditions.""",
]
def ctaSWY(self):
return [
"""A SMALL CRAFT ADVISORY FOR HAZARDOUS SEAS MEANS THAT WAVES ARE EXPECTED TO BE HAZARDOUS TO SMALL CRAFT. MARINERS SHOULD AVOID SHOALING AREAS. LONG PERIOD SWELL CAN SHARPEN INTO LARGE BREAKING WAVES IN SHOALING AREAS. IT IS NOT UNUSUAL FOR WAVES TO BREAK MUCH FARTHER FROM SHOALING AREAS THAN IS NORMALLY EXPERIENCED. REMEMBER...BREAKING WAVES CAN EASILY CAPSIZE EVEN LARGER VESSELS.""",
"""A Small Craft Advisory for hazardous seas means that waves are expected to be hazardous to small craft. Mariners should avoid shoaling areas. Long period swell can sharpen into large breaking waves in shoaling areas. It is not unusual for waves to break much farther from shoaling areas than is normally experienced. Remember...breaking waves can easily capsize even larger vessels.""",
]
def ctaTRA(self):
return [
"""A TROPICAL STORM WATCH MEANS SUSTAINED WINDS OF |* 34 TO 63 KT OR 39 TO 73 MPH OR 63 TO 118 KM PER HR *| ARE POSSIBLE DUE TO A TROPICAL STORM WITHIN 48 HOURS.""",
"""A Tropical Storm Watch means sustained winds of |* 34 to 63 kt or 39 to 73 mph or 63 to 118 km per hr *| are possible due to a tropical storm within 48 hours.""",
]
def ctaTRW(self):
return [
"""A TROPICAL STORM WARNING MEANS SUSTAINED WINDS OF |* 34 TO 63 KT OR 39 TO 73 MPH OR 63 TO 118 KM PER HR *| ARE EXPECTED DUE TO A TROPICAL STORM WITHIN 36 HOURS.""",
"""A Tropical Storm Warning means sustained winds of |* 34 to 63 kt or 39 to 73 mph or 63 to 118 km per hr *| are expected due to a tropical storm within 36 hours.""",
]
def ctaUPA(self):
return [
"""A HEAVY FREEZING SPRAY WATCH IS ISSUED WHEN THE RISK OF HEAVY FREEZING SPRAY HAS SIGNIFICANTLY INCREASED...BUT THE SPECIFIC TIMING AND/OR LOCATION IS STILL UNCERTAIN. IT IS INTENDED TO PROVIDE ADDITIONAL LEAD TIME FOR MARINERS WHO MAY WISH TO CONSIDER ALTERING THEIR PLANS.""",
"""A Heavy Freezing Spray Watch is issued when the risk of heavy freezing spray has significantly increased...but the specific timing and/or location is still uncertain. It is intended to provide additional lead time for mariners who may wish to consider altering their plans.""",
]
def ctaUPW(self):
return [
"""A HEAVY FREEZING SPRAY WARNING MEANS HEAVY FREEZING SPRAY IS EXPECTED TO RAPIDLY ACCUMULATE ON VESSELS. THESE CONDITIONS CAN BE EXTREMELY HAZARDOUS TO NAVIGATION. IT IS RECOMMENDED THAT MARINERS NOT TRAINED TO OPERATE IN THESE CONDITIONS OR VESSELS NOT PROPERLY EQUIPED TO DO SO...REMAIN IN PORT OR AVOID THE WARING AREA.""",
"""A Heavy Freezing Spray Warning means heavy freezing spray is expected to rapidly accumulate on vessels. These conditions can be extremely hazardous to navigation. It is recommended that mariners not trained to operate in these conditions or vessels not properly equiped to do so...remain in port or avoid the waring area.""",
]
def ctaUPY(self):
return [
"""A FREEZING SPRAY ADVISORY MEANS THAT LIGHT TO MODERATE ACCUMULATION OF ICE IS EXPECTED ON VESSELS. OPERATING A VESSEL IN FREEZING SPRAY CAN BE HAZARDOUS. IT IS RECOMMENDED THAT VESSELS BE PREPARED TO TAKE APPROPRIATE COUNTER MEASURES BEFORE PUTTING TO SEA OR ENTER THE ADVISORY AREA.""",
"""A Freezing Spray Advisory means that light to moderate accumulation of ice is expected on vessels. Operating a vessel in freezing spray can be hazardous. It is recommended that vessels be prepared to take appropriate counter measures before putting to sea or enter the advisory area.""",
]
def ctaWCA(self):
return [
"""A WIND CHILL WATCH MEANS THE THERE IS THE POTENTIAL FOR A COMBINATION OF VERY COLD AIR AND STRONG WINDS TO CREATE DANGEROUSLY LOW WIND CHILL VALUES. MONITOR THE LATEST FORECASTS AND WARNINGS FOR UPDATES ON THIS SITUATION.""",
"""A Wind Chill Watch means the there is the potential for a combination of very cold air and strong winds to create dangerously low wind chill values. Monitor the latest forecasts and warnings for updates on this situation.""",
]
def ctaWCW(self):
return [
"""A WIND CHILL WARNING MEANS THE COMBINATION OF VERY COLD AIR AND STRONG WINDS WILL CREATE DANGEROUSLY LOW WIND CHILL VALUES. THIS WILL RESULT IN FROST BITE AND LEAD TO HYPOTHERMIA OR DEATH IF PRECAUTIONS ARE NOT TAKEN.""",
"""A Wind Chill Warning means the combination of very cold air and strong winds will create dangerously low wind chill values. This will result in frost bite and lead to hypothermia or death if precautions are not taken.""",
]
def ctaWCY(self):
return [
"""A WIND CHILL ADVISORY MEANS THAT VERY COLD AIR AND STRONG WINDS WILL COMBINE TO GENERATE LOW WIND CHILLS. THIS WILL RESULT IN FROST BITE AND LEAD TO HYPOTHERMIA IF PRECAUTIONS ARE NOT TAKEN. IF YOU MUST VENTURE OUTDOORS...MAKE SURE YOU WEAR A HAT AND GLOVES.""",
"""A Wind Chill Advisory means that very cold air and strong winds will combine to generate low wind chills. This will result in frost bite and lead to hypothermia if precautions are not taken. If you must venture outdoors...make sure you wear a hat and gloves.""",
]
def ctaWIY(self):
return [
"""A WIND ADVISORY MEANS THAT WINDS OF 35 MPH ARE EXPECTED. WINDS THIS STRONG CAN MAKE DRIVING DIFFICULT...ESPECIALLY FOR HIGH PROFILE VEHICLES. USE EXTRA CAUTION.""",
"""A Wind Advisory means that winds of 35 mph are expected. Winds this strong can make driving difficult...especially for high profile vehicles. Use extra caution.""",
]
def ctaWSA(self):
return [
"""A WINTER STORM WATCH MEANS THERE IS A POTENTIAL FOR SIGNIFICANT SNOW...SLEET...OR ICE ACCUMULATIONS THAT MAY IMPACT TRAVEL. CONTINUE TO MONITOR THE LATEST FORECASTS.""",
"""A Winter Storm Watch means there is a potential for significant snow...sleet...or ice accumulations that may impact travel. Continue to monitor the latest forecasts.""",
]
def ctaWSW(self):
return [
"""|*Choose the appropriate CTA below and delete the rest*|
"""|*Choose the appropriate CTA below and delete the rest*|""" """
A WINTER STORM WARNING FOR HEAVY SNOW MEANS SEVERE WINTER WEATHER CONDITIONS ARE EXPECTED OR OCCURRING. SIGNIFICANT AMOUNTS OF SNOW ARE FORECAST THAT WILL MAKE TRAVEL DANGEROUS. ONLY TRAVEL IN AN EMERGENCY. IF YOU MUST TRAVEL...KEEP AN EXTRA FLASHLIGHT...FOOD...AND WATER IN YOUR VEHICLE IN CASE OF AN EMERGENCY.
A Winter Storm Warning for heavy snow means severe winter weather conditions are expected or occurring. Significant amounts of snow are forecast that will make travel dangerous. Only travel in an emergency. If you must travel...keep an extra flashlight...food...and water in your vehicle in case of an emergency.
A WINTER STORM WARNING MEANS SIGNIFICANT AMOUNTS OF SNOW...SLEET...AND ICE ARE EXPECTED OR OCCURRING. STRONG WINDS ARE ALSO POSSIBLE. THIS WILL MAKE TRAVEL VERY HAZARDOUS OR IMPOSSIBLE.
A Winter Storm Warning means significant amounts of snow...sleet...and ice are expected or occurring. Strong winds are also possible. This will make travel very hazardous or impossible.
A WINTER STORM WARNING FOR SLEET MEANS THAT A WINTER STORM SYSTEM IS IMPACTING THE AREA WITH SIGNIFICANT AMOUNTS OF SLEET. TRAVEL IS LIKELY TO BE SEVERELY IMPACTED.""",
A Winter Storm Warning for sleet means that a winter storm system is impacting the area with significant amounts of sleet. Travel is likely to be severely impacted.""",
]
def ctaWWY(self):
return [
"""|*Choose the appropriate CTA below and delete the rest*|
"""|*Choose the appropriate CTA below and delete the rest*|""" """
A WINTER WEATHER ADVISORY MEANS THAT PERIODS OF SNOW...SLEET...OR FREEZING RAIN WILL CAUSE TRAVEL DIFFICULTIES. BE PREPARED FOR SLIPPERY ROADS AND LIMITED VISIBILITIES...AND USE CAUTION WHILE DRIVING.
A Winter Weather Advisory means that periods of snow...sleet...or freezing rain will cause travel difficulties. Be prepared for slippery roads and limited visibilities...and use caution while driving.
A WINTER WEATHER ADVISORY FOR BLOWING SNOW MEANS THAT VISIBILITIES WILL BE LIMITED DUE TO STRONG WINDS BLOWING SNOW AROUND. USE CAUTION WHEN TRAVELING...ESPECIALLY IN OPEN AREAS.
A Winter Weather Advisory for blowing snow means that visibilities will be limited due to strong winds blowing snow around. Use caution when traveling...especially in open areas.
A WINTER WEATHER ADVISORY FOR SLEET MEANS PERIODS OF SLEET ARE IMMINENT OR OCCURRING. SLEET MAY CAUSE DRIVING TO BECOME EXTREMELY DANGEROUS...SO BE PREPARED TO USE CAUTION WHEN TRAVELING.
A Winter Weather Advisory for sleet means periods of sleet are imminent or occurring. Sleet may cause driving to become extremely dangerous...so be prepared to use caution when traveling.
A WINTER WEATHER ADVISORY FOR |*LAKE EFFECT*| SNOW AND BLOWING SNOW MEANS THAT VISIBILITIES WILL BE LIMITED DUE TO A COMBINATION OF FALLING AND BLOWING SNOW. USE CAUTION WHEN TRAVELING...ESPECIALLY IN OPEN AREAS.
A Winter Weather Advisory for |*lake effect*| snow and blowing snow means that visibilities will be limited due to a combination of falling and blowing snow. Use caution when traveling...especially in open areas.
A WINTER WEATHER ADVISORY FOR SNOW MEANS THAT PERIODS OF SNOW WILL CAUSE PRIMARILY TRAVEL DIFFICULTIES. BE PREPARED FOR SNOW COVERED ROADS AND LIMITED VISIBILITIES...AND USE CAUTION WHILE DRIVING.""",
A Winter Weather Advisory for snow means that periods of snow will cause primarily travel difficulties. Be prepared for snow covered roads and limited visibilities...and use caution while driving.""",
]
def ctaZFY(self):
return [
"""A FREEZING FOG ADVISORY MEANS VISIBILITIES WILL FREQUENTLY BE REDUCED TO LESS THAN ONE QUARTER MILE. IF DRIVING...SLOW DOWN...USE YOUR HEADLIGHTS...AND LEAVE PLENTY OF DISTANCE AHEAD OF YOU. ALSO...BE ALERT FOR FROST ON BRIDGE DECKS CAUSING SLIPPERY ROADS.""",
"""A Freezing Fog Advisory means visibilities will frequently be reduced to less than one quarter mile. If driving...slow down...use your headlights...and leave plenty of distance ahead of you. Also...be alert for frost on bridge decks causing slippery roads.""",
]
def ctaZRY(self):
return [
"""A FREEZING RAIN ADVISORY MEANS THAT PERIODS OF FREEZING RAIN OR FREEZING DRIZZLE WILL CAUSE TRAVEL DIFFICULTIES. BE PREPARED FOR SLIPPERY ROADS. SLOW DOWN AND USE CAUTION WHILE DRIVING.""",
"""A Freezing Rain Advisory means that periods of freezing rain or freezing drizzle will cause travel difficulties. Be prepared for slippery roads. Slow down and use caution while driving.""",
]
#------------------------------------------------------------------------
@ -709,12 +709,12 @@ A WINTER WEATHER ADVISORY FOR SNOW MEANS THAT PERIODS OF SNOW WILL CAUSE PRIMARI
return [("***RIP CURRENTS CTA", """RIP CURRENTS ARE POWERFUL CHANNELS OF WATER FLOWING QUICKLY AWAY FROM SHORE...WHICH OCCUR MOST OFTEN AT LOW SPOTS OR BREAKS IN THE SANDBAR AND IN THE VICINITY OF STRUCTURES SUCH AS GROINS...JETTIES AND PIERS. HEED THE ADVICE OF LIFEGUARDS...BEACH PATROL FLAGS AND SIGNS.
IF YOU BECOME CAUGHT IN A RIP CURRENT...YELL FOR HELP. REMAIN CALM...do not exhaust yourself and stay afloat while waiting for help. If you have to swim out of a rip current...SWIM PARALLEL TO SHORE and back toward the beach when possible. DO NOT ATTEMPT TO SWIM DIRECTLY AGAINST A RIP CURRENT as you will tire quickly."""),
("***LONGSHORE CURRENTS CTA", """LONGSHORE CURRENTS COMMONLY OCCUR WHEN WAVES APPROACH THE SHORELINE AT AN ANGLE. THEY CAN BE PARTICULARLY DANGEROUS NEAR A JETTY OR PIER."""),
("***SNEAKER WAVES CTA", """ADD CTA HERE."""),
("***RED TIDE CTA", """ADD CTA HERE"""),
("***SEA NETTLES CTA", """ADD CTA HERE"""),
("***TSUNAMI DEBRIS CTA", """ADD CTA HERE"""),
("***OTHER BEACH HAZARDS CTA", """ADD CTA HERE"""),
("***LONGSHORE CURRENTS CTA", """Longshore currents commonly occur when waves approach the shoreline at an angle. They can be particularly dangerous near a jetty or pier."""),
("***SNEAKER WAVES CTA", """Add cta here."""),
("***RED TIDE CTA", """Add cta here"""),
("***SEA NETTLES CTA", """Add cta here"""),
("***TSUNAMI DEBRIS CTA", """Add cta here"""),
("***OTHER BEACH HAZARDS CTA", """Add cta here"""),
]
def ctaPilCWF(self):
@ -762,26 +762,26 @@ IF YOU BECOME CAUGHT IN A RIP CURRENT...YELL FOR HELP. REMAIN CALM...do not exha
]
def ctaPilHLS(self):
return [("***MINOR FLOODING", """RESIDENTS CAN EXPECT MINOR FLOODING OF ROADS...ESPECIALLY THOSE WITH POOR DRAINAGE. KNOWN INTERSECTIONS WITH VERY POOR DRAINAGE MAY HAVE WATER LEVELS UP TO 3 FEET. OTHER POOR DRAINAGE AREAS WILL HAVE WATER RISES OF 1 FOOT."""),
("***WIDESPREAD FLOODING", """RESIDENTS CAN EXPECT WIDESPREAD FLOODING. IN POOR DRAINAGE AREAS...MINOR TO MODERATE PROPERTY DAMAGE IS EXPECTED...AND SEVERAL MAIN THOROUGHFARES MAY BE CLOSED. KNOWN INTERSECTIONS WITH VERY POOR DRAINAGE MAY HAVE WATER LEVELS UP TO 5 FEET. OTHER POOR DRAINAGE AREAS WILL HAVE WATER RISES UP TO 3 FEET. LEVELS WILL RISE 1 FOOT ELSEWHERE."""),
"""SMALL STREAMS WILL SURPASS BANK FULL...BUT ONLY FOR ONE HOUR OR LESS.""",
("***WIDESPREAD STREAM FLOODING", """MOST SMALL STREAMS AND CREEKS WILL SURPASS BANK FULL...FOR UP TO 3 HOURS. LARGER RIVERS WILL RISE...AND THOSE WHICH RESPOND QUICKLY TO VERY HEAVY RAIN MAY BRIEFLY EXCEED FLOOD STAGE."""),
("***PRIOR NOTICE OF EXTENSIVE AREAL FLOODING", """EXTENSIVE FLOODING IS EXPECTED |**TODAY OR TONIGHT OR NEXT DAY**| \n\n PERSONS LIVING NEAR OR IN POOR DRAINAGE LOCATIONS SHOULD PREPARE FOR POSSIBLE EVACUATION LATER |**TODAY OR TONIGHT OR NEXT DAY**|. IN THESE AREAS...SIGNIFICANT PROPERTY DAMAGE WILL OCCUR...AND SOME POWER OUTAGES ARE LIKELY. MINOR PROPERTY DAMAGE IS POSSIBLE ELSEWHERE. \n\nWATER LEVELS IN VERY POOR DRAINAGE AREAS WILL APPROACH 7 FEET. OTHER POOR DRAINAGE LOCATIONS WILL HAVE RISES BETWEEN 3 AND 5 FEET. ELSEWHERE...EXPECT WATER RISES TO NEAR 2 FEET. NUMEROUS MAIN ROADS WILL BE CLOSED. DRIVING IS HIGHLY DISCOURAGED EXCEPT FOR EMERGENCIES."""),
("***DANGEROUS FLOODING", """THIS IS A DANGEROUS FLOOD SITUATION! \n\nPERSONS LIVING IN OR NEAR POOR DRAINAGE AREAS SHOULD EVACUATE IMMEDIATELY. SIGNIFICANT PROPERTY DAMAGE WILL OCCUR IN THESE LOCATIONS. MINOR PROPERTY DAMAGE IS POSSIBLE IN OTHER AREAS. SOME POWER OUTAGES ARE EXPECTED. \n\n WATER LEVELS IN VERY POOR DRAINAGE AREAS WILL APPROACH 7 FEET. OTHER POOR DRAINAGE LOCATIONS WILL HAVE RISES BETWEEN 3 AND 5 FEET. ELSEWHERE...EXPECT WATER RISES TO NEAR 2 FEET. NUMEROUS MAIN ROADS WILL BE CLOSED. DRIVING IS HIGHLY DISCOURAGED UNTIL WELL AFTER FLOOD WATERS RECEDE. \n\n MOVE TO SAFETY IMMEDIATELY."""),
("***PRIOR NOTICE OF EXTENSIVE RIVER FLOODING", """EXTENSIVE FLOODING IS EXPECTED |**TODAY OR TONIGHT OR NEXT DAY**|. \n\n BY |**TIME**|...ALL SMALL STREAMS AND CREEKS WILL HAVE SURPASSED BANK FULL. THESE CONDITIONS WILL LAST BETWEEN 3 AND 6 HOURS. SOME STREAMS WILL EXCEED THEIR BANKS BY SEVERAL FEET AND MAY FLOOD NEARBY HOMES. EVACUATIONS ARE POSSIBLE.\n\n RIVERS IN AFFECTED AREAS WILL RISE...WITH SOME REACHING OR EXCEEDING FLOOD STAGE. NORMALLY QUICK-RISING RIVERS WILL EXCEED FLOOD STAGE BY SEVERAL FEET...FLOODING HOMES ALONG THE RIVERSIDE. PASTURES WILL ALSO FLOOD...BUT LIVESTOCK LOSSES SHOULD BE MINIMAL. SEVERAL SECONDARY ROADS AND BRIDGES WILL BE WASHED OUT. DRIVING IS HIGHLY DISCOURAGED."""),
("***DANGEROUS RIVER FLOODING", """THIS IS A DANGEROUS SITUATION! \n\nALL STREAMS...CREEKS..AND SOME RIVERS WILL SURPASS BANKFULL...FOR BETWEEN 3 AND 6 HOURS. SOME STREAMS WILL EXCEED THEIR BANKS BY SEVERAL FEET...FLOODING NEARBY HOMES. EVACUATIONS ARE POSSIBLE. \n\n RIVERS IN AFFECTED AREAS WILL RISE...WITH SOME REACHING OR EXCEEDING FLOOD STAGE. NORMALLY QUICK RISING RIVERS WILL EXCEED FLOOD STAGE BY SEVERAL FEET...FLOODING HOMES ALONG THE RIVERSIDE. PASTURES WILL ALSO FLOOD...BUT LIVESTOCK LOSSES SHOULD BE MINIMAL."""),
("***CATASTROPHIC FLOODING EXPECTED", """CATASTROPHIC FLOODING IS EXPECTED LATER |**EDIT DAY OR NIGHT PERIODS**|. \n\n A STATE OF EMERGENCY HAS BEEN ISSUED |**BY AGENCY**| FOR |**EDIT AREA HERE**|. \n\n RESIDENTS IN FLOOD PRONE AREAS SHOULD RUSH TO COMPLETION PREPARATIONS TO PROTECT THEIR PROPERTY...THEN MOVE TO A PLACE OF SAFETY...THIS |**EDIT TIME PERIOD**|. MANDATORY EVACUATIONS ARE UNDERWAY. \n\n |** OPENING PARAGRAPH DESCRIBING ANTECEDENT RAINFALL AND EXPECTED HEAVIER RAINFALL **| \n\n LIFE THREATENING FLOODING IS LIKELY! IN URBAN AREAS...EXTENSIVE PROPERTY DAMAGE WILL OCCUR IN ALL POOR DRAINAGE AREAS...WITH MODERATE TO MAJOR PROPERTY DAMAGE ELSEWHERE. WIDESPREAD POWER OUTAGES ARE LIKELY. \n\n IN RURAL LOCATIONS...ALL STREAMS...CREEKS...AND ARROYOS WILL SURPASS BANK FULL FOR MORE THAN 6 HOURS. EACH WILL EXCEED THEIR BANKS BY SEVERAL FEET...FLOODING HOMES...EVEN THOSE UP TO ONE HALF MILE AWAY FROM THE BANKS. \n\n IN ALL AREAS...HUNDREDS OF ROADS WILL FLOOD. DOZENS OF SECONDARY ROADS MAY BECOME WASHED OUT IN RURAL AREAS. NUMEROUS LOW WATER BRIDGES WILL LIKELY WASH OUT AS WELL. \n\n WATER LEVELS WILL EXCEED 5 FEET IN ALL POOR DRAINAGE URBAN AREAS...AND AVERAGE AT LEAST 2 FEET ELSEWHERE. ALL RIVERS IN AFFECTED AREAS WILL RISE...AND MOST WILL EXCEED FLOOD STAGE. QUICK RISING RIVERS WILL EXCEED FLOOD STAGE...AND REACH NEAR RECORD CRESTS...CAUSING INUNDATION OF NEARBY HOMES. IN RURAL LOCATIONS...EXTENSIVE PASTURELAND FLOODING WILL OCCUR AS WATER LEVELS RISE TO 2 FEET OR MORE. WIDESPREAD LIVESTOCK LOSSES ARE LIKELY."""),
("***CATASTROPHIC FLOODING OCCURRING", """CATASTROPHIC FLOODING IS OCCURRING IN |**EDIT AREA**|. \n\n STATES OF EMERGENCY REMAIN IN EFFECT FOR THE FOLLOWING LOCATIONS: \n\n |**EDIT COUNTIES AND CITIES HERE**| \n\n RESIDENTS REMAIN PROHIBITED FROM VENTURING OUT. LAW ENFORCEMENT AND |**MILITARY SUPPORT GROUP EDIT HERE**| EVACUATIONS ARE NOW UNDERWAY. \n\n THIS REMAINS A LIFE THREATENING SITUATION! EXTENSIVE PROPERTY DAMAGE IS OCCURRING IN ALL POOR DRAINAGE AREAS. ELSEWHERE...MODERATE TO MAJOR PROPERTY DAMAGE IS OCCURRING. HUNDREDS OF ROADS ARE CLOSED...AND SOME ARE LIKELY DAMAGED. SEVERAL AREA BRIDGES ARE WASHED OUT. STREAMS...CREEKS...AND ARROYOS ARE SEVERAL FEET ABOVE BANK FULL...AND WILL REMAIN SO FOR HOURS. MANY RIVERS ARE NEARING FLOOD STAGE...AND SOME HAVE ALREADY SURPASSED IT. HOMES NEAR THESE RIVERS ARE LIKELY FLOODED. FLOOD WATERS WILL CONTINUE FOR SEVERAL MORE HOURS. \n\n WATER LEVELS ARE IN EXCESS OF 5 FEET IN ALL POOR DRAINAGE AREAS. ELSEWHERE...AVERAGE WATER LEVELS ARE AT LEAST 2 FEET. POWER OUTAGES ARE WIDESPREAD. \n\n STAY TUNED TO NOAA WEATHER RADIO FOR FURTHER INFORMATION ON THIS DANGEROUS FLOOD. HEED ALL EVACUATION ORDERS FROM LAW ENFORCEMENT OR MILITARY PERSONNEL."""),
("***GENERATOR PRECAUTIONS", """IF YOU PLAN ON USING A PORTABLE GENERATOR...BE SURE TO OBSERVE ALL SAFETY PRECAUTIONS TO AVOID CARBON MONOXIDE POISONING...ELECTROCUTION...OR FIRE. BE SURE TO OPERATE YOUR GENERATOR IN A DRY OUTDOOR AREA AWAY FROM WINDOWS...DOORS AND VENTS. CARBON MONOXIDE POISONING DEATHS CAN OCCUR DUE TO IMPROPERLY LOCATED PORTABLE GENERATORS!"""),
("***FLAMMABLES PRECAUTION", """FLAMMABLE LIQUIDS SUCH AS GASOLINE OR KEROSENE SHOULD ONLY BE STORED OUTSIDE OF THE LIVING AREAS IN PROPERLY LABELED...NON GLASS SAFETY CONTAINERS. DO NOT STORE IN AN ATTACHED GARAGE AS GAS FUMES CAN TRAVEL INTO THE HOME AND POTENTIALLY IGNITE...ESPECIALLY IF THE HOME HAS NATURAL OR PROPANE GAS LINES THAT COULD BECOME DAMAGED DURING THE HURRICANE."""),
("***HURRICANE WARNING DEFINITION", """A HURRICANE WARNING MEANS SUSTAINED WINDS OF |* 64 KTS OR 74 MPH *| OR HIGHER ASSOCIATED WITH A HURRICANE ARE EXPECTED WITHIN 36 HOURS. A HURRICANE WARNING CAN REMAIN IN EFFECT WHEN DANGEROUSLY HIGH WATER OR A COMBINATION OF DANGEROUSLY HIGH WATER AND EXCEPTIONALLY HIGH WAVES CONTINUE...EVEN THOUGH WINDS MAY BE LESS THAN HURRICANE FORCE."""),
("***HURRICANE WATCH DEFINITION", """A HURRICANE WATCH IS ISSUED WHEN SUSTAINED WINDS OF |* 64 KTS OR 74 MPH *| OR HIGHER ASSOCIATED WITH A HURRICANE ARE POSSIBLE WITHIN 48 HOURS."""),
("***HURRICANE WIND WARNING DEFINITION", """A HURRICANE WIND WARNING IS ISSUED WHEN A LANDFALLING HURRICANE IS EXPECTED TO SPREAD HURRICANE FORCE WINDS WELL INLAND. SERIOUS PROPERTY DAMAGE...POWER OUTAGES...BLOWING DEBRIS...AND FALLEN TREES CAN BE EXPECTED AS WINDS REACH OR EXCEED 74 MPH."""),
("***HURRICANE WIND WATCH DEFINITION", """A HURRICANE WIND WATCH IS ISSUED WHEN A LANDFALLING HURRICANE IS EXPECTED TO SPREAD HURRICANE FORCE WINDS WELL INLAND WITHIN THE NEXT 48 HOURS. PREPARE FOR WINDS IN EXCESS OF 74 MPH."""),
("***TROPICAL STORM WARNING DEFINITION", """A TROPICAL STORM WARNING MEANS SUSTAINED WINDS OF |* 34 TO 63 KT OR 39 TO 73 MPH OR 63 TO 118 KM PER HR *| ARE EXPECTED DUE TO A TROPICAL CYCLONE WITHIN 36 HOURS."""),
("***TROPICAL STORM WIND WARNING DEFINITION", """A TROPICAL STORM WIND WARNING MEANS WINDS OF 39 TO 73 MPH ARE EXPECTED DUE TO A LANDFALLING HURRICANE OR TROPICAL STORM. WINDS OF THIS MAGNITUDE ARE LIKELY TO CAUSE SPORADIC POWER OUTAGES...FALLEN TREES...MINOR PROPERTY DAMAGE...AND DANGEROUS DRIVING CONDITIONS FOR HIGH PROFILE VEHICLES."""),
("***TROPICAL STORM WATCH DEFINITION", """A TROPICAL STORM WATCH MEANS SUSTAINED WINDS OF |* 34 TO 63 KT OR 39 TO 73 MPH OR 63 TO 118 KM PER HR *| ARE POSSIBLE DUE TO A TROPICAL CYCLONE WITHIN 48 HOURS."""),
("***TROPICAL STORM WIND WATCH DEFINITION", """A TROPICAL STORM WIND WATCH MEANS WINDS OF 39 TO 73 MPH ARE EXPECTED DUE TO A LANDFALLING HURRICANE OR TROPICAL STORM WITHIN 48 HOURS."""),
return [("***MINOR FLOODING", """Residents can expect minor flooding of roads...especially those with poor drainage. Known intersections with very poor drainage may have water levels up to 3 feet. Other poor drainage areas will have water rises of 1 foot."""),
("***WIDESPREAD FLOODING", """Residents can expect widespread flooding. In poor drainage areas...minor to moderate property damage is expected...and several main thoroughfares may be closed. Known intersections with very poor drainage may have water levels up to 5 feet. Other poor drainage areas will have water rises up to 3 feet. Levels will rise 1 foot elsewhere."""),
"""Small streams will surpass bank full...but only for one hour or less.""",
("***WIDESPREAD STREAM FLOODING", """Most small streams and creeks will surpass bank full...for up to 3 hours. Larger rivers will rise...and those which respond quickly to very heavy rain may briefly exceed flood stage."""),
("***PRIOR NOTICE OF EXTENSIVE AREAL FLOODING", """Extensive flooding is expected |**today or tonight or next day**|. \n\n Persons living near or in poor drainage locations should prepare for possible evacuation later |**today or tonight or next day**|. In these areas...significant property damage will occur...and some power outages are likely. Minor property damage is possible elsewhere. \n\nWater levels in very poor drainage areas will approach 7 feet. Other poor drainage locations will have rises between 3 and 5 feet. Elsewhere...expect water rises to near 2 feet. Numerous main roads will be closed. Driving is highly discouraged except for emergencies."""),
("***DANGEROUS FLOODING", """This is a dangerous flood situation! \n\nPersons living in or near poor drainage areas should evacuate immediately. Significant property damage will occur in these locations. Minor property damage is possible in other areas. Some power outages are expected. \n\n Water levels in very poor drainage areas will approach 7 feet. Other poor drainage locations will have rises between 3 and 5 feet. Elsewhere...expect water rises to near 2 feet. Numerous main roads will be closed. Driving is highly discouraged until well after flood waters recede. \n\n Move to safety immediately."""),
("***PRIOR NOTICE OF EXTENSIVE RIVER FLOODING", """Extensive flooding is expected |**today or tonight or next day**|. \n\n By |**time**|...all small streams and creeks will have surpassed bank full. These conditions will last between 3 and 6 hours. Some streams will exceed their banks by several feet and may flood nearby homes. Evacuations are possible.\n\n Rivers in affected areas will rise...with some reaching or exceeding flood stage. Normally quick-rising rivers will exceed flood stage by several feet...flooding homes along the riverside. Pastures will also flood...but livestock losses should be minimal. Several secondary roads and bridges will be washed out. Driving is highly discouraged."""),
("***DANGEROUS RIVER FLOODING", """This is a dangerous situation! \n\nAll streams...creeks..and some rivers will surpass bankfull...for between 3 and 6 hours. Some streams will exceed their banks by several feet...flooding nearby homes. Evacuations are possible. \n\n Rivers in affected areas will rise...with some reaching or exceeding flood stage. Normally quick rising rivers will exceed flood stage by several feet...flooding homes along the riverside. Pastures will also flood...but livestock losses should be minimal."""),
("***CATASTROPHIC FLOODING EXPECTED", """Catastrophic flooding is expected later |**edit day or night periods**|. \n\n A state of emergency has been issued |**by agency**| for |**edit area here**|. \n\n Residents in flood prone areas should rush to completion preparations to protect their property...then move to a place of safety...this |**edit time period**|. Mandatory evacuations are underway. \n\n |** opening paragraph describing antecedent rainfall and expected heavier rainfall **| \n\n life threatening flooding is likely! In urban areas...extensive property damage will occur in all poor drainage areas...with moderate to major property damage elsewhere. Widespread power outages are likely. \n\n In rural locations...all streams...creeks...and arroyos will surpass bank full for more than 6 hours. Each will exceed their banks by several feet...flooding homes...even those up to one half mile away from the banks. \n\n In all areas...hundreds of roads will flood. Dozens of secondary roads may become washed out in rural areas. Numerous low water bridges will likely wash out as well. \n\n Water levels will exceed 5 feet in all poor drainage urban areas...and average at least 2 feet elsewhere. All rivers in affected areas will rise...and most will exceed flood stage. Quick rising rivers will exceed flood stage...and reach near record crests...causing inundation of nearby homes. In rural locations...extensive pastureland flooding will occur as water levels rise to 2 feet or more. Widespread livestock losses are likely."""),
("***CATASTROPHIC FLOODING OCCURRING", """Catastrophic flooding is occurring in |**edit area**|. \n\n States of emergency remain in effect for the following locations: \n\n |**edit counties and cities here**| \n\n residents remain prohibited from venturing out. Law enforcement and |**military support group edit here**| evacuations are now underway. \n\n This remains a life threatening situation! Extensive property damage is occurring in all poor drainage areas. Elsewhere...moderate to major property damage is occurring. Hundreds of roads are closed...and some are likely damaged. Several area bridges are washed out. Streams...creeks...and arroyos are several feet above bank full...and will remain so for hours. Many rivers are nearing flood stage...and some have already surpassed it. Homes near these rivers are likely flooded. Flood waters will continue for several more hours. \n\n Water levels are in excess of 5 feet in all poor drainage areas. Elsewhere...average water levels are at least 2 feet. Power outages are widespread. \n\n Stay tuned to NOAA Weather Radio for further information on this dangerous flood. Heed all evacuation orders from law enforcement or military personnel."""),
("***GENERATOR PRECAUTIONS", """If you plan on using a portable generator...be sure to observe all safety precautions to avoid carbon monoxide poisoning...electrocution...or fire. Be sure to operate your generator in a dry outdoor area away from windows...doors and vents. Carbon monoxide poisoning deaths can occur due to improperly located portable generators!"""),
("***FLAMMABLES PRECAUTION", """Flammable liquids such as gasoline or kerosene should only be stored outside of the living areas in properly labeled...non glass safety containers. Do not store in an attached garage as gas fumes can travel into the home and potentially ignite...especially if the home has natural or propane gas lines that could become damaged during the hurricane."""),
("***HURRICANE WARNING DEFINITION", """A Hurricane Warning means sustained winds of |* 64 kts or 74 mph *| or higher associated with a hurricane are expected within 36 hours. A Hurricane Warning can remain in effect when dangerously high water or a combination of dangerously high water and exceptionally high waves continue...even though winds may be less than hurricane force."""),
("***HURRICANE WATCH DEFINITION", """A Hurricane Watch is issued when sustained winds of |* 64 kts or 74 mph *| or higher associated with a hurricane are possible within 48 hours."""),
("***HURRICANE WIND WARNING DEFINITION", """A Hurricane Wind Warning is issued when a landfalling hurricane is expected to spread hurricane force winds well inland. Serious property damage...power outages...blowing debris...and fallen trees can be expected as winds reach or exceed 74 mph."""),
("***HURRICANE WIND WATCH DEFINITION", """A Hurricane Wind Watch is issued when a landfalling hurricane is expected to spread hurricane force winds well inland within the next 48 hours. Prepare for winds in excess of 74 mph."""),
("***TROPICAL STORM WARNING DEFINITION", """A Tropical Storm Warning means sustained winds of |* 34 to 63 kt or 39 to 73 mph or 63 to 118 km per hr *| are expected due to a tropical cyclone within 36 hours."""),
("***TROPICAL STORM WIND WARNING DEFINITION", """A Tropical Storm Wind Warning means winds of 39 to 73 mph are expected due to a landfalling hurricane or tropical storm. Winds of this magnitude are likely to cause sporadic power outages...fallen trees...minor property damage...and dangerous driving conditions for high profile vehicles."""),
("***TROPICAL STORM WATCH DEFINITION", """A Tropical Storm Watch means sustained winds of |* 34 to 63 kt or 39 to 73 mph or 63 to 118 km per hr *| are possible due to a tropical cyclone within 48 hours."""),
("***TROPICAL STORM WIND WATCH DEFINITION", """A Tropical Storm Wind Watch means winds of 39 to 73 mph are expected due to a landfalling hurricane or tropical storm within 48 hours."""),
]
def ctaPilHMW(self):
@ -806,7 +806,7 @@ IF YOU BECOME CAUGHT IN A RIP CURRENT...YELL FOR HELP. REMAIN CALM...do not exha
def ctaPilMWW(self):
return [
"""MARINERS SHOULD PAY CLOSE ATTENTION TO THE MARINE FORECAST...AND CONSIDER WIND AND SEA CONDITIONS IN PLANNING.""",
"""Mariners should pay close attention to the marine forecast...and consider wind and sea conditions in planning.""",
]
def ctaPilMVF(self):
@ -892,4 +892,3 @@ IF YOU BECOME CAUGHT IN A RIP CURRENT...YELL FOR HELP. REMAIN CALM...do not exha
def ctaPilZFP(self):
return [
]

View file

@ -532,7 +532,7 @@ class Header(EditAreaUtils.EditAreaUtils, StringUtils.StringUtils):
# Header support for Watch/Warning products
def getCityList(self, areaList, label="THIS INCLUDES THE CITIES OF",
def getCityList(self, areaList, label="This includes the cities of",
lineLength=66, areaDictName="AreaDictionary", addPeriod = False,
forceAlphaSort=False):
# Returns a list of cities (from the AreaDictionary)
@ -698,11 +698,11 @@ class Header(EditAreaUtils.EditAreaUtils, StringUtils.StringUtils):
str = str.replace(str2, str1, count-1)
return str
def getIssuedByString(self, words = "ISSUED BY NATIONAL WEATHER SERVICE "):
def getIssuedByString(self, words = "Issued by National Weather Service "):
issuedByString = ""
try:
if self._issuedBy is not None:
issuedByString = "ISSUED BY NATIONAL WEATHER SERVICE " + \
issuedByString = "Issued by National Weather Service " + \
self.getSiteInfo("wfoCityState",self._issuedBy) + "\n"
except:
pass

View file

@ -42,16 +42,17 @@ def ThirdMonday(monthStartDOW, monthStartDOY):
def calculateHolidayList(yearStr):
# Define holiday strings
NewYearsDay = 'NEW YEARS DAY'
MartinLutherDay = 'MARTIN LUTHER KING JR DAY'
WashingtonsBirthday = 'WASHINGTONS BIRTHDAY'
MemorialDay = 'MEMORIAL DAY'
IndependenceDay = 'INDEPENDENCE DAY'
LaborDay = 'LABOR DAY'
ColumbusDay = 'COLUMBUS DAY'
VeteransDay = 'VETERANS DAY'
ThanksgivingDay = 'THANKSGIVING DAY'
ChristmasDay = 'CHRISTMAS DAY'
# TODO: Should we add punctuation (e.g. Jr. Washington's)
NewYearsDay = 'New Years Day'
MartinLutherDay = 'Martin Luther King Jr Day'
WashingtonsBirthday = 'Washingtons Birthday'
MemorialDay = 'Memorial Day'
IndependenceDay = 'Independence Day'
LaborDay = 'Labor Day'
ColumbusDay = 'Columbus Day'
VeteransDay = 'Veterans Day'
ThanksgivingDay = 'Thanksgiving Day'
ChristmasDay = 'Christmas Day'
# Initialize Holidays list
Holidays = []

View file

@ -514,40 +514,40 @@ class MarinePhrases(ScalarPhrases.ScalarPhrases, VectorRelatedPhrases.VectorRela
return self.setWords(node, `periodValue` + " " + units)
def marine_abbreviateText(self, fcst):
#convert to upper case and add a space at the beginning to create
#a word boundary on the first word (space is removed at end of method).
fcst = " " + string.upper(fcst)
#add a space at the beginning to create a word boundary on the first word
#(space is removed at end of method).
fcst = " " + fcst
fcst = re.sub(r'\n', r' ',fcst)
fcst = re.sub(r'(\W)NORTH(\W)', r'\1N\2',fcst)
fcst = re.sub(r'(\W)SOUTH(\W)', r'\1S\2',fcst)
fcst = re.sub(r'(\W)EAST(\W)', r'\1E\2',fcst)
fcst = re.sub(r'(\W)WEST(\W)', r'\1W\2',fcst)
fcst = re.sub(r'(\W)NORTHEAST(\W)', r'\1NE\2',fcst)
fcst = re.sub(r'(\W)SOUTHEAST(\W)', r'\1SE\2',fcst)
fcst = re.sub(r'(\W)SOUTHWEST(\W)', r'\1SW\2',fcst)
fcst = re.sub(r'(\W)NORTHWEST(\W)', r'\1NW\2',fcst)
fcst = re.sub(r'(\W)KNOTS?(\W)', r'\1KT\2',fcst)
## fcst = re.sub(r'(\W)FOOT(\W)', r'\1FT\2',fcst)
fcst = re.sub(r'(\W)FEET(\W)', r'\1FT\2',fcst)
fcst = re.sub(r'(\W)POSITION(\W)', r'\1PSN\2',fcst)
fcst = re.sub(r'(\W)VISIBILITY(\W)', r'\1VSBY\2',fcst)
fcst = re.sub(r'(\W)THUNDERSTORM', r'\1TSTM',fcst)
fcst = re.sub(r'(\W)AVERAGE(\W)', r'\1AVG\2',fcst)
fcst = re.sub(r'(\W)NAUTICAL MILES?(\W)', r'\1NM\2',fcst)
fcst = re.sub(r'(\W)ATLANTIC(\W)', r'\1ATLC\2',fcst)
fcst = re.sub(r'(\W)FATHOMS?(\W)', r'\1FM\2',fcst)
fcst = re.sub(r'(\W)LONGITUDE(\W)', r'\1LONG\2',fcst)
fcst = re.sub(r'(\W)PACIFIC(\W)', r'\1PAC\2',fcst)
fcst = re.sub(r'(\W)DEGREES?(\W)', r'\1DEG\2',fcst)
fcst = re.sub(r'(\W)MILLIBARS?(\W)', r'\1MB\2',fcst)
fcst = re.sub(r'(\W)PRESSURE(\W)', r'\1PRES\2',fcst)
fcst = re.sub(r'(\W)SUNDAY(\W)', r'\1SUN\2',fcst)
fcst = re.sub(r'(\W)MONDAY(\W)', r'\1MON\2',fcst)
fcst = re.sub(r'(\W)TUESDAY(\W)', r'\1TUE\2',fcst)
fcst = re.sub(r'(\W)WEDNESDAY(\W)', r'\1WED\2',fcst)
fcst = re.sub(r'(\W)THURSDAY(\W)', r'\1THU\2',fcst)
fcst = re.sub(r'(\W)FRIDAY(\W)', r'\1FRI\2',fcst)
fcst = re.sub(r'(\W)SATURDAY(\W)', r'\1SAT\2',fcst)
fcst = re.sub(r'(?i)(\W)NORTH(\W)', r'\1N\2',fcst)
fcst = re.sub(r'(?i)(\W)SOUTH(\W)', r'\1S\2',fcst)
fcst = re.sub(r'(?i)(\W)EAST(\W)', r'\1E\2',fcst)
fcst = re.sub(r'(?i)(\W)WEST(\W)', r'\1W\2',fcst)
fcst = re.sub(r'(?i)(\W)NORTHEAST(\W)', r'\1NE\2',fcst)
fcst = re.sub(r'(?i)(\W)SOUTHEAST(\W)', r'\1SE\2',fcst)
fcst = re.sub(r'(?i)(\W)SOUTHWEST(\W)', r'\1SW\2',fcst)
fcst = re.sub(r'(?i)(\W)NORTHWEST(\W)', r'\1NW\2',fcst)
fcst = re.sub(r'(?i)(\W)KNOTS?(\W)', r'\1KT\2',fcst)
## fcst = re.sub(r'(?i)(\W)FOOT(\W)', r'\1FT\2',fcst)
fcst = re.sub(r'(?i)(\W)FEET(\W)', r'\1FT\2',fcst)
fcst = re.sub(r'(?i)(\W)POSITION(\W)', r'\1PSN\2',fcst)
fcst = re.sub(r'(?i)(\W)VISIBILITY(\W)', r'\1VSBY\2',fcst)
fcst = re.sub(r'(?i)(\W)THUNDERSTORM', r'\1TSTM',fcst)
fcst = re.sub(r'(?i)(\W)AVERAGE(\W)', r'\1AVG\2',fcst)
fcst = re.sub(r'(?i)(\W)NAUTICAL MILES?(\W)', r'\1NM\2',fcst)
fcst = re.sub(r'(?i)(\W)ATLANTIC(\W)', r'\1ATLC\2',fcst)
fcst = re.sub(r'(?i)(\W)FATHOMS?(\W)', r'\1FM\2',fcst)
fcst = re.sub(r'(?i)(\W)LONGITUDE(\W)', r'\1LONG\2',fcst)
fcst = re.sub(r'(?i)(\W)PACIFIC(\W)', r'\1PAC\2',fcst)
fcst = re.sub(r'(?i)(\W)DEGREES?(\W)', r'\1DEG\2',fcst)
fcst = re.sub(r'(?i)(\W)MILLIBARS?(\W)', r'\1MB\2',fcst)
fcst = re.sub(r'(?i)(\W)PRESSURE(\W)', r'\1PRES\2',fcst)
fcst = re.sub(r'(?i)(\W)SUNDAY(\W)', r'\1SUN\2',fcst)
fcst = re.sub(r'(?i)(\W)MONDAY(\W)', r'\1MON\2',fcst)
fcst = re.sub(r'(?i)(\W)TUESDAY(\W)', r'\1TUE\2',fcst)
fcst = re.sub(r'(?i)(\W)WEDNESDAY(\W)', r'\1WED\2',fcst)
fcst = re.sub(r'(?i)(\W)THURSDAY(\W)', r'\1THU\2',fcst)
fcst = re.sub(r'(?i)(\W)FRIDAY(\W)', r'\1FRI\2',fcst)
fcst = re.sub(r'(?i)(\W)SATURDAY(\W)', r'\1SAT\2',fcst)
fcst = re.sub(r'^ ', r'',fcst)
return fcst

View file

@ -41,11 +41,11 @@ class TextProduct(AreaFcst.TextProduct):
#Definition["outputFile"] = "/awips/GFESuite/products/TEXT/ZFP.txt"
# Header configuration items
#Definition["productName"] = "ZONE FORECAST PRODUCT" # name of product
#Definition["productName"] = "Zone Forecast Product" # name of product
#Definition["fullStationID"] = "Kxxx" # full station identifier (4letter)
#Definition["wmoID"] = "FOUS45" # WMO ID
#Definition["pil"] = "ZFPxxx" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "stateName" # Name of state, such as "Georgia"
#Definition["wfoCity"] = "WfoCity" # Location of WFO - city name
#Definition["wfoState"] = "WfoState" # Location of WFO - state name
@ -318,33 +318,33 @@ class TextProduct(AreaFcst.TextProduct):
return [
("Morning", self.DAY(), self.NIGHT(), self.NIGHT(),
".TODAY...", "early in the morning", "late in the afternoon",
".Today...", "early in the morning", "late in the afternoon",
1, seriesDefAM),
("Morning with Pre-1st Period", self.DAY()-2, self.NIGHT(), self.NIGHT(),
".TODAY...", "early in the morning", "late in the afternoon",
".Today...", "early in the morning", "late in the afternoon",
1, seriesDefAM),
("Morning Update", "issuanceHour", self.NIGHT(), self.NIGHT(),
".REST OF TODAY...", "early in the morning", "late in the afternoon",
".Rest of today...", "early in the morning", "late in the afternoon",
1, seriesDefAM),
("Afternoon Update", "issuanceHour", self.NIGHT(), self.NIGHT(),
".REST OF TODAY...", "early in the morning","late in the afternoon",
".Rest of today...", "early in the morning","late in the afternoon",
1, seriesDefAM),
# End times are tomorrow:
("Afternoon", self.NIGHT(), 24 + self.DAY(), 24 + self.DAY(),
".TONIGHT...", "late in the night", "early in the evening",
".Tonight...", "late in the night", "early in the evening",
1, seriesDefPM),
("Afternoon with Pre-1st Period", self.NIGHT()-2, 24 + self.DAY(), 24 + self.DAY(),
".TONIGHT...", "late in the night", "early in the evening",
".Tonight...", "late in the night", "early in the evening",
1, seriesDefPM),
("Evening Update", "issuanceHour", 24 + self.DAY(), 24 + self.DAY(),
".REST OF TONIGHT...", "early in the morning","early in the evening",
".Rest of tonight...", "early in the morning","early in the evening",
1, seriesDefPM),
# For the early morning update, this produces:
# REST OF TONIGHT:
# MONDAY
# MONDAY NIGHT
("Early Morning Update", "issuanceHour", self.DAY(), self.DAY(),
".REST OF TONIGHT...", "early in the morning","late in the afternoon",
".Rest of tonight...", "early in the morning","late in the afternoon",
0, seriesDefPM),
# Alternative
# For the early morning update, this produces:
@ -352,10 +352,10 @@ class TextProduct(AreaFcst.TextProduct):
# TODAY
# TONIGHT
#("Evening Update", "issuanceHour", 24 + self.DAY(), 24 + self.DAY(),
# ".REST OF TONIGHT...", "late in the night", "early in the evening",
# ".Rest of tonight...", "late in the night", "early in the evening",
# 1, seriesDefPM),
#("Early Morning Update", "issuanceHour", self.DAY(), self.DAY(),
# ".EARLY THIS MORNING...", "early in the morning", "late in the afternoon",
# ".Early this morning...", "early in the morning", "late in the afternoon",
# 1, seriesDefPM),
]
@ -550,7 +550,7 @@ class TextProduct(AreaFcst.TextProduct):
def first_null_phrase_dict(self, tree, node):
# Phrase to use if values THROUGHOUT the period or
# in the first period are Null (i.e. below threshold OR NoWx)
# E.g. LIGHT WINDS. or LIGHT WINDS BECOMING N 5 MPH.
# E.g. light winds. or light winds becoming N 5 MPH.
dict = TextRules.TextRules.first_null_phrase_dict(self, tree, node)
#dict["Wind"] = "light winds"
#dict["Wind"] = ""
@ -559,7 +559,7 @@ class TextProduct(AreaFcst.TextProduct):
def null_phrase_dict(self, tree, node):
# Phrase to use for null values in subPhrases other than the first
# Can be an empty string
# E.g. "NORTH WINDS 20 to 25 KNOTS BECOMING LIGHT"
# E.g. "north winds 20 to 25 Knots becoming light"
dict = TextRules.TextRules.null_phrase_dict(self, tree, node)
#dict["Wind"] = "light"
#dict["Wind"] = ""
@ -570,7 +570,7 @@ class TextProduct(AreaFcst.TextProduct):
def untilPhrasing_flag_dict(self, tree, node):
# If set to 1, "until" time descriptor phrasing will be used.
# E.g. "NORTH WINDS 20 MPH UNTIL 10 AM...THEN 35 MPH"
# E.g. "north winds 20 MPH until 10 AM...then 35 MPH"
return {
"otherwise": 0,
#"Wind" : 1,
@ -578,7 +578,7 @@ class TextProduct(AreaFcst.TextProduct):
def onTheFly_untilPhrasing_flag_dict(self, tree, node):
# If set to 1, "until" time descriptor phrasing will be used.
# E.g. "NORTH WINDS 20 MPH UNTIL 10 AM...THEN 35 MPH"
# E.g. "north winds 20 MPH until 10 AM...then 35 MPH"
return {
"otherwise": 0,
#"Wind" : 1,
@ -586,8 +586,8 @@ class TextProduct(AreaFcst.TextProduct):
def untilPhrasing_format_dict(self, tree, node):
# Format for "until" time descriptors.
# If "military": UNTIL 1000
# If "standard": UNTIL 10 AM
# If "military": until 1000
# If "standard": until 10 AM
return {
"otherwise": "military",
#"Wind": "standard",

View file

@ -54,7 +54,7 @@ Definition = {}
### SAF settings of baseline options: ###
#Definition['displayName'] = "SAF"
Definition["productName"] = "ZONE FORECAST PRODUCT" # name of product
Definition["productName"] = "Zone Forecast Prodact" # name of product
Definition["outputFile"] = "{prddir}/TEXT/SAF.txt"
Definition["extendedLabel"] = 1 # To include extended label
Definition["includeEveningPeriod"] = 0 # To turn off evening period
@ -302,7 +302,7 @@ class SAF_Overrides:
# Get Synopsis from previous forecast
#productID = "PDXCWFPQR"
#synopsis = self.getPreviousProduct(productID, "SYNOPSIS")
#SynopsisHeading = ".SYNOPSIS FOR SOUTHERN WASHINGTON AND NORTHERN OREGON COAST..."
#SynopsisHeading = ".Synopsis for southern Washington and northern Oregon Coast..."
#synopsis = re.sub(r'\n', r' ', synopsis)
#synopsis = self.endline(synopsis, linelength=self._lineLength)
#fcst = fcst + "-\n" + SynopsisHeading + "\n" + synopsis + "\n$$\n\n"
@ -311,9 +311,9 @@ class SAF_Overrides:
def _preProcessArea(self, fcst, editArea, areaLabel, argDict):
self.debug_print("")
# This is the header for an edit area combination
#ERH fcst=fcst+"$$\nNOW FOR THE OFFICIAL NATIONAL "
fcst=fcst+"NOW FOR THE OFFICIAL NATIONAL "
fcst=fcst+"WEATHER SERVICE FORECAST\nFOR "+areaLabel+"\n\n"
#ERH fcst=fcst+"$$\nNow for the official National "
fcst=fcst+"Now for the official National "
fcst=fcst+"Weather Service forecast\nfor "+areaLabel+"\n\n"
if self.allowedHazards() != []:
self._hazards = argDict['hazards']
self._combinations = argDict["combinations"]
@ -336,13 +336,13 @@ class SAF_Overrides:
self.debug_print("")
if self._repeat1stPeriod == 1:
# Clean up the area label to avoid possibly
# repeat "FORECAST FOR"
# repeat "forecast for"
e=re.compile('.*forecast for',re.IGNORECASE)
intro = "AGAIN, THE FORECAST FOR " + \
intro = "again, the forecast for " + \
e.sub("",areaLabel).strip()
# Now strip off any punctuation on the area label
# and add the period label, ie, today, tonight
intro=intro.rstrip(",.") + " FOR " + \
intro=intro.rstrip(",.") + " for " + \
self._1stPeriodLabel + ", "
# Wrap it up!
text = self.endline(intro + self._1stPeriodFcst)
@ -391,7 +391,7 @@ class SAF_Overrides:
return finalFcst
def setLabel(self, tree, component):
exLabel= "\n\nAND NOW THE EXTENDED FORECAST FOR THE RADIO LISTENING AREA.\n"
exLabel= "\n\nand now the extended forecast for the radio listening area.\n"
component.set("words", exLabel)
return self.DONE()
@ -725,8 +725,8 @@ class SAF_Overrides:
# Strip off any leading dots...
self._1stPeriodLabel = self._1stPeriodLabel.lstrip(".")
if self._1stPeriodLabel[0:4] == "REST":
self._1stPeriodLabel = "THE " + self._1stPeriodLabel
if self._1stPeriodLabel[0:4] == "rest":
self._1stPeriodLabel = "The " + self._1stPeriodLabel
#Now strip off any trailing punctuation on the label
self._1stPeriodLabel = self._1stPeriodLabel.rstrip(",.")
self._1stPeriodFcst = fcst
@ -826,14 +826,14 @@ class SAF_Overrides:
0, narrativeDefPM),
# Alternative
# For the early morning update, this produces:
# EARLY THIS MORNING:
# Early this morning:
# Today
# Tonight
#("Evening Update", "issuanceHour", 24 + self.DAY(), 24 + self.DAY(),
# ".Rest of Tonight...", "late in the night", "early in the evening",
# 1, narrativeDefPM),
#("Early Morning Update", "issuanceHour", self.DAY(), self.DAY(),
# ".EARLY THIS MORNING...", "early in the morning", "late in the afternoon",
# ".Early this morning...", "early in the morning", "late in the afternoon",
# 1, narrativeDefPM),
]

View file

@ -2718,7 +2718,7 @@ class ScalarPhrases(PhraseBuilder.PhraseBuilder):
if minRH == None or rh < minRH:
minRH = rh
if minRH is not None and minRH <= self.rh_threshold(tree, node):
words = "MINIMUM RH " + `int(minRH)` + " PERCENT"
words = "minimum RH " + `int(minRH)` + " percent"
return self.setWords(node, words)
# MultipleElementTable calls

View file

@ -27,6 +27,13 @@
#
# Author: hansen
# ----------------------------------------------------------------------------
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 01/22/2015 4027 randerso Changed lowerCase default to True
#
##
import string
@ -402,7 +409,7 @@ class StringUtils:
try:
lowerCase = self._lowerCase
except:
lowerCase = 0
lowerCase = True
if not lowerCase:
text = text.upper() # convert to upper case
return text
@ -413,7 +420,7 @@ class StringUtils:
try:
lowerCase = self._lowerCase
except:
lowerCase = 0
lowerCase = True
if lowerCase:
words = text.split()
new = []

View file

@ -43,43 +43,43 @@
AreaDictionary = {
'FLZ039': {'fullStateName': 'FLORIDA',
'partOfState': 'NORTHERN',
'FLZ039': {'fullStateName': 'Florida',
'partOfState': 'northern',
'stateAbbr': 'FL',
'ugcCityString': '...CEDAR KEY...HUDSON BEACH...MCKETHAN PINE ISLAND PARK',
'ugcCityString': '...Cedar Key...Hudson Beach...McKethan Pine Island Park',
'ugcCode': 'FLZ039',
'ugcName': 'Levy',
'ugcTimeZone': 'EST5EDT',
'landSeaArea': 'SRF_850',
'marineArea': 'GMZ850',
'surfAreas': [
('NorthCoast1', 'SURF ALONG NORTH FACING REEFS.............'),
('SouthCoast', 'SURF ALONG SOUTH FACING REEFS.............')
('NorthCoast1', 'Surf along north facing reefs.............'),
('SouthCoast', 'Surf along south facing reefs.............')
],
'uviCity': "TAMPA", # City for which UVI should be listed
'uviCity': "Tampa", # City for which UVI should be listed
'tideTables': ["Cedar Key", "Venice Inlet"],
},
'FLZ042': {'fullStateName': 'FLORIDA',
'partOfState': 'WEST CENTRAL',
'FLZ042': {'fullStateName': 'Florida',
'partOfState': 'west central',
'stateAbbr': 'FL',
'ugcCityString': '',
'ugcCode': 'FLZ042',
'ugcName': 'Citrus',
'ugcTimeZone': 'EST5EDT',
'surfAreas': [
('NorthCoast2', 'SURF ALONG NORTH FACING REEFS.............'),
('SouthCoast', 'SURF ALONG SOUTH FACING REEFS.............')
('NorthCoast2', 'Surf along north facing reefs.............'),
('SouthCoast', 'Surf along south facing reefs.............')
],
},
'FLZ048': {'fullStateName': 'FLORIDA',
'partOfState': 'WEST CENTRAL',
'FLZ048': {'fullStateName': 'Florida',
'partOfState': 'west central',
'stateAbbr': 'FL',
'ugcCityString': '',
'ugcCode': 'FLZ048',
'ugcName': 'Hernando',
'ugcTimeZone': 'EST5EDT'},
'FLZ049': {'fullStateName': 'FLORIDA',
'partOfState': 'WEST CENTRAL',
'FLZ049': {'fullStateName': 'Florida',
'partOfState': 'west central',
'stateAbbr': 'FL',
'ugcCityString': "",
'ugcCode': 'FLZ049',
@ -88,35 +88,35 @@ AreaDictionary = {
#############
'FLZ050': {'fullStateName': 'FLORIDA',
'partOfState': 'WEST CENTRAL',
'FLZ050': {'fullStateName': 'Florida',
'partOfState': 'west central',
'stateAbbr': 'FL',
'ugcCityString': '...BRADENTON BEACH...CLEARWATER BEACH...SIESTA KEY...SAINT PETE BEACH...VENICE BEACH',
'ugcCityString': '...Bradenton Beach...Clearwater Beach...Siesta Key...Saint pete Beach...Venice Beach',
'ugcCode': 'FLZ050',
'ugcName': 'Pinellas',
'ugcTimeZone': 'EST5EDT',
'landSeaArea': 'SRF_853',
'marineArea': 'GMZ853',
'surfAreas': [],
'uviCity': "TAMPA",
'uviCity': "Tampa",
'tideTables': ["Saint Petersburg", "Fort Myers"],
},
'FLZ051': {'fullStateName': 'FLORIDA',
'partOfState': 'WEST CENTRAL',
'FLZ051': {'fullStateName': 'Florida',
'partOfState': 'west central',
'stateAbbr': 'FL',
'ugcCityString': '',
'ugcCode': 'FLZ051',
'ugcName': 'Hillsborough',
'ugcTimeZone': 'EST5EDT'},
'FLZ055': {'fullStateName': 'FLORIDA',
'partOfState': 'WEST CENTRAL',
'FLZ055': {'fullStateName': 'Florida',
'partOfState': 'west central',
'stateAbbr': 'FL',
'ugcCityString': '',
'ugcCode': 'FLZ055',
'ugcName': 'Manatee',
'ugcTimeZone': 'EST5EDT'},
'FLZ060': {'fullStateName': 'FLORIDA',
'partOfState': 'WEST CENTRAL',
'FLZ060': {'fullStateName': 'Florida',
'partOfState': 'west central',
'stateAbbr': 'FL',
'ugcCityString': '',
'ugcCode': 'FLZ060',
@ -125,23 +125,23 @@ AreaDictionary = {
###################
'FLZ062': {'fullStateName': 'FLORIDA',
'partOfState': 'SOUTHWEST',
'FLZ062': {'fullStateName': 'Florida',
'partOfState': 'Southwest',
'stateAbbr': 'FL',
'ugcCityString': '...BOCA GRANDE...ENGLEWOOD',
'ugcCityString': '...Boca Grande...Englewood',
'ugcCode': 'FLZ062',
'ugcName': 'Charlotte',
'ugcTimeZone': 'EST5EDT',
'landSeaArea': 'SRF_856',
'marineArea': 'GMZ856',
'surfAreas': [],
'uviCity': "TAMPA",
'uviCity': "Tampa",
'tideTables': ["Venice Inlet"],
},
'FLZ065': {'fullStateName': 'FLORIDA',
'partOfState': 'SOUTHWEST',
'FLZ065': {'fullStateName': 'Florida',
'partOfState': 'Southwest',
'stateAbbr': 'FL',
'ugcCityString': '...FORT MYERS BEACH...SANIBEL ISLAND',
'ugcCityString': '...Fort Myers Beach...Sanibel Island',
'ugcCode': 'FLZ065',
'ugcName': 'Lee',
'ugcTimeZone': 'EST5EDT',

View file

@ -27,6 +27,13 @@
#
# Author: hansen
# ----------------------------------------------------------------------------
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 01/22/2015 4027 randerso Removed upper casing of weather and discrete phrases
#
##
import TextUtils
from WxMethods import *
@ -650,7 +657,7 @@ class TableBuilder(TextUtils.TextUtils):
value = string.replace(value, " ", "|")
value = string.replace(value, "thunderstorm","thunder|storm")
#print "returning", value
return string.upper(value)
return value
def long_weather_phrase(self, element, stats):
# Stats from SampleAnalysis method: weather_percentages
@ -686,7 +693,7 @@ class TableBuilder(TextUtils.TextUtils):
if words == "":
words = "None"
return words.upper()
return words
def discrete_value(self, element, stats):
" Return string of hazards"
@ -709,7 +716,7 @@ class TableBuilder(TextUtils.TextUtils):
"Hazards" + "_SFC", str)
value = value + discreteWords + " "
#print "returning", value
return value.upper()
return value
def long_discrete_phrase(self, element, stats):
# Stats from SampleAnalysis method: discrete_percentages
@ -741,7 +748,7 @@ class TableBuilder(TextUtils.TextUtils):
if words == "":
words = "None"
return words.upper()
return words
def cloudCover(self, element, stats):
# Return a text cloud cover given Sky average value
@ -757,15 +764,15 @@ class TableBuilder(TextUtils.TextUtils):
tr = TimeRange.TimeRange(period.startTime() + shift, period.endTime() + shift)
dayNight = self.getPeriod(tr)
if dayNight == self.NIGHTTIME():
valStr = "CLEAR"
valStr = "Clear"
else:
valStr = "SUNNY"
valStr = "Sunny"
elif value < 55:
valStr = "PARTLY|CLOUDY"
valStr = "Partly|Cloudy"
elif value < 85:
valStr = "MOSTLY|CLOUDY"
valStr = "Mostly|Cloudy"
else:
valStr = "CLOUDY"
valStr = "Cloudy"
return valStr

View file

@ -42,7 +42,7 @@ class TimeDescriptor(TimeRangeUtils.TimeRangeUtils, Interfaces.Interfaces):
TimeRangeUtils.TimeRangeUtils.__init__(self)
## def getHolidayLabel(self, tr):
## return "HOLIDAY"
## return "holiday"
def getCurrentTime(self, argDict=None, format="%I%M %p %Z %a %b %d %Y",
shiftToLocal=1, upperCase=0, stripLeading=1):
@ -215,7 +215,7 @@ class TimeDescriptor(TimeRangeUtils.TimeRangeUtils, Interfaces.Interfaces):
label = labels["Tomorrow"]
try:
if self._productIssuance == "Next Day":
label = "TONIGHT"
label = "Tonight"
except:
pass
return pre + label + post
@ -401,14 +401,14 @@ class TimeDescriptor(TimeRangeUtils.TimeRangeUtils, Interfaces.Interfaces):
4 : "FRI",
5 : "SAT"
},
"Now": "NOW",
"Today":"TODAY",
"Tonight": "TONIGHT",
"Rest of Today":"REST OF TODAY",
"Rest of Tonight": "REST OF TONIGHT",
"Night": "NIGHT",
"Evening": "EVENING",
"Afternoon": "THIS AFTERNOON",
"Now": "Now",
"Today":"Today",
"Tonight": "Tonight",
"Rest of Today":"Rest of today",
"Rest of Tonight": "Rest of tonight",
"Night": "Night",
"Evening": "Evening",
"Afternoon": "This afternoon",
},
"Combo": {
"PrePunctuation": ".",

View file

@ -122,17 +122,17 @@ LanguageTables = {
('swell', 'houle'),
('waves', 'mer'),
('less than', 'de moins de'),
('sky/weather...', 'CIEL/METEO.......'),
('sky/weather...', 'ciel/meteo.......'),
('lal...........', 'LAL..............'),
('temperature...', 'TEMPERATURE......'),
('humidity......', 'HUMIDITE.........'),
('wind - 20 ft..', 'VENT - 20 PIEDS..'),
('valleys...', 'VALLEES...'),
('ridges....', 'ARETES....'),
('haines index..', 'INDICE HAINES....'),
('smoke dispersal', 'DISPERSION DE FUMEE'),
('mixing height...', 'HAUTEUR DE MELANGE..'),
('transport wind..', 'VENT DE TRANSPORTATION..'),
('temperature...', 'temperature......'),
('humidity......', 'humidite.........'),
('wind - 20 ft..', 'vent - 20 pieds..'),
('valleys...', 'vallees...'),
('ridges....', 'aretes....'),
('haines index..', 'indice haines....'),
('smoke dispersal', 'dispersion de fumee'),
('mixing height...', 'hauteur de melange..'),
('transport wind..', 'vent de transportation..'),
('visibility','visibilite'),
('frequent lightning','foudre frequente'),
('gusty winds','vents brisques'),
@ -310,17 +310,17 @@ LanguageTables = {
(' at ', ' en '),
(' with ',' con '),
('mixed with', 'con'),
('sky/weather...', 'CIELO/TIEMPO.....'),
('sky/weather...', 'cielo/tiempo.....'),
('lal...........', 'NAE..............'),
('temperature...', 'TEMPERATURA......'),
('humidity......', 'HUMEDAD........'),
('wind - 20 ft..', 'VIENTO - 20 FT..'),
('valleys...', 'VALLES...'),
('ridges....', 'CRESTAS....'),
('haines index..', 'INDICE DE HAINES....'),
('smoke dispersal', 'DISPERSION DE HUMO'),
('mixing height...', 'ALTURA DE MEZCLA..'),
('transport wind..', 'VIENTO TRANSPORTADOR..'),
('temperature...', 'temperatura......'),
('humidity......', 'humedad........'),
('wind - 20 ft..', 'viento - 20 ft..'),
('valleys...', 'valles...'),
('ridges....', 'vrestas....'),
('haines index..', 'indice de haines....'),
('smoke dispersal', 'dispersion de humo'),
('mixing height...', 'altura de mezcla..'),
('transport wind..', 'viento transportador..'),
('visibility','visibilidad'),
('frequent lightning','rayos frequentes'),
('gusty winds','rachas de viento'),
@ -328,20 +328,20 @@ LanguageTables = {
('damaging winds','vientos perjudiciales'),
('small hail','granizo pequeno'),
('large hail','granizo grande'),
('sunday night','domingo por la noche'),
('monday night','lunes por la noche'),
('tuesday night','martes por la noche'),
('wednesday night','miercoles por la noche'),
('thursday night','jueves por la noche'),
('friday night','viernes por la noche'),
('saturday night','sabado por la noche'),
('sunday','domingo'),
('monday','lunes'),
('tuesday','martes'),
('wednesday','miercoles'),
('thursday','jueves'),
('friday','viernes'),
('saturday','sabado'),
('Sunday night','Domingo por la noche'),
('Monday night','Lunes por la noche'),
('Tuesday night','Martes por la noche'),
('Wednesday night','Miercoles por la noche'),
('Thursday night','Jueves por la noche'),
('Friday night','Viernes por la noche'),
('Saturday night','Sabado por la noche'),
('Sunday','Domingo'),
('Monday','Lunes'),
('Tuesday','Martes'),
('Wednesday','Miercoles'),
('Thursday','Jueves'),
('Friday','Viernes'),
('Saturday','Sabado'),
('tonight','esta noche'),
('today','hoy'),
('scattered thunderstorms','tormentas dispersas'),
@ -415,7 +415,7 @@ ValueDictTable = [
("Marine", "Marine", "Marine", "Marino"),
("Language", "Language", "Langue", "Lenguaje"),
("Audio", "Audio", "Audio", "Audio"),
("Click", "CLICK", "CLIQUER", "HAGA CLIC"),
("Click", "Click", "Cliquer", "Haga Clic"),
("ClickText", "on a location OR Select:",
"sur une location ou Choisir",
"en una localidad o Seleccionela"),
@ -442,16 +442,16 @@ Expression = [
('Friday',"Vendredi","Viernes"),
('Saturday',"Samedi","Sabado"),
('Sunday',"Dimanche","Domingo"),
("TONIGHT", "CE SOIR", "ESTA NOCHE"),
('TODAY', "AUJOURD'HUI", "HOY"),
('NIGHT', "SOIR", "NOCHE"),
('MONDAY',"LUNDI","LUNES"),
('TUESDAY',"MARDI", "MARTES"),
('WEDNESDAY',"MERCREDI", "MIERCOLES"),
('THURSDAY',"JEUDI","JUEVES"),
('FRIDAY',"VENDREDI","VIERNES"),
('SATURDAY',"SAMEDI","SABADO"),
('SUNDAY',"DIMANCHE","DOMINGO"),
("Tonight", "Ce soir", "Esta noche"),
('Today', "Aujourd'Hui", "HOY"),
('Night', "Soir", "Noche"),
('Monday',"Lundi","Lunes"),
('Tuesday',"Mardi", "Martes"),
('Wednesday',"Mercredi", "Miercoles"),
('Thursday',"Jeudi","Jueves"),
('Friday',"Vendredi","Viernes"),
('Saturday',"Samedi","Sabado"),
('Sunday',"Dimanche","Domingo"),
('Jan', "Jan", "Erno"),
('Feb', "Fev", "Febrero"),
('Mar', "Mar", "Marzo"),

View file

@ -71,6 +71,7 @@ import com.raytheon.uf.edex.database.tasks.SqlQueryTask;
* and textUtilities dirs.
* Oct 20, 2014 #3685 randerso Added code to generate SiteCFG.py from GIS database
* Cleaned up how protected file updates are returned
* Jan 23, 2015 #4027 randerso Fixed python include path
*
* </pre>
*
@ -264,7 +265,7 @@ public class Configurator {
String filePath = pathMgr.getFile(edexCx,
"textproducts" + File.separator + "Generator.py").getPath();
String commonPython = GfePyIncludeUtil.getCommonPythonIncludePath();
String commonPython = GfePyIncludeUtil.getCommonGfeIncludePath();
Map<String, Object> argList = new HashMap<String, Object>();
argList.put("siteId", siteID);

View file

@ -1,19 +1,19 @@
##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
##

View file

@ -37,6 +37,7 @@
# Oct 20, 2014 #3685 randerso Changed how SiteInfo is loaded.
# Fixed logging to log to a file
# Cleaned up how protected file updates are returned
# Jan 23, 2015 #4027 randerso Cleaned up import of SiteInfo
#
# @author: jelkins
#
@ -109,17 +110,7 @@ ProcessDirectories = [
},
]
# This will "load" SiteInfo in a more complicated way
# than 'from SiteCFG import SiteInfo'.
from LockingFile import File
pathManager = PathManagerFactory.getPathManager()
lf = pathManager.getStaticLocalizationFile(LocalizationType.COMMON_STATIC, "python/gfe/SiteCFG.py")
with File(lf.getFile(), lf.getName(), 'r') as file:
fileContents = file.read()
exec fileContents
from SiteCFG import SiteInfo
class Generator():
"""Generates site specific text products from base template files.

View file

@ -62,7 +62,7 @@
# "COZ035_pt". If no such edit area exists, the system will simply
# use the original edit area.
# Note that Hazards will always be generated for the entire edit area.
# productName defines name of product e.g. "ZONE FORECAST PRODUCT"
# productName defines name of product e.g. "Zone Forecast Product"
# fullStationID full station identifier (4letter, KSLC)
#
# wmoID WMO ID for product header, such as FOUS45
@ -203,7 +203,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"outputFile": "{prddir}/TEXT/AFD_<MultiPil>.txt",
"debug": 0,
"productName": "AREA FORECAST DISCUSSION",
"productName": "Area Forecast Discussion",
"fullStationID" : "<fullStationID>", # 4 letter station ID
"wmoID" : "<wmoID>", # WMO code
"wfoCityState" : "<wfoCityState>", # Location of WFO
@ -496,7 +496,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
####################################################################
def _getPreviousAFD(self, fcst, argDict, divider=0):
# Initialize strings and lists:
WWABlockString = "." + self._wfoSiteID + " WATCHES/W"
WWABlockString = "." + self._wfoSiteID + " Watches/W"
newAFD = []
# Retrieve the previous AFD and store the list in AFD_old:
@ -561,12 +561,12 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
issuance_dateTime = ""
# Loop through the list to find the issuance time string.
for index in xrange(start_index, end_index-1):
if prevAFD[index][:8] == "NATIONAL": # next line has date time stamp
if prevAFD[index][:8] == "National": # next line has date time stamp
issuance_dateTime = str(prevAFD[index+1])
break
# Build issuance_DateTime string:
# Strip off trailing newline...
issuance_dateTime = " /ISSUED " + issuance_dateTime[:-1] + "/ \n"
issuance_dateTime = " /issued " + issuance_dateTime[:-1] + "/ \n"
# Eliminate double whitespace characters if present:
issuance_dateTime = re.sub(r" ", r" ", issuance_dateTime) # PATCH 12/7/04 bc
fcst = fcst + self._getTopicDivider("PrevDisc") + issuance_dateTime + "\n" # PATCH 12/7/04 bc
@ -631,7 +631,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
s = self._pil + "\n\n" + \
productName + "\n" + \
"NATIONAL WEATHER SERVICE " + \
"National Weather Service " + \
self._wfoCityState +"\n" + \
issuedByString + \
self._timeLabel + "\n\n"
@ -688,13 +688,13 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
return {} #use the two-letter ids for the marine areas
# if you want descriptive names for the marine areas
#return {'AM': 'ATLANTIC COASTAL WATERS', 'GM': 'GULF OF MEXICO',
# 'LE': 'LAKE ERIE', 'LO': 'LAKE ONTARIO', 'LH': 'LAKE HURON',
# 'LC': 'LAKE ST CLAIR', 'LM': 'LAKE MICHIGAN', 'LS': 'LAKE SUPERIOR',
# 'PZ': 'PACIFIC COASTAL WATERS', 'PK': 'ALASKAN COASTAL WATERS',
# 'PH': 'HAWAIIAN COASTAL WATERS', 'PM': 'MARIANAS WATERS',
# 'AN': 'ATLANTIC COASTAL WATERS',
# 'PS': 'AMERICAN SAMOA COASTAL WATERS', 'SL': 'ST LAWRENCE RIVER'}
#return {'AM': 'Atlantic coastal Waters', 'GM': 'Gulf of Mexico',
# 'LE': 'Lake Erie', 'LO': 'Lake Ontario', 'LH': 'Lake Huron',
# 'LC': 'Lake St Clair', 'LM': 'Lake Michigan', 'LS': 'Lake Superior',
# 'PZ': 'Pacific coastal waters', 'PK': 'Alaskan coastal waters',
# 'PH': 'Hawaiian coastal waters', 'PM': 'Marianas waters',
# 'AN': 'Atlantic coastal waters',
# 'PS': 'American Samoa coastal waters', 'SL': 'St Lawrence River'}
####################################################################
# _makeHazardBlock:
@ -704,7 +704,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def _makeHazardBlock(self, fcst, argDict):
fcst = fcst + "." + self._wfoSiteID + \
" WATCHES/WARNINGS/ADVISORIES...\n"
" Watches/Warnings/Advisories...\n"
accessor = ModuleAccessor.ModuleAccessor()
areaDict = accessor.variable(self._areaDictionary, "AreaDictionary")

View file

@ -42,12 +42,12 @@
#
# You must set the following:
#
# productName defines name of product e.g. "ZONE FORECAST PRODUCT"
# productName defines name of product e.g. "Zone Forecast Product"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "SFTBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState City,state that the WFO is located in, such as "BUFFALO NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState City,state that the WFO is located in, such as "Buffalo NY"
#
# Optional Configuration Items
#
@ -250,11 +250,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"editAreaSuffix": None,
# product identifiers
"productName": "ZONE FORECAST PRODUCT", # product name
"productName": "Zone Forecast Product", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "<state>", # Name of state, such as "GEORGIA" -- optional
"areaName": "<state>", # Name of state, such as "Georgia" -- optional
"wfoCityState": "<wfoCityState>", # Location of WFO - city,state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
@ -1174,7 +1174,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
# The following lines insert a statement
@ -1352,21 +1352,21 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
1, narrativeDefPM),
# For the early morning update, this produces:
# Rest of Tonight:
# MONDAY
# MONDAY NIGHT
# Monday
# Monday night
("Early Morning Update", "issuanceHour", self.DAY(), 4,
".Rest of Tonight...", "early in the morning","late in the afternoon",
0, narrativeDefPM),
# Alternative
# For the early morning update, this produces:
# EARLY THIS MORNING:
# Early this morning:
# Today
# Tonight
#("Evening Update", "issuanceHour", 24 + self.DAY(), 4,
# ".Rest of Tonight...", "late in the night", "early in the evening",
# 1, narrativeDefPM),
#("Early Morning Update", "issuanceHour", self.DAY(), 4,
# ".EARLY THIS MORNING...", "early in the morning", "late in the afternoon",
# ".Early this morning...", "early in the morning", "late in the afternoon",
# 1, narrativeDefPM),
]
@ -1413,7 +1413,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
return fcst
def _temp_pop_statement_header(self, argDict):
return "SPOT TEMPERATURES AND PROBABILITIES OF MEASURABLE PRECIPITATION\nARE FOR "
return "Spot temperatures and probabilities of measurable precipitation\nare for "
# Western Region offices insert a special statement
# at the top of the ZFP if there are any active flood watches or
@ -1431,9 +1431,9 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
return fcst
def _flood_statement_wording(self, argDict):
return "...FLOOD WATCHES AND/OR WARNINGS HAVE BEEN ISSUED FOR PORTIONS OF\n" \
+ "THE ZONE FORECAST AREA. PLEASE REFER TO THE LATEST FLOOD BULLETIN\n" \
+ "FOR DETAILS...\n\n"
return "...Flood watches and/or warnings have been issued for portions of\n" \
+ "the zone forecast area. Please refer to the latest flood bulletin\n" \
+ "for details...\n\n"
# Returns a list of the Hazards allowed for this product in VTEC format.
# These are sorted in priority order - most important first.

View file

@ -37,12 +37,12 @@
# displayName If not None, defines how product appears in GFE GUI
# defaultEditAreas defines edit areas, default is Combinations
#
# productName defines name of product e.g. "COASTAL WATERS FORECAST"
# productName defines name of product e.g. "Coastal Waters Forecast"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "CWFBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState WFO location, such as "BUFFALO NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState WFO location, such as "Buffalo NY"
#
# Optional Configuration Items
#
@ -210,11 +210,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"defaultEditAreas" : "Combinations_CWF_<site>_<MultiPil>",
"editAreaSuffix": None,
# product identifiers
"productName": "COASTAL WATERS FORECAST", # product name
"productName": "Coastal Waters Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "<state>", # Name of state, such as "GEORGIA" -- optional
"areaName": "<state>", # Name of state, such as "Georgia" -- optional
"wfoCityState": "<wfoCityState>", # Location of WFO - city,state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
@ -606,7 +606,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"phraseList":[],
}
def setLabel(self, tree, component):
component.set("words", "\n.EXTENDED FORECAST...\n")
component.set("words", "\n.Extended forecast...\n")
return self.DONE()
def CWFExtended(self):
@ -814,7 +814,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
fcst = fcst + self._Text1()
try:
@ -951,9 +951,9 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
return [
("Morning", self.DAY(), self.NIGHT(), "issuanceHour + 13",
".TODAY...", "early", "late", 1, narrativeDefAM),
".Today...", "early", "late", 1, narrativeDefAM),
("Morning with Pre-1st Period", "issuanceHour", self.NIGHT(),
"issuanceHour + 13", ".TODAY...", "early", "late", 1,
"issuanceHour + 13", ".Today...", "early", "late", 1,
narrativeDefAM),
("Morning Update", "issuanceHour", self.NIGHT(),
"issuanceHour + 13", ".Rest of Today...", "early in the morning",
@ -983,10 +983,10 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
# TODAY
# TONIGHT
#("Evening Update", "issuanceHour", 24 + self.DAY(), "issuanceHour + 13",
# ".REST OF TONIGHT...", "late in the night", "early in the evening",
# ".Rest of tonight...", "late in the night", "early in the evening",
# 1, narrativeDefPM),
#("Early Morning Update", "issuanceHour", self.DAY(), "issuanceHour + 13",
# ".EARLY THIS MORNING...", "early in the morning", "late in the afternoon",
# ".Early this morning...", "early in the morning", "late in the afternoon",
# 1, narrativeDefPM),
]

View file

@ -37,12 +37,12 @@
#
# displayName If not None, defines how product appears in GFE GUI
# defaultEditAreas defines edit areas, default is Combinations
# productName defines name of product e.g. "COASTAL WATERS FORECAST"
# productName defines name of product e.g. "Coastal Waters Forecast"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "CWFBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState City,state that the WFO is located in, such as "BUFFALO, NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState City,state that the WFO is located in, such as "Buffalo, NY"
#
# Optional Configuration Items
#
@ -217,11 +217,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"defaultEditAreas" : "Combinations_CWF_<site>_<MultiPil>",
"editAreaSuffix": None,
# product identifiers
"productName": "COASTAL WATERS FORECAST", # product name
"productName": "Coastal Waters Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "<state>", # Name of state, such as "GEORGIA" -- optional
"areaName": "<state>", # Name of state, such as "Georgia" -- optional
"wfoCityState": "<wfoCityState>", # Location of WFO - city state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
@ -391,19 +391,19 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def inlandWatersWave_element(self, tree, node):
# Weather element first and second choice to use for reporting inland waters waves
# "WAVES 1 TO 2 FEET."
# "Waves 1 to 2 feet."
# If there is incomplete or no data for the first element, the second will be used.
return ("WindWaveHgt", "WaveHeight")
def seasWaveHeight_element(self, tree, node):
# Weather element to use for reporting seas
# "COMBINED SEAS 10 TO 15 FEET."
# "Combined seas 10 to 15 feet."
# IF above wind or swell thresholds
return "WaveHeight"
def seasWindWave_element(self, tree, node):
# Weather element to use for reporting seas waves
# "WIND WAVES 3 TO 4 FEET."
# "Wind waves 3 to 4 feet."
# IF above wind or swell thresholds
return "WindWaveHgt"
@ -430,9 +430,9 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def marine_wind_combining_flag(self, tree, node):
# If 1, Wind combining will reflect the
# crossing of significant thresholds such as gales.
# E.g. "NORTH HURRICANE FORCE WINDS TO 100 KNOTS." instead of
# "NORTH HURRICANE FORCE WINDS TO 100 KNOTS EASING TO
# TO 80 KNOTS IN THE AFTERNOON."
# E.g. "North hurricane force winds to 100 knots." instead of
# "North hurricane force winds to 100 knots easing to
# to 80 knots in the afternoon."
return 0
def phrase_descriptor_dict(self, tree, node):
@ -811,12 +811,12 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
## # expirationHour -- hour when the product expires (in local time)
## # This is relitive to midnight local time of the
## # current day.
## # period1 Label -- the label for the first period. e.g. ".TODAY...", ".REST OF TODAY..."
## # period1 Label -- the label for the first period. e.g. ".Today...", ".Rest of today..."
## # period1 lateNight phrase -- phrase to use if the hours of 3am to 6am must be qualified
## # e.g. "Partly cloudy in the early morning."
## # period1 lateDay phrase -- phrase to use if the hours of 3pm to 6pm must be qualified
## # e.g. "Partly cloudy in the early evening."
## # todayFlag -- if 1, "TODAY" and "Tonight" phrasing will be used in subsequent periods,
## # todayFlag -- if 1, "Today" and "Tonight" phrasing will be used in subsequent periods,
## # otherwise, weekday wording will apply.
## # narrative definition -- component and time period pairs
@ -867,9 +867,9 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
return [
("Morning", self.DAY(), self.NIGHT(), "issuanceHour + 13",
".TODAY...", "early", "late", 1, narrativeDefAM),
".Today...", "early", "late", 1, narrativeDefAM),
("Morning with Pre-1st Period", "issuanceHour", self.NIGHT(),
"issuanceHour + 13", ".TODAY...", "early", "late", 1,
"issuanceHour + 13", ".Today...", "early", "late", 1,
narrativeDefAM),
("Morning Update", "issuanceHour", self.NIGHT(),
"issuanceHour + 13", ".Rest of Today...", "early in the morning",
@ -899,10 +899,10 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
# TODAY
# TONIGHT
#("Evening Update", "issuanceHour", 24 + self.DAY(), "issuanceHour + 13",
# ".REST OF TONIGHT...", "late in the night", "early in the evening",
# ".Rest of tonight...", "late in the night", "early in the evening",
# 1, narrativeDefPM),
#("Early Morning Update", "issuanceHour", self.DAY(), "issuanceHour + 13",
# ".EARLY THIS MORNING...", "early in the morning", "late in the afternoon",
# ".Early this morning...", "early in the morning", "late in the afternoon",
# 1, narrativeDefPM),
]
@ -988,7 +988,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"phraseList":[],
}
def setLabel(self, tree, component):
component.set("words", "\n.EXTENDED FORECAST...\n")
component.set("words", "\n.Extended forecast...\n")
return self.DONE()
def generateForecast(self, argDict):
@ -1116,7 +1116,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
fcst = fcst + self._Text1()
try:

View file

@ -78,7 +78,7 @@ class TextProduct(GenericReport.TextProduct):
"defaultEditAreas" : "Combinations_ADR_<site>",
# product identifiers
"productName": "ADMINISTRATIVE MESSAGE", # product name
"productName": "Administrative Message", # product name
"fullStationID" : "<fullStationID>", # 4 letter station ID
"wmoID" : "<wmoID>", # WMO code
"wfoCityState" : "<wfoCityState>", # Location of WFO
@ -93,7 +93,7 @@ class TextProduct(GenericReport.TextProduct):
"language": "english",
"lineLength": 66, #Maximum line length
"includeCities" : 0, # Cities included in area header
"cityDescriptor" : "INCLUDING THE CITIES OF",
"cityDescriptor" : "Including the cities of",
"includeZoneNames" : 0, # Zone names will be included in the area header
"includeIssueTime" : 0, # This should be set to zero
"singleComboOnly" : 1, # Used for non-segmented products
@ -142,7 +142,7 @@ class TextProduct(GenericReport.TextProduct):
#
try:
if self._eas == "NONE":
if self._eas == "None":
self._eas = ""
else:
self._eas = self._eas + "\n"
@ -158,14 +158,14 @@ class TextProduct(GenericReport.TextProduct):
productName = self.checkTestMode(argDict, self._productName)
fcst = fcst + self._eas + productName + "\n" +\
source +\
"RELAYED BY NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"Relayed by National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
return fcst
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "...ADMINISTRATIVE MESSAGE...\n\n"
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "...Administrative Message...\n\n"
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
if self._callToAction:
fcst = self._makeCallToAction(fcst, editArea, areaLabel, argDict)
@ -175,9 +175,9 @@ class TextProduct(GenericReport.TextProduct):
def _makeCallToAction(self, fcst, editArea, areaLabel, argDict):
ctaBodyPhrase = ""
if self._callToAction:
ctaBodyPhrase = "\n\nPRECAUTIONARY/PREPAREDNESS ACTIONS...\n\n" + \
ctaBodyPhrase = "\n\nPrecautionary/preparedness actions...\n\n" + \
ctaBodyPhrase + \
"|* CALL TO ACTION GOES HERE *|\n\n" + \
"|* Call to action goes here *|\n\n" + \
"\n\n&&\n\n"
fcst = fcst + ctaBodyPhrase
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_ADR_<site>"
Definition["productName"] = "ADMINISTRATIVE MESSAGE" # product name
Definition["productName"] = "Administrative Message" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,8 +54,8 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_AVA_<site>"
Definition["productName"] = "AVALANCHE WATCH" # product name
Definition["productName"] = "Avalanche Watch" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,8 +54,8 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_AVW_<site>"
Definition["productName"] = "AVALANCHE WARNING" # product name
Definition["productName"] = "Avalanche Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_CAE_<site>"
Definition["productName"] = "CHILD ABDUCTION EMERGENCY" # product name
Definition["productName"] = "Child Abduction Emergency" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_CDW_<site>"
Definition["productName"] = "CIVIL DANGER WARNING" # product name
Definition["productName"] = "Civil Danger Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_CEM_<site>"
Definition["productName"] = "CIVIL EMERGENCY MESSAGE" # product name
Definition["productName"] = "Civil Emergency Message" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -53,7 +53,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_EQR_<site>"
Definition["productName"] = "EARTHQUAKE REPORT" # product name
Definition["productName"] = "Earthquake Report" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -62,22 +62,22 @@ class TextProduct(CivilEmerg.TextProduct):
Definition["mapNameForCombinations"] = "Zones_<site>"
VariableList = [
(("Issuance Type", "issuanceType") , "PRELIMINARY", "radio",
["PRELIMINARY", "UPDATE"]),
(("Official Earthquake Info Source:", "eqInfo") , "GOLDEN", "radio",
["GOLDEN", "WC/ATWC", "PTWC"]),
(("Felt:", "felt") , "WEAKLY", "radio",
["WEAKLY", "MODERATELY", "STRONGLY", "VERY STRONGLY"]),
(("How Many Reports:", "extent") , "A SINGLE PERSON", "radio",
["A SINGLE PERSON", "A FEW PEOPLE", "MANY PEOPLE", "NUMEROUS PERSONS"]),
(("Damage", "damage") , "NO", "radio",
["NO", "SLIGHT", "MODERATE", "CONSIDERABLE", "EXTENSIVE"]),
(("Damage Type", "damageType") , ["NO DAMAGE"], "check",
["NO DAMAGE", "OBJECTS FALLING FROM SHELVES", "DISHES RATTLED OR BROKEN",
"CRACKED CHIMNEYS", "COMMUNICATIONS TOWERS FALLEN",
"COLLAPSED BRIDGES", "COLLAPSED OVERPASSES", "TRAIN RAILS BENT",
"FISSURES HAVE OPENED IN THE GROUND", "GAS MAINS BROKEN",
"COMPLETE DESTRUCTION OF STRUCTURES", "SOME CASUALTIES"]),
(("Issuance Type", "issuanceType") , "Preliminary", "radio",
["Preliminary", "Update"]),
(("Official Earthquake Info Source:", "eqInfo") , "Golden", "radio",
["Golden", "WC/ATWC", "PTWC"]),
(("Felt:", "felt") , "Weakly", "radio",
["Weakly", "Moderately", "Strongly", "Very strongly"]),
(("How Many Reports:", "extent") , "A single person", "radio",
["A single person", "A few people", "Many people", "Numerous persons"]),
(("Damage", "damage") , "No", "radio",
["No", "Slight", "Moderate", "Considerable", "Extensive"]),
(("Damage Type", "damageType") , ["No damage"], "check",
["No damage", "Objects falling from shelves", "Dishes rattled or broken",
"Cracked chimneys", "Communications towers fallen",
"Collapsed bridges", "Collapsed overpasses", "Train rails bent",
"Fissures have opened in the ground", "Gas mains broken",
"Complete destruction of structures", "Some casualties"]),
]
def __init__(self):
@ -90,32 +90,32 @@ class TextProduct(CivilEmerg.TextProduct):
label, variable = key
exec "self._" + variable + "= varDict[key]"
fcst = fcst + "AN EARTHQUAKE HAS BEEN FELT " + self._felt + " BY " +\
fcst = fcst + "An earthquake has been felt " + self._felt + " BY " +\
self._extent + " " + "IN THE |*enter area*| AREA. " + \
self._damage + " DAMAGE HAS BEEN REPORTED. "
self._damage + " damage has been reported. "
if self._damage != "NO":
fcst = fcst + " DAMAGE REPORTS SO FAR..."
if self._damage != "No":
fcst = fcst + " Damage reports so far..."
for each in self._damageType:
if each != "NO DAMAGE":
if each != "No damage":
fcst = fcst + each + "..."
fcst = string.rstrip(fcst, ".")
fcst = fcst + "."
fcst = fcst + "\n\n"
if self._eqInfo == "GOLDEN":
eqOffice = "NATIONAL EARTHQUAKE INFORMATION CENTER IN GOLDEN COLORADO"
elif self._eqInfo == "WC/ATWC":
eqOffice = "WEST COAST/ALASKA TSUNAMI WARNING CENTER"
if self._eqInfo == "Golden":
eqOffice = "National Earthquake Information Center in Golden Colorado"
elif self._eqInfo == "Wc/atwc":
eqOffice = "West Coast/Alaska Tsunami Warning Center"
else:
eqOffice = "PACIFIC TSUNAMI WARNING CENTER"
eqOffice = "Pacific Tsunami Warning Center"
if self._issuanceType == "PRELIMINARY":
fcst = fcst + "INFORMATION RELEASED IN THIS STATEMENT IS PRELIMINARY. UPDATES...INCLUDING RICHTER SCALE MAGNITUDE...WILL BE PROVIDED AS MORE INFORMATION BECOMES AVAILABLE FROM THE " + eqOffice + "."
if self._issuanceType == "Preliminary":
fcst = fcst + "Information released in this statement is preliminary. Updates...including Richter scale magnitude...will be provided as more information becomes available from the " + eqOffice + "."
else:
fcst = fcst + "THE " + eqOffice + " HAS INDICATED THAT AN EARTHQUAKE MAGNITUDE *MAG* ON THE RICHTER SCALE WAS CENTERED AT *LAT*/*LON* OR ABOUT *MILES* *DIRECTION* OF *CITY*...*STATE*.\n\nANY FURTHER INFORMATION WILL BE MADE AVAILABLE WHEN IT IS RECEIVED FROM THE " + eqOffice + "."
fcst = fcst + "The " + eqOffice + " has indicated that an earthquake magnitude *mag* on the Richter scale was centered at *lat*/*lon* or about *miles* *direction* of *city*...*state*.\n\nAny further information will be made available when it is received from the " + eqOffice + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_EQW_<site>"
Definition["productName"] = "EARTHQUAKE WARNING" # product name
Definition["productName"] = "Earthquake Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_EVI_<site>"
Definition["productName"] = "EVACUATION IMMEDIATE" # product name
Definition["productName"] = "Evacuation Immediate" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -55,6 +55,6 @@ class TextProduct(CivilEmerg.TextProduct):
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_FRW_<site>"
Definition["productName"] = "FIRE WARNING" # product name
Definition["productName"] = "Fire Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_HMW_<site>"
Definition["productName"] = "HAZARDOUS MATERIAL WARNING" # product name
Definition["productName"] = "Hazardous Material Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,8 +54,8 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_LAE_<site>"
Definition["productName"] = "LOCAL AREA EMERGENCY" # product name
Definition["productName"] = "Local Area Emergency" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_LEW_<site>"
Definition["productName"] = "LAW ENFORCEMENT WARNING" # product name
Definition["productName"] = "Law Enforcement Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -55,7 +55,7 @@ class TextProduct(CivilEmerg.TextProduct):
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_NUW_<site>"
Definition["productName"] = "NUCLEAR POWER PLANT WARNING" # product name
Definition["productName"] = "Nuclear Power Plant Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_RHW_<site>"
Definition["productName"] = "RADIOLOGICAL HAZARD WARNING" # product name
Definition["productName"] = "Radiological Hazard Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_SPW_<site>"
Definition["productName"] = "SHELTER IN PLACE WARNING" # product name
Definition["productName"] = "Shelter in Place Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_TOE_<site>"
Definition["productName"] = "911 TELEPHONE OUTAGE EMERGENCY" # product name
Definition["productName"] = "911 Telephone Outage Emergency" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -55,7 +55,7 @@ class TextProduct(CivilEmerg.TextProduct):
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -44,7 +44,7 @@ class TextProduct(CivilEmerg.TextProduct):
## Edit Areas: Create Combinations file with edit area combinations.
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["defaultEditAreas"] = "Combinations_VOW_<site>"
Definition["productName"] = "VOLCANO WARNING" # product name
Definition["productName"] = "Volcano Warning" # product name
Definition["wmoID"] = "<wmoID>" # WMO code
Definition["pil"] = "<pil>" # product pil
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(CivilEmerg.TextProduct):
CivilEmerg.TextProduct.__init__(self)
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "THE FOLLOWING MESSAGE IS TRANSMITTED" + \
" AT THE REQUEST OF THE " + self._source + "."
fcst = fcst + "The following message is transmitted" + \
" at the request of the " + self._source + "."
return fcst

View file

@ -63,7 +63,7 @@ class TextProduct(GenericReport.TextProduct):
"showZoneCombiner" : 1,
# product identifiers
"productName": "HYDROLOGIC OUTLOOK", # product name
"productName": "Hydrologic Outlook", # product name
"fullStationID" : "<fullStationID>", # 4 letter station ID
"wmoID" : "<wmoID>", # WMO code
"wfoCityState" : "<wfoCityState>", # Location of WFO
@ -78,7 +78,7 @@ class TextProduct(GenericReport.TextProduct):
"language": "english",
"lineLength": 66, #Maximum line length
"includeCities" : 0, # Cities included in area header
"cityDescriptor" : "INCLUDING THE CITIES OF",
"cityDescriptor" : "Including the cities of",
"includeZoneNames" : 0, # Zone names will be included in the area header
"includeIssueTime" : 0, # This should be set to zero
"singleComboOnly" : 1, # Used for non-segmented products
@ -129,14 +129,14 @@ class TextProduct(GenericReport.TextProduct):
issuedByString = self.getIssuedByString()
productName = self.checkTestMode(argDict, self._productName)
s = productName + "\n" + \
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
fcst = fcst + s.upper()
return fcst
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "|* ...HEADLINE CONCERNING HYDROLOGIC CONDITIONS *|\n\n"
fcst = fcst + "|* INSERT FORECAST AND NARRATIVE HYDROLOGIC INFORMATION HERE *|"
fcst = fcst + "|* ...Headline concerning hydrologic conditions *|\n\n"
fcst = fcst + "|* Insert forecast and narrative hydrologic information here *|"
return fcst

View file

@ -37,12 +37,12 @@
# displayName If not None, defines how product appears in GFE GUI
# defaultEditAreas defines edit areas, default is Combinations
#
# productName defines name of product e.g. "ZONE FORECAST PRODUCT"
# productName defines name of product e.g. "Zone Forecast Product"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "SFTBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState WFO location, such as "BUFFALO NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState WFO location, such as "Buffalo NY"
#
# Optional Configuration Items
# editAreaSuffix default None. Allows for generating the body of the product for
@ -86,8 +86,8 @@
# extendedLabel If extendedLabel== 1, a label will be included for each
# individual extended
# lightningPhrases Set this to 1 if you want Lightning Activity
# reported with phrases like "1-8 STRIKES",
# "9-15 STRIKES", etc.
# reported with phrases like "1-8 strikes",
# "9-15 strikes", etc.
# windAdjustmentFactor Winds are reported from the Wind20ft grid
# if available. Otherwise, the Wind grid is
# used with the magnitude multiplied
@ -259,11 +259,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"editAreaSuffix": None,
# product identifiers
"productName": "FIRE WEATHER PLANNING FORECAST", # product name
"productName": "Fire Weather Planning Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "<state>", # Name of state, such as "GEORGIA" -- optional
"areaName": "<state>", # Name of state, such as "Georgia" -- optional
"wfoCityState": "<wfoCityState>", # Location of WFO - city state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
@ -426,7 +426,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def untilPhrasing_flag_dict(self, tree, node):
# If set to 1, "until" time descriptor phrasing will be used.
# E.g. "NORTH WINDS 20 MPH UNTIL 10 AM...THEN 35 MPH"
# E.g. "North winds 20 MPH until 10 AM...then 35 MPH"
#
# NOTE: Be sure to increase the temporal resolution by
# overriding "getFirePeriod_analysisList" from the FWF standard file.
@ -674,7 +674,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"phraseList":[],
}
def setLabel(self, tree, component):
component.set("words", "\n.FORECAST DAYS 3 THROUGH 7......\n")
component.set("words", "\n.Forecast days 3 through 7......\n")
return self.DONE()
def FireExtendedShortTerm(self):
@ -862,7 +862,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
# Put in a place holder for the headlines to be substituted in
@ -870,7 +870,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + "<HEADLINES>"
self._prodHeadlines = []
fcst = fcst + ".DISCUSSION..." + "\n\n\n\n\n"
fcst = fcst + ".Discussion..." + "\n\n\n\n\n"
return fcst
def _preProcessArea(self, fcst, editArea, areaLabel, argDict):
@ -909,12 +909,12 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def _postProcessProduct(self, fcst, argDict):
# Add one extended
if self._summaryExtended == 1:
fcst = fcst + "\n.FORECAST DAYS 3 THROUGH 7...\n\n"
fcst = fcst + "\n.Forecast days 3 through 7...\n\n"
extended = self.generateProduct("ExtendedNarrative",
argDict, area=self._summaryArea,
timeRange=self._extendedRange)
fcst = fcst + extended
fcst = fcst + "\n.OUTLOOK\n\n\n$$\n"
fcst = fcst + "\n.Outlook\n\n\n$$\n"
# Make summary headline string and substitute for "<HEADLINE>" placeholder
headlineStr = ""
@ -999,7 +999,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
# ".Rest of Tonight...", "late in the night", "early in the evening",
# 1, narrativeDefPM),
#("Early Morning Update", "issuanceHour", self.DAY(), 4,
# ".EARLY THIS MORNING...", "early in the morning", "late in the afternoon",
# ".Early this morning...", "early in the morning", "late in the afternoon",
# 1, narrativeDefPM),
]

View file

@ -37,12 +37,12 @@
# displayName If not None, defines how product appears in GFE GUI
# defaultEditAreas defines edit areas, default is Combinations
#
# productName defines name of product e.g. "FIRE WEATHER TABLE"
# productName defines name of product e.g. "Fire Weather Table"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "FWFBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState WFO location, such as "BUFFALO NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState WFO location, such as "Buffalo NY"
#
# Optional Configuration Items
# editAreaSuffix default None. Allows for generating the body of the product for
@ -94,8 +94,8 @@
# night periods.
# mixHgtMethod Can be "Max" or "Avg" for mixHgt analysis method
# lightningPhrases Set this to 1 if you want Lightning Activity
# reported with phrases like "1-8 STRIKES",
# "9-15 STRIKES", etc.
# reported with phrases like "1-8 strikes",
# "9-15 strikes", etc.
# windAdjustmentFactor Winds are reported from the Wind20ft grid
# if available. Otherwise, the Wind grid is used
# with the magnitude multiplied by this wind
@ -214,11 +214,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"defaultEditAreas" : "Combinations_FWFTable_<site>_<MultiPil>",
# product identifiers
"productName": "FIRE WEATHER PLANNING FORECAST", # product name
"productName": "Fire Weather Planning Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "<state>", # Name of state, such as "GEORGIA" -- optional
"areaName": "<state>", # Name of state, such as "Georgia" -- optional
"wfoCityState": "<wfoCityState>", # Location of WFO - city state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
@ -251,7 +251,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"mixingParmsDayAndNight": 0,
"mixHgtMethod": "Max", # Can be Max of Avg
# Set the following variable to 1 if you want Lightning Activity
# reported with phrases like "1-8 STRIKES", "9-15 STRIKES", etc.
# reported with phrases like "1-8 strikes", "9-15 strikes", etc.
"lightningPhrases": 0,
# Winds are reported from the Wind20ft grid if available.
# Otherwise, the Wind grid is used with the magnitude multiplied
@ -638,7 +638,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weahter Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
# Put in a place holder for the headlines to be substituted in
@ -646,7 +646,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + "<HEADLINES>"
self._prodHeadlines = []
fcst = fcst + ".DISCUSSION..." + "\n\n\n\n\n"
fcst = fcst + ".Discussion..." + "\n\n\n\n\n"
return fcst
def _preProcessArea(self, fcst, editArea, areaLabel, argDict):
@ -701,12 +701,12 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
for label, method in self._rowList():
fcst = method(fcst, label, statList, priorStatDict)
fcst = fcst + "\n"
fcst = fcst + "REMARKS...NONE.\n\n"
fcst = fcst + "Remarks...None.\n\n"
# Produce Individual Extended Forecast
if self._individualExtended == 1:
if self._extendedLabel == 1:
fcst = fcst + ".FORECAST FOR DAYS 3 THROUGH 7...\n\n"
fcst = fcst + ".Forecast for days 3 through 7...\n\n"
extended = self.generateProduct("ExtendedNarrative", argDict,
area = editArea, timeRange=self._extendedRange)
fcst = fcst + extended
@ -973,14 +973,14 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def _postProcessProduct(self, fcst, argDict):
if self._summaryExtended == 1:
fcst = fcst + "\n.FORECAST FOR DAYS 3 THROUGH 7...\n\n"
fcst = fcst + "\n.Forecast for days 3 through 7...\n\n"
extended = self.generateProduct("ExtendedNarrative",
argDict, area=self._summaryArea,
timeRange=self._extendedRange)
fcst = fcst + extended
if self._includeOutlooks:
fcst = fcst + "\n.OUTLOOK 6 TO 10 DAYS... \n\n.OUTLOOK 8 TO 14 DAYS...\n\n\n"
fcst = fcst + "\n.OUTLOOK\n\n"
fcst = fcst + "\n.Outlook 6 to 10 days... \n\n.Outlook 8 to 14 days...\n\n\n"
fcst = fcst + "\n.Outlook\n\n"
# Make summary headline string and substitute for "<HEADLINE>" placeholder
headlineStr = ""

View file

@ -39,13 +39,13 @@
# for all edit areas needed. Just uncomment the lines below the
# lake the formatter will be run for...and comment
# out the lines below the lakes not used.
# productName defines name of product e.g. "OPEN LAKES FORECAST"
# productName defines name of product e.g. "Open Lakes Forecast"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "GLFLS"
# areaName (opt.) Area name for product header, such as "LAKE SUPERIOR"
# wfoCityState WFO location, such as "BUFFALO NY"
# lake_name Name of lake...not including the word "LAKE" e.g "SUPERIOR"
# areaName (opt.) Area name for product header, such as "Lake Superior"
# wfoCityState WFO location, such as "Buffalo NY"
# lake_name Name of lake...not including the word "Lake" e.g "Superior"
# lakezone Zone code for the text portion of the forecast e.g. "LSZ260"
# maforzone Zone code for the mafor portion of the forecast e.g. "LSZ261"
# headerphrase Phrase for the header portion of forecast immediately above
@ -259,12 +259,12 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"defaultEditAreas" : [("west_half", "WEST HALF\n\n"),
("east_half", "EAST HALF\n\n")],
# product identifiers
"lake_name": "SUPERIOR", # use -- SUPERIOR, HURON, ERIE, ONTARIO, MICHIGAN, ST_CLAIR
"productName": "OPEN LAKES FORECAST", # product name
"lake_name": "Superior", # use -- Superior, Huron, Erie, Ontario, Michigan, St_Clair
"productName": "Open Lakes Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "STATENAME", # Name of state, such as "GEORGIA"
"areaName": "Statename", # Name of state, such as "Georgia"
"wfoCityState": "<wfoCityState>", # Location of WFO - city state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
"awipsWANPil": "<awipsWANPil>", # Product ID for transmitting to AWIPS WAN.
@ -273,7 +273,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"hazardSamplingThreshold": (10, None), #(%cov, #points)
"headerphrase": "LAKE SUPERIOR FORECAST BEYOND FIVE NAUTICAL MILES FROM SHORE", # header phrase
"headerphrase": "Lake Superior forecast beyond five nautical miles from shore", # header phrase
"lakezone": "LSZ260", # Zone code for the Lake
"maforzone": "LSZ261", # Mafor zone code
"processmafor" : 1, # process mafor data: 1=yes, 0=no
@ -425,53 +425,51 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def marine_wind_combining_flag(self, tree, node):
# If 1, Wind combining will reflect the
# crossing of significant thresholds such as gales.
# E.g. "HURRICANE FORCE WINDS TO 100 KNOTS." instead of
# "NORTH HURRICANE FORCE WINDS TO 100 KNOTS EASING TO
# HURRICANE FORCE WINDS TO 80 KNOTS IN THE AFTERNOON."
# E.g. "Hurricane forece winds to 00 knots." instead of
# "North hurricane force winds to 100 knots easing to
# hurricane force winds to 80 knots in the afternoon."
return 1
def marine_abbreviateText(self, fcst):
fcst = " " + string.upper(fcst)
fcst = " " + fcst
fcst = re.sub(r'\n', r' ',fcst)
fcst = re.sub(r'NORTH(?!WARD|ERN|WESTWARD|EASTWARD|WESTERN|EASTERN)',
r'N', fcst)
fcst = re.sub(r'SOUTH(?!WARD|ERN|WESTWARD|EASTWARD|WESTERN|EASTERN)',
r'S', fcst)
fcst = re.sub(r'EAST(?!WARD|ERN)', r'E', fcst)
fcst = re.sub(r'WEST(?!WARD|ERN)', r'W', fcst)
fcst = re.sub(r'KNOTS?', r'KT', fcst)
fcst = re.sub(r'MILLIBARS?', r'MB', fcst)
fcst = re.sub(r'FATHOMS?', r'FM', fcst)
fcst = re.sub(r'NAUTICAL MILES?', r'NM', fcst)
fcst = re.sub(r'FOOT|FEET', r'FT', fcst)
fcst = string.replace(fcst, 'POSITION', 'PSN')
fcst = string.replace(fcst, 'VISIBILITY', 'VSBY')
fcst = string.replace(fcst, 'THUNDERSTORM', 'TSTM')
fcst = string.replace(fcst, 'AVERAGE', 'AVG')
fcst = string.replace(fcst, 'ATLANTIC', 'ATLC')
fcst = string.replace(fcst, 'LONGITUDE', 'LONG')
fcst = string.replace(fcst, 'PACIFIC', 'PAC')
fcst = string.replace(fcst, 'DEGREE', 'DEG')
fcst = string.replace(fcst, 'PRESSURE', 'PRES')
fcst = string.replace(fcst, 'SUNDAY', 'SUN')
fcst = string.replace(fcst, 'MONDAY', 'MON')
fcst = string.replace(fcst, 'TUESDAY', 'TUE')
fcst = string.replace(fcst, 'WEDNESDAY', 'WED')
fcst = string.replace(fcst, 'THURSDAY', 'THU')
fcst = string.replace(fcst, 'FRIDAY', 'FRI')
fcst = string.replace(fcst, 'SATURDAY', 'SAT')
fcst = string.replace(fcst, 'W HALF', 'WEST HALF')
fcst = string.replace(fcst, 'E HALF', 'EAST HALF')
fcst = string.replace(fcst, 'N HALF', 'NORTH HALF')
fcst = string.replace(fcst, 'S HALF', 'SOUTH HALF')
fcst = string.replace(fcst, 'W THIRD', 'WEST THIRD')
fcst = string.replace(fcst, 'E THIRD', 'EAST THIRD')
fcst = string.replace(fcst, 'N THIRD', 'NORTH THIRD')
fcst = string.replace(fcst, 'S THIRD', 'SOUTH THIRD')
fcst = string.replace(fcst, 'W TWO', 'WEST TWO')
fcst = string.replace(fcst, 'E TWO', 'EAST TWO')
fcst = string.replace(fcst, 'N TWO', 'NORTH TWO')
fcst = string.replace(fcst, 'S TWO', 'SOUTH TWO')
fcst = re.sub(r'(?i)(\W)NORTH(?!WARD|ERN|WESTWARD|EASTWARD|WESTERN|EASTERN)(\W)', r'\1N\2', fcst)
fcst = re.sub(r'(?i)(\W)SOUTH(?!WARD|ERN|WESTWARD|EASTWARD|WESTERN|EASTERN)(\W)', r'\1S\2', fcst)
fcst = re.sub(r'(?i)(\W)EAST(?!WARD|ERN)(\W)', r'\1E\2', fcst)
fcst = re.sub(r'(?i)(\W)WEST(?!WARD|ERN)(\W)', r'\1W\2', fcst)
fcst = re.sub(r'(?i)(\W)KNOTS?(\W)', r'\1KT\2', fcst)
fcst = re.sub(r'(?i)(\W)MILLIBARS?(\W)', r'\1MB\2', fcst)
fcst = re.sub(r'(?i)(\W)FATHOMS?(\W)', r'\1FM\2', fcst)
fcst = re.sub(r'(?i)(\W)NAUTICAL MILES?(\W)', r'\1NM\2', fcst)
fcst = re.sub(r'(?i)(\W)FOOT|FEET(\W)', r'\1FT\2', fcst)
fcst = re.sub(r'(?i)(\W)POSITION(\W)', r'\1PSN\2', fcst)
fcst = re.sub(r'(?i)(\W)VISIBILITY(\W)', r'\1VSBY\2', fcst)
fcst = re.sub(r'(?i)(\W)THUNDERSTORM(\W)', r'\1TSTM\2', fcst)
fcst = re.sub(r'(?i)(\W)AVERAGE(\W)', r'\1AVG\2', fcst)
fcst = re.sub(r'(?i)(\W)ATLANTIC(\W)', r'\1ATLC\2', fcst)
fcst = re.sub(r'(?i)(\W)LONGITUDE(\W)', r'\1LONG\2', fcst)
fcst = re.sub(r'(?i)(\W)PACIFIC(\W)', r'\1PAC\2', fcst)
fcst = re.sub(r'(?i)(\W)DEGREE(\W)', r'\1DEG\2', fcst)
fcst = re.sub(r'(?i)(\W)PRESSURE(\W)', r'\1PRES\2', fcst)
fcst = re.sub(r'(?i)(\W)SUNDAY(\W)', r'\1SUN\2', fcst)
fcst = re.sub(r'(?i)(\W)MONDAY(\W)', r'\1MON\2', fcst)
fcst = re.sub(r'(?i)(\W)TUESDAY(\W)', r'\1TUE\2', fcst)
fcst = re.sub(r'(?i)(\W)WEDNESDAY(\W)', r'\1WED\2', fcst)
fcst = re.sub(r'(?i)(\W)THURSDAY(\W)', r'\1THU\2', fcst)
fcst = re.sub(r'(?i)(\W)FRIDAY(\W)', r'\1FRI\2', fcst)
fcst = re.sub(r'(?i)(\W)SATURDAY(\W)', r'\1SAT\2', fcst)
fcst = re.sub(r'(?i)(\W)W HALF(\W)', r'\1WEST HALF\2', fcst)
fcst = re.sub(r'(?i)(\W)E HALF(\W)', r'\1EAST HALF\2', fcst)
fcst = re.sub(r'(?i)(\W)N HALF(\W)', r'\1NORTH HALF\2', fcst)
fcst = re.sub(r'(?i)(\W)S HALF(\W)', r'\1SOUTH HALF\2', fcst)
fcst = re.sub(r'(?i)(\W)W THIRD(\W)', r'\1WEST THIRD\2', fcst)
fcst = re.sub(r'(?i)(\W)E THIRD(\W)', r'\1EAST THIRD\2', fcst)
fcst = re.sub(r'(?i)(\W)N THIRD(\W)', r'\1NORTH THIRD\2', fcst)
fcst = re.sub(r'(?i)(\W)S THIRD(\W)', r'\1SOUTH THIRD\2', fcst)
fcst = re.sub(r'(?i)(\W)W TWO(\W)', r'\1WEST TWO\2', fcst)
fcst = re.sub(r'(?i)(\W)E TWO(\W)', r'\1EAST TWO\2', fcst)
fcst = re.sub(r'(?i)(\W)N TWO(\W)', r'\1NORTH TWO\2', fcst)
fcst = re.sub(r'(?i)(\W)S TWO(\W)', r'\1SOUTH TWO\2', fcst)
fcst = re.sub(r'^ ', r'',fcst)
return fcst
@ -796,7 +794,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
self._ddhhmmTime + "\n" + self._pil + '\n' + \
self._lakezone + "-" + self._expireTimeDDHHMM + "-\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n" + \
self._headerphrase + "\n\n" + ".SYNOPSIS..." + "\n\n"
@ -855,7 +853,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def _postProcessArea(self, fcst, editArea, areaLabel, argDict):
# Adjust some phrases to local requirments
# Adjust some phrases to local requirements
# ========================================
fcst = string.replace(fcst,"WIDESPREAD RAIN", "OCCASIONAL RAIN")
fcst = string.replace(fcst,"WIDESPREAD SHOWERS", "SHOWERS")

View file

@ -38,12 +38,12 @@
#
# You must set the following:
#
# productName defines name of product e.g. "ZONE FORECAST PRODUCT"
# productName defines name of product e.g. "Zone Forecast Product"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "SFTBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState City,state that the WFO is located in, such as "BUFFALO NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState City,state that the WFO is located in, such as "Buffalo NY"
#
# Optional Configuration Items
#
@ -85,7 +85,7 @@
# expire time.
# includeCities If 1, cities will be included in the area header
# accurateCities If 1, cities are determined from grids
# citiesPhrase "INCLUDING THE CITIES OF" phrase used when including
# citiesPhrase "Including the cities of" phrase used when including
# cities
# includeZoneNames If 1, zone names will be included in the area header
# easPhrase Optional EAS phrase to be include in product header
@ -153,11 +153,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
"defaultEditAreas" : "EditAreas_PublicZones_<site>_<MultiPil>",
# product identifiers
"productName": "GENERIC HAZARD PRODUCT", # product name
"productName": "Generic Hazard Product", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "", # Name of state, such as "GEORGIA" -- optional
"areaName": "", # Name of state, such as "Georgia" -- optional
"wfoCityState": "<wfoCityState>", # Location of WFO - city,state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
@ -181,7 +181,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
"includeCities": 1 , # Cities included in area header
"accurateCities": 0, # Include all cities in area header
"cityLocation": "CityLocation", # City lat/lon dictionary to use
"cityDescriptor":"INCLUDING THE CITIES OF",
"cityDescriptor":"Including the cities of",
"includeZoneNames":1, # Zone names will be included in the area header
"easPhrase" :"", # Optional EAS phrase to be include in product header
@ -210,7 +210,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
hazardsC = argDict['hazards']
segmentList = self.organizeHazards(hazardsC.rawAnalyzedTable())
if len(segmentList) == 0:
return "NO HAZARDS TO REPORT"
return "No hazards to report"
# Determine time ranges
error = self._determineTimeRanges(argDict)
@ -286,10 +286,10 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
eas + productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
fcst = fcst + "DEFAULT OVERVIEW SECTION\n"
fcst = fcst + "Default overview section\n"
return fcst
def _preProcessArea(self, fcst, segmentAreas, expireTime, argDict):
@ -328,19 +328,19 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
# If an overview exists for this product, insert it
#
overview = self.finalOverviewText()
overviewSearch = re.compile(r'DEFAULT OVERVIEW SECTION', re.DOTALL)
overviewSearch = re.compile(r'Default overview section', re.DOTALL)
fcst = overviewSearch.sub(overview, fcst)
#
# Added to place line feeds in the CAP tags to keep separate from CTAs
fcst = string.replace(fcst, \
r"PRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.", \
r"\nPRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\n")
r"Precautionary/preparedness actions\.\.\.", \
r"\nPrecautionary/preparedness actions\.\.\.\n")
fcst = string.replace(fcst, "\n ","\n")
fcst = string.replace(fcst, "&&", "\n&&\n")
# Prevent empty Call to Action Tags
fcst = re.sub(r'\nPRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\s*&&\n', \
fcst = re.sub(r'\nPrecautionary/preparedness actions\.\.\.\s*&&\n', \
"", fcst)
fcst = self._indentBulletText(fcst)
@ -382,7 +382,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
##
## ### loop through the bullets and format the output
## for b in bList:
## bullets = bullets + "* " + b + "...|* ENTER BULLET TEXT *|\n\n"
## bullets = bullets + "* " + b + "...|* Enter bullet text *|\n\n"
## # bullets = bullets + "\n"
## return bullets
@ -505,49 +505,49 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
hazNameA = self.hazardName(eachHazard['hdln'], argDict, True)
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
# if hazName == "WINTER WEATHER ADVISORY" or hazName == "WINTER STORM WARNING":
if hazName in ["WINTER WEATHER ADVISORY", "WINTER STORM WARNING", "BEACH HAZARDS STATEMENT"]:
forPhrase = " FOR |* ENTER HAZARD TYPE *|"
# if hazName == "Winter Weather Advisory" or hazName == "Winter Storm Warning":
if hazName in ["Winter Weather Advisory", "Winter Storm Warning", "Beach Hazards Statement"]:
forPhrase = " for |* Enter hazard type *|"
else:
forPhrase =""
if nwsIntroUsed == 0:
hazardBodyPhrase = "THE NATIONAL WEATHER SERVICE IN " + self._wfoCity
hazardBodyPhrase = "The National Weather Service in " + self._wfoCity
nwsIntroUsed = 1
if phraseCount == 0:
phraseCount = 1
if eachHazard['phen'] in ['HU', 'TR', 'TY']:
hazardBodyPhrase = hazardBodyPhrase + " HAS ISSUED " + \
hazardBodyPhrase = hazardBodyPhrase + " has issued " + \
hazNameA + ". "
else:
hazardBodyPhrase = hazardBodyPhrase + " HAS ISSUED " + \
hazardBodyPhrase = hazardBodyPhrase + " has issued " + \
hazNameA + forPhrase + \
"...WHICH IS IN EFFECT" + endTimePhrase + ". "
"...which is in effect" + endTimePhrase + ". "
elif phraseCount == 1:
phraseCount = 2
if hdln != lastHdln:
if eachHazard['phen'] in ['HU', 'TR', 'TY']:
hazardBodyPhrase = hazardBodyPhrase + hazNameA + \
" HAS ALSO BEEN ISSUED."
" has also been issued."
else:
hazardBodyPhrase = hazardBodyPhrase + hazNameA + \
" HAS ALSO BEEN ISSUED. THIS " + hazName + forPhrase + \
" IS IN EFFECT" + endTimePhrase + ". "
" has also been issued. This " + hazName + forPhrase + \
" is in effect" + endTimePhrase + ". "
else:
if eachHazard['phen'] in ['HU', 'TR', 'TY']:
hazardBodyPhrase = hazardBodyPhrase + hazNameA + \
" HAS ALSO BEEN ISSUED."
" has also been issued."
else:
hazardBodyPhrase = hazardBodyPhrase + hazNameA + forPhrase + \
" HAS ALSO BEEN ISSUED" + endTimePhrase + ". "
" has also been issued" + endTimePhrase + ". "
else:
if eachHazard['phen'] in ['HU', 'TR', 'TY']:
hazardBodyPhrase = hazardBodyPhrase + "IN ADDITION..." + \
hazNameA + " HAS BEEN ISSUED."
hazardBodyPhrase = hazardBodyPhrase + "In addition..." + \
hazNameA + " has been issued."
else:
hazardBodyPhrase = hazardBodyPhrase + "IN ADDITION..." + \
hazNameA + forPhrase + " HAS BEEN ISSUED. THIS " + hazName + \
" IS IN EFFECT" + endTimePhrase + ". "
hazardBodyPhrase = hazardBodyPhrase + "In addition..." + \
hazNameA + forPhrase + " has been issued. This " + hazName + \
" is in effect" + endTimePhrase + ". "
lastHdln = hdln
#
# This is for the can hazards
@ -558,14 +558,14 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
continue #no defined headline, skip phrase
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
if nwsIntroUsed == 0:
hazardBodyPhrase = "THE NATIONAL WEATHER SERVICE IN " +\
hazardBodyPhrase = "The National Weather Service in " +\
self._wfoCity
nwsIntroUsed = 1
hazardBodyPhrase = hazardBodyPhrase + \
" HAS CANCELLED THE " + hazName + ". "
" has cancelled the " + hazName + ". "
else:
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" HAS BEEN CANCELLED. "
" has been cancelled. "
#
# This is for the exp hazards
@ -580,13 +580,13 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
if eachHazard['endTime'] <= argDict['creationTime']:
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" IS NO LONGER IN EFFECT. "
" is no longer in effect. "
else:
expTimeCurrent = argDict['creationTime']
timeWords = self.getTimingPhrase(eachHazard, expTimeCurrent)
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" WILL EXPIRE " + timeWords + ". "
" will expire " + timeWords + ". "
#
# This is for ext hazards
@ -601,7 +601,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" IS NOW IN EFFECT" + endTimePhrase + ". "
" is now in effect" + endTimePhrase + ". "
#
# This is for upgrade hazards
@ -612,7 +612,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
continue #no defined headline, skip phrase
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" IS NO LONGER IN EFFECT. "
" is no longer in effect. "
#
# This is for con hazards
@ -626,14 +626,14 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
endTimePhrase = self.hazardTimePhrases(eachHazard, argDict)
hazNameA = self.hazardName(eachHazard['hdln'], argDict, True)
hazardBodyPhrase = hazardBodyPhrase + hazNameA + \
" REMAINS IN EFFECT" + endTimePhrase + ". "
" remains in effect" + endTimePhrase + ". "
#
# This is for statement hazards
#
for eachHazard in statementList:
hazardBodyPhrase = "...|* ADD STATEMENT HEADLINE *|...\n\n"
hazardBodyPhrase = "...|* Add statement headline *|...\n\n"
#
# This adds segment text
@ -703,13 +703,13 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
print "* " + self._bulletOrder()[i] + "... found!"
segmentTextSplit = string.split(segmentText,"* " + self._bulletOrder()[i] + "...")
segmentText = string.join(segmentTextSplit,"* " + bullet + \
"...|* ENTER BULLET TEXT *|\n\n* " + self._bulletOrder()[i] + "...")
"...|* Enter bullet text *|\n\n* " + self._bulletOrder()[i] + "...")
bulletFlag = 0
if bulletFlag:
print "appending to bottom list of bullets!"
segmentTextSplit = string.split(segmentText,"PRECAUTIONARY/PREPAREDNESS ACTIONS...")
segmentTextSplit = string.split(segmentText,"Precautionary/preparedness actions...")
segmentText = "\n" + string.join(segmentTextSplit,"* " + bullet + \
"...|* ENTER BULLET TEXT *|\n\nPRECAUTIONARY/PREPAREDNESS ACTIONS...")
"...|* Enter bullet text *|\n\nPrecautionary/preparedness actions...")
bulletFlag = 0
#
# Now if there is a can/exp hazard and previous segment Text, then
@ -736,7 +736,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
print "hazardBodyText info: keepBulletList: ",keepBulletList
print "hazardBodyText info: removeBulletList: ",removeBulletList
# Finally remove the bullets no longer needed.
PRECAUTION = "PRECAUTIONARY/PREPAREDNESS ACTIONS..."
PRECAUTION = "Precautionary/preparedness actions..."
for bullet in removeBulletList:
segmentTextSplit = string.split(segmentText,"* " + bullet + "...")
print "segmentTextSplit is ", segmentTextSplit
@ -752,7 +752,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
segmentText = string.join(segmentTextSplit,"")
if keepBulletList == []:
segmentText = "\n\n|* WRAP-UP TEXT GOES HERE *|.\n"
segmentText = "\n\n|* Wrap-up text goes here *|.\n"
elif removeBulletList != []:
segmentText = "|*\n" + segmentText + "*|"
else:
@ -772,10 +772,10 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
bulletFlag = 0
if eachHazard['act'] == 'CAN':
hazardBodyPhrase = hazardBodyPhrase + \
"\n\n|* WRAP-UP TEXT GOES HERE *|.\n"
"\n\n|* Wrap-up text goes here *|.\n"
elif eachHazard['act'] == 'EXP':
hazardBodyPhrase = hazardBodyPhrase + \
"\n\n|* WRAP-UP TEXT GOES HERE *|.\n"
"\n\n|* Wrap-up text goes here *|.\n"
else:
bulletFlag = 1
## print "bulletFlag is: ",bulletFlag
@ -798,14 +798,14 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
bulletOrder.remove(bullet)
print "reordered bullets are: ", bulletOrder
for b in bulletOrder:
bullets = bullets + "* " + b + "...|* ENTER BULLET TEXT *|\n\n"
bullets = bullets + "* " + b + "...|* Enter bullet text *|\n\n"
hazardBodyPhrase = hazardBodyPhrase + "\n\n" + bullets
# If segment doesn't pass the checks, put in framing codes
else:
hazardBodyPhrase = hazardBodyPhrase + \
"\n\n|* STATEMENT TEXT GOES HERE *|.\n\n"
"\n\n|* Statement text goes here *|.\n\n"
# End code for DR 21310
@ -835,13 +835,13 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
if len(ctas) > 0:
hazardBodyPhrase = hazardBodyPhrase + \
'PRECAUTIONARY/PREPAREDNESS ACTIONS...\n\n'
'Precautionary/preparedness actions...\n\n'
for c in ctas:
hazardBodyPhrase = hazardBodyPhrase + c + '\n\n'
hazardBodyPhrase = hazardBodyPhrase + '&&\n\n'
# Make sure there is only one CAP tag pairs
hazardBodyPhrase = re.sub(r'&&\s*PRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\n', \
hazardBodyPhrase = re.sub(r'&&\s*Precautionary/preparedness actions\.\.\.\n', \
"", hazardBodyPhrase)
return hazardBodyPhrase
@ -851,13 +851,13 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
if len(self.__overviewText) == 0:
if self._includeOverviewHeadline:
overviewHeadline = "...|*OVERVIEW HEADLINE " + \
overviewHeadline = "...|*Overview headline " + \
"(must edit)*|...\n\n"
else:
overviewHeadline = ""
if self._includeOverview:
overviewBody = ".|*OVERVIEW (must edit)*|.\n\n"
overviewBody = ".|*Overview (must edit)*|.\n\n"
else:
overviewBody = ""
@ -987,7 +987,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
def decodeBulletedText(self, prevText):
# returns the bullet paragraph text or None, returns the
# regular text after the bullets. The afterText is text up to
# the next bullet or up to "THE NATIONAL WEATHER SERVICE". Note
# the next bullet or up to "The National Weather Service". Note
# that this only correctly handles the 1st set of entries in
# a segment, thus double events will only decode the first set
# of bullets and text. The multipleRecords is set to 1 in the
@ -1028,7 +1028,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis,
# beginning of any next NWS phrase.
lines = regText.split('\n')
for x in xrange(len(lines)):
if lines[x].find('THE NATIONAL WEATHER SERVICE') == 0:
if lines[x].find('The National Weather Service') == 0:
lines = lines[0:x] #eliminate following lines
break
regText = ("\n").join(lines)

View file

@ -35,12 +35,12 @@
#
# You must set the following:
#
# productName defines name of product e.g. "ZONE FORECAST PRODUCT"
# productName defines name of product e.g. "Zone Forecast Product"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "SFTBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState City,state that the WFO is located in, such as "BUFFALO NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState City,state that the WFO is located in, such as "Buffalo NY"
#
# Optional Configuration Items
#
@ -66,7 +66,7 @@
#
# defaultEditAreas Defines edit areas, default is Combinations
# includeCities If 1, cities will be included in the area header
# cityDescriptor "INCLUDING THE CITIES OF" phrase used when including
# cityDescriptor "Including the cities of" phrase used when including
# cities
# includeZoneNames If 1, zone names will be included in the area header
#
@ -135,7 +135,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
## Edit Areas: Create Combinations file with edit area combinations.
"defaultEditAreas" : "",
"includeCities": 1 , # Cities included in area header
"cityDescriptor":"INCLUDING THE CITIES OF",
"cityDescriptor":"Including the cities of",
"includeZoneNames":1, # Zone names will be included in the area header
# product identifiers
@ -261,7 +261,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
s = self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
fcst = fcst + s.upper()

View file

@ -26,7 +26,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
Definition["defaultEditAreas"] = "Combinations_HLS_<site>"
Definition["showZoneCombiner"] = 0 # 1 to cause zone combiner to display
Definition["productName"] = "LOCAL STATEMENT"
Definition["productName"] = "Local Statement"
Definition["fullStationID" ] = "<fullStationID>"
Definition["wmoID" ] = "<wmoID>"
@ -309,7 +309,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
return "" #"MFL"
def _cwa_descriptor(self):
return "" #"SOUTH FLORIDA"
return "" #"South Florida"
def _localReferencePoints(self):
# Give the name and lat/lon for each local reference point
@ -1009,7 +1009,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
return qualifier
def _coastalHazardsSection(self, productDict, productSegmentGroup, productSegment):
productDict['coastalHazardsSection'] = self._frame("ENTER HERE A STATEMENT OF ANY ADDITIONAL HAZARDS OF CONCERN ALONG THE COAST SUCH AS RIP CURRENTS, HIGH WAVES, CONCERNS FOR BEACH EROSION ETC ETC IF NOT ALREADY DONE IN THE SURGE SECTION.")
productDict['coastalHazardsSection'] = self._frame("Enter here a statement of any additional hazards of concern along the coast such as rip currents, high waves, concerns for beach erosion etc etc if not already done in the surge section.")
def _preparednessSection(self, productDict, productSegmentGroup, productSegment):
sectionDict = dict()
@ -1549,8 +1549,8 @@ class TextProduct(HLSTCV_Common.TextProduct):
def _getStormInfo(self, argDict):
# Get the Storm information
self._stormType = "TROPICAL"
self._stormName = "CYCLONE"
self._stormType = "Tropical"
self._stormName = "Cyclone"
self._stormTypeName = self._stormType + " " +self._stormName
@ -1564,7 +1564,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
# Storm intensity in mph and the stated intensity trend.
self._stormIntensityTrend = "Storm Intensity " + stormDict.get("StormIntensity","")
self.debug_print("BEGIN STORM INFORMATION", 1)
self.debug_print("Begin storm information", 1)
self.debug_print("storm dict = %s" % (stormDict), 1)
self.debug_print("storm name = %s" % (self._stormName), 1)
self.debug_print("type = %s" % (self._stormType), 1)
@ -1577,7 +1577,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
self.debug_print("references = %s" % (self._stormLocalReferences), 1)
self.debug_print("movement trend = %s" % (self._stormMovementTrend), 1)
self.debug_print("intensity trend = %s" % (self._stormIntensityTrend), 1)
self.debug_print("END STORM INFORMATION", 1)
self.debug_print("End storm information", 1)
def _grabStormInfo(self, tcp):
# Get the storm information from the selected TCP
@ -1635,7 +1635,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
if mndSearch is not None:
# Pick off the storm type and name
dict["StormType"] = "REMNANTS OF"
dict["StormType"] = "Remnants of"
dict["StormName"] = mndSearch.group(1).strip()
# end possible removal - 12/15/2010 (MHB)
@ -1679,7 +1679,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
(dict["StormTime"])
# Now add some phrasing to maintain proper grammar, if needed
if dict["StormType"] == "REMNANTS OF":
if dict["StormType"] == "Remnants of":
dict["StormCenter"] = "%s THE" % (dict["StormCenter"])
# Now add the storm type and storm name
@ -1695,9 +1695,9 @@ class TextProduct(HLSTCV_Common.TextProduct):
#----------------------------------------------------------------
# Now add the primary NHC geographic reference
# Get all the NHC references - starting with the word 'ABOUT'
# Get all the NHC references - starting with the word 'About'
# after the first one
referenceIndex = dict["StormReference"][4:].find('ABOUT')
referenceIndex = dict["StormReference"][4:].find('About')
# Assume we only have one NHC reference point by default
nhcReference = dict["StormReference"]
@ -1707,7 +1707,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
# If we have more than one NHC reference point
if referenceIndex != -1:
# Adjust this index to account for the first 'ABOUT'
# Adjust this index to account for the first 'About'
referenceIndex += 4
# Only keep the first NHC reference location
@ -1943,7 +1943,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
if coordPtnMatch.group(10) in ["W", "w"]:
self._stormLon *= -1.0
# Construct the storm location pair and remove the "LATITUDE " and "LONGITUDE " text
# Construct the storm location pair and remove the "Latitude " and "Longitude " text
self._stormLocation = (coordPtnMatch.group(1)[9:], coordPtnMatch.group(7)[10:])
# If we found the primary NHC reference we were after
@ -2000,22 +2000,22 @@ class TextProduct(HLSTCV_Common.TextProduct):
def _expandBearings(self, text):
# Convert any abbreviated bearings to full words
text = text.replace(' N ', ' NORTH ')
text = text.replace(' NNE ', ' NORTH-NORTHEAST ')
text = text.replace(' NE ', ' NORTHEAST ')
text = text.replace(' ENE ', ' EAST-NORTHEAST ')
text = text.replace(' E ', ' EAST ')
text = text.replace(' ESE ', ' EAST-SOUTHEAST ')
text = text.replace(' SE ', ' SOUTHEAST ')
text = text.replace(' SSE ', ' SOUTH-SOUTHEAST ')
text = text.replace(' S ', ' SOUTH ')
text = text.replace(' SSW ', ' SOUTH-SOUTHWEST ')
text = text.replace(' SW ', ' SOUTHWEST ')
text = text.replace(' WSW ', ' WEST-SOUTHWEST ')
text = text.replace(' W ', ' WEST ')
text = text.replace(' WNW ', ' WEST-NORTHWEST ')
text = text.replace(' NW ', ' NORTHWEST ')
text = text.replace(' NNW ', ' NORTH-NORTHWEST ')
text = text.replace(' N ', ' north ')
text = text.replace(' NNE ', ' north-northeast ')
text = text.replace(' NE ', ' northeast ')
text = text.replace(' ENE ', ' east-northeast ')
text = text.replace(' E ', ' east ')
text = text.replace(' ESE ', ' east-southeast ')
text = text.replace(' SE ', ' southeast ')
text = text.replace(' SSE ', ' south-southeast ')
text = text.replace(' S ', ' south ')
text = text.replace(' SSW ', ' south-southwest ')
text = text.replace(' SW ', ' southwest ')
text = text.replace(' WSW ', ' west-southwest ')
text = text.replace(' W ', ' west ')
text = text.replace(' WNW ', ' west-northwest ')
text = text.replace(' NW ', ' northwest ')
text = text.replace(' NNW ', ' north-northwest ')
return text
@ -2089,7 +2089,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
#distKm_str = `int((distKm/10)*10)`
direction = self._bearing(lat1, lon1, lat0, lon0)
direction = self._dirInEnglish(direction)
localRef ="ABOUT "+distMph_str+" MILES "+direction
localRef ="About "+distMph_str+" miles "+direction
self.debug_print("localRef = %s" % (localRef), 1)
return localRef

View file

@ -55,11 +55,11 @@ class TextProduct(GenericHazards.TextProduct):
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items
Definition["productName"] = "AIR QUALITY ALERT" # name of product
Definition["productName"] = "Air Quality Alert" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -74,7 +74,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["purgeTime"] = 24 # Maximum hours for expireTime from issueTime
Definition["includeCities"] = 1 # Cities included in area header
Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
#Definition["easPhrase"] = "" # Optional EAS phrase to be include in product header
Definition["lineLength"] = 69
@ -112,7 +112,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["alertCodes"] = ["Orange", "Red", "Purple"]
Definition["alertCTAsDict"] = {
"Orange": "Members of sensitive groups may experience health effects. The general public is not likely to be affected.",
"Red" : "Everyone may experience health effects. Members of sensitive groups may experience more serious health effects.",
"Red" : "Everyone may experience health effects. Members of sensitive groups May experience more serious health effects.",
"Purple" : "Health alert: everyone may experience serious health effects.",
}
@ -162,7 +162,7 @@ class TextProduct(GenericHazards.TextProduct):
# Placeholder for Agency Names to be filled in in _postProcessProduct
#fcst = fcst + "@AGENCYNAMES" + "\n"
s = "RELAYED BY NATIONAL WEATHER SERVICE " + self._wfoCityState + "\n" +\
s = "Relayed by National Weather Service " + self._wfoCityState + "\n" +\
issuedByString + self._timeLabel + "\n\n"
fcst = fcst + s.upper()
@ -178,12 +178,12 @@ class TextProduct(GenericHazards.TextProduct):
# Each can be one of these phraseTypes:
# "EXPLICIT" will return words such as "5 PM"
# "FUZZY4" will return words such as "THIS EVENING"
# "DAY_NIGHT_ONLY" use only weekday or weekday "NIGHT" e.g.
# "SUNDAY" or "SUNDAY NIGHT" or "TODAY" or "TONIGHT"
# "DAY_NIGHT_ONLY" use only weekday or weekday "Night" e.g.
# "Sunday" or "Sunday night" or "Today" or "Tonight"
# Note: You will probably want to set both the
# startPhraseType and endPhraseType to DAY_NIGHT_ONLY to
# have this work correctly.
# "NONE" will result in no words
# "None" will result in no words
# OR a method which takes arguments:
# issueTime, eventTime, timeZone, and timeType
# and returns:
@ -243,7 +243,7 @@ class TextProduct(GenericHazards.TextProduct):
# If no valid AQA hazard grid, just return a placeholder
if headlines == "":
return fcst + "|* STATEMENT TEXT *|"
return fcst + "|* Statement text *|"
# If valid hazard grid, insert headline, agency attribution, and any default text
else:

View file

@ -35,13 +35,13 @@ class TextProduct(GenericHazards.TextProduct):
Definition["mapNameForCombinations"] = "Zones_<site>" # Map background for creating Combinations
# Header configuration items
Definition["productName"] = "COASTAL HAZARD MESSAGE" # Warning! DO NOT CHANGE.
Definition["productName"] = "Coastal Hazard Message" # Warning! DO NOT CHANGE.
# The productName gets substituted later in the formatter!
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -60,7 +60,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["accurateCities"] = 0 # If 1, cities are based on grids;
# otherwise full list is included
Definition["cityLocation"] = "CityLocation" # City lat/lon dictionary to use
#Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
#Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
Definition["lineLength"] = 66 # line length
Definition["easPhrase"] = "URGENT - IMMEDIATE BROADCAST REQUESTED"
@ -72,12 +72,12 @@ class TextProduct(GenericHazards.TextProduct):
###
### Text to insert below the last $$ of the product (WFO URL)
### use "" if you do not want text to appear
## Definition["urlText"] = "HTTP://WWW.WEATHER.GOV/MIAMI"
## Definition["urlText"] = "http://www.weather.gov/miami"
### no additional text example
Definition["urlText"] = ""
### multiple line example
## Definition["urlText"] = "FOR MORE INFORMATION FROM NOAA/S NATIONAL WEATHER SERVICE VISIT...\n" + \
## "HTTP://WEATHER.GOV/SALTLAKECITY (ALL LOWER CASE)"
## Definition["urlText"] = "For more information from NOAA/s National Weather Service visit...\n" + \
## "http://weather.gov/saltlakecity"
###
def __init__(self):
@ -106,23 +106,23 @@ class TextProduct(GenericHazards.TextProduct):
def _bulletDict(self):
return {
"CF" : ("COASTAL FLOODING,TIMING,IMPACTS"), ### coastal flood warning, advisory, watch
"LS" : ("LAKE SHORE FLOODING,TIMING,IMPACTS"), ### lake shore flood warning, advisory, watch
"BH" : ("HAZARDS,TIMING,LOCATION,POTENTIAL IMPACTS"), ### hazardous beach conditions
"SU" : ("WAVES AND SURF,TIMING,IMPACTS"), ### high surf warning, advisory
"RP" : ("TIMING,IMPACTS"), ### high rip current risk
"CF" : ("Coastal Flooding,Timing,Impacts"), ### coastal flood warning, advisory, watch
"LS" : ("Lake Shore Flooding,Timing,Impacts"), ### lake shore flood warning, advisory, watch
"BH" : ("Hazards,Timing,Location,Potential Impacts"), ### hazardous beach conditions
"SU" : ("Waves and Surf,Timing,Impacts"), ### high surf warning, advisory
"RP" : ("Timing,Impacts"), ### high rip current risk
}
def _bulletOrder(self):
return [
"COASTAL FLOODING",
"LAKE SHORE FLOODING",
"WAVES AND SURF",
"HAZARDS",
"TIMING",
"LOCATION",
"POTENTIAL IMPACTS",
"IMPACTS",
"Coastal Flooding",
"Lake Shore Flooding",
"Waves and Surf",
"Hazards",
"Timing",
"Location",
"Potential Impacts",
"Impacts",
]
@ -174,7 +174,7 @@ class TextProduct(GenericHazards.TextProduct):
# If an overview exists for this product, insert it
#
overview = self.finalOverviewText()
overviewSearch = re.compile(r'DEFAULT OVERVIEW SECTION', re.DOTALL)
overviewSearch = re.compile(r'Default overview section', re.DOTALL)
fcst = overviewSearch.sub(overview, fcst)
@ -202,21 +202,21 @@ class TextProduct(GenericHazards.TextProduct):
# rename the product if necessary based on VTEC codes
for each in fullKeyList:
if each in ['LS.W', 'LS.A', 'LS.Y', 'LS.S']:
productName = "LAKESHORE HAZARD MESSAGE"
productName = "Lakeshore Hazard Message"
fcst = fcst.replace(self._productName, productName, 1)
break
# Added to place line feeds in the CAP tags to keep separate from CTAs
fcst = string.replace(fcst, \
r"PRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.", \
r"\nPRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\n")
r"Precautionary/preparedness actions\.\.\.", \
r"\nPrecautionary/preparedness actions\.\.\.\n")
fcst = string.replace(fcst, ".:", ".")
fcst = string.replace(fcst, "\n ","\n")
fcst = string.replace(fcst, "&&", "\n&&\n")
# Prevent empty Call to Action Tags
fcst = re.sub(r'\nPRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\s*&&\n', \
fcst = re.sub(r'\nPrecautionary/preparedness actions\.\.\.\s*&&\n', \
"", fcst)
### to remove any empty framing code
fcst = re.sub("\|\*\s*\*\|", "", fcst)

View file

@ -61,11 +61,11 @@ class TextProduct(GenericHazards.TextProduct):
Definition["mapNameForCombinations"] = "Zones_<site>"
# Header configuration items
Definition["productName"] = "FLOOD WATCH" # name of product
Definition["productName"] = "Flood Watch" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -83,7 +83,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["accurateCities"] = 0 # If 1, cities are based on grids;
# otherwise full list is included
Definition["cityLocation"] = "CityLocation" # City lat/lon dictionary to use
Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
Definition["includeIssueTime"] = 1 # This should be set to zero for products
# that do not include a time lime below the UGC
@ -145,10 +145,10 @@ class TextProduct(GenericHazards.TextProduct):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" + easPhrase +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n" + \
self._easPhrase + "\n\n"
fcst = fcst + "DEFAULT OVERVIEW SECTION\n"
fcst = fcst + "Default overview section\n"
return fcst
@ -293,9 +293,9 @@ class TextProduct(GenericHazards.TextProduct):
#period.
areaGroupLen = len(areaGroups)
if areaGroupLen == 1:
areaPhrase = "A PORTION OF "
areaPhrase = "A portion of "
else:
areaPhrase = "PORTIONS OF "
areaPhrase = "Portions of "
#parts of the states
areaGroupCount = 0
@ -314,55 +314,55 @@ class TextProduct(GenericHazards.TextProduct):
areaPhrase = areaPhrase + conn + partOfState + " " + state
#including phrase, have to count what we have
d = {'INDEPENDENT CITY': ("INDEPENDENT CITY", "INDEPENDENT CITIES"),
'PARISH': ("PARISH", "PARISHES"),
'COUNTY': ("COUNTY", "COUNTIES"),
'ZONE': ("AREA", "AREAS") }
d = {'Independent city': ("Independent city", "Independent cities"),
'Parish': ("Parish", "Parishes"),
'County': ("County", "Counties"),
'Zone': ("Area", "Areas") }
icCnt = 0
parishCnt = 0
zoneCnt = 0
countyCnt = 0
for state, partOfState, names in areaGroups:
for name,nameType in names:
if nameType == "ZONE":
if nameType == "Zone":
zoneCnt = zoneCnt + 1
elif nameType == "COUNTY":
elif nameType == "County":
countyCnt = countyCnt + 1
elif nameType == "INDEPENDENT CITY":
elif nameType == "Independent city":
icCnt = icCnt + 1
elif nameType == "PARISH":
elif nameType == "Parish":
parishCnt = parishCnt + 1
incPhrases = []
if zoneCnt == 1:
incPhrases.append("AREA")
incPhrases.append("Area")
elif zoneCnt > 1:
incPhrases.append("AREAS")
incPhrases.append("Areas")
if countyCnt == 1:
incPhrases.append("COUNTY")
incPhrases.append("County")
elif countyCnt > 1:
incPhrases.append("COUNTIES")
incPhrases.append("Counties")
if icCnt == 1:
incPhrases.append("INDEPENDENT CITY")
incPhrases.append("Independent city")
elif icCnt > 1:
incPhrases.append("INDEPENDENT CITIES")
incPhrases.append("Independent cities")
if parishCnt == 1:
incPhrases.append("PARISH")
incPhrases.append("Parish")
elif parishCnt > 1:
incPhrases.append("PARISHES")
incPhrases.append("Parishes")
incPhrase = " AND ".join(incPhrases)
if generalOnly:
return areaPhrase
areaPhrase = areaPhrase + "...INCLUDING THE FOLLOWING " + \
areaPhrase = areaPhrase + "...Including the following " + \
incPhrase + "..."
#list of the specific areas
for i in xrange(len(areaGroups)):
state, partOfState, names = areaGroups[i]
if state == "THE DISTRICT OF COLUMBIA":
if state == "The District of Columbia":
areaPhrase = areaPhrase + state
else:
# extract out the names
@ -401,7 +401,7 @@ class TextProduct(GenericHazards.TextProduct):
#in. canHazard is any associated CAN/EXP/UPG hazard, areaPhrase is
#the area description for the segment.
nwsPhrase = "THE NATIONAL WEATHER SERVICE IN " + self._wfoCity + " HAS "
nwsPhrase = "The National Weather Service in " + self._wfoCity + " has "
#
# Attribution and 1st bullet (headPhrase)
@ -412,42 +412,42 @@ class TextProduct(GenericHazards.TextProduct):
hazName = self.hazardName(hazard['hdln'], argDict, False)
if hazard['act'] == 'NEW' and len(hazard['hdln']):
attribution = nwsPhrase + "ISSUED A"
attribution = nwsPhrase + "issued a"
headPhrase = "* " + hazName + " FOR " + areaPhrase + "."
elif hazard['act'] == 'CON' and len(hazard['hdln']):
attribution = "THE " + hazName + " CONTINUES FOR"
attribution = "The " + hazName + " continues for"
headPhrase = "* " + areaPhrase + "."
elif hazard['act'] == 'EXA' and len(hazard['hdln']):
attribution = nwsPhrase + "EXPANDED THE"
headPhrase = "* " + hazName + " TO INCLUDE " + areaPhrase + "."
attribution = nwsPhrase + "expanded the"
headPhrase = "* " + hazName + " to include " + areaPhrase + "."
elif hazard['act'] == 'EXT' and len(hazard['hdln']):
attribution = 'THE ' + hazName + " IS NOW IN EFFECT FOR"
attribution = 'The ' + hazName + " is now in effect for"
headPhrase = "* " + areaPhrase + "."
elif hazard['act'] == 'EXB' and len(hazard['hdln']):
attribution = nwsPhrase + "EXPANDED THE"
headPhrase = "* " + hazName + " TO INCLUDE " + areaPhrase + "."
attribution = nwsPhrase + "expanded the"
headPhrase = "* " + hazName + " to include " + areaPhrase + "."
elif hazard['act'] == 'CAN' and len(hazard['hdln']):
attribution = "THE " + hazName + \
" FOR " + areaPhrase + " HAS BEEN CANCELLED. " + \
"|* BRIEF POST-SYNOPSIS/SUMMARY OF HYDROMET ACTIVITY *|\n\n"
attribution = "The " + hazName + \
" for " + areaPhrase + " has been cancelled. " + \
"|* brief post-synopsis/summary of hydromet activity *|\n\n"
elif hazard['act'] == 'EXP' and len(hazard['hdln']):
expTimeCurrent = argDict['creationTime']
if hazard['endTime'] <= expTimeCurrent:
attribution = "THE " + hazName + \
" FOR " + areaPhrase + " HAS EXPIRED. " + \
"|* BRIEF POST-SYNOPSIS/SUMMARY OF HYDROMET ACTIVITY *|"
attribution = "The " + hazName + \
" for " + areaPhrase + " has expired. " + \
"|* brief post-synopsis/summary of hydromet activity *|"
else:
timeWords = self.getTimingPhrase(hazard, expTimeCurrent)
attribution = "THE " + hazName + \
" FOR " + areaPhrase + " WILL EXPIRE " + timeWords + \
attribution = "The " + hazName + \
" for " + areaPhrase + " will expire " + timeWords + \
". " + \
"|* BRIEF POST-SYNOPSIS/SUMMARY OF HYDROMET ACTIVITY *|"
"|* brief post-synopsis/summary of hydromet activity *|"
#wrap it, if headPhrase, then we have bullets
if headPhrase is not None:
@ -458,7 +458,7 @@ class TextProduct(GenericHazards.TextProduct):
endTimePhrase = self.hazardTimePhrases(hazard, argDict,
prefixSpace=False)
endTimePhrase = self.substituteBulletedText(endTimePhrase,
"TIME IS MISSING", "DefaultOnly")
"Time is missing", "DefaultOnly")
# 3rd bullet (basis), 4th bullet (impacts)
if hazard['act'] == "NEW" and canHazard:
@ -469,11 +469,11 @@ class TextProduct(GenericHazards.TextProduct):
self.decodeBulletedText(capText)
defaultBasis = {
'NEW': ("BASIS FOR THE WATCH", "Always"),
'CON': ("DESCRIBE CURRENT SITUATION", "DefaultOnly"),
'EXT': ("BASIS FOR EXTENDING THE WATCH", "DefaultOnly"),
'EXB': ("BASIS FOR EXPANSION OF THE WATCH", "DefaultOnly"),
'EXA': ("BASIS FOR EXPANSION OF THE WATCH", "DefaultOnly"),
'NEW': ("Basis for the watch", "Always"),
'CON': ("Describe current situation", "DefaultOnly"),
'EXT': ("Basis for extending the watch", "DefaultOnly"),
'EXB': ("Basis for expansion of the watch", "DefaultOnly"),
'EXA': ("Basis for expansion of the watch", "DefaultOnly"),
}
b = defaultBasis[hazard['act']]
if multRecords == 0:
@ -486,7 +486,7 @@ class TextProduct(GenericHazards.TextProduct):
else:
framing = "DefaultOnly"
impactsPhrase = self.substituteBulletedText(impact,
"(OPTIONAL) POTENTIAL IMPACTS OF FLOODING", framing)
"(optional) potential impacts of flooding", framing)
#remainder of text
general = ''
@ -517,16 +517,16 @@ class TextProduct(GenericHazards.TextProduct):
cta = ''
if len(cta) > 1:
ctaBodyPhrase ="\n\nPRECAUTIONARY/PREPAREDNESS ACTIONS...\n\n" + \
ctaBodyPhrase ="\n\nPrecautionary/preparedness actions...\n\n" + \
cta + \
"\n\n&&\n\n"
else:
ctaBodyPhrase = cta
if ctaBodyPhrase.find('PRECAUTIONARY/PREPAREDNESS ACTIONS...') != -1 and \
if ctaBodyPhrase.find('Precautionary/preparedness actions...') != -1 and \
attribution.find('&&') != -1:
attribution = attribution.replace('&&','')
ctaBodyPhrase = ctaBodyPhrase.replace('PRECAUTIONARY/PREPAREDNESS ACTIONS...','')
ctaBodyPhrase = ctaBodyPhrase.replace('Precautionary/preparedness actions...','')
attrPhrase = attribution + '\n\n' + headPhrase + '\n' + \
endTimePhrase + '\n' + basisPhrase + '\n' + impactsPhrase + \

View file

@ -52,7 +52,7 @@ class TextProduct(GenericReport.TextProduct):
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
# product identifiers
Definition["productName"] = "HAZARDOUS WEATHER OUTLOOK" # product name
Definition["productName"] = "Hazardous Weather Outlook" # product name
Definition["fullStationID" ] = "<fullStationID>" # 4 letter station ID
Definition["wmoID" ] = "<wmoID>" # WMO code
Definition["wfoCityState" ] = "<wfoCityState>" # Location of WFO
@ -74,7 +74,7 @@ class TextProduct(GenericReport.TextProduct):
# Header format
Definition["includeCities"] = 0 # Cities not included in area header
Definition ["cityDescriptor"] = "INCLUDING THE CITIES OF"
Definition ["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
#
@ -135,7 +135,7 @@ class TextProduct(GenericReport.TextProduct):
#
generalArea = self.getGeneralAreaList(areaList, areaDictName=self._areaDictionary)
areaPhrase = "THIS HAZARDOUS WEATHER OUTLOOK IS FOR PORTIONS OF "
areaPhrase = "This Hazardous Weather Outlook is for portions of "
areaLen = len(generalArea)
areaCount = 0

View file

@ -35,11 +35,11 @@ class TextProduct(GenericHazards.TextProduct):
Definition["mapNameForCombinations"] = "Marine_Zones_<site>_<MultiPil>" # Map background for creating Combinations
# Header configuration items
Definition["productName"] = "MARINE WEATHER STATEMENT" # name of product
Definition["productName"] = "Marine Weather Statement" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -54,7 +54,7 @@ class TextProduct(GenericHazards.TextProduct):
#Definition["purgeTime"] = 6 # Maximum hours for expireTime from issueTime
Definition["includeCities"] = 0 # Cities included in area header
Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
Definition["lineLength"] = 66 # Zone names will be included in the area header
#Definition["easPhrase"] = "" # Optional EAS phrase to be include in product header

View file

@ -54,7 +54,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -69,7 +69,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["purgeTime"] = 8 # Maximum hours for expireTime from issueTime
#Definition["includeCities"] = 1 # Cities included in area header
#Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
#Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
#Definition["easPhrase"] = "" # Optional EAS phrase to be include in product header
Definition["lineLength"] = 66
@ -82,12 +82,12 @@ class TextProduct(GenericHazards.TextProduct):
###
### Text to insert below the last $$ of the product (WFO URL)
### use "" if you do not want text to appear
## Definition["urlText"] = "HTTP://WWW.WEATHER.GOV/MIAMI"
## Definition["urlText"] = "http://www.weather.gov/miami"
### no additional text example
Definition["urlText"] = ""
### multiple line example
## Definition["urlText"] = "FOR MORE INFORMATION FROM NOAA/S NATIONAL WEATHER SERVICE VISIT...\n" + \
## "HTTP://WEATHER.GOV/SALTLAKECITY (ALL LOWER CASE)"
## Definition["urlText"] = "For more information from NOAA/s National Weather Service visit...\n" + \
## "http://weather.gov/saltlakecity"
###
def __init__(self):
@ -129,34 +129,34 @@ class TextProduct(GenericHazards.TextProduct):
def _bulletDict(self):
return {
"HU" : ("WINDS,WAVES/SEAS"), ### hurricane warning, watch
"TR" : ("WINDS,WAVES/SEAS"), ### tropical storm warning, watch
"GL" : ("WINDS,WAVES/SEAS"), ### gale warning, watch
"HF" : ("WINDS,WAVES/SEAS"), ### hurricane force wind warnings, watch
"MH" : ("VOLCANIC ASH INFO"), ### volcanic ashfall warning, advisory
"SE" : ("WAVES/SEAS"), ### hazardous seas warning, watch
"SR" : ("WINDS,WAVES/SEAS"), ### storm warning, watch
"UP" : ("ICE ACCUMULATIONS"), ### heavy freezing spray warnings, advisory, watch
"BW" : ("WINDS"), ### brisk wind advisory
"MF" : ("VISIBILITY"), ### dense fog advisory
"LO" : ("WATER LEVELS"), ### low water advisory
"RB" : ("WAVES/SEAS,FIRST EBB,SECOND EBB"), ### small craft advisory for rough bar
"SI" : ("WINDS"), ### small craft advisory for winds
"SC" : ("WINDS,WAVES/SEAS"), ### small craft advisory
"MS" : ("VISIBILITY"), ### dense smoke advisory
"SW" : ("WAVES/SEAS"), ### small craft advisory hazardous seas
"HU" : ("Winds,Waves/seas"), ### hurricane warning, watch
"TR" : ("Winds,Waves/seas"), ### tropical storm warning, watch
"GL" : ("Winds,Waves/seas"), ### gale warning, watch
"HF" : ("Winds,Waves/seas"), ### hurricane force wind warnings, watch
"MH" : ("Volcanic ash info"), ### volcanic ashfall warning, advisory
"SE" : ("Waves/seas"), ### hazardous seas warning, watch
"SR" : ("Winds,Waves/seas"), ### storm warning, watch
"UP" : ("Ice accumulations"), ### heavy freezing spray warnings, advisory, watch
"BW" : ("Winds"), ### brisk wind advisory
"MF" : ("Visibility"), ### dense fog advisory
"LO" : ("Water levels"), ### low water advisory
"RB" : ("Waves/seas,First ebb,Second ebb"), ### small craft advisory for rough bar
"SI" : ("Winds"), ### small craft advisory for winds
"SC" : ("Winds,Waves/seas"), ### small craft advisory
"MS" : ("Visibility"), ### dense smoke advisory
"SW" : ("Waves/seas"), ### small craft advisory hazardous seas
}
def _bulletOrder(self):
return [
"WINDS",
"WAVES/SEAS",
"VOLCANIC ASH INFO",
"ICE ACCUMULATIONS",
"FIRST EBB",
"SECOND EBB",
"WATER LEVELS",
"VISIBILITY",
"Winds",
"Waves/seas",
"Volcanic ash info",
"Ice accumulations",
"First ebb",
"Second ebb",
"Water levels",
"Visibility",
]
@ -208,19 +208,19 @@ class TextProduct(GenericHazards.TextProduct):
# If an overview exists for this product, insert it
#
overview = self.finalOverviewText()
overviewSearch = re.compile(r'DEFAULT OVERVIEW SECTION', re.DOTALL)
overviewSearch = re.compile(r'Default overview section', re.DOTALL)
fcst = overviewSearch.sub(overview, fcst)
# Added to place line feeds in the CAP tags to keep separate from CTAs
fcst = string.replace(fcst, \
r"PRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.", \
r"\nPRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\n")
r"Precautionary/preparedness actions\.\.\.", \
r"\nPrecautionary/preparedness actions\.\.\.\n")
fcst = string.replace(fcst, ".:", ".")
fcst = string.replace(fcst, "\n ","\n")
fcst = string.replace(fcst, "&&", "\n&&\n")
# Prevent empty Call to Action Tags
fcst = re.sub(r'\nPRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\s*&&\n', \
fcst = re.sub(r'\nPrecautionary/preparedness actions\.\.\.\s*&&\n', \
"", fcst)
### to remove any empty framing code
fcst = re.sub("\|\*\s*\*\|", "", fcst)

View file

@ -54,7 +54,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -72,7 +72,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["accurateCities"] = 0 # If 1, cities are based on grids;
# otherwise full list is included
Definition["cityLocation"] = "CityLocation" # City lat/lon dictionary to use
Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
#Definition["easPhrase"] = "" # Optional EAS phrase to be include in product header
Definition["lineLength"] = 66
@ -119,33 +119,33 @@ class TextProduct(GenericHazards.TextProduct):
### set the default bullets
def _bulletDict(self):
return {
"LW" : ("TIMING,WINDS,IMPACTS"), ## Lake Wind
"WI" : ("TIMING,WINDS,IMPACTS"), ## Wind Advisory
"HW" : ("TIMING,WINDS,IMPACTS"), ## High Wind
"DU" : ("TIMING,WINDS,VISIBILITY,IMPACTS"), ## Blowing Dust
"DS" : ("TIMING,WINDS,VISIBILITY,IMPACTS"), ## Dust Storm
"FG" : ("VISIBILITY,IMPACTS"), ## Dense Fog
"FZ" : ("TEMPERATURE,IMPACTS"), ## Freeze
"AF" : ("ASH INFO,IMPACTS"), ## Ashfall
"AS" : ("AIR QUALITY,IMPACTS"), ## Air Stagnation
"EH" : ("TEMPERATURE,IMPACTS"), ## Excessive Heat
"EC" : ("TEMPERATURE,IMPACTS"), ## Excessive Cold
"HZ" : ("TEMPERATURE,IMPACTS"), ## Hard Freeze
"ZF" : ("TIMING,VISIBILITY,IMPACTS"), ## Freezing Fog
"FR" : ("TEMPERATURE,IMPACTS"), ## Frost
"HT" : ("TEMPERATURE,IMPACTS"), ## Heat
"SM" : ("VISIBILITY,IMPACTS"), ## Dense Smoke
"LW" : ("Timing,Winds,Impacts"), ## Lake Wind
"WI" : ("Timing,Winds,Impacts"), ## Wind Advisory
"HW" : ("Timing,Winds,Impacts"), ## High Wind
"DU" : ("Timing,Winds,Visibility,Impacts"), ## Blowing Dust
"DS" : ("Timing,Winds,Visibility,Impacts"), ## Dust Storm
"FG" : ("Visibility,Impacts"), ## Dense Fog
"FZ" : ("Temperature,Impacts"), ## Freeze
"AF" : ("Ash info,Impacts"), ## Ashfall
"AS" : ("Air quality,Impacts"), ## Air Stagnation
"EH" : ("Temperature,Impacts"), ## Excessive Heat
"EC" : ("Temperature,Impacts"), ## Excessive Cold
"HZ" : ("Temperature,Impacts"), ## Hard Freeze
"ZF" : ("Timing,Visibility,Impacts"), ## Freezing Fog
"FR" : ("Temperature,Impacts"), ## Frost
"HT" : ("Temperature,Impacts"), ## Heat
"SM" : ("Visibility,Impacts"), ## Dense Smoke
}
def _bulletOrder(self):
return [
"TIMING",
"ASH INFO",
"WINDS",
"VISIBILITY",
"AIR QUALITY",
"TEMPERATURE",
"IMPACTS",
"Timing",
"Ash info",
"Winds",
"Visibility",
"Air quality",
"Temperature",
"Impacts",
]
###

View file

@ -62,7 +62,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -80,7 +80,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["accurateCities"] = 0 # If 1, cities are based on grids;
# otherwise full list is included
Definition["cityLocation"] = "CityLocation" # City lat/lon dictionary to use
Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
Definition["includeIssueTime"] = 1 # This should be set to zero for products
# that do not include a time lime below the UGC
@ -93,8 +93,8 @@ class TextProduct(GenericHazards.TextProduct):
#Definition["hazardSamplingThreshold"] = (10, None) #(%cov, #points)
Definition["numInHeadline"] = 1
Definition["GenericBullets"] = ["AFFECTED AREA", "WIND", "HUMIDITY", "THUNDERSTORMS", "HIGHEST THREAT", "IMPACTS"]
Definition["locationsBullet"] = "AFFECTED AREA"
Definition["GenericBullets"] = ["Affected area", "Wind", "Humidity", "Thunderstorms", "Highest threat", "Impacts"]
Definition["locationsBullet"] = "Affected area"
Definition["noNameInBullet"] = 1
Definition["includeStateName"] = 0
Definition["urlText"] = ""
@ -190,25 +190,25 @@ class TextProduct(GenericHazards.TextProduct):
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
if nwsIntroUsed == 0:
hazardBodyPhrase = "THE NATIONAL WEATHER SERVICE IN " + self._wfoCity
hazardBodyPhrase = "The National Weather Service in " + self._wfoCity
nwsIntroUsed = 1
if phraseCount == 0:
phraseCount = 1
hazardBodyPhrase = hazardBodyPhrase + " HAS ISSUED " + \
hazNameA + "...WHICH IS IN EFFECT" + endTimePhrase + ". "
hazardBodyPhrase = hazardBodyPhrase + " has issued " + \
hazNameA + "...which is in effect" + endTimePhrase + ". "
elif phraseCount == 1:
phraseCount = 2
if hdln != lastHdln:
hazardBodyPhrase = hazardBodyPhrase + hazNameA + \
" HAS ALSO BEEN ISSUED. THIS " + hazName + \
" IS IN EFFECT" + endTimePhrase + ". "
" has also been issued. This " + hazName + \
" is in effect" + endTimePhrase + ". "
else:
hazardBodyPhrase = hazardBodyPhrase + hazNameA + \
" HAS ALSO BEEN ISSUED" + endTimePhrase + ". "
" has also been issued" + endTimePhrase + ". "
else:
hazardBodyPhrase = hazardBodyPhrase + "IN ADDITION..." + \
hazNameA + " HAS BEEN ISSUED. THIS " + hazName + \
" IS IN EFFECT" + endTimePhrase + ". "
hazardBodyPhrase = hazardBodyPhrase + "In addition..." + \
hazNameA + " has been issued. This " + hazName + \
" is in effect" + endTimePhrase + ". "
lastHdln = hdln
#
@ -221,14 +221,14 @@ class TextProduct(GenericHazards.TextProduct):
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
if nwsIntroUsed == 0:
hazardBodyPhrase = "THE NATIONAL WEATHER SERVICE IN " +\
hazardBodyPhrase = "The National Weather Service in " +\
self._wfoCity
nwsIntroUsed = 1
hazardBodyPhrase = hazardBodyPhrase + \
" HAS CANCELLED THE " + hazName + ". "
" has cancelled the " + hazName + ". "
else:
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" HAS BEEN CANCELLED. "
hazardBodyPhrase = hazardBodyPhrase + "The " + hazName + \
" has been cancelled. "
#
# This is for the exp hazards
@ -243,14 +243,14 @@ class TextProduct(GenericHazards.TextProduct):
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
if eachHazard['endTime'] <= argDict['creationTime']:
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" IS NO LONGER IN EFFECT. "
hazardBodyPhrase = hazardBodyPhrase + "The " + hazName + \
" is no longer in effect. "
else:
expTimeCurrent = argDict['creationTime']
timeWords = self.getTimingPhrase(eachHazard, expTimeCurrent)
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" WILL EXPIRE " + timeWords + ". "
hazardBodyPhrase = hazardBodyPhrase + "The " + hazName + \
" will expire " + timeWords + ". "
#
# This is for ext hazards
@ -264,8 +264,8 @@ class TextProduct(GenericHazards.TextProduct):
endTimePhrase = self.hazardTimePhrases(eachHazard, argDict)
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" IS NOW IN EFFECT" + endTimePhrase + ". "
hazardBodyPhrase = hazardBodyPhrase + "The " + hazName + \
" is now in effect" + endTimePhrase + ". "
#
# This is for upgrade hazards
@ -276,8 +276,8 @@ class TextProduct(GenericHazards.TextProduct):
continue #no defined headline, skip phrase
hazName = self.hazardName(eachHazard['hdln'], argDict, False)
hazardBodyPhrase = hazardBodyPhrase + "THE " + hazName + \
" IS NO LONGER IN EFFECT. "
hazardBodyPhrase = hazardBodyPhrase + "The " + hazName + \
" is no longer in effect. "
#
# This is for con hazards
@ -291,7 +291,7 @@ class TextProduct(GenericHazards.TextProduct):
endTimePhrase = self.hazardTimePhrases(eachHazard, argDict)
hazNameA = self.hazardName(eachHazard['hdln'], argDict, True)
hazardBodyPhrase = hazardBodyPhrase + hazNameA + \
" REMAINS IN EFFECT" + endTimePhrase + ". "
" remains in effect" + endTimePhrase + ". "
#
# This is for statement hazards
@ -300,7 +300,7 @@ class TextProduct(GenericHazards.TextProduct):
#we will add in text later either by text capture or
#framing codes as needed
#for eachHazard in statementList:
# hazardBodyPhrase = hazardBodyPhrase + "|* STATEMENT TEXT *|."
# hazardBodyPhrase = hazardBodyPhrase + "|* Statement text *|."
#
# This adds segment text
@ -406,7 +406,7 @@ class TextProduct(GenericHazards.TextProduct):
## hazardBodyPhrase = hazardBodyPhrase + "\n\n" + bullets
## else:
## hazardBodyPhrase = hazardBodyPhrase + \
## "\n\n|* CANCELLATION TEXT GOES HERE *|.\n"
## "\n\n|* Cancellation text goes here *|.\n"
elif self._bulletProd:
forceList = ['HW','DS','EH','EC','BZ','WS','IS']
for h in newList:
@ -414,17 +414,17 @@ class TextProduct(GenericHazards.TextProduct):
eachHazard = h
if eachHazard['act'] == 'CAN':
hazardBodyPhrase = hazardBodyPhrase + \
"\n\n|* WRAP-UP TEXT GOES HERE *|.\n"
"\n\n|* Wrap-up text goes here *|.\n"
elif eachHazard['act'] == 'EXP':
hazardBodyPhrase = hazardBodyPhrase + \
"\n\n|* WRAP-UP TEXT GOES HERE *|.\n"
"\n\n|* Wrap-up text goes here *|.\n"
else:
### get the default bullets from the bullet dictionary
bullets = self._getBullets(eachHazard, argDict, self._areaDictionary)
hazardBodyPhrase = hazardBodyPhrase + "\n\n" + bullets
else:
hazardBodyPhrase = hazardBodyPhrase + \
"\n\n|* SEGMENT TEXT GOES HERE *|.\n\n"
"\n\n|* Segment text goes here *|.\n\n"
# end addition
#
@ -453,13 +453,13 @@ class TextProduct(GenericHazards.TextProduct):
if len(ctas) > 0:
hazardBodyPhrase = hazardBodyPhrase + \
'PRECAUTIONARY/PREPAREDNESS ACTIONS...\n\n'
'Precautionary/preparedness actions...\n\n'
for c in ctas:
hazardBodyPhrase = hazardBodyPhrase + c + '\n\n'
hazardBodyPhrase = hazardBodyPhrase + '&&\n\n'
# Make sure there is only one CAP tag pairs
hazardBodyPhrase = re.sub(r'&&\s*PRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\n', \
hazardBodyPhrase = re.sub(r'&&\s*Precautionary/preparedness actions\.\.\.\n', \
"", hazardBodyPhrase)
return hazardBodyPhrase
@ -489,15 +489,15 @@ class TextProduct(GenericHazards.TextProduct):
le = le + phraseDict.get(t)[0]
### add zone numbers or generic location description to headline
if self._numInHeadline == 0:
le = le + "FOR |* LOCATION DESCRIPTION *|"
le = le + "For |* location description *|"
else:
le = le + self._headlineNumbers(hazard['id'])
else:
### if no event type selected make a generic phrase
if self._numInHeadline == 0:
le = le + "|* EVENT TYPE *| FOR |* LOCATION DESCRIPTION *|"
le = le + "|* event type *| for |* location description *|"
else:
le = le + "|* EVENT TYPE *| " + self._headlineNumbers(hazard['id'])
le = le + "|* event type *| " + self._headlineNumbers(hazard['id'])
else:
### get the additive data from the previous product
le = self._buildForPhrase(hazard)
@ -577,9 +577,9 @@ class TextProduct(GenericHazards.TextProduct):
numList.sort()
### initialize the zone number list
if len(numList) > 1:
numStr = "FOR FIRE WEATHER ZONES "
numStr = "For fire weather zones "
else:
numStr = "FOR FIRE WEATHER ZONE "
numStr = "For fire weather zone "
i = 0
for i in range (len(numList)):
@ -665,14 +665,14 @@ class TextProduct(GenericHazards.TextProduct):
if self._noNameInBullet == 0: ### include zone names and numbers
for i in range (len(ugcList)):
if (len(ugcList) - i) > 1:
nameString = nameString + "FIRE WEATHER ZONE " + ugcList[i][2] + " " + ugcList[i][1] + "..."
nameString = nameString + "Fire weather zone " + ugcList[i][2] + " " + ugcList[i][1] + "..."
else:
nameString = nameString + "FIRE WEATHER ZONE " + ugcList[i][2] + " " + ugcList[i][1] + "."
nameString = nameString + "Fire weather zone " + ugcList[i][2] + " " + ugcList[i][1] + "."
else: ### include zone numbers
if len(ugcList) > 1:
nameString = nameString + "FIRE WEATHER ZONES "
nameString = nameString + "Fire weather zones "
else:
nameString = nameString + "FIRE WEATHER ZONE "
nameString = nameString + "Fire weather zone "
for i in range (len(ugcList)):
if (len(ugcList) - i) == 1: ### one entry or last entry in list
@ -700,14 +700,14 @@ class TextProduct(GenericHazards.TextProduct):
if self._noNameInBullet == 0: ### include zone names
for i in range (len(newList)):
if (len(newList) - i) > 1:
nameString = nameString + "FIRE WEATHER ZONE " + newList[i][0] + " " + newList[i][1] + "..."
nameString = nameString + "Fire weather zone " + newList[i][0] + " " + newList[i][1] + "..."
else:
nameString = nameString + "FIRE WEATHER ZONE " + newList[i][0] + " " + newList[i][1] + ". "
nameString = nameString + "Fire weather zone " + newList[i][0] + " " + newList[i][1] + ". "
else: ### don't include zone names
if len(newList) > 1:
nameString = nameString + "FIRE WEATHER ZONES "
nameString = nameString + "Fire weather zones "
else:
nameString = nameString + "FIRE WEATHER ZONE "
nameString = nameString + "Fire weather zone "
for i in range (len(newList)):
if (len(newList) - i) == 1: ### one entry or last entry in list
@ -742,7 +742,7 @@ class TextProduct(GenericHazards.TextProduct):
dict = self._bulletDict()
bList = bList + dict.get(b)[1]
bList.append("IMPACTS")
bList.append("Impacts")
### get the default configured list
else:
@ -763,19 +763,19 @@ class TextProduct(GenericHazards.TextProduct):
bullets = bullets + StringUtils.StringUtils().indentText(b+"..."+locations, \
indentFirstString="* ", indentNextString=" ", \
maxWidth=65,breakStrings=[" ","..."]) + "\n\n"
elif b == "EXTREME GRASSLAND FIRE DANGER":
bullets = bullets + "* " + b + "...IS FORECAST.\n\n"
elif b == "Extreme grassland fire danger":
bullets = bullets + "* " + b + "...is forecast.\n\n"
elif b == "HIGHEST THREAT":
bullets = bullets + "|* * " + b + "...IS LOCATED (optional bullet)*|\n\n"
elif b == "Highest threat":
bullets = bullets + "|* * " + b + "...is located (optional bullet)*|\n\n"
elif b == "IMPACTS":
bullets = bullets + "* " + b + "...ANY FIRES THAT DEVELOP WILL LIKELY SPREAD RAPIDLY."
bullets = bullets + " OUTDOOR BURNING IS NOT RECOMMENDED.\n\n"
elif b == "Impacts":
bullets = bullets + "* " + b + "...any fires that develop will likely spread rapidly."
bullets = bullets + " outdoor burning is not recommended.\n\n"
else:
bullets = bullets + "* " + b + "...|* ENTER BULLET TEXT *|\n\n"
bullets = bullets + "* " + b + "...|* Enter bullet text *|\n\n"
return bullets
@ -786,7 +786,7 @@ class TextProduct(GenericHazards.TextProduct):
############################################################################################
def _buildForPhrase (self, eHazard):
forPhrase = " FOR |* ENTER REASON FOR RFW *|"
forPhrase = " for |* enter reason for RFW *|"
if eHazard.has_key('prevText'):
prevProduct = eHazard['prevText']
@ -863,21 +863,21 @@ class TextProduct(GenericHazards.TextProduct):
# If an overview exists for this product, insert it
#
overview = self.finalOverviewText()
overviewSearch = re.compile(r'DEFAULT OVERVIEW SECTION', re.DOTALL)
overviewSearch = re.compile(r'Default overview section', re.DOTALL)
fcst = overviewSearch.sub(overview, fcst)
#
# Added to place line feeds in the CAP tags to keep separate from CTAs
fcst = string.replace(fcst, \
r"PRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.", \
r"\nPRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\n")
r"Precautionary/preparedness actions\.\.\.", \
r"\nPrecautionary/preparedness actions\.\.\.\n")
# Commented out following line to prevent it from changing bullet indentation
#fcst = string.replace(fcst, "\n ","\n")
fcst = string.replace(fcst, "&&", "\n&&\n")
# Prevent empty Call to Action Tags
fcst = re.sub(r'\nPRECAUTIONARY/PREPAREDNESS ACTIONS\.\.\.\s*&&\n', \
fcst = re.sub(r'\nPrecautionary/preparedness actions\.\.\.\s*&&\n', \
"", fcst)
fcst = self._indentBulletText(fcst)

View file

@ -105,19 +105,19 @@ class TextProduct(Hazard_RFW_<MultiPil>.TextProduct):
### First bullet is the locationsBullet and must match Definition["locationsBullet"] below
### Modify according to other sections above
## Definition["WindRHBullets"] = ["AFFECTED AREA", "WIND", "HUMIDITY"]
## Definition["ThunderBullets"] = ["AFFECTED AREA", "THUNDERSTORMS", "OUTFLOW WINDS"]
## Definition["HainesBullets"] = ["AFFECTED AREA", "HAINES", "TEMPERATURES/HUMIDITY"]
## Definition["FireDangerBullets"] = ["AFFECTED AREA", "TIMING", "EXTREME GRASSLAND FIRE DANGER",\
## "WIND", "HUMIDITY"]
## Definition["WindRHBullets"] = ["Affected area", "Wind", "Humidity"]
## Definition["ThunderBullets"] = ["Affected area", "Thunderstorms", "Outflow winds"]
## Definition["HainesBullets"] = ["Affected area", "Haines", "Temperatures/humidity"]
## Definition["FireDangerBullets"] = ["Affected area", "Timing", "Extreme grassland fire danger",\
## "Wind", "Humidity"]
###
### Generic Bullets - Used if an RFW Type is not selected in the Initial GUI
### Product will put in these bullets as a generic guideline for the RFW
Definition["GenericBullets"] = ["AFFECTED AREA", "WIND", "HUMIDITY", "THUNDERSTORMS", "HIGHEST THREAT", "IMPACTS"]
Definition["GenericBullets"] = ["Affected area", "Wind", "Humidity", "Thunderstorms", "Highest threat", "Impacts"]
###
### Name for the Location Bullet - again, must match first bullet wording above
Definition["locationsBullet"] = "AFFECTED AREA"
Definition["locationsBullet"] = "Affected area"
### Geographical descriptor for headlines.
### Inserts zone numbers or a generic location into headlines
@ -142,11 +142,11 @@ class TextProduct(Hazard_RFW_<MultiPil>.TextProduct):
### Text to insert below the last $$ of the product (WFO URL)
### Making no changes will leave default of no url text
### Single line example
## Definition["urlText"] = "HTTP://WEATHER.GOV/your_wfo"
## Definition["urlText"] = "http://weather.gov/your_wfo"
###
### multiple line example
## Definition["urlText"] = "FOR MORE INFORMATION FROM NOAA/S NATIONAL WEATHER SERVICE VISIT...\n" + \
## "HTTP://WEATHER.GOV/your_wfo (ALL LOWER CASE)"
## Definition["urlText"] = "For more information from NOAA/s National Weather Service visit...\n" + \
## "http://weather.gov/your_wfo"
###
### End Configuration Section
######################################################################################################

View file

@ -24,7 +24,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
Definition["defaultEditAreas"] = "Combinations_TCV_<site>"
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
Definition["productName"] = "LOCAL WATCH/WARNING STATEMENT"
Definition["productName"] = "Local Watch/Warning Statement"
Definition["fullStationID" ] = "<fullStationID>"
Definition["wmoID" ] = "<wmoID>"
@ -464,7 +464,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
self._segmentList = self._determineSegments()
self.debug_print("Segment Information: %s" % (self._pp.pformat(self._segmentList)), 1)
if len(self._segmentList) == 0:
return "NO HAZARDS TO REPORT"
return "No hazards to report"
# Determine time ranges
self._determineTimeRanges(argDict)
@ -765,7 +765,7 @@ class TextProduct(HLSTCV_Common.TextProduct):
combos = accessor.variable(self._defaultEditAreas, "Combinations")
# combos is a list of tuples. Each tuple is a grouping of zones (a list of zones, combo name).
if combos is None:
LogStream.logVerbose("COMBINATION FILE NOT FOUND: " + self._defaultEditAreas)
LogStream.logVerbose("Combination file not found: " + self._defaultEditAreas)
return []
self.debug_print("Segments from Zone Combiner = %s" % (self._pp.pformat(combos)), 1)
@ -1527,21 +1527,21 @@ class SectionCommon():
def _preparationStatement(self, severityString):
preparationStatement = ""
if severityString == "DEVASTATING" or severityString == "EXTENSIVE IMPACTS":
preparationStatement += "AGGRESSIVE "
if severityString == "Devastating" or severityString == "Extensive impacts":
preparationStatement += "Aggressive "
preparationStatement += "PREPARATIONS SHOULD BE MADE FOR CHANCE OF "
preparationStatement += "preparations should be made for chance of "
if severityString == "DEVASTATING":
preparationStatement += "DEVASTATING TO CATASTROPHIC"
elif severityString == "EXTENSIVE IMPACTS":
preparationStatement += "EXTENSIVE"
elif severityString == "SIGNIFICANT":
preparationStatement += "SIGNIFICANT"
elif severityString == "LIMITED":
preparationStatement += "LIMITED"
if severityString == "Devastating":
preparationStatement += "devastating to catastrophic"
elif severityString == "Extensive impacts":
preparationStatement += "extensive"
elif severityString == "Significant":
preparationStatement += "significant"
elif severityString == "Limited":
preparationStatement += "limited"
preparationStatement += " IMPACTS BASED ON LATEST THREAT"
preparationStatement += " impacts based on latest threat"
return preparationStatement
@ -1585,7 +1585,7 @@ class WindSection(SectionCommon):
categoryLabel = key
break
forecastText = "LATEST LOCAL FORECAST: "
forecastText = "Latest Local Forecast: "
if categoryLabel is not None:
forecastText += "Equivalent " + categoryLabel + " force wind"
else:
@ -1608,7 +1608,7 @@ class WindSection(SectionCommon):
def _peakWind(self, segmentDict, productSegmentGroup, productSegment):
if self._stats._maxWind is not None:
windText = "PEAK WIND FORECAST: "
windText = "Peak Wind Forecast: "
moderatedMaxWind = self._ktToMph(self._stats._maxWind, "Wind")
if moderatedMaxWind >= 74:
maxRange = 20
@ -1810,10 +1810,10 @@ class StormSurgeSection(SectionCommon):
elif max > 0:
# We were getting really weird values of peak surge
# (e.g. "UP TO 1.70000004768 FEET"). This fix will round up
# (e.g. "up to 1.70000004768 feet"). This fix will round up
# to the nearest integer value
# words = "Up to " + str(max) + " feet above ground"
words = "Up to " + str(int(max + 0.5)) + " feet above ground"
# words = "up to " + str(max) + " feet above ground"
words = "up to " + str(int(max + 0.5)) + " feet above ground"
else:
words = ""
@ -2422,11 +2422,11 @@ class WindSectionStats(SectionCommonStats):
if localtime.tm_hour >= 15: # 3PM to midnight
self._textProduct.debug_print("between 3PM and midnight!", 1)
pwsTXXStats.dropFirstGridType = "DAY"
pwsTXXStats.dropFirstGridType = "day"
self._textProduct.debug_print("need to drop the day grid(s) if they come first", 1)
elif localtime.tm_hour >= 3 and localtime.tm_hour < 12: # 3AM to noon
self._textProduct.debug_print("between 3AM and noon!", 1)
pwsTXXStats.dropFirstGridType = "NIGHT"
pwsTXXStats.dropFirstGridType = "night"
self._textProduct.debug_print("need to drop the night grid(s) if they come first", 1)
else:
self._textProduct.debug_print("not dropping any grids!", 1)
@ -2447,12 +2447,12 @@ class WindSectionStats(SectionCommonStats):
if pwsDXX is not None and isValidDay:
self._textProduct.debug_print("Wind Window Debug: pwsTXXStats DAY", 1)
if pwsTXXStats.dropFirstGridType == "DAY":
if pwsTXXStats.dropFirstGridType == "day":
self._textProduct.debug_print("Wind Window Debug: dropping a day grid", 1)
self._textProduct.debug_print("Wind Window Debug: tr = %s, period = %s" % (tr, period), 1)
pwsTXXStats.droppedFirstGrid = True
return
elif pwsTXXStats.dropFirstGridType == "NIGHT":
elif pwsTXXStats.dropFirstGridType == "night":
# We dropped all the necessary grids now that we found a day grid so stop dropping
pwsTXXStats.dropFirstGridType = None
pwsTXXStats.periodWithFirstCorrectGrid = period
@ -2465,12 +2465,12 @@ class WindSectionStats(SectionCommonStats):
elif pwsNXX is not None and not isValidDay:
self._textProduct.debug_print("Wind Window Debug: pwsTXXStats NIGHT", 1)
if pwsTXXStats.dropFirstGridType == "NIGHT":
if pwsTXXStats.dropFirstGridType == "night":
self._textProduct.debug_print("Wind Window Debug: dropping a night grid", 1)
self._textProduct.debug_print("Wind Window Debug: tr = %s, period = %s" % (tr, period), 1)
pwsTXXStats.droppedFirstGrid = True
return
elif pwsTXXStats.dropFirstGridType == "DAY":
elif pwsTXXStats.dropFirstGridType == "day":
# We dropped all the necessary grids now that we found a night grid so stop dropping
pwsTXXStats.dropFirstGridType = None
pwsTXXStats.periodWithFirstCorrectGrid = period

View file

@ -47,11 +47,11 @@ class TextProduct(GenericHazards.TextProduct):
# Map background for creating Combinations
# Header configuration items
Definition["productName"] = "WATCH COUNTY NOTIFICATION" # name of product
Definition["productName"] = "Watch County Notification" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -66,7 +66,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["purgeTime"] = 15 # Maximum hours for expireTime from issueTime
Definition["includeCities"] = 0 # Cities included in area header
Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 0 # Zone names will be included in the area header
Definition["includeIssueTime"] = 0 # This should be set to zero for products
# that do not include a time lime below the UGC
@ -98,9 +98,9 @@ class TextProduct(GenericHazards.TextProduct):
allWatchList.append(hazard['etn'])
if len(allWatchList) == 1:
watchPhrase = " FOR WATCH " + str(allWatchList[0])
watchPhrase = " for watch " + str(allWatchList[0])
else:
watchPhrase = " FOR WATCHES "
watchPhrase = " for watches "
allWatchList.sort()
for x in xrange(len(allWatchList)):
watchPhrase = watchPhrase + str(allWatchList[x])
@ -120,7 +120,7 @@ class TextProduct(GenericHazards.TextProduct):
s = self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n" + self._easPhrase + "\n"
fcst = fcst + s.upper()
return fcst
@ -215,10 +215,10 @@ class TextProduct(GenericHazards.TextProduct):
False) + " " + str(oldWatch['etn'])
validTime = self.getTimingPhrase(newWatch, issuanceTime)
attrPhrase = "THE NATIONAL WEATHER SERVICE HAS ISSUED " + \
attrPhrase = "The National Weather Service has issued " + \
newWatchName + " " + validTime + \
" WHICH REPLACES A PORTION OF " + oldWatchName + '. ' + \
"THE NEW WATCH IS VALID FOR THE FOLLOWING AREAS"
" which replaces a portion of " + oldWatchName + '. ' + \
"The new watch is valid for the following areas"
#
@ -245,14 +245,14 @@ class TextProduct(GenericHazards.TextProduct):
validTime = self.getTimingPhrase(newWatch, issuanceTime)
if oldWatch['endTime'] > argDict['creationTime']:
expirePhrase = "WILL BE ALLOWED TO EXPIRE."
expirePhrase = "will be allowed to expire."
else:
expirePhrase = "HAS EXPIRED."
expirePhrase = "has expired."
attrPhrase = "THE NATIONAL WEATHER SERVICE HAS ISSUED " + \
attrPhrase = "The National Weather Service has issued " + \
newWatchName + ' ' + validTime + ". " + \
oldWatchName + " " + expirePhrase + \
" THE NEW WATCH IS VALID FOR THE FOLLOWING AREAS"
" The new watch is valid for the following areas"
#
# Else if the hazardListLength isn't 2
@ -270,9 +270,9 @@ class TextProduct(GenericHazards.TextProduct):
#
if eachHazard['act'] == 'NEW':
attrPhrase = "THE NATIONAL WEATHER SERVICE HAS ISSUED " +\
watchName + " IN EFFECT " +\
validTime + " FOR THE FOLLOWING AREAS"
attrPhrase = "The National Weather Service has issued " +\
watchName + " in effect " +\
validTime + " for the following areas"
phraseType = "NEW"
#
@ -280,8 +280,8 @@ class TextProduct(GenericHazards.TextProduct):
#
elif eachHazard['act'] == 'CON':
attrPhrase = watchName + " REMAINS VALID " + validTime + \
" FOR THE FOLLOWING AREAS"
attrPhrase = watchName + " remains valid " + validTime + \
" for the following areas"
phraseType = "NEW"
#
@ -290,13 +290,13 @@ class TextProduct(GenericHazards.TextProduct):
elif eachHazard['act'] == 'EXP':
if eachHazard['endTime'] > argDict['creationTime']:
attrPhrase = "THE NATIONAL WEATHER SERVICE " + \
"WILL ALLOW " + watchName + " TO EXPIRE " +\
validTime + " FOR THE FOLLOWING AREAS"
attrPhrase = "The National Weather Service" + \
" will allow " + watchName + " to expire " +\
validTime + " for the following areas"
else:
attrPhrase = "THE NATIONAL WEATHER SERVICE " + \
"HAS ALLOWED " + watchName + " TO EXPIRE" +\
" FOR THE FOLLOWING AREAS"
attrPhrase = "The National Weather Service" + \
" has allowed " + watchName + " to expire" +\
" for the following areas"
phraseType = "EXPIRE"
#
@ -304,9 +304,9 @@ class TextProduct(GenericHazards.TextProduct):
#
elif eachHazard['act'] == 'CAN':
attrPhrase = "THE NATIONAL WEATHER SERVICE " +\
"HAS CANCELLED " + watchName + \
" FOR THE FOLLOWING AREAS"
attrPhrase = "The National Weather Service" +\
" has cancelled " + watchName + \
" for the following areas"
phraseType = "CANCEL"
#
@ -314,8 +314,8 @@ class TextProduct(GenericHazards.TextProduct):
#
elif eachHazard['act'] in ['EXA', 'EXB']:
attrPhrase="THE NATIONAL WEATHER SERVICE HAS EXTENDED " +\
watchName + " TO INCLUDE THE FOLLOWING AREAS " + \
attrPhrase="The National Weather Service has extended " +\
watchName + " to include the following areas " + \
validTime
phraseType = "NEW"
@ -331,18 +331,18 @@ class TextProduct(GenericHazards.TextProduct):
prevRec['endTime'] = eachHazard['previousEnd']
prevExpPhrase = self.getTimingPhrase(prevRec, issuanceTime)
attrPhrase = watchName + "...PREVIOUSLY IN EFFECT " +\
prevExpPhrase + "...IS NOW IN EFFECT " + \
validTime + " FOR THE FOLLOWING AREAS"
attrPhrase = watchName + "...previously in effect " +\
prevExpPhrase + "...is now in effect " + \
validTime + " for the following areas"
#
# Generic Phrase...should never reach this point
#
else:
startingPhrase = "THE NATIONAL WEATHER SERVICE " + \
"HAS ISSUED |* WATCH TYPE *| |* WATCH NUMBER *| " + \
"UNTIL |* WATCH END TIME *| FOR THE FOLLOWING AREAS"
startingPhrase = "The National Weather Service" + \
" has issued |* watch type *| |* watch number *|" + \
" until |* watch end time *| for the following areas"
attrPhrase = startingPhrase
phraseType = "NEW"
@ -355,42 +355,38 @@ class TextProduct(GenericHazards.TextProduct):
# Get the phrasing set up for the type of event
if phraseType == "NEW":
county1 = "IN {area} THIS WATCH INCLUDES {number} {placeType}"
county2 = "IN {area} THIS WATCH INCLUDES {number} {placeTypes}"
indepCity1 = "IN {area} THIS WATCH INCLUDES {number} " + \
"INDEPENDENT CITY"
indepCity2 = "IN {area} THIS WATCH INCLUDES {number} " + \
"INDEPENDENT CITIES"
marine = "THIS WATCH INCLUDES THE FOLLOWING ADJACENT " +\
"COASTAL WATERS"
county1 = "In {area} this watch includes {number} {placeType}"
county2 = "In {area} this watch includes {number} {placeTypes}"
indepCity1 = "In {area} this watch includes {number} " + \
"independent city"
indepCity2 = "In {area} this watch includes {number} " + \
"independent cities"
marine = "This watch includes the following adjacent coastal waters"
elif phraseType == "CANCEL":
county1 = "IN {area} THIS CANCELS {number} {placeType}"
county2 = "IN {area} THIS CANCELS {number} {placeTypes}"
indepCity1 = "IN {area} THIS CANCELS {number} INDEPENDENT CITY"
indepCity2 = "IN {area} THIS CANCELS {number} INDEPENDENT CITIES"
marine = "THIS CANCELS THE FOLLOWING ADJACENT " +\
"COASTAL WATERS"
county1 = "In {area} this cancels {number} {placeType}"
county2 = "In {area} this cancels {number} {placeTypes}"
indepCity1 = "In {area} this cancels {number} INDEPENDENT CITY"
indepCity2 = "In {area} this cancels {number} INDEPENDENT CITIES"
marine = "This cancels the following adjacent coastal waters"
elif phraseType == "EXPIRE":
county1 = "IN {area} THIS ALLOWS TO EXPIRE {number} {placeType}"
county2 = "IN {area} THIS ALLOWS TO EXPIRE {number} {placeTypes}"
indepCity1 = "IN {area} THIS ALLOWS TO EXPIRE {number} " +\
"INDEPENDENT CITY"
county1 = "In {area} this allows to expire {number} {placeType}"
county2 = "In {area} this allows to expire {number} {placeTypes}"
indepCity1 = "In {area} this allows to expire {number} " +\
"independent city"
indepCity2 = "IN {area} THIS ALLOWS TO EXPIRE {number} " +\
"INDEPENDENT CITIES"
marine = "THIS ALLOWS TO EXPIRE THE FOLLOWING ADJACENT " +\
"COASTAL WATERS"
"independent cities"
marine = "This allows to expire the following adjacent coastal waters"
elif phraseType == "REPLACE":
county1 = "IN {area} THE NEW WATCH INCLUDES {number} {placeType}"
county2 = "IN {area} THE NEW WATCH INCLUDES {number} {placeTypes}"
indepCity1 = "IN {area} THE NEW WATCH INCLUDES {number} " + \
"INDEPENDENT CITY"
"independent city"
indepCity2 = "IN {area} THE NEW WATCH INCLUDES {number} " + \
"INDEPENDENT CITIES"
marine = "THE NEW WATCH INCLUDES THE FOLLOWING ADJACENT " +\
"COASTAL WATERS"
"independent cities"
marine = "The new watch includes the following adjacent coastal waters"
else:
raise Exception, "Illegal phraseType in WCN formatter. " +\
@ -545,7 +541,7 @@ class TextProduct(GenericHazards.TextProduct):
return countyList
def _makeTextFromMarineTuple(self, countyTuple, lineLength=66, colWidth=22,
mainFormat="THIS WATCH INCLUDES THE FOLLOWING ADJACENT COASTAL WATERS"):
mainFormat="This watch includes the following adjacent coastal waters"):
#countyTuple: (state, partOfStateAndState, name)
#extract out the marine zones
@ -561,8 +557,8 @@ class TextProduct(GenericHazards.TextProduct):
def _makeTextFromCountyTuple(self, countyTuple, lineLength=66, colWidth=22,
mainFormatSingular="IN {area} THIS WATCH INCLUDES {number} {placeType}",
mainFormatPlural="IN {area} THIS WATCH INCLUDES {number} {placeTypes}",
mainFormatSingular="In {area} this watch includes {number} {placeType}",
mainFormatPlural="In {area} this watch includes {number} {placeTypes}",
subFormat="IN {area}", mode="byState"):
#countyTuple: (state, partOfStateAndState, name)
@ -629,8 +625,8 @@ class TextProduct(GenericHazards.TextProduct):
for state, partStateNames in geoList:
#special District of Columbia, no parts of state descriptors
if state == "DISTRICT OF COLUMBIA":
result = result + "THE DISTRICT OF COLUMBIA\n\n"
if state == "District of Columbia":
result = result + "The District of Columbia\n\n"
continue
ccount = counts.get(state, 0)
@ -640,12 +636,12 @@ class TextProduct(GenericHazards.TextProduct):
header = mainFormatSingular
header = string.replace(header, '{area}', state)
header = string.replace(header, '{number}', str(ccount))
if state == "LOUISIANA":
header = string.replace(header, '{placeType}', "PARISH")
header = string.replace(header, '{placeTypes}', "PARISHES")
if state == "Louisiana":
header = string.replace(header, '{placeType}', "parish")
header = string.replace(header, '{placeTypes}', "parishes")
else:
header = string.replace(header, '{placeType}', "COUNTY")
header = string.replace(header, '{placeTypes}', "COUNTIES")
header = string.replace(header, '{placeType}', "county")
header = string.replace(header, '{placeTypes}', "counties")
result = result + header + '\n\n'
@ -689,8 +685,8 @@ class TextProduct(GenericHazards.TextProduct):
for partState, names in geoList:
#special District of Columbia
if partState.find("DISTRICT OF COLUMBIA") != -1:
result = result + "THE DISTRICT OF COLUMBIA\n\n"
if partState.find("District of Columbia") != -1:
result = result + "The District of Columbia\n\n"
continue
ccount = counts.get(partState, 0)
@ -700,12 +696,12 @@ class TextProduct(GenericHazards.TextProduct):
header = mainFormatSingular
header = string.replace(header, '{area}', partState)
header = string.replace(header, '{number}', str(ccount))
if partState.find("LOUISIANA") != -1:
header = string.replace(header, '{placeType}', "PARISH")
header = string.replace(header, '{placeTypes}', "PARISHES")
if partState.find("Louisiana") != -1:
header = string.replace(header, '{placeType}', "parish")
header = string.replace(header, '{placeTypes}', "parishes")
else:
header = string.replace(header, '{placeType}', "COUNTY")
header = string.replace(header, '{placeTypes}', "COUNTIES")
header = string.replace(header, '{placeType}', "county")
header = string.replace(header, '{placeTypes}', "counties")
counties = self.formatCountyColumns(names, colWidth, lineLength)

View file

@ -54,7 +54,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
#Definition["areaName"] = "STATENAME" # Name of state, such as "GEORGIA"
#Definition["areaName"] = "Statename" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["wfoCity"] = "<wfoCity>" # WFO Name as it should appear in a text product
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
@ -72,7 +72,7 @@ class TextProduct(GenericHazards.TextProduct):
Definition["accurateCities"] = 0 # All cities are included in header;
# if 1, cities are based on grids
Definition["cityLocation"] = "CityLocation" # City lat/lon dictionary to use
Definition["cityDescriptor"] = "INCLUDING THE CITIES OF"
Definition["cityDescriptor"] = "Including the cities of"
Definition["includeZoneNames"] = 1 # Zone names will be included in the area header
Definition["lineLength"] = 66 # Zone names will be included in the area header
#Definition["easPhrase"] = "" # Optional EAS phrase to be include in product header
@ -114,24 +114,24 @@ class TextProduct(GenericHazards.TextProduct):
### Set the default bullets
def _bulletDict(self):
return {
"WS" : ("TIMING,MAIN IMPACT,OTHER IMPACTS"), ## Winter Storm
"WW" : ("TIMING,MAIN IMPACT,OTHER IMPACTS"), ## Winter Weather
"LE" : ("TIMING,SNOW ACCUMULATIONS,OTHER IMPACTS"), ## Lake Effect
"BZ" : ("TIMING,WINDS/VISIBILITY,SNOW ACCUMULATIONS"),## Blizzard
"ZR" : ("TIMING,ICE ACCUMULATIONS,OTHER IMPACTS"), ## Freezing Rain
"IS" : ("TIMING,ICE ACCUMULATIONS,OTHER IMPACTS"), ## Ice Storm
"WC" : ("WIND CHILL VALUES,OTHER IMPACTS"), ## Wind Chill
"WS" : ("Timing,Main impact,Other impacts"), ## Winter Storm
"WW" : ("Timing,Main impact,Other impacts"), ## Winter Weather
"LE" : ("Timing,Snow accumulations,Other impacts"), ## Lake Effect
"BZ" : ("Timing,Winds/visibility,Snow accumulations"),## Blizzard
"ZR" : ("Timing,Ice accumulations,Other impacts"), ## Freezing Rain
"IS" : ("Timing,Ice accumulations,Other impacts"), ## Ice Storm
"WC" : ("Wind chill values,Other impacts"), ## Wind Chill
}
def _bulletOrder(self):
return [
"TIMING",
"WINDS/VISIBILITY",
"SNOW ACCUMULATIONS",
"ICE ACCUMULATIONS",
"WIND CHILL VALUES",
"MAIN IMPACT",
"OTHER IMPACTS",
"Timing",
"Winds/visibility",
"Snow accumulations",
"Ice accumulations",
"Wind chill values",
"Main impact",
"Other impacts",
]
###

View file

@ -37,13 +37,13 @@
# displayName If not None, defines how product appears in GFE GUI
# defaultEditAreas defines edit areas, default is Combinations
#
# productName defines name of product e.g. "MARINE VERIFICATION FORECAST"
# productName defines name of product e.g. "Marine Verification Forecast"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "MVFBOS"
# zoneCode ZONE code for product header, such as "NYZ001>025"
# stateName State name for product header, such as "WESTERN NEW YORK"
# wfoCityState WFO location, such as "BUFFALO NY"
# stateName State name for product header, such as "Western New York"
# wfoCityState WFO location, such as "Buffalo NY"
#
# Optional Configuration Items
# database Source database for product. Can be "Official",
@ -106,12 +106,12 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
("area2", "45005"),
],
# product identifiers
"productName": "MARINE VERIFICATION FORECAST", # product name
"productName": "Marine Verification Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"zoneCode": "stZALL", # Zone Code, such as "GAZ025-056"
"stateName": "<state>", # Name of state, such as "GEORGIA"
"stateName": "<state>", # Name of state, such as "Georgia"
"wfoCityState": "<wfoCityState>", # Location of WFO - city state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.

View file

@ -52,7 +52,7 @@ class TextProduct(GenericReport.TextProduct):
Definition["showZoneCombiner"] = 1 # 1 to cause zone combiner to display
# product identifiers
Definition["productName"] = "SHORT TERM FORECAST" # product name
Definition["productName"] = "Short Term Forecast" # product name
Definition["fullStationID" ] = "<fullStationID>" # 4 letter station ID
Definition["wmoID" ] = "<wmoID>" # WMO code
Definition["wfoCityState" ] = "<wfoCityState>" # Location of WFO

View file

@ -40,12 +40,12 @@
# displayName If not None, defines how product appears in GFE GUI
# defaultEditAreas defines edit areas, default is Combinations
#
# productName defines name of product e.g. "ZONE FORECAST PRODUCT"
# productName defines name of product e.g. "Zone Forecast Product"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "SFTBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState WFO location, such as "BUFFALO NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState WFO location, such as "Buffalo NY"
#
# Optional Configuration Items
# editAreaSuffix default None. Allows for generating the body of the product for
@ -177,11 +177,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"editAreaSuffix": None,
# product identifiers
"productName": "NEARSHORE MARINE FORECAST", # product name
"productName": "Nearshore Marine Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "<state>", # Name of state, such as "GEORGIA"
"areaName": "<state>", # Name of state, such as "Georgia"
"wfoCityState": "<wfoCityState>", # Location of WFO - city state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
@ -229,7 +229,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
return ""
def _lakeStmt(self, argDict):
return "FOR WATERS WITHIN FIVE NAUTICAL MILES OF SHORE ON LAKE (NAME)"
return "For waters within five nautical miles of shore on Lake (name)"
########################################################################
# OVERRIDING THRESHOLDS AND VARIABLES
@ -321,9 +321,9 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def marine_wind_combining_flag(self, tree, node):
# If 1, Wind combining will reflect the
# crossing of significant thresholds such as gales.
# E.g. "HURRICANE FORCE WINDS TO 100 KNOTS." instead of
# "NORTH HURRICANE FORCE WINDS TO 100 KNOTS EASING TO
# HURRICANE FORCE WINDS TO 80 KNOTS IN THE AFTERNOON."
# E.g. "Hurricane force winds to 100 knots." instead of
# "north hurricane force winds to 100 knots easing to
# hurricane force winds to 80 knots in the afternoon."
return 1
def postProcessPhrases(self, tree, node):
@ -585,7 +585,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n" + \
self._lakeStmt(argDict) + "\n\n"
fcst = fcst + self._Text1()

View file

@ -37,12 +37,12 @@
# displayName If not None, defines how product appears in GFE GUI
# defaultEditAreas defines edit areas, default is Combinations
#
# productName defines name of product e.g. "COASTAL WATERS FORECAST"
# productName defines name of product e.g. "Coastal Waters Rorecast"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "OFFBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState City,state that the WFO is located in, such as "BUFFALO, NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState City,state that the WFO is located in, such as "Buffalo, NY"
#
# synopsisUGC UGC code for Synopsis
# synopsisHeading Heading for Synopsis
@ -213,11 +213,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"defaultEditAreas" : "Combinations_OFF_<site>_<MultiPil>",
"editAreaSuffix": None,
# product identifiers
"productName": "OFFSHORE FORECAST", # product name
"productName": "Offshore Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "<state>", # Name of state, such as "GEORGIA" -- optional
"areaName": "<state>", # Name of state, such as "Georgia" -- optional
"wfoCityState": "<wfoCityState>", # Location of WFO - city state
"synopsisUGC": "", # UGC code for synopsis
@ -503,7 +503,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
# MarinePhrases Overrides
def seasWaveHeight_element(self, tree, node):
# Weather element to use for reporting seas
# "COMBINED SEAS 10 TO 15 FEET."
# "combined seas 10 to 15 feet."
# IF above wind or swell thresholds
return "WaveHeight"
@ -930,7 +930,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
fcst = fcst + self._Text1()
try:

View file

@ -665,9 +665,9 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n"
if self._productType == "AFM":
productDescription = "AREA FORECAST MATRICES"
productDescription = "Area Forecast Matrices"
else:
productDescription = "POINT FORECAST MATRICES"
productDescription = "Point Forecast Matrices"
issuedByString = self.getIssuedByString()
@ -676,7 +676,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._pil + "\n\n"
fcst = fcst + productName + "\n"
fcst = fcst + "NATIONAL WEATHER SERVICE "
fcst = fcst + "National Weather Service "
fcst = fcst + self._wfoCityState +"\n"
fcst = fcst + issuedByString
fcst = fcst + self._mndTimeLabel + "\n\n"

View file

@ -60,7 +60,7 @@ class TextProduct(GenericReport.TextProduct):
"defaultEditAreas" : "Combinations_PNS_<site>",
# product identifiers
"productName": "PUBLIC INFORMATION STATEMENT", # product name
"productName": "Public Information Statement", # product name
"fullStationID" : "<fullStationID>", # 4 letter station ID
"wmoID" : "<wmoID>", # WMO code
"wfoCityState" : "<wfoCityState>", # Location of WFO
@ -117,13 +117,13 @@ class TextProduct(GenericReport.TextProduct):
issuedByString = self.getIssuedByString()
productName = self.checkTestMode(argDict, self._productName)
s = productName + "\n" + \
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
fcst = fcst + s.upper()
return fcst
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "...PUBLIC INFORMATION STATEMENT...\n\n"
fcst = fcst + "...Public Information Statement...\n\n"
fcst = fcst + "|* Information goes here *|\n\n"
return fcst

View file

@ -64,7 +64,7 @@ class TextProduct(GenericReport.TextProduct):
"defaultEditAreas" : "Combinations_RFD_<site>",
# product identifiers
"productName": "FIRE DANGER STATEMENT", # product name
"productName": "Fire Danger Statement", # product name
"fullStationID" : "<fullStationID>", # 4 letter station ID
"wmoID" : "<wmoID>", # WMO code
"wfoCityState" : "<wfoCityState>", # Location of WFO
@ -79,7 +79,7 @@ class TextProduct(GenericReport.TextProduct):
"language": "english",
"lineLength": 66, #Maximum line length
"includeCities" : 0, # Cities included in area header
"cityDescriptor" : "INCLUDING THE CITIES OF",
"cityDescriptor" : "Including the cities of",
"includeZoneNames" : 0, # Zone names will be included in the area header
"includeIssueTime" : 0, # This should be set to zero
"singleComboOnly" : 1, # Used for non-segmented products
@ -121,14 +121,14 @@ class TextProduct(GenericReport.TextProduct):
issuedByString = self.getIssuedByString()
productName = self.checkTestMode(argDict, self._productName)
s = productName + "\n" + \
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
fcst = fcst + s.upper()
return fcst
def _makeProduct(self, fcst, editArea, areaLabel, argDict):
fcst = fcst + "|* HEADLINE DESCRIBING FIRE DANGER INDEX LEVEL AND TIME PERIOD *|\n\n"
fcst = fcst + "|* DESCRIBE AREA OF THE FIRE DANGER AND WEATHER CONDITIONS *|"
fcst = fcst + "|* Headline describing fire danger index level and time period *|\n\n"
fcst = fcst + "|* Describe area of the fire danger and weather conditions *|"
return fcst
def _postProcessProduct(self, fcst, argDict):

View file

@ -44,7 +44,7 @@
# (editAreaName, "REGIONLABEL\nCITYLABEL")
# (editAreaName, "CITYLABEL")
#
# productName defines name of product e.g. "TABULAR STATE FORECAST"
# productName defines name of product e.g. "Tabular State Forecast"
#
# fullStationID Full station identifier, 4 letter, such as "KSLC".
#
@ -54,9 +54,9 @@
#
# zoneCode ZONE code for product header, such as "NYZ001>025"
#
# stateName State name for product header, such as "WESTERN NEW YORK"
# stateName State name for product header, such as "Western New York"
#
# wfoCityState WFO location, such as "BUFFALO NY"
# wfoCityState WFO location, such as "Buffalo NY"
#
# Optional Configuration Items
# database Source database for product. Can be "Official",
@ -164,12 +164,12 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
],
# product identifiers
"productName": "TABULAR STATE FORECAST", # product name
"productName": "Tabular State Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"zoneCode": "stZ000", # Zone Code, such as "GAZ025-056"
"stateName": "<state>", # Name of state, such as "GEORGIA"
"stateName": "<state>", # Name of state, such as "Georgia"
"wfoCityState": "<wfoCityState>", # Location of WFO - city state
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
"awipsWANPil": "<awipsWANPil>", # Product ID for transmitting to AWIPS WAN.
@ -360,7 +360,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
self._ddhhmmTime + "\n" + self._pil + "\n" +\
self._zoneCode + "-" + self._ddhhmmTimeExpire + "-\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n" + \
self._rowDescription() + "\n\n" + self._tableHeader() + "\n\n"

View file

@ -65,7 +65,7 @@ class TextProduct(GenericReport.TextProduct):
"AKZ215","AKZ216","AKZ217","AKZ227"]
# product identifiers
Definition["productName"] = "SPECIAL WEATHER STATEMENT" # product name
Definition["productName"] = "Special Weather Statement" # product name
Definition["fullStationID" ] = "<fullStationID>" # 4 letter station ID
Definition["wmoID" ] = "<wmoID>" # WMO code
Definition["wfoCityState" ] = "<wfoCityState>" # Location of WFO
@ -89,7 +89,7 @@ class TextProduct(GenericReport.TextProduct):
# REQUIRED OVERRIDES
def _postProcessArea(self, fcst, editArea, areaLabel, argDict):
return fcst + "|* STATEMENT TEXT *|\n\n$$\n\n"
return fcst + "|* Statement text *|\n\n$$\n\n"
# OPTIONAL OVERRIDES

View file

@ -67,24 +67,24 @@
# For example, If you have:
#
# surfAreas: [
# ("WestCoast", "SURF ALONG WEST FACING REEFS.............."),
# ("NorthCoast", "SURF ALONG NORTH FACING REEFS............."),
# ("EastCoast", "SURF ALONG EAST FACING REEFS.............."),
# ("SouthCoast", "SURF ALONG SOUTH FACING REEFS............."),
# ("WestCoast", "Surf along west facing reefs.............."),
# ("NorthCoast", "Surf along north facing reefs............."),
# ("EastCoast", "Surf along east facing reefs.............."),
# ("SouthCoast", "Surf along south facing reefs............."),
# ]
#
# You would get a surfHeight report for each surfArea listed:
#
# SURF ALONG WEST FACING REEFS................10 TO 12 FEET.
# SURF ALONG NORTH FACING REEFS...............4 TO 6 FEET.
# SURF ALONG EAST FACING REEFS................2 TO 3 FEET.
# SURF ALONG SOUTH FACING REEFS...............4 TO 6 FEET.
# Surf along west facing reefs................10 TO 12 feet.
# Surf along north facing reefs...............4 TO 6 feet.
# Surf along east facing reefs................2 TO 3 feet.
# Surf along south facing reefs...............4 TO 6 feet.
#
# If the list is empty, you will simply get surfHeight reported
# for the current value of the WaveHeight Grid sampled from the
# landSea edit area:
#
# SURF................1 TO 2 FEET.
# Surf................1 TO 2 feet.
#
# "uviCity": The UVI index is take from the previous UVI product (pil is UVI<siteID>).
# This specifies the city name from which to report the uvi index.
@ -107,12 +107,12 @@
# Note that if you always have the same combinations,
# you need only list this additional information for
# one of the zones in each combination.
# productName defines name of product e.g. "ZONE FORECAST PRODUCT"
# productName defines name of product e.g. "Zone Forecast Product"
# fullStationID Full station identifier, 4 letter, such as "KSLC".
# wmoID WMO ID code for product header, such as "FOUS45"
# pil Product pil, such as "SFTBOS"
# areaName (opt.) Area name for product header, such as "WESTERN NEW YORK"
# wfoCityState WFO location, such as "BUFFALO NY"
# areaName (opt.) Area name for product header, such as "Western New York"
# wfoCityState WFO location, such as "Buffalo NY"
#
# Optional Configuration Items
# mapNameForCombinations Name of the map background that is used for
@ -259,11 +259,11 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
# Source database for product. Can be "Official", "Fcst" or "ISC"
"database": "Official",
"debug": 0,
"productName": "SURFZONE FORECAST", # product name
"productName": "Surfzone Forecast", # product name
"fullStationID": "<fullStationID>", # full station identifier (4letter)
"wmoID": "<wmoID>", # WMO ID
"pil": "<pil>", # Product pil
"areaName": "<state>", # Name of state, such as "GEORGIA" -- optional
"areaName": "<state>", # Name of state, such as "Georgia" -- optional
"wfoCityState": "<wfoCityState>", # Location of WFO - city and state name
"textdbPil": "<textdbPil>", # Product ID for storing to AWIPS text database.
@ -365,24 +365,24 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
"chop" : "water condition.....",
"rip" : "rip current risk....",
"HeatIndex": "heat index..........",
"20-FOOT WINDS......." : "Beach WINDS.........",
"MaxT_FireWx":"MAX TEMPERATURE.....",
"SKY/WEATHER.........": "SKY/WEATHER.........",
"sst" : "WATER TEMPERATURE...",
"uvi" : "UVI INDEX...........",
"LAL" : "LIGHTNING THREAT....",
"WaterSpout" : "WATERSPOUT THREAT...",
"PoP" : "CHANCE OF...........",
"20-foot winds......." : "beach winds.........",
"MaxT_FireWx":"max temperature.....",
"Sky/weather.........": "sky/weather.........",
"sst" : "water temperature...",
"uvi" : "UVI index...........",
"LAL" : "lightning threat....",
"WaterSpout" : "waterspout threat...",
"PoP" : "chance of...........",
"MinT":"lows",
"MaxT":"highs",
"Wind": "winds",
# Used for Headlines
"EXPECTED" : "EXPECTED",
"IN EFFECT" : "IN EFFECT",
"Expected" : "expected",
"In effect" : "in effect",
# Used for single values
"around": "around ",
" VALLEYS/LWR SLOPES...": " INLAND...............",
" RIDGES/UPR SLOPES....": " COASTAL..............",
" valleys/lwr slopes...": " inland...............",
" ridges/upr slopes....": " coastal..............",
}
############################################################################
@ -868,7 +868,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
fcst = fcst + self._wmoID + " " + self._fullStationID + " " + \
self._ddhhmmTime + "\n" + self._pil + "\n\n" +\
productName + "\n" +\
"NATIONAL WEATHER SERVICE " + self._wfoCityState + \
"National Weather Service " + self._wfoCityState + \
"\n" + issuedByString + self._timeLabel + "\n\n"
# Try to get Synopsis from previous SRF
@ -883,7 +883,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
areaHeader = self.makeAreaHeader(
argDict, areaLabel, self._issueTime, self._expireTime,
self._areaDictionary, self._defaultEditAreas,
cityDescriptor = "INCLUDING THE BEACHES OF")
cityDescriptor = "Including the beaches of")
fcst = fcst + areaHeader
# get the hazards text
@ -937,8 +937,8 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
# "landSeaArea": "Extra0",
# "marineArea": "Extra1",
# "surfAreas": [
# ('NorthCoast', 'SURF ALONG NORTH FACING REEFS.............'),
# ('SouthCoast', 'SURF ALONG SOUTH FACING REEFS.............')
# ('NorthCoast', 'Surf along north facing reefs.............'),
# ('SouthCoast', 'Surf along south facing reefs.............')
# ],
# "tideTables": ["Cedar Key", "Venice Inlet"],
# },
@ -1116,7 +1116,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def untilPhrasing_flag_dict(self, tree, node):
# If set to 1, "until" time descriptor phrasing will be used.
# E.g. "NORTH WINDS 20 MPH UNTIL 10 AM...THEN 35 MPH"
# E.g. "North winds 20 mph until 10 am...then 35 mph"
dict = TextRules.TextRules.untilPhrasing_flag_dict(self, tree, node)
componentName = node.getComponent().get("name")
if componentName == "SurfPeriod":
@ -1228,7 +1228,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
return self.setWords(node, "")
self.setWords(node, "")
node.set("descriptor", "")
node.set("indentLabel", "20-FOOT WINDS.......")
node.set("indentLabel", "20-foot winds.......")
return self.DONE()
def fireRidgeValleyWind_setUp(self, tree, node):
@ -1380,15 +1380,15 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
return self.setWords(node, "")
lal = self.getValue(stats, "Max", self.SCALAR())
if lal == 1:
value = "NO LIGHTNING"
value = "No lightning"
elif lal == 2:
value = "VERY INFREQUENT DEADLY LIGHTNING"
value = "Very infrequent deadly lightning"
elif lal == 3:
value = "INFREQUENT DEADLY LIGHTNING"
value = "Infrequent deadly lightning"
elif lal == 4:
value = "FREQUENT DEADLY LIGHTNING"
value = "Frequent deadly lightning"
elif lal == 5:
value = "EXTREME DEADLY LIGHTNING"
value = "Extreme deadly lightning"
else:
value = "!!!LAL phrase problem!!!"
return self.setWords(node, value)
@ -1428,15 +1428,15 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
waterSpout = self.getValue(stats, "Max", self.SCALAR())
#print "LLLLLLLLLLLLLLLL", waterSpout
if waterSpout == 1:
value = "NO WATERSPOUTS"
value = "No waterspouts"
elif waterSpout == 2:
value = "VERY SLIGHT CHANCE OF WATERSPOUTS"
value = "Very slight chance of waterspouts"
elif waterSpout == 3:
value = "VERY SLIGHT CHANCE OF WATERSPOUTS"
value = "Very slight chance of waterspouts"
elif waterSpout == 4:
value = "MODERATE CHANCE OF WATERSPOUTS"
value = "Moderate chance of waterspouts"
elif waterSpout == 5:
value = "VERY GOOD CHANCE OF WATERSPOUTS"
value = "Very good chance of waterspouts"
else:
value = "!!!WATERSPOUT phrase problem!!!"
return self.setWords(node, value)
@ -1586,7 +1586,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
if labels == []:
return fcst
fcst = fcst + "\nTIDE INFORMATION...\n"
fcst = fcst + "\nTide Information...\n"
# Get day/month/year
creationTime = time.localtime(argDict["creationTime"])
currentDate = time.strftime("%m/%d/%Y", creationTime)
@ -1613,16 +1613,16 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
#print "tideList", tideList
for timeStr, timeDesc, height, lowHigh in tideList:
if lowHigh == "L":
tideType = "LOW"
tideType = "Low"
else:
tideType = "HIGH"
tideType = "High"
hrMin = timeStr[0:5].lstrip("0")
amPm = timeStr[5:]
if self._includeTideHeights:
height = " " + height + " FEET"
height = " " + height + " feet"
else:
height = ""
fcst = fcst + tideType+" TIDE"+height+" AT "+hrMin+" "+amPm+ "\n"
fcst = fcst + tideType+" tide"+height+" at "+hrMin+" "+amPm+ "\n"
return fcst
@ -1704,7 +1704,7 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
if words is None:
return
if words == "":
words = "MISSING"
words = "Missing"
node.set("descriptor", "")
node.set("indentLabel", "Label"+elementName)
node.set("compound", 1)
@ -1897,9 +1897,9 @@ class TextProduct(TextRules.TextRules, SampleAnalysis.SampleAnalysis):
def ripPhrases(self):
return {
"lowPhrase" : "LOW...HOWEVER...STRONG CURRENTS CAN OCCUR NEAR PIERS AND JETTIES. ALWAYS HAVE A FLOTATION DEVICE WITH YOU IN THE WATER",
"modPhrase" : "MODERATE. A MODERATE RISK OF RIP CURRENTS MEANS WIND AND OR WAVE CONDITIONS SUPPORT STRONGER OR MORE FREQUENT RIP CURRENTS. ALWAYS HAVE A FLOTATION DEVICE WITH YOU IN THE WATER",
"highPhrase" : "HIGH. HIGH SURF AND LARGE SWELLS WILL PRODUCE DANGEROUS POUNDING SURF AND RIP CURRENTS AT THE BEACHES. PEOPLE VISITING THE BEACHES SHOULD STAY OUT OF THE HIGH SURF",
"lowPhrase" : "Low...however...strong currents can occur near piers and jetties. Always have a flotation device with you in the water",
"modPhrase" : "Moderate. A moderate risk of rip currents means wind and or wave conditions support stronger or more frequent rip currents. Always have a flotation device with you in the water",
"highPhrase" : "High. High surf and large swells will produce dangerous pounding surf and rip currents at the beaches. People visiting the beaches should stay out of the high surf",
}
def ripGrid_value(self, value):

View file

@ -60,7 +60,7 @@ Definition["displayName"] = "AFD_<MultiPil>"
# ]
# product identifiers
#Definition["productName"] = "AREA FORECAST DISCUSSION" # full station idr (e.g., KSLC)
#Definition["productName"] = "Area Forecast Discussion" # full station idr (e.g., KSLC)
Definition["fullStationID"] = "<fullStationID>" # full station idr (e.g., KSLC)
Definition["wmoID"] = "<wmoID>" # wmoID
Definition["pil"] = "<pil>" # product pil

View file

@ -78,11 +78,11 @@ elif "<site>" == "AFG":
# Header configuration items
#Definition["productName"] = "COASTAL WATERS FORECAST" # name of product
#Definition["productName"] = "Coastal Waters Forecast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city st
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -77,11 +77,11 @@ elif "<site>" == "AFG":
# Header configuration items
#Definition["productName"] = "COASTAL WATERS FORECAST" # name of product
#Definition["productName"] = "Coastal Waters Forecast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city st
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -68,11 +68,11 @@ if "<site>" == "AFG":
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items
#Definition["productName"] = "FIRE WEATHER PLANNING FORECAST" # name of product
#Definition["productName"] = "Fire Weather Planning Forecast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -71,11 +71,11 @@ if "<site>" == "AFG":
# creating Ridges and Valleys edit areas
# Header configuration items
#Definition["productName"] = "FIRE WEATHER PLANNING FORECAST" # name of product
#Definition["productName"] = "Fire Weather Planning Foercast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city st
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -44,14 +44,14 @@ Definition = {}
# REQUIRED CONFIGURATION ITEMS
#Definition['displayName'] = None
Definition['displayName'] = "FWS_<MultiPil>"
#Definition["productName"] = "SPOT FORECAST" # name of product
#Definition["productName"] = "Spot Forecast" # name of product
Definition["statePil"] = "GTF" # State Pil ID
# Header configuration items
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city st
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.
@ -134,8 +134,8 @@ Definition["stqPil"] = "STQ<site>" # STQ pil
# Definitions to insert unrepresentativeness of the forecast
# instructions for the user.
#Definition["insertUnrepresentStatement"] = 0 # Use 1 for yes, 0 for no
#Definition["unrepresentStatement"] = "IF CONDITIONS BECOME UNREPRESENTATIVE..." + \
# "CONTACT THE NATIONAL WEATHER\nSERVICE."
#Definition["unrepresentStatement"] = "If conditions become unrepresentative..." + \
# "contact the National Weather\nService."
#Definition["tempLocalEffects"] = 1 # Set to 1 to enable Temp and RH local effects AFTER
# creating AboveElev and BelowElev edit areas

View file

@ -55,17 +55,17 @@ Definition["defaultEditAreas"] = [("west_half", "WEST HALF\n\n"),
# Definition["defaultEditAreas"] = [("north_half", "NORTH HALF\n\n"),
# ("south_half", "SOUTH HALF\n\n")]
# # St Clair
#Definition["defaultEditAreas"] = [("ST_CLAIR", "\n\n"),]
#Definition["lake_name"] = "SUPERIOR" # use -- SUPERIOR, HURON, ERIE, ONTARIO, MICHIGAN, ST_CLAIR
#Definition["defaultEditAreas"] = [("St_Clair", "\n\n"),]
#Definition["lake_name"] = "Superior" # use -- Superior, Huron, Erie, Ontario, Michigan, St_Clair
# HEADER AND ZONE CONFIG ITEMS
#Definition["productName"] = "OPEN LAKE FORECAST" # name of product
#Definition["productName"] = "Open Lake Forecast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil in AWIPS XX is the
#lake abbreviation "LE, LS, LO, SC, LM"
#Definition["areaName"] = "LAKE SUPERIOR" # Name of lake, such
# as "LAKE SUPERIOR"
#Definition["areaName"] = "Lake Superior" # Name of lake, such
# as "Lake Superior"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.
@ -73,7 +73,7 @@ Definition["outputFile"] = "{prddir}/TEXT/GLF_<MultiPil>.txt"
#Definition["lakezone"] = "LSZ260" # lake zone code
#Definition["maforzone"] = "LSZ261" # mafor zone code
#Definition["headerphrase"] = "LAKE SUPERIOR FORECAST BEYOND FIVE NAUTICAL MILES FROM SHORE" # header phrase
#Definition["headerphrase"] = "Lake Superior forecast beyond five nautical miles from shore" # header phrase
#Definition["hazardSamplingThreshold"] = (10, None) #(%cov, #points)

View file

@ -58,12 +58,12 @@ Definition["defaultEditAreas"] = [
]
# Header configuration items
#Definition["productName"] = "MARINE VERIFICATION FORECAST" # name of product
#Definition["productName"] = "Marine Verification Forecast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["zoneCode"] = "stZALL" # Zone Code, such as "GAZ025-056"
Definition["stateName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["stateName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -56,11 +56,11 @@ Definition["defaultEditAreas"] = "Combinations_NSH_<site>_<MultiPil>"
Definition["mapNameForCombinations"] = "Marine_Zones_<site>" # Map background for creating Combinations
# Header configuration items
#Definition["productName"] = "NEAR SHORE FORECAST" # name of product
#Definition["productName"] = "Near Shore Forecast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # OPTIONAL Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # OPTIONAL Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -53,11 +53,11 @@ Definition["defaultEditAreas"] = "Combinations_OFF_<site>_<MultiPil>"
Definition["mapNameForCombinations"] = "Marine_Zones_<site>" # Map background for creating Combinations
# Header configuration items
#Definition["productName"] = "COASTAL WATERS FORECAST" # name of product
#Definition["productName"] = "Coastal Waters Forecast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city st
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -46,9 +46,9 @@ Definition = {}
Definition['displayName'] = "SFT_<MultiPil>"
Definition["defaultEditAreas"] = [
("area1", "REGION1\nCITY1"),
("area2", "REGION1\nCITY2"),
("area3", "REGION2\nCITY3"),
("area1", "Region1\nCity1"),
("area2", "Region1\nCity2"),
("area3", "Region2\nCity3"),
]
# Header configuration items
@ -56,7 +56,7 @@ Definition["fullStationID"] = "<fullStationID>" # full station identifier (4let
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["zoneCode"] = "stZ000" # Zone Code, such as "GAZ025-056"
Definition["stateName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["stateName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -86,11 +86,11 @@ if "<site>" == "AFG":
#Definition["waterSpoutGrid"] = "" # Grid for waterspout_phrase (if empty, no phrase appears)
# Header configuration items
#Definition["productName"] = "FIRE WEATHER PLANNING FORECAST" # name of product
#Definition["productName"] = "Fire Weather Planning Forecast" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city st
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -64,11 +64,11 @@ if "<site>" == "AFG":
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items
#Definition["productName"] = "ZONE FORECAST PRODUCT" # name of product
#Definition["productName"] = "Zone Forecast Product" # name of product
Definition["fullStationID"] = "<fullStationID>" # full station identifier (4letter)
Definition["wmoID"] = "<wmoID>" # WMO ID
Definition["pil"] = "<pil>" # product pil
Definition["areaName"] = "<state>" # Name of state, such as "GEORGIA"
Definition["areaName"] = "<state>" # Name of state, such as "Georgia"
Definition["wfoCityState"] = "<wfoCityState>" # Location of WFO - city state
Definition["textdbPil"] = "<textdbPil>" # Product ID for storing to AWIPS text database.
Definition["awipsWANPil"] = "<awipsWANPil>" # Product ID for transmitting to AWIPS WAN.

View file

@ -41,6 +41,7 @@ import com.raytheon.uf.common.util.FileUtil;
* Sep 16, 2013 #1759 dgilling Move tests and autotests to GfeCavePyIncludeUtil.
* Aug 22, 2014 #3500 bclement added python path in getConfigIncludePath()
* Nov 11, 2014 #4953 randerso Changed COMMON_GFE to public
* Jan 23, 2015 #4027 randerso added configured and site to getCommonGfeIncludePath
* Mar 12, 2015 #4246 randerso Changes to support VCModules at base, site, and user levels
* </pre>
*
@ -152,10 +153,17 @@ public class GfePyIncludeUtil extends PythonIncludePathUtil {
public static String getCommonGfeIncludePath() {
String pythonDir = getCommonPythonIncludePath();
String gfeDir = getPath(PATH_MANAGER.getContext(
String baseDir = getPath(PATH_MANAGER.getContext(
LocalizationType.COMMON_STATIC, LocalizationLevel.BASE),
COMMON_GFE);
return PyUtil.buildJepIncludePath(pythonDir, gfeDir);
String configDir = getPath(PATH_MANAGER.getContext(
LocalizationType.COMMON_STATIC, LocalizationLevel.CONFIGURED),
COMMON_GFE);
String siteDir = getPath(PATH_MANAGER.getContext(
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE),
COMMON_GFE);
return PyUtil.buildJepIncludePath(pythonDir, siteDir, configDir,
baseDir);
}
public static String getProceduresIncludePath() {

View file

@ -2,4 +2,20 @@
# Product IDs should be 3 characters long and delimited by commas or white space.
# Overrides to the base file will add to the list of mixed case products
AFD PNS RWS PWO TCD TWD TWO WRK # Phase 1 Products
# Phase 1 Products
#AFD PNS RWS PWO TCD TWD TWO WRK
# Phase 2 Text Products
#ADA ADM ADR AVA AVW AWO BRT FTM PLS SIM SYN
# Phase 2 Climate Refresh Products
#CF6 CLA CLI CLM CLQ CLS CLT LCD
# Phase 2 GFE Forecast Products
#AFM CCF CWF ESF FWF FWM FWS GLF HLS MVF NOW NSH OFF PFM RFD SAF SFT SPS SRF ZFP
# Phase 2 GFE CivilEmerg Products
#ADR AVA AVW CAE CDW CEM EQR EQW EVI FRW HMW LAE LEW NUW RHW SPW TOE VOW
# Phase 2 GFE Hazard Products
#AQA CFW FFA HWO MWS MWW NPW RFW TCV WCN WSW