13.3.1-9 baseline
Former-commit-id:468ae82305
[formerly 17276903ed005e17165649f236e6a99afa47b7fb] Former-commit-id:f2b3fddfe2
This commit is contained in:
parent
5f492500ea
commit
0375805e79
14 changed files with 165 additions and 50 deletions
|
@ -60,6 +60,9 @@
|
||||||
# Status: TEST
|
# Status: TEST
|
||||||
# Title: AvnFPS: tpo indicator not monitoring properly
|
# Title: AvnFPS: tpo indicator not monitoring properly
|
||||||
#
|
#
|
||||||
|
# Date Ticket# Engineer Description
|
||||||
|
# ------------- ---------- ----------- --------------------------
|
||||||
|
# Feb. 21, 2013 15834 zhao Modified for CCFP 8hr data
|
||||||
#
|
#
|
||||||
import logging, time
|
import logging, time
|
||||||
import Avn, AvnLib, Globals, MonitorP
|
import Avn, AvnLib, Globals, MonitorP
|
||||||
|
@ -68,10 +71,10 @@ import CCFPData
|
||||||
_Logger = logging.getLogger(__name__)
|
_Logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
_Code = { \
|
_Code = { \
|
||||||
'tops': {1: '370+ ', 2: '310-370', 3: '250-310'}, \
|
'tops': {1: '400+ ', 2: '350-390', 3: '300-340', 4: '250-290'}, \
|
||||||
'gwth': {1: '++', 2: '+ ', 3: 'NC', 4: '- '}, \
|
'gwth': {1: '+ ', 2: 'NC', 3: '- '}, \
|
||||||
'conf': {1: 'HIGH', 3: 'LOW'}, \
|
'conf': {1: 'HIGH', 3: 'LOW'}, \
|
||||||
'cvrg': {1: '75-100%', 2: ' 50-74%', 3: ' 25-49%'}, \
|
'cvrg': {1: '75-100%', 2: ' 40-74%', 3: ' 25-39%'}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -82,7 +85,7 @@ class Monitor(MonitorP.Monitor):
|
||||||
def __makeData(self, data):
|
def __makeData(self, data):
|
||||||
# 6 hour forecast
|
# 6 hour forecast
|
||||||
tstart = (time.time()//3600.0 + 1) * 3600.0
|
tstart = (time.time()//3600.0 + 1) * 3600.0
|
||||||
tend = tstart + 7*3600.0 - 10.0
|
tend = tstart + 9*3600.0 - 10.0
|
||||||
seq = [{'time': t} for t in Avn.frange(tstart, tend, 3600.0)]
|
seq = [{'time': t} for t in Avn.frange(tstart, tend, 3600.0)]
|
||||||
fcst, text = {}, []
|
fcst, text = {}, []
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
menuText="Convective SIGMET" id="ConvSigmet">
|
menuText="Convective SIGMET" id="ConvSigmet">
|
||||||
<dataURI>/convsigmet/%</dataURI>
|
<dataURI>/convsigmet/%</dataURI>
|
||||||
</contribute>
|
</contribute>
|
||||||
|
<contribute xsi:type="bundleItem" file="bundles/BufrNcwf.xml" menuText="NCWF" id="NCWF">
|
||||||
|
<dataURI>/bufrncwf/%</dataURI>
|
||||||
|
</contribute>
|
||||||
<contribute xsi:type="separator" id="separator1"/>
|
<contribute xsi:type="separator" id="separator1"/>
|
||||||
|
|
||||||
<contribute xsi:type="titleItem" titleText="------ Icing Products ------" />
|
<contribute xsi:type="titleItem" titleText="------ Icing Products ------" />
|
||||||
|
|
|
@ -53,6 +53,7 @@ import com.raytheon.viz.warngen.gis.AffectedAreas;
|
||||||
* moved the following methods from InitialLockingBehavior to this class:
|
* moved the following methods from InitialLockingBehavior to this class:
|
||||||
* bulletIndices(), header(), firstBullet(), secondBullet(), getImmediateCausesPtrn();
|
* bulletIndices(), header(), firstBullet(), secondBullet(), getImmediateCausesPtrn();
|
||||||
* updated body(), header(), and secondBullet();
|
* updated body(), header(), and secondBullet();
|
||||||
|
* Mar 13, 2013 DR 15892 D. Friedman Fix bullet parsing.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -141,10 +142,13 @@ abstract public class AbstractLockingBehavior implements ICommonPatterns {
|
||||||
private Integer[] bulletIndices() {
|
private Integer[] bulletIndices() {
|
||||||
List<Integer> bulletIndices = new ArrayList<Integer>();
|
List<Integer> bulletIndices = new ArrayList<Integer>();
|
||||||
|
|
||||||
int index = text.indexOf("* ");
|
/* Assumes first line cannot be a bullet and that the '*' is
|
||||||
|
* at the start of a line.
|
||||||
|
*/
|
||||||
|
int index = text.indexOf("\n* ");
|
||||||
while (index >= 0) {
|
while (index >= 0) {
|
||||||
bulletIndices.add(index);
|
bulletIndices.add(index + 1);
|
||||||
index = text.indexOf("* ", index + 2);
|
index = text.indexOf("\n* ", index + 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return bulletIndices.toArray(new Integer[bulletIndices.size()]);
|
return bulletIndices.toArray(new Integer[bulletIndices.size()]);
|
||||||
|
|
|
@ -39,6 +39,8 @@ import com.raytheon.viz.warngen.gis.AffectedAreas;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Sep 24, 2012 15322 jsanchez Initial creation
|
* Sep 24, 2012 15322 jsanchez Initial creation
|
||||||
* Jan 8, 2013 15664 Qinglu Lin Updated body().
|
* Jan 8, 2013 15664 Qinglu Lin Updated body().
|
||||||
|
* Mar 13, 2013 15892 D. Friedman Fix headline locking. Do not
|
||||||
|
* lock "AND" or "FOR".
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -51,10 +53,8 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void body() {
|
public void body() {
|
||||||
if (action != WarningAction.COR)
|
headlines();
|
||||||
headlines();
|
super.body();
|
||||||
else
|
|
||||||
super.body();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,7 +66,7 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior {
|
||||||
// should be blank.
|
// should be blank.
|
||||||
Pattern headlinePtrn = Pattern
|
Pattern headlinePtrn = Pattern
|
||||||
.compile(
|
.compile(
|
||||||
"^\\.\\.\\.(A|THE) (.*) (WARNING|ADVISORY) .*(REMAINS|EXPIRE|CANCELLED).*(\\.\\.\\.)$",
|
"^\\.\\.\\.(AN?|THE) (.*) (WARNING|ADVISORY) .*(REMAINS|EXPIRE|CANCELLED).*(\\.\\.\\.)$",
|
||||||
Pattern.MULTILINE);
|
Pattern.MULTILINE);
|
||||||
Matcher m = headlinePtrn.matcher(text);
|
Matcher m = headlinePtrn.matcher(text);
|
||||||
|
|
||||||
|
@ -187,16 +187,8 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior {
|
||||||
+ LOCK_START + "..." + LOCK_END;
|
+ LOCK_START + "..." + LOCK_END;
|
||||||
}
|
}
|
||||||
// Locks warning type (i.e. SEVERE THUNDERSTORM)
|
// Locks warning type (i.e. SEVERE THUNDERSTORM)
|
||||||
headline = headline.replaceAll("(A|THE) (" + warningType + ")",
|
headline = headline.replaceAll("(AN?|THE)( [\\w\\s]*?)(" + warningType + ")",
|
||||||
LOCK_START + "$0" + LOCK_END);
|
LOCK_START + "$1" + LOCK_END + "$2" + LOCK_START + "$3" + LOCK_END);
|
||||||
|
|
||||||
// Locks the 'FOR' in the headline
|
|
||||||
headline = headline.replaceFirst(" FOR ", " " + LOCK_START + "FOR"
|
|
||||||
+ LOCK_END + " ");
|
|
||||||
|
|
||||||
// Locks the 'AND' in the headline
|
|
||||||
headline = headline.replaceFirst(" AND ", " " + LOCK_START + "AND"
|
|
||||||
+ LOCK_END + " ");
|
|
||||||
|
|
||||||
return headline;
|
return headline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ import java.util.regex.Pattern;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Sep 24, 2012 15332 jsanchez Initial creation
|
* Sep 24, 2012 15332 jsanchez Initial creation
|
||||||
* Oct 18, 2012 15332 jsanchez Replaced listOfAreaNamesPtrn with String pattern.
|
* Oct 18, 2012 15332 jsanchez Replaced listOfAreaNamesPtrn with String pattern.
|
||||||
|
* Mar 13, 2013 DR 15892 D. Friedman Allow some punctuation in area names.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -55,7 +56,7 @@ public interface ICommonPatterns {
|
||||||
// LOCK_END can be added at the start of the line if a previous line has
|
// LOCK_END can be added at the start of the line if a previous line has
|
||||||
// been locked.
|
// been locked.
|
||||||
public static final String listOfAreaName = "^((" + LOCK_END
|
public static final String listOfAreaName = "^((" + LOCK_END
|
||||||
+ "){0,1}(((\\w+\\s{1})+\\w{2}-)*((\\w+\\s{1})+\\w{2}-)))";
|
+ "){0,1}((([\\?\\(\\)\\w\\.,/'-]+\\s{1})+\\w{2}-)*(([\\?\\(\\)\\w\\.,/'-]+\\s{1})+\\w{2}-)))";
|
||||||
|
|
||||||
// LOCK_END should not be found at the beginning of a first bullet since the
|
// LOCK_END should not be found at the beginning of a first bullet since the
|
||||||
// previous line should be blank.
|
// previous line should be blank.
|
||||||
|
|
|
@ -340,7 +340,7 @@ public class FipsUtil {
|
||||||
* @param fips
|
* @param fips
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private static ArrayList<String> getListCounties(String fips) {
|
public static ArrayList<String> getListCounties(String fips) {
|
||||||
ArrayList<String> rval = new ArrayList<String>();
|
ArrayList<String> rval = new ArrayList<String>();
|
||||||
String matchStr = "";
|
String matchStr = "";
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ import com.raytheon.viz.warngen.text.ICommonPatterns;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jul 22, 2008 #1284 bwoodle Initial creation
|
* Jul 22, 2008 #1284 bwoodle Initial creation
|
||||||
* Oct 18, 2012 15332 jsanchez Fixed refactor bugs.
|
* Oct 18, 2012 15332 jsanchez Fixed refactor bugs.
|
||||||
|
* Mar 13, 2013 DR 15892 D. Friedman Handle SMW format in canceledAreasFromText
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -43,6 +44,8 @@ public class FollowUpUtil {
|
||||||
public static final Pattern vtecPtrn = Pattern
|
public static final Pattern vtecPtrn = Pattern
|
||||||
.compile("/[OTEX]\\.([A-Z]{3})\\.[A-Za-z0-9]{4}\\.[A-Z]{2}\\.[WAYSFON]\\.\\d{4}\\.\\d{6}T\\d{4}Z-\\d{6}T\\d{4}Z/");
|
.compile("/[OTEX]\\.([A-Z]{3})\\.[A-Za-z0-9]{4}\\.[A-Z]{2}\\.[WAYSFON]\\.\\d{4}\\.\\d{6}T\\d{4}Z-\\d{6}T\\d{4}Z/");
|
||||||
|
|
||||||
|
private static final String SMW_CANCELED_AREAS_HEADER = "THE AFFECTED AREAS WERE...";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method checks whether a particular followup should be available
|
* This method checks whether a particular followup should be available
|
||||||
* given a Warning Record, a vtec Action, and a template configuration
|
* given a Warning Record, a vtec Action, and a template configuration
|
||||||
|
@ -173,7 +176,8 @@ public class FollowUpUtil {
|
||||||
String headline = "";
|
String headline = "";
|
||||||
Pattern listOfAreaNamePtrn = Pattern
|
Pattern listOfAreaNamePtrn = Pattern
|
||||||
.compile(ICommonPatterns.listOfAreaName);
|
.compile(ICommonPatterns.listOfAreaName);
|
||||||
for (String line : originalText.trim().split("\n")) {
|
String[] splitLines = originalText.trim().split("\n");
|
||||||
|
for (String line : splitLines) {
|
||||||
if (line.contains("TEST") || line.trim().length() == 0) {
|
if (line.contains("TEST") || line.trim().length() == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -198,8 +202,15 @@ public class FollowUpUtil {
|
||||||
headline += line;
|
headline += line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String[] ugcs = ugcLine.split("-");
|
String[] ugcs = FipsUtil.getListCounties(ugcLine).toArray(new String[0]);
|
||||||
String[] names = namesLine.split("-");
|
String[] names;
|
||||||
|
boolean smwAreas = false;
|
||||||
|
if (namesLine.length() > 0)
|
||||||
|
names = namesLine.split("-");
|
||||||
|
else {
|
||||||
|
names = parseSMWCanceledAreas(splitLines);
|
||||||
|
smwAreas = true;
|
||||||
|
}
|
||||||
String[] areas = headline.split("\\.\\.\\.");
|
String[] areas = headline.split("\\.\\.\\.");
|
||||||
|
|
||||||
ArrayList<AffectedAreas> al = new ArrayList<AffectedAreas>();
|
ArrayList<AffectedAreas> al = new ArrayList<AffectedAreas>();
|
||||||
|
@ -222,13 +233,21 @@ public class FollowUpUtil {
|
||||||
areasNotation = "COUNTIES";
|
areasNotation = "COUNTIES";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ugc.length() < 3)
|
||||||
|
continue; // TODO: log?
|
||||||
|
|
||||||
fips = ugc.substring(ugc.length() - 3);
|
fips = ugc.substring(ugc.length() - 3);
|
||||||
|
|
||||||
if (i < names.length) {
|
if (i < names.length) {
|
||||||
name = names[i].substring(0, names[i].length() - 3);
|
if (!smwAreas && names[i].length() >= 3) {
|
||||||
stateAbbreviation = names[i].substring(names[i].length() - 2);
|
name = names[i].substring(0, names[i].length() - 3);
|
||||||
}
|
stateAbbreviation = names[i].substring(names[i].length() - 2);
|
||||||
|
} else {
|
||||||
|
name = names[i];
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
break;
|
||||||
|
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
for (String area : areas) {
|
for (String area : areas) {
|
||||||
|
@ -334,4 +353,32 @@ public class FollowUpUtil {
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Parses the canceled areas of an SMW, which have a different format
|
||||||
|
* from other products.
|
||||||
|
*/
|
||||||
|
private static String[] parseSMWCanceledAreas(String[] splitLines) {
|
||||||
|
StringBuilder text = new StringBuilder(64);
|
||||||
|
boolean inAreas = false;
|
||||||
|
for (String line : splitLines) {
|
||||||
|
String trimmedLine = line.trim();
|
||||||
|
if (SMW_CANCELED_AREAS_HEADER.equals(trimmedLine))
|
||||||
|
inAreas = true;
|
||||||
|
else if (inAreas) {
|
||||||
|
if (trimmedLine.length() > 0) {
|
||||||
|
text.append(trimmedLine);
|
||||||
|
text.append('\n');
|
||||||
|
} else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int len = text.length();
|
||||||
|
if (len >= 4 && "...\n".equals(text.substring(len - 4)))
|
||||||
|
text.delete(len - 4, len);
|
||||||
|
String[] areas = text.toString().split("\\.\\.\\.\\n");
|
||||||
|
// Unwrap lines.
|
||||||
|
for (int i = 0; i < areas.length; ++i)
|
||||||
|
areas[i] = areas[i].replace("\n", " ");
|
||||||
|
return areas;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
##### Qinglu Lin 08-13-2012 DR 14493. Use corToNewMarker and corEventtime.
|
##### Qinglu Lin 08-13-2012 DR 14493. Use corToNewMarker and corEventtime.
|
||||||
##### D. Friedman 11-09-2012 DR 15430. Rework included watches.
|
##### D. Friedman 11-09-2012 DR 15430. Rework included watches.
|
||||||
##### QINGLU LIN 12-27-2012 DR 15594. Added $lock to headlineLocList.
|
##### QINGLU LIN 12-27-2012 DR 15594. Added $lock to headlineLocList.
|
||||||
|
##### D. Friedman 03-13-2013 DR 15892. Do not lock portion of state in firstBullet.
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
Mile Marker Test Code
|
Mile Marker Test Code
|
||||||
macro "mmarkers" use (called out of VM_global_library.vm):
|
macro "mmarkers" use (called out of VM_global_library.vm):
|
||||||
|
@ -750,7 +751,7 @@ THE ${area.name}##
|
||||||
#if(${intFIPS.parseInt($FIPS)} < 500 || ${area.stateabbr} == "TX")
|
#if(${intFIPS.parseInt($FIPS)} < 500 || ${area.stateabbr} == "TX")
|
||||||
<L>${area.name} ${area.areaNotation}</L> IN #areaFormat(${area.partOfParentRegion} true false) <L>${area.parentRegion}...</L>
|
<L>${area.name} ${area.areaNotation}</L> IN #areaFormat(${area.partOfParentRegion} true false) <L>${area.parentRegion}...</L>
|
||||||
#else
|
#else
|
||||||
<L>${area.name}</L> IN <L>#areaFormat(${area.partOfParentRegion} true false) ${area.parentRegion}...</L>
|
<L>${area.name}</L> IN #areaFormat(${area.partOfParentRegion} true false) <L>${area.parentRegion}...</L>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
## COMMENTED OUT 5 LINES BELOW THIS IS GENERALLY NOT UTILIZED - you can unREMARK if desired
|
## COMMENTED OUT 5 LINES BELOW THIS IS GENERALLY NOT UTILIZED - you can unREMARK if desired
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
## Evan Bookbinder 4-25-2012 for OB 12.3.1 (corText)
|
## Evan Bookbinder 4-25-2012 for OB 12.3.1 (corText)
|
||||||
## QINGLU LIN 7-31-2012 DR 15217 use roundAndPad
|
## QINGLU LIN 7-31-2012 DR 15217 use roundAndPad
|
||||||
## Qinglu Lin 12-27-2012 DR 15594. Appended true to headlineLocList's parameter list.
|
## Qinglu Lin 12-27-2012 DR 15594. Appended true to headlineLocList's parameter list.
|
||||||
|
## D. Friedman 03-13-2013 DR 15892. Use printcoords.
|
||||||
################################################
|
################################################
|
||||||
##
|
##
|
||||||
### CREATE PHRASING DEPENDING ON WHETHER WE ISSUE EXP PRIOR TO EXPIRATION TIME OR NOT
|
### CREATE PHRASING DEPENDING ON WHETHER WE ISSUE EXP PRIOR TO EXPIRATION TIME OR NOT
|
||||||
|
@ -482,10 +483,7 @@ THIS IS A TEST MESSAGE.##
|
||||||
THIS IS A TEST MESSAGE. DO NOT TAKE ACTION BASED ON THIS MESSAGE.
|
THIS IS A TEST MESSAGE. DO NOT TAKE ACTION BASED ON THIS MESSAGE.
|
||||||
|
|
||||||
#end
|
#end
|
||||||
LAT...LON ##
|
#printcoords(${areaPoly}, ${list})
|
||||||
#foreach(${coord} in ${areaPoly})
|
|
||||||
#llFormat(${coord.y}) #llFormat(${coord.x}) ##
|
|
||||||
#end
|
|
||||||
|
|
||||||
TIME...MOT...LOC ##
|
TIME...MOT...LOC ##
|
||||||
${dateUtil.format(${event}, ${timeFormat.time})}Z ##
|
${dateUtil.format(${event}, ${timeFormat.time})}Z ##
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND)
|
## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND)
|
||||||
## QINGLU LIN 7-31-2012 DR 15217 use roundAndPad ##
|
## QINGLU LIN 7-31-2012 DR 15217 use roundAndPad ##
|
||||||
## Qinglu Lin 12-27-2012 DR 15594. Appended true to headlineLocList's parameter list.
|
## Qinglu Lin 12-27-2012 DR 15594. Appended true to headlineLocList's parameter list.
|
||||||
|
## D. Friemdan 13-03-2013 DR 15892. Do not lock locations in headline.
|
||||||
######################################################
|
######################################################
|
||||||
##
|
##
|
||||||
##SET SOME INITIAL VARIABLES
|
##SET SOME INITIAL VARIABLES
|
||||||
|
@ -120,7 +121,7 @@ THIS IS A TEST MESSAGE. ##
|
||||||
#end
|
#end
|
||||||
#if(${windSpeed} >= 40 || ${hailSize} >= 0.70)
|
#if(${windSpeed} >= 40 || ${hailSize} >= 0.70)
|
||||||
...SIGNIFICANT WEATHER ADVISORY FOR ##
|
...SIGNIFICANT WEATHER ADVISORY FOR ##
|
||||||
#headlineLocList(${areas} true false true false true) #secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone})
|
#headlineLocList(${areas} true false true false false) #secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone})
|
||||||
...##
|
...##
|
||||||
#elseif(${windSpeed} == 0 && ${hailSize} == 0)
|
#elseif(${windSpeed} == 0 && ${hailSize} == 0)
|
||||||
!** YOU DID NOT SELECT ANY WIND OR HAIL THREATS. PLEASE RE-GENERATE THIS ADVISORY **!
|
!** YOU DID NOT SELECT ANY WIND OR HAIL THREATS. PLEASE RE-GENERATE THIS ADVISORY **!
|
||||||
|
|
|
@ -70,6 +70,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Dec 3, 2010 rjpeter Initial creation
|
* Dec 3, 2010 rjpeter Initial creation
|
||||||
* Mar 07, 2013 1587 bsteffen rewrite static data generation.
|
* Mar 07, 2013 1587 bsteffen rewrite static data generation.
|
||||||
|
* Mar 14, 2013 1587 bsteffen Fix persisting to datastore.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -267,7 +268,7 @@ public class StaticDataGenerator {
|
||||||
for (GridRecord staticRecord : datastoreRecords) {
|
for (GridRecord staticRecord : datastoreRecords) {
|
||||||
populateMessageData(staticRecord);
|
populateMessageData(staticRecord);
|
||||||
}
|
}
|
||||||
dao.persistToHDF5(databaseRecords.toArray(new PluginDataObject[0]));
|
dao.persistToHDF5(datastoreRecords.toArray(new PluginDataObject[0]));
|
||||||
}
|
}
|
||||||
if (!databaseRecords.isEmpty()) {
|
if (!databaseRecords.isEmpty()) {
|
||||||
dao.persistToDatabase(databaseRecords
|
dao.persistToDatabase(databaseRecords
|
||||||
|
@ -423,7 +424,8 @@ public class StaticDataGenerator {
|
||||||
datasets = Collections.emptyList();
|
datasets = Collections.emptyList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (datasets.contains(missing)) {
|
if (!datasets.contains(staticRecord.getParameter()
|
||||||
|
.getAbbreviation())) {
|
||||||
missing.add(staticRecord);
|
missing.add(staticRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
<bean id="ffmpThreadPool"
|
<bean id="ffmpThreadPool"
|
||||||
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
|
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
|
||||||
<property name="corePoolSize" value="2" />
|
<property name="corePoolSize" value="1" />
|
||||||
<property name="maxPoolSize" value="4" />
|
<property name="maxPoolSize" value="1" />
|
||||||
<property name="keepAliveSeconds" value="60000" />
|
<property name="keepAliveSeconds" value="60000" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,7 @@ import com.raytheon.uf.edex.plugin.ffmp.common.FFTIRatioDiff;
|
||||||
* 07/31/2011 578 dhladky FFTI modifications
|
* 07/31/2011 578 dhladky FFTI modifications
|
||||||
* 01/27/13 1478 D. Hladky Added creation of full cache records to help read write stress on NAS
|
* 01/27/13 1478 D. Hladky Added creation of full cache records to help read write stress on NAS
|
||||||
* 02/25/13 1660 D. Hladky Redesigned data flow for FFTI in order to have only one mosaic piece in memory at a time.
|
* 02/25/13 1660 D. Hladky Redesigned data flow for FFTI in order to have only one mosaic piece in memory at a time.
|
||||||
|
* 03/13/13 1478 D. Hladky non-FFTI mosaic containers weren't getting ejected. Made it so that they are ejected after processing as well.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author dhladky
|
* @author dhladky
|
||||||
|
@ -701,18 +702,47 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
||||||
fftiSources.add(ffmp.getFFTISource());
|
fftiSources.add(ffmp.getFFTISource());
|
||||||
ffti.processFFTI();
|
ffti.processFFTI();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do the accumulation now, more memory efficient.
|
// Do the accumulation now, more memory efficient.
|
||||||
// Only one piece in memory at a time
|
// Only one piece in memory at a time
|
||||||
for (String attribute: ffmp.getAttributes()) {
|
for (String attribute : ffmp.getAttributes()) {
|
||||||
if (attribute.equals(ATTRIBUTE.ACCUM.getAttribute())) {
|
if (attribute.equals(ATTRIBUTE.ACCUM
|
||||||
FFTIAccum accum = getAccumulationForSite(ffmpProduct.getDisplayName(), siteKey, dataKey, fftiSource.getDurationHour(), ffmpProduct.getUnit(siteKey));
|
.getAttribute())) {
|
||||||
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
|
FFTIAccum accum = getAccumulationForSite(
|
||||||
statusHandler.debug("Accumulating FFTI for source: "+ffmpProduct.getDisplayName()+" site: "+siteKey+" data: "+dataKey+" duration: "+fftiSource.getDurationHour()+ " accumulation: "+accum.getAccumulation());
|
ffmpProduct.getDisplayName(),
|
||||||
|
siteKey, dataKey,
|
||||||
|
fftiSource.getDurationHour(),
|
||||||
|
ffmpProduct.getUnit(siteKey));
|
||||||
|
if (statusHandler
|
||||||
|
.isPriorityEnabled(Priority.DEBUG)) {
|
||||||
|
statusHandler
|
||||||
|
.debug("Accumulating FFTI for source: "
|
||||||
|
+ ffmpProduct
|
||||||
|
.getDisplayName()
|
||||||
|
+ " site: "
|
||||||
|
+ siteKey
|
||||||
|
+ " data: "
|
||||||
|
+ dataKey
|
||||||
|
+ " duration: "
|
||||||
|
+ fftiSource
|
||||||
|
.getDurationHour()
|
||||||
|
+ " accumulation: "
|
||||||
|
+ accum.getAccumulation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SourceXML source = getSourceConfig().getSource(
|
||||||
|
ffmpRec.getSourceName());
|
||||||
|
|
||||||
|
if (!source.getSourceType().equals(
|
||||||
|
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||||
|
String sourceSiteDataKey = getSourceSiteDataKey(source,
|
||||||
|
dataKey, ffmpRec);
|
||||||
|
ffmpData.remove(sourceSiteDataKey);
|
||||||
|
statusHandler.info("Removing from memory: "+sourceSiteDataKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1919,6 +1949,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
||||||
}
|
}
|
||||||
|
|
||||||
ffmpData.remove(siteDataKey);
|
ffmpData.remove(siteDataKey);
|
||||||
|
statusHandler.info("Removing from memory: "+siteDataKey);
|
||||||
accumulator.setReset(false);
|
accumulator.setReset(false);
|
||||||
writeFFTIData(siteDataKey, accumulator);
|
writeFFTIData(siteDataKey, accumulator);
|
||||||
}
|
}
|
||||||
|
@ -2069,6 +2100,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
||||||
|
|
||||||
// replace or insert it
|
// replace or insert it
|
||||||
ffmpData.remove(qpeSiteSourceDataKey);
|
ffmpData.remove(qpeSiteSourceDataKey);
|
||||||
|
statusHandler.info("Removing from memory: "+qpeSiteSourceDataKey);
|
||||||
values.setReset(false);
|
values.setReset(false);
|
||||||
writeFFTIData(siteDataKey, values);
|
writeFFTIData(siteDataKey, values);
|
||||||
}
|
}
|
||||||
|
@ -2102,5 +2134,33 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find siteSourceDataKey
|
||||||
|
*
|
||||||
|
* @param source
|
||||||
|
* @param dataKey
|
||||||
|
* @param ffmpRec
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getSourceSiteDataKey(SourceXML source, String dataKey, FFMPRecord ffmpRec) {
|
||||||
|
|
||||||
|
String sourceName = source.getSourceName();
|
||||||
|
String sourceSiteDataKey = null;
|
||||||
|
|
||||||
|
if (source.getSourceType().equals(
|
||||||
|
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||||
|
sourceName = source.getDisplayName();
|
||||||
|
sourceSiteDataKey = sourceName;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
sourceName = ffmpRec.getSourceName();
|
||||||
|
sourceSiteDataKey = sourceName + "-" + ffmpRec.getSiteKey()
|
||||||
|
+ "-" + dataKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sourceSiteDataKey;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -66,6 +66,7 @@ import com.raytheon.uf.edex.database.plugin.PluginDao;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 4/7/09 1994 bphillip Initial Creation
|
* 4/7/09 1994 bphillip Initial Creation
|
||||||
|
* Mar 14, 2013 1587 bsteffen Fix static data persisting to datastore.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -99,10 +100,13 @@ public class GridDao extends PluginDao {
|
||||||
long[] sizes = new long[] { location.getNx(), location.getNy() };
|
long[] sizes = new long[] { location.getNx(), location.getNy() };
|
||||||
String abbrev = gridRec.getParameter().getAbbreviation();
|
String abbrev = gridRec.getParameter().getAbbreviation();
|
||||||
String group = gridRec.getDataURI();
|
String group = gridRec.getDataURI();
|
||||||
|
String datasetName = "Data";
|
||||||
if (GridPathProvider.STATIC_PARAMETERS.contains(abbrev)) {
|
if (GridPathProvider.STATIC_PARAMETERS.contains(abbrev)) {
|
||||||
group = "/" + location.getId();
|
group = "/" + location.getId();
|
||||||
|
datasetName = abbrev;
|
||||||
}
|
}
|
||||||
AbstractStorageRecord storageRecord = new FloatDataRecord("Data",
|
AbstractStorageRecord storageRecord = new FloatDataRecord(
|
||||||
|
datasetName,
|
||||||
group, (float[]) messageData, 2, sizes);
|
group, (float[]) messageData, 2, sizes);
|
||||||
|
|
||||||
storageRecord.setCorrelationObject(gridRec);
|
storageRecord.setCorrelationObject(gridRec);
|
||||||
|
|
Loading…
Add table
Reference in a new issue