awips2/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/impactSpecialMarineWarning.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

499 lines
20 KiB
Text
Executable file

#####################################################
## SPECIAL MARINE WARNING TEMPLATE ##
## FOR CR IMPACT BASED WARNING INITIATIVE ##
## CREATED BY PHIL KURIMSKI - WFO DTX ##
## UPDATED PHIL KURIMSKI -- SEP 17 2013 OB13.5.2-4 ##
## EVAN BOOKBINDER -- SEP 18 2013 Implemented config.vm
######################################################
#parse("config.vm")
################################################
## Set null variables used in the template
################################################
#set($capable = "")
#set($ashfallPath = "")
#set($debrisflowPath = "")
#set($ashfallInfo = "")
#set($debrisflowInfo = "")
#set($ashfallCTA = "")
#set($spoutTag = "")
#set($source = "RADAR INDICATED.")
#set($extraSource = "")
#set($spoutThreat = "")
################################################
## Set up override for ashfall warning
## This will change Special Marine Warning to
## Ashfall Warning Per the 10-313 Directive
################################################
#if(${list.contains(${bullets}, "ashfall")})
#set($ashfallHeadline = "ASHFALL WARNING FOR VOLCANIC ASH AND OTHER HAZARDS FOR...")
#end
################################################
${WMOId} ${vtecOffice} 000000 ${BBBId}
SMW${siteId}
${ugcline}
/${productClass}.${action}.${vtecOffice}.MA.W.${etn}.${dateUtil.format(${start}, ${timeFormat.ymdthmz})}-${dateUtil.format(${expire}, ${timeFormat.ymdthmz}, 15)}/
BULLETIN - IMMEDIATE BROADCAST REQUESTED
#if(${productClass}=="T")
TEST...SPECIAL MARINE WARNING...TEST
#else
SPECIAL MARINE WARNING
#end
NATIONAL WEATHER SERVICE ${officeShort}
#backupText(${backupSite})
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
#if(${productClass}=="T")
...THIS MESSAGE IS FOR TEST PURPOSES ONLY...
#end
#headline(${officeLoc}, ${backupSite})
* ##
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
##################################################
## Override for Ashfall Warning
##################################################
#if(${ashfallHeadline})
${ashfallHeadline}
#else
SPECIAL MARINE WARNING FOR...
#end
#######################################################################
## Coding to use the raw marine zone output from the shapefiles
## Comment this section out if you are combining your marine zones
#######################################################################
#foreach (${area} in ${areas})
##
${area.name}...
#end
#######################################################################
## End of code for raw marine zone output from the shapefiles
#######################################################################
#######################################################################
## The following code will create a string of marine zone fips codes
## which will be important in combining marine zones
#######################################################################
#######################################################################
## Set the fipsstring variable to null for marine zone combinations
#######################################################################
#set($fipsstring = "")
#foreach (${area} in ${areas})
#set($fipsstring = $fipsstring + $area.fips + "-")
#end
#######################################################################
## Parse in the marineCombo.vm file which contains marine zone combinations
## Uncomment the parse command if you are combining your marine zones
#######################################################################
##parse("marineCombo.vm")
#######################################################################
## End of the marine zone combination script
#######################################################################
* ##
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone})
#######################################################################
## List of Event Types. Added several events such as Shower...Cloud and Front.
## Removed Strong and Severe Thunderstorm selections and placed logic in the
## wind and hail selections that will change wording for Severe Thunderstorms.
#######################################################################
#set($eventType = "THUNDERSTORM")
#if(${list.contains(${bullets}, "thunderstorm")})
#set($eventType = "THUNDERSTORM")
#set($severeType = "STRONG")
#end
#if(${list.contains(${bullets}, "shower")})
#set($eventType = "SHOWER")
#end
#if(${list.contains(${bullets}, "cloud")})
#set($eventType = "CLOUD")
#end
#if(${list.contains(${bullets}, "front")})
#set($eventType = "FRONT")
#end
#if(${list.contains(${bullets}, "volcano")})
#set($eventType = "VOLCANO")
#end
#######################################################################
## Added a Threat Section to the template that includes Wind...Hail
## and Waterspout selections.
## Strong Thunderstorm will change to Severe Thunderstorm automatically based on
## selections in Wind...Hail and Waterspout sections.
#######################################################################
#set($windTag = "<34")
#set($windCTA = "GUSTY WINDS")
#if(${list.contains(${bullets}, "34ktWind")})
#set($windTag = ">34")
#set($windType = "WIND GUSTS 34 KNOTS OR GREATER")
#set($windCTA = "${windType}")
#end
#if(${list.contains(${bullets}, "40ktWind")})
#set($windTag = "40")
#set($windType = "WIND GUSTS TO 40 KNOTS")
#set($windCTA = "${windType}")
#end
#if(${list.contains(${bullets}, "40ktplusWind")})
#set($windTag = "49")
#set($windType = "WIND GUSTS TO NEARLY 50 KNOTS")
#set($windCTA = "${windType}")
#end
#if(${list.contains(${bullets}, "50ktWind")})
#set($windTag = "50")
#set($windType = "WIND GUSTS IN EXCESS OF 50 KNOTS")
#set($severeType = "SEVERE")
#set($windCTA = "${windType}")
#end
#if(${list.contains(${bullets}, "65ktWind")})
#set($windTag = "65")
#set($windType = "WIND GUSTS IN EXCESS OF 65 KNOTS")
#set($severeType = "SEVERE")
#set($windCTA = "${windType}")
#end
#set($hailTag = "0.00")
#set($hailCTA = "")
#if(${list.contains(${bullets}, "smallHail")})
#set($hailTag = "<.75")
#set($hailType = "SMALL HAIL")
#set($hailCTA = "...${hailType}")
#end
#if(${list.contains(${bullets}, "largeHail")})
#set($hailTag = ">.75")
#set($hailType = "LARGE HAIL")
#set($severeType = "SEVERE")
#set($hailCTA = "...${hailType}")
#end
#if(${list.contains(${bullets}, "destructiveHail")})
#set($hailTag = ">2.0")
#set($hailType = "LARGE DESTRUCTIVE HAIL")
#set($severeType = "SEVERE")
#set($hailCTA = "...${hailType}")
#end
#if(${list.contains(${bullets}, "sightedSpout")})
#set($spoutTag = "WATERSPOUT...OBSERVED")
#set($spoutType = "WATERSPOUTS")
#set($severeType = "SEVERE")
#end
#if(${list.contains(${bullets}, "possibleSpout")})
#set($spoutTag = "WATERSPOUT...POSSIBLE")
#set($spoutType = "WATERSPOUTS")
#set($capable = "CAPABLE OF ")
#set($severeType = "SEVERE")
#end
################################################
## Threat section for Volcanic Situations
################################################
#if(${list.contains(${bullets}, "ashfall")})
#set($ashfallType = "ASHFALL")
#set($ashfallPath = "VOLCANIC ASH")
#set($ctaSelected = "YES")
#set($ashfallCTA = "ASH IS AN EYE AND RESPIRATORY IRRITANT AND IS ABRASIVE. THOSE WITH RESPIRATORY SENSITIVITIES SHOULD TAKE EXTRA PRECAUTIONS TO MINIMIZE EXPOSURE. PROTECT ELECTRONICS AND COVER AIR INTAKES IF ASHFALL IS EXPECTED OR CONFIRMED. REMOVE ASH FROM SURFACES WITH WATER IF POSSIBLE TO PREVENT EXCESSIVE ACCUMULATION.")
#set($ashfallInfo = "AN ASHFALL WARNING MEANS THAT THE VOLCANO IS UNDERGOING A MAJOR ERUPTION. IT IS VERY LIKELY THAT MARINERS WILL BE AFFECTED BY VOLCANIC HAZARDS IN THE WARNING AREAS SUCH AS SIGNIFICANT DEBRIS...ASHFALL ONE QUARTER INCH OR GREATER...LAVA...OR LAHAR AND DEBRIS FLOWS.")
#end
#if(${list.contains(${bullets}, "debrisFlow")})
#set($debrisflowType = "DEBRIS FLOW")
#set($debrisflowPath = "DEBRIS FLOW")
#set($debrisflowInfo = "THE ERUPTION OF THE VOLCANO CAN CAUSE A SUDDEN MELTING OF SNOW AND ICE ON THE MOUNTAIN. THIS WILL RESULT IN A TORRENT OF MUD...ASH...ROCK...AND HOT WATER TO FLOW DOWN THE MOUNTAIN AND INTO THE NEARBY WATERS.")
#end
##################################################################################
## Logic to put together the threats based on Wind...Hail and Waterspout sections.
##################################################################################
#if(${spoutType} && ${windType} && ${hailType})
#set($threat = "${spoutType}...${windType} AND ${hailType}")
#elseif(${spoutType} && ${hailType})
#set($threat = "${spoutType} AND ${hailType}")
#elseif(${spoutType} && ${windType})
#set($threat = "${spoutType} AND ${windType}")
#elseif(${windType} && ${hailType})
#set($threat = "${windType} AND ${hailType}")
#elseif(${spoutType})
#set($threat = "${spoutType}")
#elseif(${windType})
#set($threat = "${windType}")
#elseif(${hailType})
#set($threat = "${hailType}")
#else
#set($threat = "!**YOU DID NOT SELECT ANY THREATS. PLEAST RE-GENERATE THIS WARNING!**!")
#end
#set($hazard = "${threat}.")
#######################################################################
## Logic for Volcanic Threats. If selected this will override any
## other selections for wind/hail/spouts.
#######################################################################
#if(${ashfallType} && ${debrisflowType})
#set($threat = "${ashfallType} AND ${debrisflowType}")
#set($volcanoPath = "${ashfallPath} AND ${debrisflowPath}")
#elseif(${ashfallType})
#set($threat = "${ashfallType}")
#set($volcanoPath = "${ashfallPath}")
#elseif(${debrisflowType})
#set($threat = "${debrisflowType}")
#set($volcanoPath = "${debrisflowPath}")
#else
#end
#########################################################################
## Section to determine Thunderstorm Severity based on Threat Selections.
#########################################################################
#if(${eventType} == "THUNDERSTORM")
#set($thunderstormType = "${severeType} ${eventType}")
#set($eventType = "${thunderstormType}")
#end
#######################################################################
## Section to create line wording based on track type.
#######################################################################
#set($stormline = "A ${eventType}")
#set($pathheader = "THE ${eventType}")
#set($specialEvent = "THIS ${eventType}")
#set($reportType2 = "THE ${eventType} WAS")
#if(${stormType} == "line")
#set($stormline = "A LINE OF ${eventType}S")
#set($pathheader = "${eventType}S")
#set($specialEvent = "THESE ${eventType}S")
#set($reportType2 = "THE ${eventType}S WERE")
#end
###########################################################################
## Corrective coding to prevent the use of "Line of Fronts" in the Product.
###########################################################################
#if(${eventType} == "FRONT")
#set($stormline = "A ${eventType}")
#set($pathheader = "THE ${eventType}")
#set($specialEvent = "THIS ${eventType}")
#set($reportType2 = "THE ${eventType} WAS")
## #set($stormType = "")
#end
#######################################################################
## Coding for volcanos...this will override all other selections.
#######################################################################
#set($impacted = "LOCATIONS IMPACTED INCLUDE...")
#if(${eventType} == "VOLCANO")
#set($stormline = "AN ERUPTION OF !** NAME OF VOLCANO**! VOLCANO")
#set($pathheader = "THE ${volcanoPath}")
#set($reportType2 = "THE ${volcanoPath} WAS")
#set($specialEvent = "THE ${volcanoPath}")
## #set($stormType = "")
#set($impacted = "LOCATIONS IMPACTED BY ${volcanoPath} INCLUDE...")
#end
##########################################################################
## Basis section that incorporates line phenomena...capable vs producing
## and threat based on selections above. Added Satellite Imagery to basis.
##########################################################################
#set($report = "!** YOU DIDN'T SELECT A REPORTER **! ${eventType}")
#if(${list.contains(${bullets}, "doppler")})
#set($source = "RADAR INDICATED.")
#set($capable = "CAPABLE OF ")
## #set($report = "DOPPLER RADAR INDICATED ${stormline}...${capable}PRODUCING ${threat}...")
#end
#if(${list.contains(${bullets}, "doppler")} && ${list.contains(${bullets}, "sightedSpout")})
## #set($report = "DOPPLER RADAR INDICATED ${stormline}...PRODUCING ${threat}...")
#end
#if(${list.contains(${bullets}, "marineSpotter")})
#set($source = "MARINE WEATHER SPOTTER.")
## #set($report = "MARINE WEATHER SPOTTERS REPORTED ${stormline}...${capable}PRODUCING ${threat}...")
#end
#if(${list.contains(${bullets}, "mariner")})
#set($source = "MARINER.")
## #set($report = "A MARINER REPORTED ${stormline}...${capable}PRODUCING ${threat}...")
#end
#if(${list.contains(${bullets}, "public")})
#set($source = "PUBLIC.")
## #set($report = "THE PUBLIC REPORTED ${stormline}...${capable}PRODUCING ${threat}...")
#end
#if(${list.contains(${bullets}, "pilot")})
#set($source = "PILOT.")
## #set($report = "A PILOT REPORTED ${stormline}...${capable}PRODUCING ${threat}...")
#end
#if(${list.contains(${bullets}, "satellite")})
#set($source = "SATELLITE IMAGERY INDICATED.")
#set($capable = "CAPABLE OF ")
## #set($report = "SATELLITE IMAGERY INDICATED ${stormline}...${capable}PRODUCING ${threat}...")
#end
#if(${list.contains(${bullets}, "satellite")} && ${list.contains(${bullets}, "sightedSpout")})
## #set($report = "SATELLITE IMAGERY INDICATED ${stormline}...PRODUCING ${threat}...")
#end
## If waterspouts are observed override the capable wording
#if(${list.contains(${bullets}, "sightedSpout")})
#set($capable = "")
#end
## If waterspouts are selected include them in the AT... section of the product
#if($spoutTag.length() > 0)
#set($spoutThreat = " ${capable}PRODUCING ${spoutType}")
#end
#set($report = "${stormline}${spoutThreat}...")
## Storm current location description
* ##
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#thirdBullet(${dateUtil},${event},${timeFormat},${localtimezone},${secondtimezone})
...${report}LOCATED ##
#if(${stormType} == "line")
#handleClosestPoints(${list}, ${closestPoints}, ${otherClosestPoints}, ${stormType}, ${nearPhrase} , ${maxMarineNearDistance}, ${overPhrase}, ${maxMarineOverDistance}, ${marineDistanceUnits}, ${useSecondReferenceLine})
#else
#handleClosestPoints(${list}, ${closestPoints}, ${otherClosestPoints}, ${stormType}, ${nearPhrase} , ${maxMarineNearDistance}, ${overPhrase}, ${maxMarineOverDistance}, ${marineDistanceUnits}, ${useSecondReferenceCell})
#end
#if(${eventType} == "VOLCANO")
.
#elseif(${movementSpeed} < ${marineStationary} || ${stationary})
. ${reportType2} NEARLY STATIONARY.
#else
...MOVING #direction(${movementDirectionRounded}) AT ${mathUtil.roundTo5(${movementSpeed})} KNOTS.
#end
#############################################
######## GENERATE ADDITIONAL REPORTS #######
#############################################
#if(${list.contains(${bullets}, "addlRpt")})
#set($extraSource = " AT !**enter time, phenomena**! WAS REPORTED !**enter location**!.")
#end
##########################################################################
## Command to parse the impact statements into the template
##########################################################################
#parse("impactStatements.vm")
###################################
## Section to include the hazard ##
###################################
#wrapText("HAZARD...${hazard}" 2 11)
#wrapText("SOURCE...${source}${extraSource}" 2 11)
#wrapText("IMPACT...${smwimpact}" 2 11)
${ashfallInfo}
${debrisflowInfo}
#set($eventType = "${pathheader}")
#set($warningType = "WARNING")
#if(${list.contains(${bullets}, "pathcast")})
* ##
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#pathCast("${eventType} WILL BE NEAR..." ${eventType} ${pathCast} ${otherPoints} ${areas} ${dateUtil} ${timeFormat} 1)
#elseif(${list.contains(${bullets}, "listoflocations")})
* ##
#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("${impacted}" "${eventType}" 0 ${locationList} ${otherPoints} ${areas} ${dateUtil} ${timeFormat} 1)
#end
##############################################
###### SPECIAL VENUE/EVENT CASE ##############
##############################################
#if(${list.contains(${bullets}, "specialEvent")})
THOSE ATTENDING !**event/venue name or location**! ARE IN THE PATH OF ${specialEvent} AND SHOULD PREPARE FOR IMMINENT DANGEROUS WEATHER CONDITIONS. SEEK SHELTER NOW.
#end
#####################
## CALL TO ACTIONS ##
#####################
#######################################################################
## Check to see if we've selected any calls to action. In our .xml file
## we ended each CTA bullet ID with "CTA" for this reason as a 'trip'
#######################################################################
#foreach (${bullet} in ${bullets})
#if(${bullet.endsWith("CTA")})
#set($ctaSelected = "YES")
#end
#end
#if(${ctaSelected} == "YES")
PRECAUTIONARY/PREPAREDNESS ACTIONS...
#end
##
${ashfallCTA}
#if(${list.contains(${bullets}, "genericCTA")})
#if(${stormType} == "line")
AS THUNDERSTORMS MOVE OVER THE WATER...BOATERS CAN EXPECT GUSTY WINDS AND HIGH WAVES. MOVE TO SAFE HARBOR OR STAY CLOSE TO SHORE UNTIL THESE STORMS PASS.
#else
AS THIS THUNDERSTORM MOVES OVER THE WATER...BOATERS CAN EXPECT GUSTY WINDS AND HIGH WAVES. MOVE TO SAFE HARBOR OR STAY CLOSE TO SHORE UNTIL THE STORM PASSES.
#end
#end
#if(${list.contains(${bullets}, "gustyWindsCTA")})
#if(${stormType} == "line")
MARINERS CAN EXPECT GUSTY WINDS...HIGH WAVES...DANGEROUS LIGHTNING...AND HEAVY RAINS. BOATERS SHOULD SEEK SAFE HARBOR IMMEDIATELY...UNTIL THESE STORMS PASS.
#else
MARINERS CAN EXPECT GUSTY WINDS...HIGH WAVES...DANGEROUS LIGHTNING...AND HEAVY RAINS. BOATERS SHOULD SEEK SAFE HARBOR IMMEDIATELY...UNTIL THIS STORM PASSES.
#end
#end
#if(${list.contains(${bullets}, "hailWindsCTA")})
#if(${stormType} == "line")
MARINERS CAN EXPECT ${windCTA}${hailCTA}...HIGH WAVES...DANGEROUS LIGHTNING...AND HEAVY RAINS. BOATERS SHOULD SEEK SAFE HARBOR IMMEDIATELY...UNTIL THESE STORMS PASS.
#else
MARINERS CAN EXPECT ${windCTA}${hailCTA}...HIGH WAVES...DANGEROUS LIGHTNING...AND HEAVY RAINS. BOATERS SHOULD SEEK SAFE HARBOR IMMEDIATELY...UNTIL THIS STORM PASSES.
#end
#end
#if(${list.contains(${bullets}, "nonThunderstormCTA")})
MARINERS CAN EXPECT GUSTY WINDS...AND INCREASING WAVES. BOATERS...ESPECIALLY THOSE UNDER SAIL...SHOULD SEEK SAFE HARBOR IMMEDIATELY...UNTIL THE HIGH WINDS SUBSIDE.
#end
#if(${list.contains(${bullets}, "waterspoutCTA")})
THUNDERSTORMS CAN PRODUCE SUDDEN WATERSPOUTS. WATERSPOUTS CAN EASILY OVERTURN BOATS AND CREATE LOCALLY HAZARDOUS SEAS. SEEK SAFE HARBOR IMMEDIATELY.
#end
#if(${list.contains(${bullets}, "lightningCTA")})
FREQUENT LIGHTNING IS OCCURRING WITH THIS STORM. IF CAUGHT ON THE OPEN WATER STAY BELOW DECK IF POSSIBLE...KEEP AWAY FROM UNGROUNDED METAL OBJECTS.
#end
#if(${list.contains(${bullets}, "reportCTA")})
REPORT SEVERE WEATHER TO THE COAST GUARD OR NEAREST LAW ENFORCEMENT AGENCY. THEY WILL RELAY YOUR REPORT TO THE NATIONAL WEATHER SERVICE OFFICE.
#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})
##################################################################
## Waterspout/Hail/Wind Tags used by CR for IBW
##################################################################
#if($spoutTag.length() > 0)
<L>${spoutTag}</L>
#end
<L>HAIL...${hailTag}IN</L>
<L>WIND...${windTag}KTS</L>
$$
#parse("forecasterName.vm")