awips2/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/significantWeatherAdvisory.vm
Jonathan Sanchez b991838494 Issue #3419 Refactored watches to use the county table.
Change-Id: Ide7e07813203213511640d5ee515e73b278089c1

Former-commit-id: 135d7ffa84af58d7b3c9575e654fa1298b76b2e2
2014-07-22 15:32:12 -05:00

332 lines
12 KiB
Text
Executable file

######################################################
## SPS - SIGNIFICANT WEATHER ADVISORY ##
## WRITTEN BY: ##
## TOM BIRCHARD WFO HFO/EVAN BOOKBINDER WFO EAX ##
## Modified by: ##
## Phil Kurimski 16 Sep 2013 OB13.5.2-4 ##
## Evan Bookbinder Sep 18 2013 Implemented config.vm ##
###################################################################
##
##SET SOME INITIAL VARIABLES
#parse("config.vm")
#if(${stormType} == "line")
#set($report = "A LINE OF STRONG THUNDERSTORMS WERE REPORTED")
#set($reportType1 = "LINE OF STRONG THUNDERSTORMS")
#set($reportType2 = "THESE STORMS WERE")
#else
#set($report = "A STRONG THUNDERSTORM WAS REPORTED")
#set($reportType1 = "STRONG THUNDERSTORM")
#set($reportType2 = "THIS STORM WAS")
#end
#set($windThreat = "")
#set($hailThreat = "")
#set($hailTrail = "")
#############################################################
#### CREATE BASIS WORDING ###################################
#############################################################
#if(${list.contains(${bullets}, "doppler")})
#set($report = "DOPPLER RADAR WAS TRACKING A ${reportType1}")
#set($reportAuthSVR = "CAPABLE OF PRODUCING")
#end
#if(${list.contains(${bullets}, "stormSpotters")})
#set($report = "TRAINED WEATHER SPOTTERS REPORTED A ${reportType1}")
#set($reportAuthSVR = "PRODUCING")
#end
#if(${list.contains(${bullets}, "lawEnforcement")})
#set($report = "LOCAL LAW ENFORCEMENT REPORTED A ${reportType1}")
#set($reportAuthSVR = "PRODUCING")
#end
#if(${list.contains(${bullets}, "emergencyMgmt")})
#set($report = "EMERGENCY MANAGEMENT REPORTED A ${reportType1}")
#set($reportAuthSVR = "PRODUCING")
#end
#if(${list.contains(${bullets}, "public")})
#set($report = "THE PUBLIC REPORTED A ${reportType1}")
#set($reportAuthSVR = "PRODUCING")
#end
#if(${list.contains(${bullets}, "amateurRadio")})
#set($report = "AMATEUR RADIO OPERATORS REPORTED A ${reportType1}")
#set($reportAuthSVR = "PRODUCING")
#end
###################################################
## HANDLE WIND POSSIBILITIES ######################
###################################################
#set($windSpeed = 0)
#if(${list.contains(${bullets}, "wind30")})
#set($windThreat = "WINDS IN EXCESS OF 30 MPH")
#set($windSpeed = 30)
#set($windTag = "30MPH")
#end
#if(${list.contains(${bullets}, "wind40")})
#set($windThreat = "WINDS IN EXCESS OF 40 MPH")
#set($windSpeed = 40)
#set($windTag = "40MPH")
#end
#if(${list.contains(${bullets}, "wind50")})
#set($windThreat = "WIND GUSTS UP TO 50 MPH")
#set($windSpeed = 50)
#set($windTag = "50MPH")
#end
#if(${list.contains(${bullets}, "wind55")})
#set($windThreat = "WIND GUSTS OF 50 TO 55 MPH")
#set($windSpeed = 50)
#set($windTag = "55MPH")
#end
###################################################
## HANDLE HAIL POSSIBILITIES ######################
###################################################
#set($hailSize = 0)
#set($smallHail = "")
#if(${list.contains(${bullets}, "peaHail")})
#set($hailSize = 0.25)
#set($hailThreat = "PEA SIZE")
#set($hailTrail = " HAIL")
#end
#if(${list.contains(${bullets}, "halfHail")})
#set($hailSize = 0.50)
#set($hailThreat = "HALF INCH")
#set($hailTrail = " HAIL")
#end
#if(${list.contains(${bullets}, "dimeHail")})
#set($hailSize = 0.75)
#set($hailThreat = "DIME SIZE")
#set($hailTrail = " HAIL")
#end
#if(${list.contains(${bullets}, "nickelHail")})
#set($hailSize = 0.88)
#set($hailThreat = "NICKEL SIZE")
#set($hailTrail = " HAIL")
#end
################################################################
######### ~*~*~*~*~*~* BEGIN OUTPUT ~*~*~*~*~*~*~ ##############
################################################################
${WMOId} ${vtecOffice} 000000 ${BBBId}
SPS${siteId}
#if(${productClass}=="T")
TEST...SPECIAL WEATHER STATEMENT...TEST##
#else
SPECIAL WEATHER STATEMENT##
#end
NATIONAL WEATHER SERVICE ${officeShort}
#backupText(${backupSite})
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
#if(${productClass}=="T")
...THIS MESSAGE IS FOR TEST PURPOSES ONLY...
#end
${ugcline}
#foreach (${area} in ${areas})
${area.name}##
#if(${includeStateAbbreviation}==true)
${area.stateabbr}##
#end
-##
#end
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#if(${windSpeed} >= 40 || ${hailSize} >= 0.70)
...SIGNIFICANT WEATHER ADVISORY FOR ##
###zoneHeadlineLocList(${areas} true true true false)
##REPLACE WITH THE LINE ABOVE WITH THE FOLLOWING IF YOU USE ZONE OUTPUT
#headlineLocList(${affectedCounties} true true true false)
#secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone})
...##
#elseif(${windSpeed} == 0 && ${hailSize} == 0)
!** YOU DID NOT SELECT ANY WIND OR HAIL THREATS. PLEASE RE-GENERATE THIS ADVISORY **!
#else
...SPECIAL WEATHER STATEMENT...
#end
######################################################
###### Storm current location description ##########
######################################################
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#thirdBullet(${dateUtil},${event},${timeFormat},${localtimezone},${secondtimezone})
...${report} ##
##Many of the variables passed below are controlled by config.vm
#if(${stormType} == "line")
#handleClosestPoints(${list}, ${closestPoints}, ${otherClosestPoints}, ${stormType}, ${nearPhrase} , ${maxLandNearDistance}, ${overPhrase}, ${maxLandOverDistance}, ${landDistanceUnits}, ${useSecondReferenceLine})
#else
#handleClosestPoints(${list}, ${closestPoints}, ${otherClosestPoints}, ${stormType}, ${nearPhrase} , ${maxLandNearDistance}, ${overPhrase}, ${maxLandOverDistance}, ${landDistanceUnits}, ${useSecondReferenceCell})
#end
#if(${movementSpeed} < ${landStationary} || ${stationary})
. ${reportType2} NEARLY STATIONARY. ${smallHail}
#else
#if(${stormType} == "line")
...AND MOVING ##
#else
...MOVING ##
#end
#direction(${movementDirectionRounded}) AT ${mathUtil.roundTo5(${movementSpeed})} MPH. ${smallHail}
#end
#if(${stormType} == "line")
#if(${hailThreat} != "" && ${windThreat} != "")
${hailThreat}${hailTrail} AND ${windThreat} WILL BE POSSIBLE WITH THESE STORMS.
#elseif(${hailThreat}=="" && ${windThreat}!="")
${windThreat} WILL BE POSSIBLE WITH THESE STORMS.
#elseif(${hailThreat}!="" && ${windThreat}=="")
${hailThreat}${hailTrail} WILL BE POSSIBLE WITH THESE STORMS.
#end
#else
#if(${hailThreat} != "" && ${windThreat} != "")
${hailThreat}${hailTrail} AND ${windThreat} WILL BE POSSIBLE WITH THIS STORM.
#elseif(${hailThreat}=="" && ${windThreat}!="")
${windThreat} WILL BE POSSIBLE WITH THIS STORM.
#elseif(${hailThreat}!="" && ${windThreat}=="")
${hailThreat}${hailTrail} WILL BE POSSIBLE WITH THIS STORM.
#end
#end
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
###################################################
######## GENERATE PATHCAST OR CITIES LIST #########
###################################################
#if(${stormType} == "line")
#set($pathcastLead = "STRONG THUNDERSTORMS")
#set($otherLead = "THESE STORMS")
#else
#set($pathcastLead = "THIS STRONG THUNDERSTORM")
#set($otherLead = "THIS STORM")
#end
#if(${list.contains(${bullets}, "pathcast")})
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#pathCast("${pathcastLead} WILL BE NEAR..." ${otherLead} ${pathCast} ${otherPoints} ${affectedCounties} ${dateUtil} ${timeFormat} 0)
#elseif(${list.contains(${bullets}, "listofcities")})
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#### THE THIRD ARGUMENT IS A NUMBER SPECIFYING THE NUMBER OF COLUMNS TO OUTPUT THE CITIES LIST IN
#### 0 IS A ... SEPARATED LIST, 1 IS ONE PER LINE, >1 IS A COLUMN FORMAT
#### IF YOU USE SOMETHING OTHER THAN "LOCATIONS IMPACTED INCLUDE" LEAD IN BELOW, MAKE SURE THE
#### ACCOMPANYING XML FILE PARSE STRING IS CHANGED TO MATCH!
#locationsList("LOCATIONS IMPACTED INCLUDE..." ${otherLead} 0 ${cityList} ${otherPoints} ${affectedCounties} ${dateUtil} ${timeFormat} 0)
#end
##############################################
##############################################
###### SPECIAL VENUE/EVENT CASE ##############
##############################################
#if(${list.contains(${bullets}, "specialEvent")})
#if(${stormType} == "line")
THOSE ATTENDING THE !**event/venue name or location**! ARE IN THE PATH OF THESE STORMS AND SHOULD PREPARE FOR IMMINENT DANGEROUS WEATHER CONDITIONS.
#else
THOSE ATTENDING THE !**event/venue name or location**! ARE IN THE PATH OF THIS STORM AND SHOULD PREPARE FOR IMMINENT DANGEROUS WEATHER CONDITIONS.
#end
#end
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
## parse file command here is to pull in mile marker info
## #parse("mileMarkers.vm")
## Uncomment below pull in point marker info
## #parse("pointMarkers.vm")
##################################
######### CALLS TO ACTION ########
##################################
#foreach (${bullet} in ${bullets})
#if(${bullet.endsWith("CTA")})
#set($ctaSelected = "YES")
#end
#end
##
#if(${ctaSelected} == "YES")
PRECAUTIONARY/PREPAREDNESS ACTIONS...
#end
#if(${list.contains(${bullets}, "torrentialRainfallCTA")})
#if(${stormType} == "line")
TORRENTIAL RAINFALL IS ALSO OCCURRING WITH THESE STORMS...AND MAY LEAD TO FLASH FLOODING. DO NOT DRIVE YOUR VEHICLE THROUGH FLOODED ROADWAYS.
#else
TORRENTIAL RAINFALL IS ALSO OCCURRING WITH THIS STORM...AND MAY LEAD TO FLASH FLOODING. DO NOT DRIVE YOUR VEHICLE THROUGH FLOODED ROADWAYS.
#end
#end
#if(${list.contains(${bullets}, "lightningCTA")})
#if(${stormType} == "line")
FREQUENT CLOUD TO GROUND LIGHTNING IS OCCURRING WITH THESE STORMS. LIGHTNING CAN STRIKE 15 MILES AWAY FROM A THUNDERSTORM. SEEK A SAFE SHELTER INSIDE A BUILDING OR VEHICLE.
#else
FREQUENT CLOUD TO GROUND LIGHTNING IS OCCURRING WITH THIS STORM. LIGHTNING CAN STRIKE 15 MILES AWAY FROM A THUNDERSTORM. SEEK A SAFE SHELTER INSIDE A BUILDING OR VEHICLE.
#end
#end
##
#if(${list.contains(${bullets}, "stormIntensify")})
#if(${stormType} == "line")
THESE STORMS MAY INTENSIFY...SO BE CERTAIN TO MONITOR LOCAL RADIO AND TV STATIONS...AS WELL AS LOCAL CABLE TV OUTLETS...FOR ADDITIONAL INFORMATION AND POSSIBLE WARNINGS FROM THE NATIONAL WEATHER SERVICE.
#else
THIS STORM MAY INTENSIFY...SO BE CERTAIN TO MONITOR LOCAL RADIO AND TV STATIONS...AS WELL AS LOCAL CABLE TV OUTLETS...FOR ADDITIONAL INFORMATION AND POSSIBLE WARNINGS FROM THE NATIONAL WEATHER SERVICE.
#end
#end
##
#if(${list.contains(${bullets}, "lawEnforcementCTA")})
TO REPORT SEVERE WEATHER...CONTACT YOUR NEAREST LAW ENFORCEMENT AGENCY. THEY WILL RELAY YOUR REPORT TO THE NATIONAL WEATHER SERVICE OFFICE IN ${officeLoc}.
#end
##
#if(${list.contains(${bullets}, "boatersCTA")})
IF ON OR NEAR !**Name Of Lake**!...GET OUT OF THE WATER AND MOVE INDOORS OR INSIDE A VEHICLE. REMEMBER...LIGHTNING CAN STRIKE OUT TO 15 MILES FROM THE PARENT THUNDERSTORM. IF YOU CAN HEAR THUNDER...YOU ARE CLOSE ENOUGH TO BE STRUCK BY LIGHTNING. MOVE TO SAFE SHELTER NOW. DO NOT BE CAUGHT ON THE WATER IN A THUNDERSTORM.
#end
##
#if(${ctaSelected} == "YES")
&&
#end
#############
## WATCHES ##
#############
#if(${list.contains(${includedWatches}, "TO.A")})
#inserttorwatches(${watches}, ${list}, ${secondtimezone}, ${dateUtil}, ${timeFormat})
#end
#if(${list.contains(${includedWatches}, "SV.A")})
#insertsvrwatches(${watches}, ${list}, ${secondtimezone}, ${dateUtil}, ${timeFormat})
#end
####################################
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. DO NOT TAKE ACTION BASED ON THIS MESSAGE.
####################################
#end
#printcoords(${areaPoly}, ${list})
#tml(${TMLtime}, ${timeFormat}, ${movementDirection}, ${movementInKnots}, ${eventLocation})
$$
#parse("forecasterName.vm")