Merge tag 'OB_16.1.2-18' into omaha_16.1.2
16.1.2-18 Former-commit-id: b39ff4003c91951433c4650491a8780543107a2e
This commit is contained in:
commit
53bd54eb86
10 changed files with 187 additions and 126 deletions
|
@ -112,6 +112,8 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* 09-09-2014 RM #657 Qinglu Lin handle StormTrackState.trackType is null.
|
||||
* 09-25-2014 ASM #16773 D. Friedman Fix NPE.
|
||||
* 10-10-2014 ASM #16844 D. Friedman Prevent some errors when moving track.
|
||||
* 02-09-2016 ASM #18421 D. Friedman Don't call ToolsDataManager.setStormTrackData
|
||||
* if there is no storm motion.
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
|
@ -1454,6 +1456,9 @@ public class StormTrackDisplay implements IRenderable {
|
|||
}
|
||||
|
||||
private void postData(StormTrackState state) {
|
||||
if (!(state.speed > 0)) {
|
||||
return;
|
||||
}
|
||||
StormTrackData data = new StormTrackData();
|
||||
Coordinate[] coords = new Coordinate[state.timePoints.length];
|
||||
for (int i = 0; i < coords.length; ++i) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# TCV_Dictionary
|
||||
# TCV_Dictionary file
|
||||
# Author: GFE Installation Script
|
||||
# Last Modified: Feb 13, 2015
|
||||
# Last Modified: Jan 26, 2016
|
||||
# ----------------------------------------------------------------------------
|
||||
# Needed to prevent an error from the SmartTool module
|
||||
WeatherElementEdited = None
|
||||
|
@ -16,7 +16,7 @@ ThreatStatements = {
|
|||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3 intensity or higher.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic wind impacts. Efforts should now be underway to secure all properties.",
|
||||
"action": "Extremely Dangerous and life threatening wind is possible. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering.",
|
||||
"action": "Extremely dangerous and life threatening wind is possible. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency plans should include a reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3 intensity or higher.",
|
||||
|
|
|
@ -177,6 +177,8 @@ import com.raytheon.viz.ui.simulatedtime.SimulatedTimeOperations;
|
|||
* 12/14/2015 18367 ryu Disable finalization of ETN when product is stored to text database.
|
||||
* 12/16/2015 18410 lshi For corrected products, both WMO time and MND time should
|
||||
* match the current time
|
||||
* 01/21/2016 18505 lshi Resent product should have same WMO, MND, and segment times
|
||||
* as original product.
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -1150,8 +1152,8 @@ public class ProductEditorComp extends Composite implements
|
|||
// prevent the launching of another dialog until the modal dialog is
|
||||
// closed.
|
||||
StoreTransmitDlg storeDlg = new StoreTransmitDlg(parent.getShell(),
|
||||
showStore, this, transmissionCB, pid,
|
||||
!textComp.isCorMode() && (action == Action.TRANSMIT));
|
||||
showStore, this, transmissionCB, pid, !textComp.isCorMode()
|
||||
&& (action == Action.TRANSMIT));
|
||||
storeDlg.open();
|
||||
}
|
||||
}
|
||||
|
@ -1203,6 +1205,9 @@ public class ProductEditorComp extends Composite implements
|
|||
}
|
||||
|
||||
private boolean changeTimes() {
|
||||
if (selectedType == productTypeEnum.res) {
|
||||
return false;
|
||||
}
|
||||
Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
GMT.setTime(SimulatedTime.getSystemTime().getTime());
|
||||
GMT.set(Calendar.SECOND, 0);
|
||||
|
@ -1698,24 +1703,31 @@ public class ProductEditorComp extends Composite implements
|
|||
selectedType = productTypeEnum.valueOf(val);
|
||||
|
||||
String txt;
|
||||
boolean updateTimes = true;
|
||||
if (val.charAt(0) == 'A') {
|
||||
txt = "UPDATED";
|
||||
|
||||
} else if (val.charAt(0) == 'R') {
|
||||
txt = "DELAYED";
|
||||
} else if (val.charAt(0) == 'C') {
|
||||
txt = "CORRECTED";
|
||||
} else if (val.equals("res")) {
|
||||
txt = "RESENT";
|
||||
updateTimes = false;
|
||||
} else if (val.equals("rou")) {
|
||||
txt = EMPTY;
|
||||
updateTimes = false;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (updateTimes) {
|
||||
updateExpireTimeFromTimer();
|
||||
}
|
||||
|
||||
textComp.startUpdate();
|
||||
textComp.patchMND(txt, true);
|
||||
textComp.updatePType(val);
|
||||
|
||||
textComp.endUpdate();
|
||||
}
|
||||
|
||||
|
@ -1790,6 +1802,9 @@ public class ProductEditorComp extends Composite implements
|
|||
}
|
||||
|
||||
private void setPurgeTime() {
|
||||
if (selectedType == productTypeEnum.res) {
|
||||
return;
|
||||
}
|
||||
Float offset = null;
|
||||
if (!editorCorrectionMode) {
|
||||
Object obj = productDefinition.get("purgeTime");
|
||||
|
@ -1982,13 +1997,14 @@ public class ProductEditorComp extends Composite implements
|
|||
ProductDataStruct pds = textComp.getProductDataStruct();
|
||||
if (pds != null) {
|
||||
// update WMO time
|
||||
//if (!textComp.isCorMode()) { ## uncomment this if want to keep WMO time original
|
||||
// if (!textComp.isCorMode()) { ## uncomment this if want to
|
||||
// keep WMO time original
|
||||
TextIndexPoints pit = pds.getPIT();
|
||||
if (pit != null) {
|
||||
String time = purgeTimeFmt.format(now);
|
||||
textComp.replaceText(pit, time);
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
// Update MND time
|
||||
TextIndexPoints tip = pds.getMndMap().get("nwstime");
|
||||
|
@ -2181,7 +2197,6 @@ public class ProductEditorComp extends Composite implements
|
|||
*/
|
||||
private void loadPrevious() {
|
||||
String initialValue;
|
||||
textComp.setCorMode(true);
|
||||
|
||||
if (!testVTEC) {
|
||||
initialValue = "cccnnnxxx";
|
||||
|
@ -2220,7 +2235,7 @@ public class ProductEditorComp extends Composite implements
|
|||
String product = TextDBUtil.retrieveProduct(pid, operationalMode);
|
||||
if ((product != null) && !product.isEmpty()) {
|
||||
// add back the new line stripped off by text decoder
|
||||
setProductText(product + "\n");
|
||||
setProductText(product + "\n", false);
|
||||
}
|
||||
} else {
|
||||
devLoad(pid);
|
||||
|
@ -2230,7 +2245,9 @@ public class ProductEditorComp extends Composite implements
|
|||
|
||||
// Enter res mode
|
||||
setPTypeCategory(PTypeCategory.PE);
|
||||
textComp.setCorMode(true);
|
||||
|
||||
setPurgeTime();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2413,7 +2430,7 @@ public class ProductEditorComp extends Composite implements
|
|||
}
|
||||
|
||||
if (product != null) {
|
||||
setProductText(product);
|
||||
setProductText(product, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* May 29, 2015 4440 randerso Fix resource leak (file not closed)
|
||||
* Jul 15, 2015 DR17716 mgamazaychikov Change to Geometry class in total intersection calculations.
|
||||
* Oct 21, 2105 5021 randerso Fix issue with CORs for mixed case
|
||||
* Feb 9, 2016 DR18421 D. Friedman Don't call ToolsDataManager.setStormTrackData if there is no storm motion.
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
|
@ -555,10 +556,12 @@ public class TemplateRunner {
|
|||
stormLocs[i].y);
|
||||
}
|
||||
context.put("eventLocation", coords);
|
||||
t0 = System.currentTimeMillis();
|
||||
ToolsDataManager.getInstance().setStormTrackData(std);
|
||||
perfLog.logDuration("Save storm track data",
|
||||
System.currentTimeMillis() - t0);
|
||||
if (std.getMotionSpeed() > 0) {
|
||||
t0 = System.currentTimeMillis();
|
||||
ToolsDataManager.getInstance().setStormTrackData(std);
|
||||
perfLog.logDuration("Save storm track data",
|
||||
System.currentTimeMillis() - t0);
|
||||
}
|
||||
} else {
|
||||
// Retrieve the old Warning
|
||||
// Example: s[0-5] = T.CON-KLWX.SV.W.0123
|
||||
|
@ -612,10 +615,12 @@ public class TemplateRunner {
|
|||
std.setDate(simulatedTime);
|
||||
std.setMotionDirection(motionDirection);
|
||||
std.setMotionSpeed(oldWarn.getMotspd());
|
||||
t0 = System.currentTimeMillis();
|
||||
ToolsDataManager.getInstance().setStormTrackData(std);
|
||||
perfLog.logDuration("Save storm track data",
|
||||
System.currentTimeMillis() - t0);
|
||||
if (std.getMotionSpeed() > 0) {
|
||||
t0 = System.currentTimeMillis();
|
||||
ToolsDataManager.getInstance().setStormTrackData(std);
|
||||
perfLog.logDuration("Save storm track data",
|
||||
System.currentTimeMillis() - t0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -301,12 +301,13 @@ rfc.groupName = 'ISC'
|
|||
|
||||
# NHA ISC area
|
||||
domain = ShapeTable('nhadomain')
|
||||
#segment.name = "AllCWA"
|
||||
domain.name = "TropicalISC"
|
||||
domain.groupName = "ISC"
|
||||
domain.editAreaName = "ISC_NHA"
|
||||
|
||||
# Storm Surge Watch/Warning Area
|
||||
stormsurgeww = ShapeTable('stormsurgeww')
|
||||
stormsurgeww.name = "StormSurgeWW"
|
||||
stormsurgeww.groupName = "SurgeCollab"
|
||||
stormsurgeww.editAreaName = "StormSurgeWW_EditArea"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Version 2015.8.27-0
|
||||
# Version 2016.01.26-0
|
||||
|
||||
import GenericHazards
|
||||
import string, time, os, re, types, copy, LogStream, collections
|
||||
|
@ -549,21 +549,16 @@ class TextProduct(HLSTCV_Common.TextProduct):
|
|||
productDict['stormInformation'] = stormInfoDict
|
||||
|
||||
def _situationOverview(self, productDict, productSegmentGroup, productSegment):
|
||||
overviewSectionTitle = ".Situation Overview...\n"
|
||||
|
||||
# Use generic text for the situation overview
|
||||
productDict['situationOverview'] = self._frame("Succinctly describe the expected evolution of the event for the cwa; which hazards are of greater (or lesser) concern, forecast focus, etc.")
|
||||
|
||||
# Get the WRKHLS product that has the situation overview we want
|
||||
wrkhlsProduct = self.getPreviousProduct("WRKHLS")
|
||||
|
||||
# Try finding the situation overview
|
||||
overviewSearch = re.search("(?ism).*^%s(.+?)^\." % (overviewSectionTitle), wrkhlsProduct)
|
||||
wrkhlsProduct = self.getPreviousProduct("WRKHLS").strip()
|
||||
|
||||
# If we found the overview
|
||||
if overviewSearch is not None:
|
||||
# Clean it up
|
||||
productDict['situationOverview'] = self._cleanText(overviewSearch.group(1).strip())
|
||||
else:
|
||||
# Use generic text for the situation overview
|
||||
productDict['situationOverview'] = self._frame("Succinctly describe the expected evolution of the event for the cwa; which hazards are of greater (or lesser) concern, forecast focus, etc.")
|
||||
if len(wrkhlsProduct) > 0:
|
||||
# Frame the imported overview and use it instead of the generic text
|
||||
productDict['situationOverview'] = self._frame(wrkhlsProduct)
|
||||
|
||||
def _windSection(self, productDict, productSegmentGroup, productSegment):
|
||||
sectionDict = dict()
|
||||
|
@ -2754,4 +2749,3 @@ class LegacyFormatter():
|
|||
self._textProduct.debug_print("subpart newtext = '%s'" % (self._pp.pformat(newtext)))
|
||||
text += newtext
|
||||
return text
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Version 2015.11.19-0
|
||||
# Version 2016.01.26-0
|
||||
|
||||
import GenericHazards
|
||||
import JsonSupport
|
||||
|
@ -469,14 +469,14 @@ class TextProduct(HLSTCV_Common.TextProduct):
|
|||
if len(self._segmentList) == 0:
|
||||
return "No hazards to report"
|
||||
|
||||
# Determine time ranges
|
||||
self._determineTimeRanges(argDict)
|
||||
|
||||
# Make sure we have all of the necessary grids before continuing
|
||||
error = self._performGridChecks(argDict)
|
||||
if error is not None:
|
||||
return error
|
||||
|
||||
# Determine time ranges
|
||||
self._determineTimeRanges(argDict)
|
||||
|
||||
# Sample the data
|
||||
self._sampleData(argDict)
|
||||
|
||||
|
@ -556,10 +556,25 @@ class TextProduct(HLSTCV_Common.TextProduct):
|
|||
ifpClient = argDict["ifpClient"]
|
||||
dbId = argDict["databaseID"]
|
||||
parmId = ParmID(weatherElement, dbId)
|
||||
gridTimes = ifpClient.getGridInventory(parmId)
|
||||
times = ifpClient.getGridInventory(parmId)
|
||||
|
||||
self.debug_print("Element being tested: %s" % (self._pp.pformat(weatherElement)), 1)
|
||||
self.debug_print("Expected number of grids: %s" % (self._pp.pformat(expectedNumGrids)), 1)
|
||||
|
||||
gridTimes = []
|
||||
for index in range(len(times)):
|
||||
gridTime = TimeRange.TimeRange(times[index])
|
||||
|
||||
if (gridTime.endTime() <= self._timeRange.startTime() or
|
||||
gridTime.startTime() >= self._timeRange.endTime()):
|
||||
|
||||
prettyStartTime = self._pp.pformat(str(gridTime.startTime()))
|
||||
prettyEndTime = self._pp.pformat(str(gridTime.endTime()))
|
||||
self.debug_print("skipping grid %s (%s - %s): outside of time range"
|
||||
% (index, prettyStartTime, prettyEndTime), 1)
|
||||
else:
|
||||
gridTimes.append(gridTime)
|
||||
|
||||
self.debug_print("Length of grid times: %s" % (self._pp.pformat(len(gridTimes))), 1)
|
||||
|
||||
return len(gridTimes) == expectedNumGrids
|
||||
|
@ -592,11 +607,28 @@ class TextProduct(HLSTCV_Common.TextProduct):
|
|||
gridTimes = sorted(gridTimes, key= lambda gridTime: gridTime.startTime())
|
||||
|
||||
totalHours = 0
|
||||
previousEndTime = gridTimes[0].startTime()
|
||||
previousEndTime = None
|
||||
for gridTime in gridTimes:
|
||||
self.debug_print("previous end time: %s" % (self._pp.pformat(str(previousEndTime))), 1)
|
||||
self.debug_print("current start time: %s" % (self._pp.pformat(str(gridTime.startTime()))), 1)
|
||||
|
||||
if gridTime.endTime() <= self._timeRange.startTime():
|
||||
prettyEndTime = self._pp.pformat(str(gridTime.endTime()))
|
||||
prettyStartTime = self._pp.pformat(str(self._timeRange.startTime()))
|
||||
self.debug_print("skipping: grid end time (%s) before time range start time (%s)"
|
||||
% (prettyEndTime, prettyStartTime), 1)
|
||||
continue
|
||||
|
||||
if gridTime.startTime() >= self._timeRange.endTime():
|
||||
prettyStartTime = self._pp.pformat(str(gridTime.startTime()))
|
||||
prettyEndTime = self._pp.pformat(str(self._timeRange.endTime()))
|
||||
self.debug_print("done: grid start time (%s) after time range end time (%s)"
|
||||
% (prettyStartTime, prettyEndTime), 1)
|
||||
break
|
||||
|
||||
if previousEndTime is None:
|
||||
previousEndTime = gridTime.startTime()
|
||||
|
||||
if previousEndTime != gridTime.startTime():
|
||||
# Not continuous
|
||||
return False
|
||||
|
@ -674,10 +706,6 @@ class TextProduct(HLSTCV_Common.TextProduct):
|
|||
|
||||
self.debug_print("vtecRecord = %s" % (self._pp.pformat(vtecRecord)), 1)
|
||||
|
||||
if vtecRecord["phen"] == "SS":
|
||||
# Temporary? Change the vtec mode for SS hazards to be experimental
|
||||
vstr = vstr[0] + 'X' + vstr[2:]
|
||||
|
||||
self.debug_print("final vstr = %s" % vstr, 1)
|
||||
records.append(vstr)
|
||||
segmentDict['vtecRecords'] = records
|
||||
|
@ -1385,7 +1413,8 @@ class SectionCommon():
|
|||
elif self._isThreatIncreasing(shorterTermTrendDifference, longerTermTrendDifference):
|
||||
self._textProduct.debug_print("threat is increasing", 1)
|
||||
threatTrendValue = "INCREASING"
|
||||
elif currentThreat == "Extreme" and \
|
||||
# NOTE: Modified so more threat levels can be classified as increasing when forecast has increased
|
||||
elif currentThreat in ["Mod", "High", "Extreme"] and \
|
||||
self._isMagnitudeIncreasing(forecastKey, magnitudeIncreaseThreshold):
|
||||
self._textProduct.debug_print("Increasing based on magnitude", 1)
|
||||
threatTrendValue = "INCREASING"
|
||||
|
@ -1587,7 +1616,7 @@ class SectionCommon():
|
|||
self._setProductPartValue(segmentDict, 'potentialImpactsSummary', summary)
|
||||
|
||||
def _getPotentialImpactsSummaryText(self, maxThreat):
|
||||
if not self.isThreatNoneForEntireStorm:
|
||||
if self.isThreatNoneForEntireStorm:
|
||||
return "Potential Impacts: Little to None"
|
||||
if self._tr is not None and self._sectionHeaderName in ["Wind", "Storm Surge"]:
|
||||
if self._tr == "hunker down":
|
||||
|
@ -1855,11 +1884,11 @@ class WindSection(SectionCommon):
|
|||
# Dictionary representing wind thresholds in kts
|
||||
# for category 1, 2, 3, 4 or 5 hurricanes.
|
||||
return {
|
||||
'CAT 5 Hurricane': (157, 999),
|
||||
'CAT 4 Hurricane': (130, 157),
|
||||
'CAT 3 Hurricane': (111, 130),
|
||||
'CAT 2 Hurricane': ( 96, 111),
|
||||
'CAT 1 Hurricane': ( 74, 96),
|
||||
'Cat 5 Hurricane': (157, 999),
|
||||
'Cat 4 Hurricane': (130, 157),
|
||||
'Cat 3 Hurricane': (111, 130),
|
||||
'Cat 2 Hurricane': ( 96, 111),
|
||||
'Cat 1 Hurricane': ( 74, 96),
|
||||
'Strong Tropical Storm': ( 58, 73),
|
||||
'Tropical Storm': ( 39, 58),
|
||||
}
|
||||
|
@ -2108,7 +2137,7 @@ class FloodingRainSection(SectionCommon):
|
|||
words = self._rainRange(int(self._stats._sumAccum + 0.5))
|
||||
|
||||
# If we have previous rainfall
|
||||
if self._stats._prevAccum not in [0.0, None]:
|
||||
if self._stats._prevAccum not in [0.0, None] and (int(self._stats._sumAccum + 0.5)) != 0:
|
||||
words = "Additional " + words
|
||||
self._setProductPartValue(segmentDict, 'peakRain', "Peak Rainfall Amounts: " + words)
|
||||
|
||||
|
@ -2116,7 +2145,9 @@ class FloodingRainSection(SectionCommon):
|
|||
minAccum = 0
|
||||
maxAccum = 0
|
||||
|
||||
if sumAccum == 0:
|
||||
if sumAccum == 0 and self._stats._prevAccum not in [0.0, None]:
|
||||
return "No additional significant rainfall forecast"
|
||||
elif sumAccum == 0 and self._stats._prevAccum in [0.0, None]:
|
||||
return "No significant rainfall forecast"
|
||||
elif sumAccum == 1:
|
||||
return "around 1 inch"
|
||||
|
@ -2187,14 +2218,6 @@ class FloodingRainSection(SectionCommon):
|
|||
if len(subsectionDict) > 0:
|
||||
self._setProductPartValue(segmentDict, 'impactsSubsection', subsectionDict)
|
||||
|
||||
def _specialImpactsStatements(self):
|
||||
return {"hunker down": ["Potential impacts from flooding rain are still unfolding.",
|
||||
"The extent of realized impacts will depend on actual rainfall amounts as received at particular locations.",
|
||||
],
|
||||
"recovery": ["For additional information on impacts being caused by flooding rain, refer to the local hazardous weather outlook or hurricane local statement.",
|
||||
],
|
||||
}
|
||||
|
||||
def _potentialImpactsSummary(self, segmentDict, productSegmentGroup, productSegment):
|
||||
if not self._textProduct._WSPGridsAvailable:
|
||||
self._setProductPartValue(segmentDict, 'potentialImpactsSummary',
|
||||
|
@ -2315,14 +2338,6 @@ class TornadoSection(SectionCommon):
|
|||
if len(subsectionDict) > 0:
|
||||
self._setProductPartValue(segmentDict, 'impactsSubsection', subsectionDict)
|
||||
|
||||
def _specialImpactsStatements(self):
|
||||
return {"hunker down": ["Potential impacts from tropical tornadoes are still unfolding.",
|
||||
"The extent of realized impacts will depend on the severity of actual tornado occurrence as experienced at particular locations.",
|
||||
],
|
||||
"recovery": ["For additional information on impacts being caused by tropical tornadoes, refer to the local hazardous weather outlook or hurricane local statement.",
|
||||
],
|
||||
}
|
||||
|
||||
def _potentialImpactsSummary(self, segmentDict, productSegmentGroup, productSegment):
|
||||
if not self._textProduct._WSPGridsAvailable:
|
||||
self._setProductPartValue(segmentDict, 'potentialImpactsSummary',
|
||||
|
@ -2827,16 +2842,13 @@ class StormSurgeSectionStats(SectionCommonStats):
|
|||
def _setStats(self, statList, timeRangeList):
|
||||
phishStartTime = None
|
||||
phishEndTime = None
|
||||
possibleStop = 0
|
||||
possibleStart = 0
|
||||
|
||||
# If this is an inland area, just move on
|
||||
if statList == "InlandArea":
|
||||
return
|
||||
|
||||
self._textProduct.debug_print("*"*100, 1)
|
||||
self._textProduct.debug_print("phishStartTime = %s phishEndTime = %s possibleStop = %d possibleStart = %d" %
|
||||
(str(phishStartTime), str(phishEndTime), possibleStop, possibleStart), 1)
|
||||
self._textProduct.debug_print("Setting Surge Section stats for %s" % self._segment, 1)
|
||||
|
||||
statDict = statList[0]
|
||||
self._inundationMax = self._textProduct._getStatValue(statDict, "InundationMax", "Max")
|
||||
|
@ -2844,54 +2856,80 @@ class StormSurgeSectionStats(SectionCommonStats):
|
|||
self._inundationMax = round(self._inundationMax)
|
||||
self._textProduct.debug_print("self._inundationMax = %s" % (self._inundationMax), 1)
|
||||
|
||||
self._textProduct.debug_print("%s" % (self._textProduct._pp.pformat(statList)), 1)
|
||||
self._textProduct.debug_print("length of statList = %s" % (len(statList)), 1)
|
||||
for period in range(len(statList)):
|
||||
tr, _ = timeRangeList[period]
|
||||
statDict = statList[period]
|
||||
self._textProduct.debug_print("-"*50, 1)
|
||||
self._textProduct.debug_print("tr = %s" % (self._textProduct._pp.pformat(tr)), 1)
|
||||
self._textProduct.debug_print("statDict = %s" % (self._textProduct._pp.pformat(statDict)), 1)
|
||||
|
||||
|
||||
curPhish = self._textProduct._getStatValue(statDict, "InundationTiming", "Max")
|
||||
self._textProduct.debug_print("tr = %s" % (self._textProduct._pp.pformat(tr)), 1)
|
||||
self._textProduct.debug_print("curPhish = '%s' possibleStop = %d possibleStart = %d" %
|
||||
(str(curPhish), possibleStop, possibleStart), 1)
|
||||
self._textProduct.debug_print("curPhish = '%s'" % (str(curPhish)), 1)
|
||||
self._textProduct.debug_print("phishStartTime = %s phishEndTime = %s" %
|
||||
(str(phishStartTime), str(phishEndTime)), 1)
|
||||
|
||||
if (curPhish is None) or (curPhish == 'None'):
|
||||
self._textProduct.debug_print("Done: Reached end of grids (curPhish was None)", 1)
|
||||
break
|
||||
|
||||
if self._inundationMax >= 3:
|
||||
if curPhish >= 1:
|
||||
if possibleStop != 0:
|
||||
possibleStop = 0
|
||||
possibleStart += 1
|
||||
if phishStartTime is None:
|
||||
phishStartTime = tr.startTime()
|
||||
elif curPhish < 1 and possibleStart < 2:
|
||||
possibleStart = 0
|
||||
phishStartTime = None
|
||||
elif phishStartTime is not None and curPhish is not None: # Only checking if valid grid
|
||||
possibleStop += 1
|
||||
if possibleStop < 2:
|
||||
phishEndTime = tr.startTime()
|
||||
else: # possibleStop == 2
|
||||
break
|
||||
else: # curPhish is None so out of grids
|
||||
break
|
||||
|
||||
# For start time:
|
||||
# If inundationMax >= 3:
|
||||
# Looking for 2 consecutive grids with a surge height >= 1
|
||||
# Start will be the start time of the FIRST of the 2 consecutive grids
|
||||
# If 1 <= inundationMax < 3:
|
||||
# Looking for 1 grid with a surge height >= 1
|
||||
# Start will be the start time of this grid
|
||||
#
|
||||
# For end time:
|
||||
# Looking for 2 consecutive grids with a surge height < 1
|
||||
# End will be the start time of the FIRST of the 2 consecutive grids
|
||||
|
||||
# If we have another period after this one, we may need to look at the two
|
||||
# consecutive periods for start and end time conditions
|
||||
isLastPeriod = True
|
||||
if period < len(statList) - 1:
|
||||
isLastPeriod = False
|
||||
nextTr, _ = timeRangeList[period+1]
|
||||
nextStatDict = statList[period+1]
|
||||
nextPhish = self._textProduct._getStatValue(nextStatDict, "InundationTiming", "Max")
|
||||
|
||||
self._textProduct.debug_print("nextTr = %s" % (self._textProduct._pp.pformat(nextTr)), 1)
|
||||
self._textProduct.debug_print("nextStatDict = %s" % (self._textProduct._pp.pformat(nextStatDict)), 1)
|
||||
self._textProduct.debug_print("nextPhish = '%s'" % (str(nextPhish)), 1)
|
||||
|
||||
# Set what the condition is for determining the start time
|
||||
if (self._inundationMax >= 3) and (not isLastPeriod):
|
||||
startCondition = (curPhish >= 1) and (nextPhish >= 1)
|
||||
self._textProduct.debug_print("startCondition looking at 2 periods", 1)
|
||||
elif 1 <= self._inundationMax < 3:
|
||||
if curPhish >= 1:
|
||||
if possibleStop != 0:
|
||||
possibleStop = 0
|
||||
if phishStartTime is None:
|
||||
phishStartTime = tr.startTime()
|
||||
elif phishStartTime is not None and curPhish is not None: # Only checking if valid grid
|
||||
possibleStop += 1
|
||||
if possibleStop < 2:
|
||||
phishEndTime = tr.startTime()
|
||||
else: # possibleStop == 2
|
||||
break
|
||||
else: # curPhish is None so out of grids
|
||||
break
|
||||
startCondition = curPhish >= 1
|
||||
self._textProduct.debug_print("startCondition looking at 1 period", 1)
|
||||
else:
|
||||
startCondition = False
|
||||
self._textProduct.debug_print("no startCondition, done", 1)
|
||||
break
|
||||
|
||||
# Set what the condition is for determining the end time
|
||||
if not isLastPeriod:
|
||||
endCondition = (curPhish < 1) and (nextPhish < 1)
|
||||
self._textProduct.debug_print("endCondition looking at 2 periods", 1)
|
||||
else:
|
||||
endCondition = False
|
||||
self._textProduct.debug_print("this is the last period, no endCondition possible", 1)
|
||||
|
||||
if startCondition and (phishStartTime is None):
|
||||
phishStartTime = tr.startTime()
|
||||
elif endCondition and (phishStartTime is not None) and (phishEndTime is None):
|
||||
phishEndTime = tr.startTime()
|
||||
self._textProduct.debug_print("final phishStartTime = %s final phishEndTime = %s" %
|
||||
(str(phishStartTime), str(phishEndTime)), 1)
|
||||
break
|
||||
|
||||
self._textProduct.debug_print("new phishStartTime = %s new phishEndTime = %s" %
|
||||
(str(phishStartTime), str(phishEndTime)), 1)
|
||||
|
||||
|
||||
self._windowSurge = "Window of concern: "
|
||||
|
@ -2907,7 +2945,7 @@ class StormSurgeSectionStats(SectionCommonStats):
|
|||
|
||||
self._textProduct.debug_print("surge startTime = %s self._onsetSurgeHour = %s " %
|
||||
(self._textProduct._pp.pformat(startTime), self._onsetSurgeHour), 1)
|
||||
if phishEndTime is not None and possibleStop >= 2:
|
||||
if phishEndTime is not None:
|
||||
self._endSurgeHour = self._calculateHourOffset(phishEndTime)
|
||||
endTime = AbsTime(self._textProduct._issueTime_secs + self._endSurgeHour*60*60)
|
||||
windowPeriod = self._textProduct.makeTimeRange(startTime, endTime)
|
||||
|
@ -2917,18 +2955,12 @@ class StormSurgeSectionStats(SectionCommonStats):
|
|||
|
||||
startTimeDescriptor = self._textProduct._formatPeriod(windowPeriod)
|
||||
|
||||
# Modified to handle case where last grid is zero but did not have two grids
|
||||
if phishEndTime is None or possibleStop == 1:
|
||||
if phishEndTime is None:
|
||||
self._windowSurge += "Begins " + startTimeDescriptor
|
||||
elif phishStartTime == phishEndTime:
|
||||
self._windowSurge += startTimeDescriptor
|
||||
else:
|
||||
endTimeDescriptor = self._textProduct._formatPeriod(windowPeriod, useEndTime = True)
|
||||
|
||||
if self._onsetSurgeHour > 12:
|
||||
# self._windowSurge += startTimeDescriptor +\
|
||||
# " through " +\
|
||||
# endTimeDescriptor
|
||||
self._windowSurge += startTimeDescriptor +\
|
||||
" until " +\
|
||||
endTimeDescriptor
|
||||
|
@ -2936,17 +2968,22 @@ class StormSurgeSectionStats(SectionCommonStats):
|
|||
self._windowSurge += "through " + endTimeDescriptor
|
||||
|
||||
if self._inundationMax is not None:
|
||||
# Round so we don't store values like 1.600000023841858
|
||||
# inundationMax is already rounded but should be stored as an int and not a float
|
||||
self._currentAdvisory["StormSurgeForecast"] = int(self._inundationMax)
|
||||
|
||||
self._textProduct.debug_print("+"*60, 1)
|
||||
self._textProduct.debug_print("In StormSurgeSectionStats._setStats", 1)
|
||||
self._textProduct.debug_print("Done in StormSurgeSectionStats._setStats:", 1)
|
||||
self._textProduct.debug_print("self._inundationMax = '%s'" %
|
||||
(self._inundationMax), 1)
|
||||
self._textProduct.debug_print("self._onsetSurgeHour = '%s'" %
|
||||
(self._onsetSurgeHour), 1)
|
||||
self._textProduct.debug_print("self._endSurgeHour = '%s'" %
|
||||
(self._endSurgeHour), 1)
|
||||
self._textProduct.debug_print("self._windowSurge = '%s'" %
|
||||
(self._windowSurge), 1)
|
||||
self._textProduct.debug_print("self._maxThreat = '%s'" %
|
||||
(self._maxThreat), 1)
|
||||
self._textProduct.debug_print("+"*60, 1)
|
||||
|
||||
|
||||
class FloodingRainSectionStats(SectionCommonStats):
|
||||
|
|
|
@ -139,7 +139,7 @@ Must be paired with proper vm code (also commented out in flashFloodWarning.vm)!
|
|||
<bullet bulletName="rain3" bulletText="Three inches so far" bulletGroup="rainAmt" parseString="THREE INCHES OF RAIN HAVE ALREADY FALLEN"/>
|
||||
<bullet bulletName="rainEdit" bulletText="User defined amount" bulletGroup="rainAmt" parseString="INCHES OF RAIN HAVE FALLEN"/>
|
||||
<bullet bulletText="*********** ADDITIONAL INFO ***********" bulletType="title"/>
|
||||
<bullet bulletName="listofcities" bulletDefault="true" bulletText="Select for a list of cities" bulletGroup="pcast" parseSting=""LOCATIONS","INCLUDE...""/>
|
||||
<bullet bulletName="listofcities" bulletDefault="true" bulletText="Select for a list of cities" bulletGroup="pcast" parseString=""LOCATIONS","INCLUDE...""/>
|
||||
<!-- <bullet bulletName="pathcast" bulletText="Generate Pathcast " bulletGroup="pcast" parseString="THE FOLLOWING LOCATIONS..."/>
|
||||
-->
|
||||
<bullet bulletName="addRainfall" bulletText="Additional rainfall of XX inches expected" parseString="ADDITIONAL RAINFALL"/>
|
||||
|
|
9
edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialWeatherStatement.xml
Executable file → Normal file
9
edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialWeatherStatement.xml
Executable file → Normal file
|
@ -5,6 +5,7 @@
|
|||
Mike Dangelo 1/23/2014 added blankStatement bullet
|
||||
Mike Rega 5/23/14 DR 17380 svr wx watch logic OB14.3.1
|
||||
Mike Dangelo 6/24/2014 removed unnecessary example bullets
|
||||
Evan Bookbinder 6/21/2015 fixed bad parse strings (thunderstorms) on two winter weather CTAs.
|
||||
Phil Kurimski 10-20-2015 added campers CTA
|
||||
-->
|
||||
<warngenConfig>
|
||||
|
@ -117,8 +118,8 @@ turned on unless the corresponding .vm file is turned on in a given template's .
|
|||
<bullet bulletName="includeTorWatches" bulletText="Include Tornado Watches" parseString=""/>
|
||||
<bullet bulletName="includeSvrWatches" bulletText="Include Severe Thunderstorm Watches" parseString=""/>
|
||||
<bullet bulletText="******** WINTER WX CALLS TO ACTION (CHOOSE 1 OR MORE) *********" bulletType="title"/>
|
||||
<bullet bulletName="advisoryCTA" bulletText="Advisory may be required" bulletGroup="toggle3" parseString="STORMS MAY INTENSIFY...MONITOR TV"/>
|
||||
<bullet bulletName="advisoryEffectCTA" bulletText="Advisory in effect" bulletGroup="toggle3" parseString="FREQUENT CLOUD TO GROUND LIGHTNING IS OCCURRING"/>
|
||||
<bullet bulletName="advisoryCTA" bulletText="Advisory may be required" bulletGroup="toggle3" parseString="WINTER WEATHER ADVISORY MAY BECOME NECESSARY"/>
|
||||
<bullet bulletName="advisoryEffectCTA" bulletText="Advisory in effect" bulletGroup="toggle3" parseString="WINTER WEATHER ADVISORY IS IN EFFECT"/>
|
||||
<bullet bulletName="snowSquallCTA" bulletText="Snow Squall" parseString="TORRENTIAL RAINFALL IS ALSO OCCURRING"/>
|
||||
<bullet bulletName="freezingDrizzleCTA" bulletText="Freezing Drizzle/Rain" parseString="CONTACT YOUR NEAREST LAW ENFORCEMENT"/>
|
||||
<bullet bulletName="flashFreezeCTA" bulletText="Flash Freeze" parseString="RAPID DROP IN TEMPERATURES"/>
|
||||
|
@ -169,8 +170,8 @@ turned on unless the corresponding .vm file is turned on in a given template's .
|
|||
<bullet bulletName="includeTorWatches" bulletText="Include Tornado Watches" parseString=""/>
|
||||
<bullet bulletName="includeSvrWatches" bulletText="Include Severe Thunderstorm Watches" parseString=""/>
|
||||
<bullet bulletText="******** WINTER WX CALLS TO ACTION (CHOOSE 1 OR MORE) *********" bulletType="title"/>
|
||||
<bullet bulletName="advisoryCTA" bulletText="Advisory may be required" bulletGroup="toggle3" parseString="STORMS MAY INTENSIFY...MONITOR TV"/>
|
||||
<bullet bulletName="advisoryEffectCTA" bulletText="Advisory in effect" bulletGroup="toggle3" parseString="FREQUENT CLOUD TO GROUND LIGHTNING IS OCCURRING"/>
|
||||
<bullet bulletName="advisoryCTA" bulletText="Advisory may be required" bulletGroup="toggle3" parseString="WINTER WEATHER ADVISORY MAY BECOME NECESSARY"/>
|
||||
<bullet bulletName="advisoryEffectCTA" bulletText="Advisory in effect" bulletGroup="toggle3" parseString="WINTER WEATHER ADVISORY IS IN EFFECT"/>
|
||||
<bullet bulletName="snowSquallCTA" bulletText="Snow Squall" parseString="TORRENTIAL RAINFALL IS ALSO OCCURRING"/>
|
||||
<bullet bulletName="freezingDrizzleCTA" bulletText="Freezing Drizzle/Rain" parseString="CONTACT YOUR NEAREST LAW ENFORCEMENT"/>
|
||||
<bullet bulletName="flashFreezeCTA" bulletText="Flash Freeze" parseString="RAPID DROP IN TEMPERATURES"/>
|
||||
|
|
9
edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/tornadoWarning.xml
Executable file → Normal file
9
edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/tornadoWarning.xml
Executable file → Normal file
|
@ -13,6 +13,7 @@
|
|||
Richard Barnhill 10-28-2013 Changed/added torEMER bulletGroup to keep it locked on followups
|
||||
Mike Dangelo 1-23-2014 Changed parseStrings for default safety rules CTAs and law enf CTA
|
||||
Evan Bookbinder 9-5-2014 Fixed law enf CTA parse strings to match
|
||||
Evan Bookbinder 6-15-15 Fixed incorrect softball and grapefruit hail sizes
|
||||
Evan Bookbinder 12-7-2015 Added TOR EMER CTA back into cta1 bullet group (undid 1/23/2014 change)
|
||||
-->
|
||||
|
||||
|
@ -109,8 +110,8 @@ turned on unless the corresponding .vm file is turned on in a given template's .
|
|||
<bullet bulletName="tennisBallHail" bulletText="Tennis ball hail (2 1/2")" bulletGroup="hailThreat" parseString="TENNIS BALL SIZE"/>
|
||||
<bullet bulletName="baseballHail" bulletText="Baseball size hail (2 3/4")" bulletGroup="hailThreat" parseString="BASEBALL SIZE"/>
|
||||
<bullet bulletName="threeinchHail" bulletText="Three inch hail (3")" bulletGroup="hailThreat" parseString="THREE INCHES IN DIAMETER"/>
|
||||
<bullet bulletName="grapefruitHail" bulletText="Grapefruit size hail (4")" bulletGroup="hailThreat" parseString="GRAPEFRUIT SIZE"/>
|
||||
<bullet bulletName="softballHail" bulletText="Softball size hail (4 1/4")" bulletGroup="hailThreat" parseString="SOFTBALL SIZE"/>
|
||||
<bullet bulletName="softballHail" bulletText="Softball size hail (4")" bulletGroup="hailThreat" parseString="SOFTBALL SIZE"/>
|
||||
<bullet bulletName="grapefruitHail" bulletText="Grapefruit size hail (4 1/2")" bulletGroup="hailThreat" parseString="GRAPEFRUIT SIZE"/>
|
||||
-->
|
||||
<bullet bulletText="" bulletType="title"/>
|
||||
<bullet bulletText="****** ADDITIONAL REPORTS *******" bulletType="title"/>
|
||||
|
@ -173,8 +174,8 @@ turned on unless the corresponding .vm file is turned on in a given template's .
|
|||
<bullet bulletName="tennisBallHail" bulletText="Tennis ball hail (2 1/2")" bulletGroup="hailThreat" parseString="TENNIS BALL SIZE"/>
|
||||
<bullet bulletName="baseballHail" bulletText="Baseball size hail (2 3/4")" bulletGroup="hailThreat" parseString="BASEBALL SIZE"/>
|
||||
<bullet bulletName="threeinchHail" bulletText="Three inch hail (3")" bulletGroup="hailThreat" parseString="THREE INCHES IN DIAMETER"/>
|
||||
<bullet bulletName="grapefruitHail" bulletText="Grapefruit size hail (4")" bulletGroup="hailThreat" parseString="GRAPEFRUIT SIZE"/>
|
||||
<bullet bulletName="softballHail" bulletText="Softball size hail (4 1/4")" bulletGroup="hailThreat" parseString="SOFTBALL SIZE"/>
|
||||
<bullet bulletName="softballHail" bulletText="Softball size hail (4")" bulletGroup="hailThreat" parseString="SOFTBALL SIZE"/>
|
||||
<bullet bulletName="grapefruitHail" bulletText="Grapefruit size hail (4 1/2")" bulletGroup="hailThreat" parseString="GRAPEFRUIT SIZE"/>
|
||||
-->
|
||||
<bullet bulletText="" bulletType="title"/>
|
||||
<bullet bulletText="****** ADDITIONAL REPORTS *******" bulletType="title"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue