awips2/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/impactDustAdvisory.vm
2022-05-05 12:34:50 -05:00

345 lines
12 KiB
Text

###########################################################################################
## DUST ADVISORY TEMPLATE ##
## VERSION HISTORY ##
## Based off Ken Waters/Mark OMalley Templates 01-27-17 Added logic for not ##
## choosing valid Vsby ##
## WG TEAM (Tomalak/Birchard/Dangelo 2-1-2017 Initial Implementation; DCS20066 ##
## Bookbinder 9-12-2017 Modified to segmented format per directive req. ##
## Bookbinder 1-30-2019 DR20914 Fix format error caused when no highway ##
## mile markers are found ##
###########################################################################################
##
#parse("config.vm")
###########################################
##SET SOME INITIAL VARIABLES
###########################################
#if(${stormType} == "line")
#set($reportType1 = "wall of dust")
#set($reportType2 = "a wall of dust was")
#else
#set($reportType1 = "dust channel")
#set($reportType2 = "a dust channel was")
#end
#set($source = "Doppler radar.")
#set($reportAuthDSW = "capable of producing")
#############################################################
#### CREATE BASIS WORDING ###################################
#############################################################
#if(${list.contains(${bullets}, "meteorologists")})
#set($reportAuthDSW = "capable of producing")
#set($source = "Detected by National Weather Service meteorologists.")
#end
#if(${list.contains(${bullets}, "doppler")})
#set($reportAuthDSW = "capable of producing")
#set($source = "Doppler radar.")
#end
#if(${list.contains(${bullets}, "trainedSpotters")})
#set($reportAuthDSW = "producing")
#set($source = "Trained weather spotters.")
#end
#if(${list.contains(${bullets}, "lawEnforcement")})
#set($reportAuthDSW = "producing")
#set($source = "Law enforcement.")
#end
#if(${list.contains(${bullets}, "emergencyMgmt")})
#set($reportAuthDSW = "producing")
#set($source = "Emergency management.")
#end
#if(${list.contains(${bullets}, "public")})
#set($reportAuthDSW = "producing")
#set($source = "Public.")
#end
###################################################
## HANDLE WIND POSSIBILITIES ######################
###################################################
#set($windHazard = "")
#set($windSpeed = 0)
#if(${list.contains(${bullets}, "30mphWind")})
#set($windSpeed = 30)
#set($windTag = "30MPH")
#set ($windHazard = " with strong wind in excess of 30 mph")
#end
#if(${list.contains(${bullets}, "40mphWind")})
#set($windSpeed = 40)
#set($windTag = "40MPH")
#set ($windHazard = " with strong wind in excess of 40 mph")
#end
#if(${list.contains(${bullets}, "50mphWind")})
#set($windSpeed = 50)
#set($windTag = "50MPH")
#set ($windHazard = " with strong wind in excess of 50 mph")
#end
###################################################
## HANDLE VISIBILITY POSSIBILITIES ################
###################################################
#set($vsbyHazard = "less than three miles visibility")
#set($vsbyDist = 100)
#if(${list.contains(${bullets}, "threeVis")})
#set($vsbyTrail = "visibility")
#set($vsbyLead = "")
#set($vsbyDist = 3.0)
#set($vsbyTag = "3.00MI")
#set($vsbyHazard = "less than three miles visibility")
#end
#if(${list.contains(${bullets}, "twoVis")})
#set($vsbyTrail = "visibility")
#set($vsbyLead = "")
#set($vsbyDist = 2.0)
#set($vsbyTag = "2.00MI")
#set($vsbyHazard = "less than two miles visibility")
#end
#if(${list.contains(${bullets}, "oneVis")})
#set($vsbyTrail = "visibility")
#set($vsbyLead = "")
#set($vsbyDist = 1.0)
#set($vsbyTag = "1.00MI")
#set($vsbyHazard = "less than one mile visibility")
#end
#if(${list.contains(${bullets}, "halfVis")})
#set($vsbyTrail = "visibility")
#set($vsbyLead = "")
#set($vsbyDist = 0.5)
#set($vsbyTag = "0.5MI")
#set($vsbyHazard = "less than one half mile visibility")
#end
#set($hazard = "${vsbyHazard}${windHazard}.")
################################################################
######### ~*~*~*~*~*~* BEGIN OUTPUT ~*~*~*~*~*~*~ ##############
################################################################
${WMOId} ${vtecOffice} 000000 ${BBBId}
DSW${siteId}
#if(${productClass}=="T")
TEST...Dust Advisory...TEST
#else
Dust Advisory
#end
National Weather Service ${officeShort}
#backupText(${backupSite})
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
${ugcline}
/${productClass}.${action}.${vtecOffice}.DS.Y.${etn}.${dateUtil.format(${start}, ${timeFormat.ymdthmz})}-${dateUtil.format(${expire}, ${timeFormat.ymdthmz}, 15)}/
#foreach (${area} in ${areas})
#capitalize(${area.name} "FIRST")
#if(${includeStateAbbreviation}==true)
${area.stateabbr}##
#end
-##
#end
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
#if(${productClass}=="T")
...THIS MESSAGE IS FOR TEST PURPOSES ONLY...
#end
##############################################
#### ATTRIBUTION LINE
##############################################
#headline(${officeLoc}, ${backupSite})
* ##
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
Dust Advisory for...
#firstBullet(${areas})
####################################################
############# SECOND BULLET ########################
####################################################
* ##
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone},${duration})
####################################################
############# THIRD BULLET (Initial position) ######
####################################################
* ##
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#thirdBullet(${dateUtil},${event},${timeFormat},${localtimezone},${secondtimezone})
, ${reportType2} ##
##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})
, and is nearly stationary.
#else
, moving #direction(${movementDirectionRounded}) at ${mathUtil.roundTo5(${movementSpeed})} mph.
#end
#set ($dustimpact = "Hazardous travel.")
##########################################################################
## Section to include IMPACT LIST ##
##########################################################################
#wrapText("HAZARD...#capitalize(${hazard} 'FIRST')" 2 11)
#wrapText("SOURCE...#capitalize(${source} 'FIRST')" 2 11)
#wrapText("IMPACT...${dustimpact}" 2 11)
#######################################
########## BEGIN 4TH BULLET ###########
#######################################
#set($mileMarkers = "")
#set($mileMarkers = "#parse('mileMarkers.vm')")
#if(${mileMarkers.length()} <= 10)
* !**ENTER IN ANY AFFECTED ROAD/HIGHWAY INFORMATION**!
#else
* $mileMarkers
#end
##
###################################################
######## GENERATE PATHCAST OR CITIES LIST #########
###################################################
#if(${stormType} == "line")
#set($pathcastLead = "This wall of dust")
#set($otherLead = "This wall of dust")
#else
#set($pathcastLead = "This dust channel")
#set($otherLead = "This dust channel")
#end
#if(${list.contains(${bullets}, "pathcast")})
#if(${productClass}=="T")
THIS IS A TEST MESSAGE. ##
#end
#pathCast("${pathcastLead} will be near..." ${otherLead} ${pathCast} ${otherPoints} ${areas} ${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} ${areas} ${dateUtil} ${timeFormat} 0)
#else
* Locations impacted include...
!** YOU DID NOT SELECT PATHCAST OR LIST OF CITIES BULLET.
PLEASE ENTER LOCATIONS IMPACTED OR REGENERATE THE WARNING WITH
THE CORRECT LOCATIONS BULLET SELECTED **!.
#end
##################################################
## Uncomment below pull in point marker info
##################################################
## #parse("pointMarkers.vm")
##
##############################################
###### 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 this wall of dust and should prepare for hazardous weather conditions.
#else
Those attending the !**EVENT/VENUE NAME OR LOCATION**! are in the path of this dust channel and should prepare for hazardous weather conditions.
#end
#end
##################################
######### CALLS TO ACTION ########
##################################
##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'
#if(${stormType} == "line")
#set($reportType4 = "this wall of dust")
#else
#set($reportType4 = "this dust channel")
#end
#foreach (${bullet} in ${bullets})
#if(${bullet.endsWith("CTA")})
#set($ctaSelected = "YES")
#end
#end
##
#if(${ctaSelected} == "YES")
PRECAUTIONARY/PREPAREDNESS ACTIONS...
#end
##
#if(${list.contains(${bullets}, "healthCTA")})
Blowing dust can be unhealthy and has been known to lead to Valley Fever. Avoid outdoor exposure.
#end
##
#if(${list.contains(${bullets}, "genericCTA")})
Blowing dust brings reduced visibility, leading to dangerous driving conditions. If driving, avoid blowing dust if possible. If caught in dense blowing dust, pull off the road, turn off your lights and keep your foot off the brake.
#end
##
#if(${list.contains(${bullets}, "motoristCTA")})
Motorists should not drive into an area of blowing dust. PULL ASIDE STAY ALIVE!
#end
##
#if(${list.contains(${bullets}, "lawEnforcementCTA")})
To report severe weather, contact the National Weather Service, or your nearest law enforcement agency, who 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(${list.contains(${bullets}, "ThunderstormCTA")})
Strong to severe thunderstorms are also possible behind ${reportType4}. Keep updated with this quickly evolving situation.
#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")