From 56a8c39c917e5eb2652786552bb9b249c7208f19 Mon Sep 17 00:00:00 2001 From: David Lovely Date: Thu, 25 Jun 2015 09:57:12 -0500 Subject: [PATCH 01/20] Omaha #4582 Added Maven to support QPID build Former-commit-id: 9a8355b150d7186d35c68b833c84cc373382c52f --- rpms/build/common/lookupRPM.sh | 4 ++++ rpms/build/x86_64/build.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/rpms/build/common/lookupRPM.sh b/rpms/build/common/lookupRPM.sh index 71d3ce5948..bb757f7eaa 100644 --- a/rpms/build/common/lookupRPM.sh +++ b/rpms/build/common/lookupRPM.sh @@ -33,6 +33,10 @@ function lookupRPM() # lookup the rpm. # foss rpms -> python rpms. + if [ "${1}" = "awips2-maven" ]; then + export RPM_SPECIFICATION="${installer_dir}/maven-3.2.3/" + return 0 + fi if [ "${1}" = "awips2-python" ]; then export RPM_SPECIFICATION="${installer_dir}/python-2.7.8/" return 0 diff --git a/rpms/build/x86_64/build.sh b/rpms/build/x86_64/build.sh index da139fe230..febb00d862 100644 --- a/rpms/build/x86_64/build.sh +++ b/rpms/build/x86_64/build.sh @@ -187,6 +187,7 @@ if [ "${1}" = "-rh6" ]; then buildRPM "awips2-python-pygtk" buildRPM "awips2-python-shapely" buildRPM "awips2-ant" + buildRPM "awips2-maven" buildRPM "awips2-tools" buildRPM "awips2-postgres" buildRPM "awips2-pgadmin3" From 0c8f6a7f9c372c13fe88c41e0cf7efb0f3db2253 Mon Sep 17 00:00:00 2001 From: Mark Peters Date: Thu, 9 Jul 2015 16:02:41 -0500 Subject: [PATCH 02/20] Omaha #4641 14.4.1: Volume Browser sometimes fails to load, throws error when launched Change-Id: Ia426360e75f898fb010a327cccae46f922605bc0 Former-commit-id: fffd9245ef0141587063c034ad3153af1449b3c9 --- .../viz/volumebrowser/xml/VbSourceList.java | 148 ++++++++++++------ 1 file changed, 101 insertions(+), 47 deletions(-) diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSourceList.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSourceList.java index 251c9b04e3..6290cecbc7 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSourceList.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSourceList.java @@ -51,6 +51,7 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu; * Aug 19, 2014 3506 mapeters Populate toolbar contributions from directory of * source files instead of one file, merge sources from * different localization levels instead of overriding. + * Jul 07, 2015 4641 mapeters Fix/improve comparators for VbSource sorting. * * * @@ -63,28 +64,73 @@ public class VbSourceList { private final static IPathManager pm = PathManagerFactory.getPathManager(); + /** + * Comparator for sorting sources (compares category, then subcategory, then + * name). + */ private static Comparator comparator = new Comparator() { - /* - * For sorting sources, compare subcategories first. If they are the - * same or either source doesn't have one, compare display names. - */ @Override public int compare(VbSource source1, VbSource source2) { + String cat1 = source1.getCategory(); + String cat2 = source2.getCategory(); + if (!cat1.equals(cat2)) { + /* + * Categories are in the format + * "DropDownMenu/SubMenu/SubMenu/..." + */ + String[] cat1Parts = cat1.split("/"); + String[] cat2Parts = cat2.split("/"); + int minParts = Math.min(cat1Parts.length, cat2Parts.length); + for (int i = 0; i < minParts; i++) { + if (!cat1Parts[i].equals(cat2Parts[i])) { + return comparatorString.compare(cat1Parts[i], + cat2Parts[i]); + } + } + /* + * At this point, categories must match up to the end of the + * smaller of the two (e.g. SfcGrid and SfcGrid/RTOFS/forecast). + * Return the comparison of sourceWithShorterCategory's name and + * otherSource's next submenu level (RTOFS in the example). + */ + if (cat1Parts.length > minParts) { + return comparatorString.compare(cat1Parts[minParts], + source2.getName()); + } else { + return comparatorString.compare(source1.getName(), + cat2Parts[minParts]); + } + } + + /* + * Compare subcategories next. If one source has a subcategory and + * another doesn't, return the source with a subcategory as being + * larger (later in the list). + */ String subCat1 = source1.getSubCategory(); String subCat2 = source2.getSubCategory(); - if (subCat1 != null && subCat2 != null && !subCat1.equals(subCat2)) { - return comparatorString.compare(subCat1, subCat2); + if (subCat1 != null && subCat2 != null) { + if (!subCat1.equals(subCat2)) { + return comparatorString.compare(subCat1, subCat2); + } + } else if (subCat1 != null) { + return 1; + } else if (subCat2 != null) { + return -1; } + + // Compare names if categories and subcategories match. return comparatorString.compare(source1.getName(), source2.getName()); } }; + /** + * Comparator for comparing two strings, ignoring capitalization and + * comparing numeric values (assumes there are no leading zeros in the + * numeric values). + */ private static Comparator comparatorString = new Comparator() { - /* - * Compares two strings, ignoring capitalization and comparing numeric - * values. - */ @Override public int compare(String s1, String s2) { int n1 = s1.length(); @@ -95,47 +141,54 @@ public class VbSourceList { for (int i = 0; i < min; i++) { char c1 = s1.charAt(i); char c2 = s2.charAt(i); - if (c1 != c2) { - if (Character.isDigit(c1) && Character.isDigit(c2)) { - // Store aligned numeric values as strings - number1 += c1; - number2 += c2; - } else if (!number1.equals(number2)) { - if (Character.isDigit(c1)) { - /* - * Return first string as larger if it has - * longer/larger numeric value. - */ - return 1; - } else if (Character.isDigit(c2)) { - /* - * Return second string as larger if it has - * longer/larger numeric value. - */ - return -1; - } else { - /* - * Compare stored numeric values. - */ - return number1.charAt(0) - number2.charAt(0); - } + if (Character.isDigit(c1) && Character.isDigit(c2)) { + /* + * If aligned characters are both digits, store them as + * strings and proceed to next pair of aligned characters. + */ + number1 += c1; + number2 += c2; + continue; + } else if (!(Character.isDigit(c1) || Character.isDigit(c2))) { + /* + * If neither aligned character is a digit, return + * difference in stored numbers if they aren't equal, + * otherwise reset numbers if they aren't already empty. + */ + if (!number1.equals(number2)) { + return Integer.valueOf(number1) + - Integer.valueOf(number2); + } else if (!number1.isEmpty()) { + number1 = ""; + number2 = ""; + } + } else if (!number1.isEmpty()) { + /* + * Exactly one of the two characters must be a digit to + * reach here. If the numbers aren't empty, whichever string + * has the extra digit is larger as its number is larger. + */ + if (Character.isDigit(c1)) { + return 1; } else { - c1 = Character.toUpperCase(c1); - c2 = Character.toUpperCase(c2); - if (c1 != c2) { - c1 = Character.toLowerCase(c1); - c2 = Character.toLowerCase(c2); - if (c1 != c2) { - // No overflow because of numeric promotion - return c1 - c2; - } - } + return -1; + } + } + c1 = Character.toUpperCase(c1); + c2 = Character.toUpperCase(c2); + if (c1 != c2) { + c1 = Character.toLowerCase(c1); + c2 = Character.toLowerCase(c2); + if (c1 != c2) { + // No overflow because of numeric promotion + return c1 - c2; } } } /* - * If two strings end with numeric values after for loop, check for - * additional digits beyond minimum length to determine order. + * If two strings end with unequal numeric values after for loop, + * check for additional digits beyond minimum length to determine + * order. */ if (!number1.equals(number2)) { if (n1 > n2 && Character.isDigit(s1.charAt(n2))) { @@ -143,7 +196,7 @@ public class VbSourceList { } else if (n2 > n1 && Character.isDigit(s2.charAt(n1))) { return -1; } else - return number1.charAt(0) - number2.charAt(0); + return Integer.valueOf(number1) - Integer.valueOf(number2); } return n1 - n2; } @@ -153,6 +206,7 @@ public class VbSourceList { * @deprecated This file path string exists only to support legacy overrides * and should eventually be removed. */ + @Deprecated private final static String VB_SOURCE_FILE = "volumebrowser/VbSources.xml"; private final static char SUB_MENU_SPLIT = '/'; From a7059ba80c9d2569d3a9912d9ee28220f4e9d05a Mon Sep 17 00:00:00 2001 From: Mark Peters Date: Fri, 10 Jul 2015 15:09:38 -0500 Subject: [PATCH 03/20] Omaha #4641 Volume browser sources sorting and null checks Change-Id: Iabd25162a4ea115d7cf54145fb6c2496241a20e4 Former-commit-id: d1a484d56a9351c5b75c851435fc3d72d987ee5d --- .../viz/volumebrowser/xml/VbSource.java | 16 +++- .../viz/volumebrowser/xml/VbSourceList.java | 90 ++++++++++++++++--- 2 files changed, 94 insertions(+), 12 deletions(-) diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSource.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSource.java index a0ecd0977d..bad1a091a8 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSource.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSource.java @@ -22,6 +22,7 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu; * Dec 11, 2013 2602 bsteffen Remove ISerializableObject. * Aug 14, 2014 3506 mapeters Added remove field and equals * and hashCode functions. + * Jul 10, 2015 4641 mapeters Added toString(). * * * @@ -142,7 +143,6 @@ public class VbSource { @Override public boolean equals(Object that) { - if (that instanceof VbSource) { if ((this.key.equals(((VbSource) that).getKey()) && (this .getCategory().compareTo(((VbSource) that).getCategory()) == 0))) { @@ -156,6 +156,20 @@ public class VbSource { public int hashCode() { String newKey = key.concat(category); return newKey.hashCode(); + } + @Override + public String toString() { + StringBuilder sourceString = new StringBuilder("VbSource["); + sourceString.append("key=").append(key); + sourceString.append(", "); + sourceString.append("name=").append(name); + sourceString.append(", "); + sourceString.append("category=").append(category); + sourceString.append(", "); + sourceString.append("subCategory=").append(subCategory); + sourceString.append("]"); + + return sourceString.toString(); } } diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSourceList.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSourceList.java index 6290cecbc7..2dc4bf9a14 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSourceList.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/VbSourceList.java @@ -5,6 +5,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.ListIterator; @@ -32,6 +33,9 @@ import com.raytheon.uf.common.menus.xml.CommonMenuContribution; import com.raytheon.uf.common.menus.xml.CommonTitleImgContribution; import com.raytheon.uf.common.menus.xml.CommonToolBarContribution; import com.raytheon.uf.common.menus.xml.CommonToolbarSubmenuContribution; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu; /** @@ -52,6 +56,7 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu; * source files instead of one file, merge sources from * different localization levels instead of overriding. * Jul 07, 2015 4641 mapeters Fix/improve comparators for VbSource sorting. + * Jul 10, 2015 4641 mapeters Added check for sources with null key/category fields. * * * @@ -62,8 +67,15 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu; @XmlRootElement public class VbSourceList { + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(VbSourceList.class); + private final static IPathManager pm = PathManagerFactory.getPathManager(); + /** The sources categories in order */ + private static final String[] CATEGORIES = new String[] { "Volume", + "SfcGrid", "Local", "Point" }; + /** * Comparator for sorting sources (compares category, then subcategory, then * name). @@ -83,10 +95,16 @@ public class VbSourceList { int minParts = Math.min(cat1Parts.length, cat2Parts.length); for (int i = 0; i < minParts; i++) { if (!cat1Parts[i].equals(cat2Parts[i])) { - return comparatorString.compare(cat1Parts[i], - cat2Parts[i]); + /* + * Compare the drop down menu names differently to keep + * them in the order the NWS is used to. + */ + Comparator comparator = (i == 0) ? categoryComparator + : stringComparator; + return comparator.compare(cat1Parts[i], cat2Parts[i]); } } + /* * At this point, categories must match up to the end of the * smaller of the two (e.g. SfcGrid and SfcGrid/RTOFS/forecast). @@ -94,10 +112,10 @@ public class VbSourceList { * otherSource's next submenu level (RTOFS in the example). */ if (cat1Parts.length > minParts) { - return comparatorString.compare(cat1Parts[minParts], + return stringComparator.compare(cat1Parts[minParts], source2.getName()); } else { - return comparatorString.compare(source1.getName(), + return stringComparator.compare(source1.getName(), cat2Parts[minParts]); } } @@ -111,7 +129,7 @@ public class VbSourceList { String subCat2 = source2.getSubCategory(); if (subCat1 != null && subCat2 != null) { if (!subCat1.equals(subCat2)) { - return comparatorString.compare(subCat1, subCat2); + return stringComparator.compare(subCat1, subCat2); } } else if (subCat1 != null) { return 1; @@ -120,7 +138,7 @@ public class VbSourceList { } // Compare names if categories and subcategories match. - return comparatorString.compare(source1.getName(), + return stringComparator.compare(source1.getName(), source2.getName()); } }; @@ -130,7 +148,7 @@ public class VbSourceList { * comparing numeric values (assumes there are no leading zeros in the * numeric values). */ - private static Comparator comparatorString = new Comparator() { + private static Comparator stringComparator = new Comparator() { @Override public int compare(String s1, String s2) { int n1 = s1.length(); @@ -202,6 +220,38 @@ public class VbSourceList { } }; + /** + * Comparator for comparing the drop down menu names of the sources. + * Determines order based on {@link #CATEGORIES}. + */ + private static Comparator categoryComparator = new Comparator() { + @Override + public int compare(String cat1, String cat2) { + if (cat1.equals(cat2)) { + return 0; + } + for (String category : CATEGORIES) { + /* + * The categories aren't equal (checked for above), so whichever + * one appears first in the ordered categories list (CATEGORIES) + * should be returned as being smaller (making it also appear + * earlier in the sorted list of VbSources). + */ + if (cat1.equals(category)) { + return -1; + } else if (cat2.equals(category)) { + return 1; + } + } + + /* + * If neither category is in the ordered list of expected + * categories, compare them alphabetically. + */ + return stringComparator.compare(cat1, cat2); + } + }; + /** * @deprecated This file path string exists only to support legacy overrides * and should eventually be removed. @@ -311,6 +361,18 @@ public class VbSourceList { List sources = JAXB.unmarshal(locFile.getFile(), VbSourceList.class).getEntries(); if (sources != null) { + Iterator itr = sources.iterator(); + while (itr.hasNext()) { + VbSource source = itr.next(); + if (source.getCategory() == null + || source.getKey() == null) { + statusHandler + .handle(Priority.WARN, + source + + " was excluded from sources menu due to null key and/or category field."); + itr.remove(); + } + } allSources.addAll(sources); } } @@ -321,8 +383,11 @@ public class VbSourceList { DatasetInfo info; // Set containing sources to not be added to lists Set removes = new HashSet(); - for (int i = 0; i < allSources.size(); i++) { - VbSource source = allSources.get(i); + Iterator itr = allSources.iterator(); + // The current index in allSources + int i = 0; + while (itr.hasNext()) { + VbSource source = itr.next(); // Set display names for sources if (source.getName() == null) { info = lookup.getInfo(source.getKey()); @@ -331,11 +396,14 @@ public class VbSourceList { if (source.getRemove()) { // Add sources with remove tags to removal set and remove them. removes.add(source); - allSources.remove(i--); + itr.remove(); } else if (removes.contains(source) || allSources.subList(0, i).contains(source)) { // Remove sources in removal set and repeats - allSources.remove(i--); + itr.remove(); + } else { + // Increment index in allSources if source wasn't removed + i++; } } Collections.sort(allSources, comparator); From 24c42c479ac98f50155e0e0302d044c5896bdda7 Mon Sep 17 00:00:00 2001 From: Michael Gamazaychikov Date: Thu, 16 Jul 2015 09:19:46 -0400 Subject: [PATCH 04/20] ASM #17716 - WarnGen: assigning a MultiPolygon to a Polygon causes failure in creating SVS. Change-Id: Id521b7c71c31b28e8668ab6a8d91f7661ebc79bb Former-commit-id: 469652fbde56520e971edbc15b0d921969abb8e1 --- .../viz/warngen/template/TemplateRunner.java | 23 +++++++++++++------ .../warngen/text/AbstractLockingBehavior.java | 3 +++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java index 1b0f478f8a..21dfeef97a 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java @@ -98,6 +98,7 @@ import com.raytheon.viz.warnings.DateUtil; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.Polygon; +import com.vividsolutions.jts.geom.TopologyException; import com.vividsolutions.jts.io.WKTReader; /** @@ -145,6 +146,7 @@ import com.vividsolutions.jts.io.WKTReader; * Aug 28, 2014 ASM #15551 Qinglu Lin Replaced 1200 PM/1200 AM by NOON/MIDNIGHT, removed days in * included tornado/severe thunderstorm watch message. * Sep 18, 2014 ASM #15465 Qinglu Lin For backup, get officeShort and officeLoc from backup WFO's config.xml. + * Jul 15, 2015 DR17716 mgamazaychikov Change to Geometry class in total intersection calculations. * * * @author njensen @@ -325,7 +327,7 @@ public class TemplateRunner { } else { // Determine if one letter timezone is going to be // put into timeZones. - Polygon[] poly1, poly2; + Geometry[] poly1, poly2; int n1, n2; double size, totalSize; for (int i = 0; i < oneLetterTimeZones.length(); i++) { @@ -345,14 +347,14 @@ public class TemplateRunner { if (intersectSize.get(oneLetterTZ[i]) != null) { continue; } - poly1 = new Polygon[warningArea + poly1 = new Geometry[warningArea .getNumGeometries()]; n1 = warningArea.getNumGeometries(); for (int j = 0; j < n1; j++) { poly1[j] = (Polygon) warningArea .getGeometryN(j); } - poly2 = new Polygon[timezoneGeom + poly2 = new Geometry[timezoneGeom .getNumGeometries()]; n2 = timezoneGeom.getNumGeometries(); for (int j = 0; j < n2; j++) { @@ -360,10 +362,17 @@ public class TemplateRunner { .getGeometryN(j); } // Calculate the total size of intersection - for (Polygon p1 : poly1) { - for (Polygon p2 : poly2) { - size = p1.intersection(p2) - .getArea(); + for (Geometry p1 : poly1) { + for (Geometry p2 : poly2) { + try { + size = p1.intersection(p2) + .getArea(); + } catch (TopologyException e) { + statusHandler + .handle(Priority.VERBOSE, + "Geometry error calculating the total size of intersection.", + e); + } if (size > 0.0) { totalSize += size; } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java index ae315f8078..a20dc3d060 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java @@ -57,6 +57,7 @@ import com.raytheon.viz.warngen.gis.AffectedAreas; * Apr 29, 2014 3033 jsanchez Moved patterns into ICommonPatterns * May 1, 2014 DR 16627 Qinglu Lin Added hasStateAbbrev(), isOtherType(), lockListOfNames(), and updated lock(). * May 13, 2014 DR 17177 Qinglu Lin Updated secondBullet(). + * Jul 15, 2015 DR17716 mgamazaychikov Remove all nulls from the affectedAreas to avoid TimSort NPE in initialize. * * * @@ -311,6 +312,8 @@ abstract public class AbstractLockingBehavior implements ICommonPatterns { if (canceledAreas != null) { this.affectedAreas.addAll(Arrays.asList(canceledAreas)); } + // remove all nulls from the collection to avoid TimSort NPE + this.affectedAreas.removeAll(Collections.singleton(null)); Collections.sort(this.affectedAreas, comparator); } From 890c6503353908e7d4ae6f6075b0364125f15208 Mon Sep 17 00:00:00 2001 From: Sarah Pontius Date: Thu, 16 Jul 2015 09:05:21 -0600 Subject: [PATCH 05/20] VLab Issue #9419 - Advisory Sorting Not Accurate and Consistent; fixes #9419 Change-Id: I15e9f32a23e1509e3473fa8c49a680dea3cbc7da Former-commit-id: 47f8e240c94a47991ca98d1002707143f8181ebb --- .../localization/gfe/userPython/textProducts/HLSTCV_Common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textProducts/HLSTCV_Common.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textProducts/HLSTCV_Common.py index ec2a4162e8..3cb623e8d5 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textProducts/HLSTCV_Common.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textProducts/HLSTCV_Common.py @@ -1082,7 +1082,7 @@ FORECASTER STEWART""" # We need to reverse the order of the advisories so the latest # advisories come first in this list - stormAdvisories.reverse() + stormAdvisories.sort(reverse=True) lastTwoAdvisories = [] From 7530aa788b03a9c446d783c1e9fb0a2e5ba44ec9 Mon Sep 17 00:00:00 2001 From: Michael Gamazaychikov Date: Mon, 20 Jul 2015 08:44:07 -0400 Subject: [PATCH 06/20] ASM #17716 - WarnGen: assigning a MultiPolygon to a Polygon causes failure in creating SVS. Change-Id: Ifacc23e1004cd934d913bd7d2b0ae113e8cedb05 Former-commit-id: f6608d26c83f0a2e4a8da8f1bbfe7b8c724c6554 --- .../src/com/raytheon/viz/warngen/template/TemplateRunner.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java index 21dfeef97a..303c07c3db 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java @@ -351,14 +351,14 @@ public class TemplateRunner { .getNumGeometries()]; n1 = warningArea.getNumGeometries(); for (int j = 0; j < n1; j++) { - poly1[j] = (Polygon) warningArea + poly1[j] = warningArea .getGeometryN(j); } poly2 = new Geometry[timezoneGeom .getNumGeometries()]; n2 = timezoneGeom.getNumGeometries(); for (int j = 0; j < n2; j++) { - poly2[j] = (Polygon) timezoneGeom + poly2[j] = timezoneGeom .getGeometryN(j); } // Calculate the total size of intersection From 1c4d5a5a9d17daaee75b9a2656061d0436baa055 Mon Sep 17 00:00:00 2001 From: Ron Anderson Date: Tue, 21 Jul 2015 09:27:57 -0500 Subject: [PATCH 07/20] Omaha #4013 Allow rsyncGridsToCWF_client.sh to use entire EDEX cluster Change-Id: I98a849bbd96a35ac8f3e418c3410dac5839e77b4 Former-commit-id: 7276286f419d5baba1efb2374eec2f3b903973d9 --- .../res/spring/gfe-request.xml | 5 ++ .../handler/RsyncGridsToCWFHandler.java | 76 +++++++++++++++++ .../gfe/request/RsyncGridsToCWFRequest.java | 41 +++++++++ .../cli/rsyncGridsToCWF_client.sh | 54 +++++++++--- .../src/rsyncGridsToCWF/rsyncGridsToCWF.py | 85 +++++++++++++++++++ .../gfe/request/RsyncGridsToCWFRequest.py | 37 ++++++++ .../common/dataplugin/gfe/request/__init__.py | 13 ++- 7 files changed, 298 insertions(+), 13 deletions(-) create mode 100644 edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/RsyncGridsToCWFHandler.java create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/RsyncGridsToCWFRequest.java create mode 100644 edexOsgi/com.raytheon.uf.tools.gfesuite/cli/src/rsyncGridsToCWF/rsyncGridsToCWF.py create mode 100644 pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/RsyncGridsToCWFRequest.py diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml index 45c39f37f9..46168cb8ba 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml @@ -232,6 +232,11 @@ + + + + + diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/RsyncGridsToCWFHandler.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/RsyncGridsToCWFHandler.java new file mode 100644 index 0000000000..9dd86c74ee --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/RsyncGridsToCWFHandler.java @@ -0,0 +1,76 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package com.raytheon.edex.plugin.gfe.server.handler; + +import java.io.IOException; + +import com.raytheon.uf.common.dataplugin.gfe.request.RsyncGridsToCWFRequest; +import com.raytheon.uf.common.serialization.comm.IRequestHandler; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.common.util.RunProcess; + +/** + * rsync GFE grids to CWF handler + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 15, 2015  #4013     randerso     Initial creation
+ * 
+ * 
+ * + * @author randerso + * @version 1.0 + */ + +public class RsyncGridsToCWFHandler implements + IRequestHandler { + protected static final IUFStatusHandler statusHandler = UFStatus + .getHandler(RsyncGridsToCWFHandler.class); + + @Override + public Object handleRequest(RsyncGridsToCWFRequest request) + throws Exception { + + String command = "/awips2/GFESuite/bin/rsyncGridsToCWF.sh " + + request.getSiteID(); + statusHandler.info("Running: \"" + command + "\""); + RunProcess proc; + try { + proc = RunProcess.getRunProcess().exec(command); + } catch (IOException e) { + statusHandler.error("Error executing " + command, e); + return null; + } + + int exitCode = proc.waitFor(); + if (exitCode != 0) { + statusHandler.error(command + + " terminated abnormally with exit code: " + exitCode); + } + + return null; + } + +} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/RsyncGridsToCWFRequest.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/RsyncGridsToCWFRequest.java new file mode 100644 index 0000000000..5982a136b0 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/RsyncGridsToCWFRequest.java @@ -0,0 +1,41 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package com.raytheon.uf.common.dataplugin.gfe.request; + +/** + * rsync GFE grids to CWF request + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 15, 2015  #4013     randerso     Initial creation
+ * 
+ * 
+ * + * @author randerso + * @version 1.0 + */ + +public class RsyncGridsToCWFRequest extends AbstractGfeRequest { + +} diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF_client.sh b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF_client.sh index 4412498829..5d5bd9ed1a 100644 --- a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF_client.sh +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF_client.sh @@ -1,6 +1,26 @@ #!/bin/sh ################################################################################ # +## +# This software was developed and / or modified by Raytheon Company, +# pursuant to Contract DG133W-05-CQ-1067 with the US Government. +# +# U.S. EXPORT CONTROLLED TECHNICAL DATA +# This software product contains export-restricted data whose +# export/transfer/disclosure is restricted by U.S. law. Dissemination +# to non-U.S. persons whether in the United States or abroad requires +# an export license or other authorization. +# +# Contractor Name: Raytheon Company +# Contractor Address: 6825 Pine Street, Suite 340 +# Mail Stop B8 +# Omaha, NE 68106 +# 402.291.0100 +# +# See the AWIPS II Master Rights File ("Master Rights File.pdf") for +# further licensing information. +## +############################################################################## # Program name: rsyncGridsToCWF_client.sh # # Executes rsynceGridsToCWF.sh locally or remotely as needed @@ -11,15 +31,29 @@ # Date Ticket# Engineer Description # ------------ ---------- ----------- ------------------------------- # 04/25/2012 jdynina Created Script -# 01/13/2015 #4013 randerso Changed to work on any EDEX -# cluster server +# 07/15/2015 #4013 randerso Changed to use a thrift request that can +# be handled on any EDEX cluster server to +# run rsyncGridsToCWF.sh +# ################################################################################ -if [ $# -lt 1 ] ;then - echo Invalid number of arguments. - echo Script stopped. - echo ./rsyncGridsToCWF_client.sh wfo - exit -fi -# ssh to ec which will actually go to one of the servers in the EDEX cluster -ssh ec "/awips2/GFESuite/bin/rsyncGridsToCWF.sh ${1}" +# this allows you to run this script from outside of ./bin +path_to_script=`readlink -f $0` +RUN_FROM_DIR=`dirname $path_to_script` + +BASE_AWIPS_DIR=`dirname $RUN_FROM_DIR` + +# get the base environment +source ${RUN_FROM_DIR}/setup.env + +# setup the environment needed to run the the Python +export LD_LIBRARY_PATH=${BASE_AWIPS_DIR}/src/lib:${PYTHON_INSTALL}/lib +export PYTHONPATH=${RUN_FROM_DIR}/src:$PYTHONPATH + +# execute the rsyncGridsToCWF Python module +_PYTHON="${PYTHON_INSTALL}/bin/python" +_MODULE="${RUN_FROM_DIR}/src/rsyncGridsToCWF/rsyncGridsToCWF.py" + +# quoting of '$@' is used to prevent command line interpretation +$_PYTHON $_MODULE "$@" + diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/src/rsyncGridsToCWF/rsyncGridsToCWF.py b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/src/rsyncGridsToCWF/rsyncGridsToCWF.py new file mode 100644 index 0000000000..1f0cc20709 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/src/rsyncGridsToCWF/rsyncGridsToCWF.py @@ -0,0 +1,85 @@ +## +# This software was developed and / or modified by Raytheon Company, +# pursuant to Contract DG133W-05-CQ-1067 with the US Government. +# +# U.S. EXPORT CONTROLLED TECHNICAL DATA +# This software product contains export-restricted data whose +# export/transfer/disclosure is restricted by U.S. law. Dissemination +# to non-U.S. persons whether in the United States or abroad requires +# an export license or other authorization. +# +# Contractor Name: Raytheon Company +# Contractor Address: 6825 Pine Street, Suite 340 +# Mail Stop B8 +# Omaha, NE 68106 +# 402.291.0100 +# +# See the AWIPS II Master Rights File ("Master Rights File.pdf") for +# further licensing information. +## +# +# Revisions: +# Date Ticket# Engineer Description +# ------------ ---------- ----------- ------------------------------- +# 07/15/2015 #4013 randerso Initial creation +# +## + +from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.request import RsyncGridsToCWFRequest +from dynamicserialize.dstypes.com.raytheon.uf.common.message import WsId + +from ufpy import ThriftClient +from ufpy import UsageArgumentParser + +import os + +def main(): + args = validateArgs() + + request = createRequest(args.site) + thriftClient = ThriftClient.ThriftClient(args.host, args.port, "/services") + + try: + thriftClient.sendRequest(request) + except Exception, ex: + print "Caught exception submitting RsyncGridsToCWFRequest: ", str(ex) + return 1 + +def validateArgs(): + parser = UsageArgumentParser.UsageArgumentParser(conflict_handler="resolve", prog='ifpInit') + parser.add_argument("-h", action="store", dest="host", + help="ifpServer host name", + metavar="hostname") + parser.add_argument("-p", action="store", type=int, dest="port", + help="rpc port number of ifpServer", + metavar="port") + parser.add_argument("site", action="store", + help="site to rsync grids for", + metavar="site") + args = parser.parse_args() + + if args.host is None and "CDSHOST" in os.environ: + args.host = os.environ["CDSHOST"] + + if args.port is None and "CDSPORT" in os.environ: + args.port = int(os.environ["CDSPORT"]) + + if args.host is None: + args.host = str(os.getenv("DEFAULT_HOST", "localhost")) + + if args.port is None: + args.port = int(os.getenv("DEFAULT_PORT", "9581")) + return args + + +def createRequest(site): + request = RsyncGridsToCWFRequest(site) + + wsId = WsId(progName="rsyncGridsToCWF") + + request.setWorkstationID(wsId) + + return request + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/RsyncGridsToCWFRequest.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/RsyncGridsToCWFRequest.py new file mode 100644 index 0000000000..eb61432227 --- /dev/null +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/RsyncGridsToCWFRequest.py @@ -0,0 +1,37 @@ +## +# This software was developed and / or modified by Raytheon Company, +# pursuant to Contract DG133W-05-CQ-1067 with the US Government. +# +# U.S. EXPORT CONTROLLED TECHNICAL DATA +# This software product contains export-restricted data whose +# export/transfer/disclosure is restricted by U.S. law. Dissemination +# to non-U.S. persons whether in the United States or abroad requires +# an export license or other authorization. +# +# Contractor Name: Raytheon Company +# Contractor Address: 6825 Pine Street, Suite 340 +# Mail Stop B8 +# Omaha, NE 68106 +# 402.291.0100 +# +# See the AWIPS II Master Rights File ("Master Rights File.pdf") for +# further licensing information. +## +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# Jul 15, 2015 #4013 randerso Initial creation (hand generated) +# +# + +from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.request import AbstractGfeRequest + + +class RsyncGridsToCWFRequest(AbstractGfeRequest): + + def __init__(self, siteId=None): + super(RsyncGridsToCWFRequest, self).__init__() + if siteId is not None: + self.siteID = str(siteId) diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/__init__.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/__init__.py index 784a71c794..e592625ec1 100644 --- a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/__init__.py +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/__init__.py @@ -17,8 +17,13 @@ # See the AWIPS II Master Rights File ("Master Rights File.pdf") for # further licensing information. ## - -# File auto-generated by PythonFileGenerator +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# Jul 15, 2015 #4013 randerso Added RsyncGridsToCWFRequest +# __all__ = [ 'AbstractGfeRequest', @@ -45,7 +50,8 @@ __all__ = [ 'ProcessReceivedDigitalDataRequest', 'PurgeGfeGridsRequest', 'SaveASCIIGridsRequest', - 'SmartInitRequest' + 'SmartInitRequest', + 'RsyncGridsToCWFRequest', ] from AbstractGfeRequest import AbstractGfeRequest @@ -73,4 +79,5 @@ from ProcessReceivedDigitalDataRequest import ProcessReceivedDigitalDataRequest from PurgeGfeGridsRequest import PurgeGfeGridsRequest from SaveASCIIGridsRequest import SaveASCIIGridsRequest from SmartInitRequest import SmartInitRequest +from RsyncGridsToCWFRequest import RsyncGridsToCWFRequest From b93eda8a799912bc61e81d7f4e41e5977e35e4c2 Mon Sep 17 00:00:00 2001 From: Melissa Porricel Date: Wed, 22 Jul 2015 15:12:45 -0400 Subject: [PATCH 08/20] ASM #17615 - Fix model run precip accum display when time steps differ Change-Id: I36614b97e4ed0b9008e67731da2d426dcca7d8c7 Former-commit-id: 8e718bed73542d0d2ae900eabe2862dcc8626656 --- .../base/derivedParameters/definitions/SA6hr.xml | 6 ++++++ .../base/derivedParameters/definitions/SAmodel.xml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/SA6hr.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/SA6hr.xml index 700a1d06ba..a5255db90d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/SA6hr.xml +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/SA6hr.xml @@ -22,6 +22,12 @@ + + + + + + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/SAmodel.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/SAmodel.xml index 08bbbae8ee..dc4a7d5e53 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/SAmodel.xml +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/SAmodel.xml @@ -19,6 +19,9 @@ further_licensing_information. --> + + + From 0a500a18a719bc8aafce31c0c49510fbb149cbfa Mon Sep 17 00:00:00 2001 From: Sarah Pontius Date: Fri, 24 Jul 2015 10:23:48 -0600 Subject: [PATCH 09/20] VLab Issue #9414 - GFE Formatter: Storm surge forecast can differ significantly from Threat and potential impacts provided in TCV; fixes #9414 Change-Id: Ia1ad56f5043f4a153fdc35398637ab308ced6778 Former-commit-id: ba08dcdc83ea47b16e641b9c2ab70d7bb0a7ae93 --- .../textproducts/templates/product/HLS.py | 7 ++-- .../templates/product/Hazard_TCV.py | 35 +++++++++++++------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/textproducts/templates/product/HLS.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/textproducts/templates/product/HLS.py index ce0c4e701c..d05003058d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/textproducts/templates/product/HLS.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/textproducts/templates/product/HLS.py @@ -1,4 +1,4 @@ -# Version 2015.6.16-0 +# Version 2015.7.22-0 import GenericHazards import string, time, os, re, types, copy, LogStream, collections @@ -23,7 +23,7 @@ class TextProduct(HLSTCV_Common.TextProduct): Definition["database"] = "Official" # Source database Definition["debug"] = 1 Definition["mapNameForCombinations"] = "Zones_" - Definition["defaultEditAreas"] = "" + Definition["defaultEditAreas"] = [] Definition["showZoneCombiner"] = 0 # 1 to cause zone combiner to display Definition["productName"] = "LOCAL STATEMENT" @@ -1137,6 +1137,8 @@ class TextProduct(HLSTCV_Common.TextProduct): statDict = statList[period] for threatName in ['WindThreat', 'FloodingRainThreat', 'TornadoThreat']: self._sampleRankedDiscreteValue(threatName, statDict) + # TODO: Investigate if this sampling method is still really needed. The JSON files may + # have all the needed information now self._sampleMostSignificantDiscreteValue(threatName, statDict) qpfToFfgRatio = self._getStatValue(statDict, "QPFtoFFGRatio", "Max") @@ -1183,7 +1185,6 @@ class TextProduct(HLSTCV_Common.TextProduct): for period in range(len(statList)): statDict = statList[period] self._sampleRankedDiscreteValue('StormSurgeThreat', statDict) - self._sampleMostSignificantDiscreteValue('StormSurgeThreat', statDict) inundationMax = self._getStatValue(statDict, "InundationMax", "Max") decidingField = self._samplingDict['StormSurgeThreat']['decidingField'] diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/textproducts/templates/product/Hazard_TCV.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/textproducts/templates/product/Hazard_TCV.py index c8b54ecdb2..455a0710d2 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/textproducts/templates/product/Hazard_TCV.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/textproducts/templates/product/Hazard_TCV.py @@ -1,4 +1,4 @@ -# Version 2015.5.22-0 +# Version 2015.7.23-0 import GenericHazards import JsonSupport @@ -433,7 +433,6 @@ class TextProduct(HLSTCV_Common.TextProduct): analysisList = [ ("InundationMax", self.moderatedMax, [6]), ("InundationTiming", self.moderatedMax, [6]), - ("StormSurgeThreat", self.mostSignificantDiscreteValue), ] return analysisList @@ -1774,16 +1773,36 @@ class StormSurgeSection(SectionCommon): summary + " storm surge possible") def _peakSurge(self, segmentDict, productSegmentGroup, productSegment): + self._textProduct.debug_print("_peakSurge _inundationMax = %s" % (self._stats._inundationMax), 1) + if self._stats._inundationMax is not None and self._stats._inundationMax >= 1: - max = self._stats._inundationMax + max = round(self._stats._inundationMax) + self._stats._maxThreat = "None" if max > 10: maxRange = 4 + self._stats._maxThreat = "Extreme" elif max > 6: maxRange = 3 - elif max > 2: + if max >= 10: + self._stats._maxThreat = "Extreme" + else: + self._stats._maxThreat = "High" + elif max >= 3: maxRange = 2 + if max >= 4: + self._stats._maxThreat = "Mod" + else: + self._stats._maxThreat = "Elevated" else: maxRange = None + if max > 0: + self._stats._maxThreat = "Elevated" + + self._textProduct.debug_print("_peakSurge maxRange = %s" % (maxRange), 1) + self._textProduct.debug_print("_peakSurge _maxThreat = %s" % (self._stats._maxThreat), 1) + + # Save off the surge threat to the advisory + self._textProduct._currentAdvisory['ZoneData'][self._segment]["StormSurgeThreat"] = self._stats._maxThreat if maxRange is not None: words = str(int(max - maxRange)) + "-" + str(int(max)) + " feet above ground" @@ -2680,8 +2699,7 @@ class StormSurgeSectionStats(SectionCommonStats): if phishEndTime is None: phishEndTime = tr.startTime() - - self._updateThreatStats(tr, statDict, "StormSurgeThreat") + self._windowSurge = "Window of concern: " @@ -2720,7 +2738,6 @@ class StormSurgeSectionStats(SectionCommonStats): else: self._windowSurge += "through " + endTimeDescriptor - self._currentAdvisory["StormSurgeThreat"] = self._maxThreat if self._inundationMax is not None: # Round so we don't store values like 1.600000023841858 self._currentAdvisory["StormSurgeForecast"] = \ @@ -2751,10 +2768,6 @@ class StormSurgeSectionStats(SectionCommonStats): # Inundation timing - only applies if any inundation forecast if self._inundationMax >= 1 and self._onsetSurgeHour is None: missingGridsList.append("InundationTiming") - - # Threat grid - if self._maxThreat is None: - missingGridsList.append("StormSurgeThreat") # If there are any missing grids - let the user know if len(missingGridsList) > 0: From 924e8266381bc11e1956ffb33761d71ff4392121 Mon Sep 17 00:00:00 2001 From: "Ying-Lian.Shi" Date: Mon, 27 Jul 2015 18:08:08 +0000 Subject: [PATCH 10/20] ASM #17771 GFE: HLSPQx does not correctly assign the ETN for TY hazards Change-Id: I3cad7be2f331160a629c385ca87228126880851f Former-commit-id: 13df1bebf4a459b6361b764ae7158163cd64d824 --- cave/com.raytheon.viz.gfe/res/spring/gfe.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.gfe/res/spring/gfe.xml b/cave/com.raytheon.viz.gfe/res/spring/gfe.xml index 17277873c8..68e8760e02 100644 --- a/cave/com.raytheon.viz.gfe/res/spring/gfe.xml +++ b/cave/com.raytheon.viz.gfe/res/spring/gfe.xml @@ -26,6 +26,8 @@ TR.W SS.A SS.W + TY.A + TY.W @@ -37,6 +39,8 @@ TR.W SS.A SS.W + TY.A + TY.W
@@ -51,4 +55,4 @@ - \ No newline at end of file + From b8e287d62f909373e72f1faa577358414cdf6317 Mon Sep 17 00:00:00 2001 From: "Yun.Teng" Date: Tue, 28 Jul 2015 17:06:08 +0100 Subject: [PATCH 11/20] ASM #17777 - change Red Flag Warning CTA language Change-Id: I50dfa8670926777de6f5d6d779b60641c658daaa Former-commit-id: 4d6c3cf8f041cf4bb1ef97c7fd7e8104d0a1386f --- .../gfe/userPython/textUtilities/regular/CallToActions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textUtilities/regular/CallToActions.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textUtilities/regular/CallToActions.py index ed2ffc5c2c..f7e1162d38 100755 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textUtilities/regular/CallToActions.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textUtilities/regular/CallToActions.py @@ -34,6 +34,7 @@ # Updated 3/27/09 Shannon for tropical and AF.W # Updated 3/29/10 Shannon for tropical # Updated 1/12/11 Shannon to remove HI/TI hazards and fix typos +# Updated 7/28/15 yteng to change Red Flag Warning CTA language for DR 17777 # ---------------------------------------------------------------------------- class CallToActions: @@ -377,7 +378,7 @@ Listen to NOAA Weather Radio or local media for further information.""", def ctaFWW(self): return [ - """A Red Flag Warning means that critical fire weather conditions are either occurring now....or will shortly.""", + """A Red Flag Warning means that critical fire weather conditions are either occurring now....or will shortly. A combination of strong winds...low relative humidity...and warm temperatures can contribute to extreme fire behavior.""", ] def ctaFZA(self): From 03000dc48d5fde842f871a0668edb88c43ea948a Mon Sep 17 00:00:00 2001 From: David Friedman Date: Thu, 30 Jul 2015 14:16:05 +0000 Subject: [PATCH 12/20] ASM #17761 - Fix storm track time matching Change-Id: I441b98eedc3ab546aa29d1828c24c8918303a5a0 Former-commit-id: 31d15e1e106d5adfb588e086a3561b63c474da3e --- .../uf/viz/d2d/core/time/D2DTimeMatcher.java | 11 +++++++---- .../stormtrack/AbstractStormTrackResource.java | 12 ++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java index 8d057e727e..d1d9682100 100644 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java +++ b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java @@ -82,6 +82,8 @@ import com.raytheon.uf.viz.d2d.core.D2DLoadProperties; * like A1. * May 5, 2014 3265 bsteffen Better handling of resources returning * null dataTimes. + * Jul 30, 2015 17761 D. Friedman Allow resources to return data times based + * on base frame times. * * * @@ -424,7 +426,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher { config = config.clone(); if ((config.getDataTimes() == null) || (config.getDataTimes().length < 1)) { - config.setDataTimes(getLatestTimes(rsc)); + config.setDataTimes(getLatestTimes(rsc, timeSteps)); } populateConfiguration(config); TimeMatcher tm = new TimeMatcher(); @@ -586,7 +588,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher { rsc.getLoadProperties()).clone(); if ((config.getDataTimes() == null) || (config.getDataTimes().length < 1)) { - config.setDataTimes(getLatestTimes(rsc)); + config.setDataTimes(getLatestTimes(rsc, null)); if ((config.getDataTimes() == null) || (config.getDataTimes().length < 1)) { return null; @@ -707,10 +709,11 @@ public class D2DTimeMatcher extends AbstractTimeMatcher { * product times. * * @param rsc + * @param timeSteps * @return * @throws VizException */ - protected DataTime[] getLatestTimes(AbstractVizResource rsc) + protected DataTime[] getLatestTimes(AbstractVizResource rsc, DataTime[] timeSteps) throws VizException { DataTime[] availableTimes = null; @@ -727,7 +730,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher { } if (availableTimes == null) { - availableTimes = rsc.getDataTimes(); + availableTimes = rsc.getMatchedDataTimes(timeSteps); Arrays.sort(availableTimes); } diff --git a/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/AbstractStormTrackResource.java b/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/AbstractStormTrackResource.java index 468292c090..bc3b56de69 100644 --- a/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/AbstractStormTrackResource.java +++ b/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/AbstractStormTrackResource.java @@ -70,6 +70,7 @@ import com.raytheon.viz.ui.input.EditableManager; * adjustAngle to protected. * Mar 15, 2013 15693 mgamazaychikov Added magnification to display state. * Jun 10, 2014 3263 bsteffen Synchronize dataTimes + * Jul 30, 2015 17761 D. Friedman Fix time matching. * * * @@ -123,7 +124,7 @@ public abstract class AbstractStormTrackResource extends } @Override - public DataTime[] getDataTimes() { + public DataTime[] getMatchedDataTimes(DataTime[] timeSteps) { synchronized (this.dataTimes) { if (timeMatchBasis) { @@ -142,12 +143,11 @@ public abstract class AbstractStormTrackResource extends this.fillDataTimeArray(earliestTime, variance); } } else { - FramesInfo info = descriptor.getFramesInfo(); dataTimes.clear(); this.maximumFrameCount = this.descriptor.getNumberOfFrames(); // First time called - if (info.getFrameTimes() != null) { - for (DataTime dt : info.getFrameTimes()) { + if (timeSteps != null) { + for (DataTime dt : timeSteps) { dataTimes.add(dt); } } @@ -258,10 +258,6 @@ public abstract class AbstractStormTrackResource extends @Override public String getName() { - DataTime[] frameTimes = descriptor.getFramesInfo().getFrameTimes(); - if (frameTimes != null) { - descriptor.getTimeMatchingMap().put(this, frameTimes); - } return getResourceName(); } From b4f2e593156d2094d6d1591262eb35a95da1b4a6 Mon Sep 17 00:00:00 2001 From: "Ying-Lian.Shi" Date: Mon, 27 Jul 2015 14:35:14 +0000 Subject: [PATCH 13/20] ASM #17770 GFE: MakeHazard does not decode TCPPQx and TCMCPx products correctly, Add handling for AT, EP, CP, WP, warn on invalid basinID, code clean up Change-Id: Ia247e52e94afe3607dafacda71d3c09460b923d2 Former-commit-id: 0081fb67da6894e550591b9d13342cdc8e247116 --- .../gfe/userPython/procedures/MakeHazard.py | 3 +- .../userPython/utilities/MakeHazardConfig.py | 4 + .../viz/gfe/makehazard/MakeHazardDialog.java | 103 ++++++++++-------- 3 files changed, 64 insertions(+), 46 deletions(-) diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/MakeHazard.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/MakeHazard.py index 33e8e1eb08..8c275673d4 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/MakeHazard.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/MakeHazard.py @@ -12,6 +12,7 @@ # level of site customization # Apr 09,2012 436 randerso Merged RNK's MakeHazards_Elevation procedure # Feb 12,2014 17058 ryu Extend converter for Collections$EmptyList objects. +# Jul 29,2015 17770 lshi Added TY.A TY.W to tropicalHaz # # Author: randerso # ---------------------------------------------------------------------------- @@ -37,7 +38,7 @@ class Procedure (SmartScript.SmartScript): self._dataManager = dbss self._afterInit = 0 #flag indicating init is done. - self._tropicalHaz = ['HU.W','HU.A','HU.S','TR.W','TR.A'] + self._tropicalHaz = ['HU.W','HU.A','HU.S','TR.W','TR.A','TY.W','TY.A'] self._natlBaseETN = 1001 diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/MakeHazardConfig.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/MakeHazardConfig.py index ed56dae727..b52b3918f8 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/MakeHazardConfig.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/MakeHazardConfig.py @@ -10,6 +10,7 @@ # ------------ ---------- ----------- -------------------------- # Jul 10,2012 436 randerso Separated configuration data from the # MakeHazard procedure +# Jul 29, 2015 17770 lshi Add tcmList template for WP basin # # Author: randerso # ---------------------------------------------------------------------------- @@ -144,6 +145,9 @@ tcmList = [] # Comment out for HLS sites # Uncomment line below for CPac basin sites #tcmList = ["TCMCP1", "TCMCP2", "TCMCP3", "TCMCP4", "TCMCP5"] +# Uncomment line below for WPac basin sites +#tcmList = ["TCPPQ1", "TCPPQ2", "TCPPQ3", "TCPPQ4", "TCPPQ5"] + # Dictionary mapping Hazard Types to applicable local effect areas # that can be intersected with the zone edit areas. # You should not define localEffectAreas entries for Tropical Cyclone diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java index e8328c7ed7..98f3813fd5 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java @@ -1,19 +1,19 @@ /** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * + * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination * to non-U.S. persons whether in the United States or abroad requires * an export license or other authorization. - * + * * Contractor Name: Raytheon Company * Contractor Address: 6825 Pine Street, Suite 340 * Mail Stop B8 * Omaha, NE 68106 * 402.291.0100 - * + * * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ @@ -67,6 +67,7 @@ import org.eclipse.ui.progress.UIJob; import org.opengis.referencing.FactoryException; import org.opengis.referencing.operation.TransformException; +import com.google.common.collect.ImmutableMap; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteDefinition; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; @@ -102,7 +103,7 @@ import com.raytheon.viz.ui.statusline.StatusStore; /** * Make Hazard Dialog - * + * *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer     Description
@@ -114,9 +115,10 @@ import com.raytheon.viz.ui.statusline.StatusStore;
  *  Apr 09,2012 436         randerso    Merged RNK's MakeHazards_Elevation procedure
  *  May 30,2012 2028        randerso    Cleaned up dialog layout
  *  Nov 13,2014 646         lshi        Fixed hard coded endTimeSlider's Max value
- * 
+ *  Jul 30,2015 17770       lshi        Add handling for AT, EP, CP and WP basins
+ *
  * 
- * + * * @author ebabin * @version 1.0 */ @@ -136,20 +138,20 @@ public class MakeHazardDialog extends CaveSWTDialog implements private static final String EDIT_AREA_MSG = "USING ACTIVE EDIT AREA"; - private List tropicalHaz; + private final List tropicalHaz; - private int natlBaseETN; + private final int natlBaseETN; - private Map> localEffectAreas; + private final Map> localEffectAreas; - private Map> localAreaData; + private final Map> localAreaData; /** * Zoom step size. */ private static final double ZOOM_STEP = 0.75; - private Map> hazardDict; + private final Map> hazardDict; private Text etnSegNumberField; @@ -157,15 +159,15 @@ public class MakeHazardDialog extends CaveSWTDialog implements private Label startTimeLabel, endTimeLabel; - private String gmtPattern = "HH:mm'Z' EEE dd-MMM-yy"; + private final String gmtPattern = "HH:mm'Z' EEE dd-MMM-yy"; - private SimpleDateFormat dateFormatter; + private final SimpleDateFormat dateFormatter; private ZoneSelector zoneSelector; /** * Used by hazard start and end Time. - * + * */ private int toHours = 96; @@ -180,9 +182,9 @@ public class MakeHazardDialog extends CaveSWTDialog implements /** * The Python script to load and run methods from. */ - private String defaultHazardType; + private final String defaultHazardType; - private Map> mapNames; + private final Map> mapNames; private Group hazardTypeGroup; @@ -194,11 +196,11 @@ public class MakeHazardDialog extends CaveSWTDialog implements private Label usingLabel; - private int defaultMapWidth; + private final int defaultMapWidth; private RGB mapColor; - private int timeScaleEndTime; + private final int timeScaleEndTime; private double areaThreshold = DEFAULT_AREA_THRESHOLD; @@ -210,9 +212,9 @@ public class MakeHazardDialog extends CaveSWTDialog implements private String defaultSegment; - private DataManager dataManager; + private final DataManager dataManager; - private List tcmList; + private final List tcmList; private String tcmProduct = null; @@ -232,6 +234,14 @@ public class MakeHazardDialog extends CaveSWTDialog implements private org.eclipse.swt.widgets.List hazardGroupList; + private static final String[] WMO_TITLES = { + "NATIONAL HURRICANE CENTER", //NHC + "NATIONAL WEATHER SERVICE TIYAN", //GUM + "CENTRAL PACIFIC HURRICANE CENTER" //CPHC + }; + + private static final Map BASINS = ImmutableMap.of("AT", "10", "EP", "20", "CP", "30", "WP", "40"); + public MakeHazardDialog(Shell parent, DataManager dataManager, String colorName, int defaultMapWidth, int timeScaleEndTime, float areaThreshold, String defaultHazardType, @@ -465,7 +475,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements * preview() process. Currently, we don't implement preview(), but we * probably will at some point in the future. When we do, we can get rid of * this method and let preview() do this for us like AWIPS I did. - * + * * @param parm * @return */ @@ -512,7 +522,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements * Figure out the hazard type (i.e., "Winter Weather") and db tables to use, * based on phen_sig. The same phensig sometimes appears in multiple hazard * types, so pick the one that draws from the most db tables. - * + * * @param phen_sig */ protected void pickDefaultCategory(String phen_sig) { @@ -568,7 +578,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements * Create the hazard in response to the run or run/dismiss button. Indicate * whether the run succeeded so run/dismiss knows whether it's OK to close * the dialog. - * + * * @return true if the hazard was created, false otherwise. */ private boolean doRunInternal(boolean dismiss) { @@ -605,8 +615,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements int segNum = getSegment(); String segmentNumber = ""; // Validate the segment number - if ((this.tropicalHaz.contains(phenSig)) - && !(this.dataManager.getSiteID().equals("GUM"))) { + if ((this.tropicalHaz.contains(phenSig))) { // if ETN is already correctly assigned, use it if (segNum >= this.natlBaseETN) { segmentNumber = Integer.toString(segNum); @@ -682,16 +691,18 @@ public class MakeHazardDialog extends CaveSWTDialog implements return null; } else { String altFileName = getAltInfoFilename(tcmProduct); - String stormNum = altFileName.substring(2, 4); - - System.out.println("storm number is " + stormNum); - - String nationalBase = "10"; - tropicalETN = nationalBase + stormNum; - - System.out.println("Tropical ETN is: " + tropicalETN); - System.out.println("length of tropical ETN is: " - + tropicalETN.length()); + if (altFileName != null) { + String nationalBase = BASINS.get("AT"); + String baseETN = altFileName.substring(0, 2); + String baseEtnCode = BASINS.get(baseETN); + if (baseEtnCode != null) { + nationalBase = baseEtnCode; + } else { + statusHandler.warn("Undefined basin ID: " + baseETN + ", defaulting to AT"); + } + String stormNum = altFileName.substring(2, 4); + tropicalETN = nationalBase + stormNum; + } } return tropicalETN; } @@ -699,10 +710,12 @@ public class MakeHazardDialog extends CaveSWTDialog implements private String getAltInfoFilename(String[] tcmProduct) { String altFilename = null; for (int i = 0; i < tcmProduct.length; i++) { - if (tcmProduct[i].contains("NATIONAL HURRICANE CENTER")) { - String[] parts = tcmProduct[i].split("\\s"); - altFilename = parts[parts.length - 1]; - break; + for (String title : WMO_TITLES) { + if (tcmProduct[i].contains(title)) { + String[] parts = tcmProduct[i].split("\\s"); + altFilename = parts[parts.length - 1]; + return altFilename; + } } } return altFilename; @@ -1120,7 +1133,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements * Event handler for when the user moves the slider. This updates * the slider label and changes the end time slider if the end time * is before the start time. - * + * * @param e * The event that caused this handler to be called. */ @@ -1185,7 +1198,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements * Event handler for when the user moves the slider. This updates * the slider label and changes the start time slider if the end * time is before the start time. - * + * * @param e * The event that caused this handler to be called. */ @@ -1302,7 +1315,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements * Add selection hours to hazardStartTime (that * is, the default starting time), and set the text of label to * the result, formatted by dateFormatter. - * + * * @param selection * The integer slider value selected by the user. * @param label @@ -1335,7 +1348,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements * Set the hazard type in the radio button control. If the hazard type is * changed, the radio button selection listener will fire, changing and * clearing selectedHazardList as a side effect. - * + * * @param hazardType * the hazard type to select. */ @@ -1384,7 +1397,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements * Set the selection in selectedHazardList to the first item that starts * with phen_sig. If phen_sig is null or an empty string, clears all * selections. - * + * * @param phen_sig * The phen_sig to select */ @@ -1487,7 +1500,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements /* * (non-Javadoc) - * + * * @see * com.raytheon.viz.gfe.ui.zoneselector.ZoneSelector.IZoneSelectionListener * #zonesSelected() From 2ba837cc33eab7f420b01bcc98a72bcd0e05d3b2 Mon Sep 17 00:00:00 2001 From: Michael Gamazaychikov Date: Sun, 2 Aug 2015 11:43:49 -0400 Subject: [PATCH 14/20] ASM #17556 - WES2Bridge Archiver: Failed to create an archive case. Change-Id: I1fa9c92881d93969111fe4739d6195cbfba86a1a Former-commit-id: a0f929049b33e5e6a3fd8bd7d0bcfc41172fdfff --- pythonPackages/pypies/pypies/impl/H5pyDataStore.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pythonPackages/pypies/pypies/impl/H5pyDataStore.py b/pythonPackages/pypies/pypies/impl/H5pyDataStore.py index da9a5a85ce..144f1ad3f7 100644 --- a/pythonPackages/pypies/pypies/impl/H5pyDataStore.py +++ b/pythonPackages/pypies/pypies/impl/H5pyDataStore.py @@ -808,7 +808,9 @@ class H5pyDataStore(IDataStore.IDataStore): if outDir is None: os.remove(filepath) os.rename(repackedFullPath, filepath) - os.chmod(filepath, stat.S_IWUSR | stat.S_IWGRP | stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH) + self.__doMakeReadable(filepath) + else : + self.__doMakeReadable(repackedFullPath) else: # remove failed new file if there was one if os.path.exists(repackedFullPath): @@ -817,6 +819,7 @@ class H5pyDataStore(IDataStore.IDataStore): # repack failed, but they wanted the data in a different # directory, so just copy the original data without the repack shutil.copy(filepath, repackedFullPath) + self.__doMakeReadable(repackedFullPath) t1=time.time() if timeMap.has_key('repack'): timeMap['repack']+=t1-t0 From c0065a5b878a6ffc1f978d3a2fe83502d238516e Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Tue, 4 Aug 2015 09:31:27 -0500 Subject: [PATCH 15/20] Omaha #4701 fix thin client satellite updates Change-Id: Ic0c38066d9ea63f3f2b0a6f2346d787404cbe23d Former-commit-id: f87ddae99b9b290c3b709167b1c672b2e3110f5c --- .../inventory/SatelliteRequestableLevelNode.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/inventory/SatelliteRequestableLevelNode.java b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/inventory/SatelliteRequestableLevelNode.java index 4aec556449..70dfc856b0 100644 --- a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/inventory/SatelliteRequestableLevelNode.java +++ b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/inventory/SatelliteRequestableLevelNode.java @@ -49,6 +49,7 @@ import com.raytheon.uf.common.time.DataTime; * Date Ticket# Engineer Description * ------------- -------- ----------- -------------------------- * Apr 09, 2014 2947 bsteffen Initial creation + * Aug 04, 2015 4701 njensen Check time agnosticism in getDataRequest() * * * @@ -67,7 +68,6 @@ public class SatelliteRequestableLevelNode extends AbstractBaseDataNode { this.requestConstraints = requestConstraints; } - public Map getRequestConstraintMap() { return requestConstraints; } @@ -101,10 +101,17 @@ public class SatelliteRequestableLevelNode extends AbstractBaseDataNode { DbQueryRequest request = getBaseRequest(originalConstraints); RequestConstraint timeRc = new RequestConstraint(); timeRc.setConstraintType(ConstraintType.IN); + boolean timeAgnostic = false; for (TimeAndSpace time : availability) { - timeRc.addToConstraintValueList(time.getTime().toString()); + if (!time.isTimeAgnostic()) { + timeRc.addToConstraintValueList(time.getTime().toString()); + } else { + timeAgnostic = true; + } + } + if (!timeAgnostic) { + request.addConstraint(PluginDataObject.DATATIME_ID, timeRc); } - request.addConstraint(PluginDataObject.DATATIME_ID, timeRc); return request; } @@ -124,7 +131,6 @@ public class SatelliteRequestableLevelNode extends AbstractBaseDataNode { return result; } - @Override public Set getData( Map orignalConstraints, From 8931cac84a696f4e917a3e2592638c52b2324a4a Mon Sep 17 00:00:00 2001 From: Ron Anderson Date: Mon, 10 Aug 2015 09:56:16 -0500 Subject: [PATCH 16/20] Omaha #4721 Change GFE formatter launcher to use awipsWANPil to determine mixed case transmission. Change-Id: Ib70627526c07d0f327356901c300a8ca76510b1f Former-commit-id: db06e308757a3bb5840c5203122d3c9a4b32469a --- .../viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java index 91000b7068..24b932c211 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java @@ -167,6 +167,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * 02/04/2014 17039 ryu Removed menu item related to the HighlighFramingCodes feature. * 04/20/2015 4027 randerso Renamed ProductStateEnum with an initial capital * Expunged Calendar from ActiveTableRecord + * 08/10/2015 4721 randerso Changed getNNNid() to use the productID field (not textdbPil) * * * @author lvenable @@ -2705,7 +2706,7 @@ public class ProductEditorComp extends Composite implements } public String getNNNid() { - return textdbPil.substring(3, 6); + return productId.substring(4, 7); } public String getProductName() { From 98489c92c4cb4cf81a5fb0c98c188f3327197930 Mon Sep 17 00:00:00 2001 From: David Friedman Date: Mon, 10 Aug 2015 21:07:55 +0000 Subject: [PATCH 17/20] ASM #17672 - (Additional fix for TDWR) Change-Id: Id256bc4a6a8dcbe19cdda7d4ba77950065639ede Former-commit-id: 8ed4346813b2a4d5ddd810098707f67eb80e3e44 --- .../src/com/raytheon/rcm/products/radarInfo.txt | 6 +++--- .../utility/common_static/base/radarInfo.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/products/radarInfo.txt b/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/products/radarInfo.txt index 80ff4de778..be7d3e6caa 100755 --- a/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/products/radarInfo.txt +++ b/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/products/radarInfo.txt @@ -38,9 +38,9 @@ 6 | 0 | 0 | 0.0 | 0 | AAP | Alert Adaptation Parms (AAP) | AAP | | | | | | | | | |22 | | 8 | 0 | 0 | 0.0 | 0 | PTL | Product List (PTL) | PTL | | | | | | | | | |66 | | 9 | 0 | 0 | 0.0 | 0 | AM | Alert Message (AM) | AM | | | | | | | | | |38 | | -180| 256| 0 | 0.15 | 90 | Z | Reflectivity (Z) | Radial | y | | | | Z | | | | | 0 | | +180| 256| 0 | 0.15 | 90 | Z | Reflectivity (Z) | Radial | y | | | | Z | | | | | 0 | | y 181| 16 | 0 | 0.15 | 90 | Z | Reflectivity (Z) | Radial | y | | | | Z | | | | | 0 | | -186| 256| 0 | 0.30 | 460 | Z | Long Range Refl (Z) | Radial | y | | | | Z | | | | | 0 | | +186| 256| 0 | 0.30 | 460 | Z | Long Range Refl (Z) | Radial | y | | | | Z | | | | | 0 | | y 187| 16 | 0 | 0.30 | 460 | Z | Long Range Refl (Z) | Radial | y | | | | Z | | | | | 0 | | 94 |256 | 0 | 1.0 | 460 | Z | 8-bit Refl Array (Z) | Radial | y | | | | Z | | | | | 0 | | y 153|256 | 0 | 0.25 | 460 | HZ | Super Res Reflectivity (Z) | Radial | y | | | | Z | | | | | 0 | 0.5 | y @@ -52,7 +52,7 @@ 21 | 16 | 0 | 4.0 | 460 | Z | Reflectivity (Z) | Radial | y | | | | Z | | | | | 0 | | 99 |256 | 0 | 0.25 | 300 | V | 8-bit Velocity Array (V) | Radial | y | | | | Vm| | | | | 1 | | y 154|256 | 0 | 0.25 | 300 | HV | Super Res Velocity (V) | Radial | y | | | | Vm| | | | | 1 | 0.5 | y -182| 256| 0 | 0.15 | 90 | V | Velocity (V) | Radial | y | | | | Vm| | | | | 1 | | +182| 256| 0 | 0.15 | 90 | V | Velocity (V) | Radial | y | | | | Vm| | | | | 1 | | y 183| 16 | 0 | 0.15 | 90 | V | Velocity (V) | Radial | y | | | | V | | | | | 1 | | 22 | 8 | 0 | 0.25 | 60 | V | Velocity (V) | Radial | y | | | | V | | | | | 1 | | 23 | 8 | 0 | 0.50 | 115 | V | Velocity (V) | Radial | y | | | | V | | | | | 1 | | diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radarInfo.txt b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radarInfo.txt index 3c7cc08f0c..c8996e67f0 100755 --- a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radarInfo.txt +++ b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radarInfo.txt @@ -43,9 +43,9 @@ 6 |0 |0 |0.0 |0 |AAP |Alert Adaptation Parms |Alert Adaptation Parms |AAP |AAP | | | | | | | | | |22 | | 8 |0 |0 |0.0 |0 |PTL |Product List |Product List |PTL |PTL | | | | | | | | | |66 | | 9 |0 |0 |0.0 |0 |AM |Alert Message |Alert Message |AM |AM | | | | | | | | | |38 | | -180|256 |0 |0.15 |90 |Z |Reflectivity |{S} {T} Reflectivity ({U}) {B}bit |{S} {T} Z {B}bit |Radial |y | | | |Z | | | | |0 |dBZ/10 | +180|256 |0 |0.15 |90 |Z |Reflectivity |{S} {T} Reflectivity ({U}) {B}bit |{S} {T} Z {B}bit |Radial |y | | | |Z | | | | |0 |dBZ/10 | y 181|16 |0 |0.15 |90 |Z |Reflectivity |{S} {T} Reflectivity ({U}) {B}bit |{S} {T} Z {B}bit |Radial |y | | | |Z | | | | |0 |dBZ | -186|256 |0 |0.30 |460 |Z |Long Range Refl |{S} Long Rng Refl ({U}) {B}bit |{S} {T} TDWR LR Z {B}bit |Radial |y | | | |Z | | | | |0 |dBZ/10 | +186|256 |0 |0.30 |460 |Z |Long Range Refl |{S} Long Rng Refl ({U}) {B}bit |{S} {T} TDWR LR Z {B}bit |Radial |y | | | |Z | | | | |0 |dBZ/10 | y 187|16 |0 |0.30 |460 |Z |Long Range Refl |{S} Long Rng Refl ({U}) {B}bit |{S} {T} TDWR LR Z {B}bit |Radial |y | | | |Z | | | | |0 |dBZ | 94 |256 |0 |1.0 |460 |Z |Reflectivity |{S} {T} Reflectivity ({U}) {B}bit |{S} {T} Z {B}bit |Radial |y | | | |Z | | | | |0 |dBZ/10 | y 153|256 |0 |0.25 |460 |HZ |Reflectivity |{S} {T} Reflectivity ({U}) {B}bit |{S} {T} Z {B}bit |Radial |y | | | |Z | | | | |0 |dBZ/10 | y @@ -57,7 +57,7 @@ 21 |16 |0 |4.0 |460 |Z |Reflectivity |{S} {T} Reflectivity {B}bit ({U}) |{S} {T} Refl {B} |Radial |y | | | |Z | | | | |0 |dBZ | 99 |256 |0 |0.25 |300 |V |Velocity |MODE=V:{S} {T} Velocity ({U}) {B}bit;MODE=SRM8:{S} {T} Storm Rel Vel {B}bit ({U}) |MODE=V:{S} {T} V {B}bit;MODE=SRM8:{S} {T} SRM |Radial |y | | | |Vm | | | | |1 |(m/s)/10| y 154|256 |0 |0.25 |300 |HV |Velocity |MODE=V:{S} {T} Velocity ({U}) {B}bit;MODE=SRM8:{S} {T} Storm Rel Vel {B}bit ({U}) |MODE=V:{S} {T} V {B}bit;MODE=SRM8:{S} {T} SRM |Radial |y | | | |Vm | | | | |1 |(m/s)/10| y -182|256 |0 |0.15 |90 |V |Velocity |MODE=V:{S} {T} Velocity ({U}) {B}bit;MODE=SRM8:{S} {T} Storm Rel Vel {B}bit ({U}) |MODE=V:{S} {T} V {B}bit;MODE=SRM8:{S} {T} SRM |Radial |y | | | |Vm | | | | |1 |(m/s)/10| +182|256 |0 |0.15 |90 |V |Velocity |MODE=V:{S} {T} Velocity ({U}) {B}bit;MODE=SRM8:{S} {T} Storm Rel Vel {B}bit ({U}) |MODE=V:{S} {T} V {B}bit;MODE=SRM8:{S} {T} SRM |Radial |y | | | |Vm | | | | |1 |(m/s)/10| y 183|16 |0 |0.15 |90 |V |Velocity |{S} {T} Velocity ({U}) |{S} {T} V |Radial |y | | | |V | | | | |1 |kts | 22 |8 |0 |0.25 |60 |V |Velocity |{S} {T} Vel {B}bit ({U}) |{S} {T} Vel {B} |Radial |y | | | |V | | | | |1 |kts | 23 |8 |0 |0.50 |115 |V |Velocity |{S} {T} Vel {B}bit ({U}) |{S} {T} Vel {B} |Radial |y | | | |V | | | | |1 |kts | From b2ef13cb19b9af1398bd92cfd67a402b06259e5e Mon Sep 17 00:00:00 2001 From: "Sean.Webb" Date: Tue, 11 Aug 2015 14:09:01 -0400 Subject: [PATCH 18/20] ASM #17882 - Changed scp commands to scp -q Change-Id: Ibb9032c38e13191e2b45ea18419d321c338608fc Former-commit-id: d6c03b3f9a8e4d4fcb6819c802fe0c1d53e6d448 --- .../src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java index 9d8a0cf4b7..29965f0b8f 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java @@ -121,7 +121,7 @@ public class FaxSender { faxWriter.write("\n"); faxWriter.close(); StringBuilder faxDataCommand = new StringBuilder(); - faxDataCommand.append("scp "); + faxDataCommand.append("scp -q "); faxDataCommand.append(faxDataFilename); faxDataCommand.append(" ldad@ls1:"); faxDataCommand.append(ldadDataFilename); @@ -136,7 +136,7 @@ public class FaxSender { return retval; } StringBuilder ldadDataCommand = new StringBuilder(); - ldadDataCommand.append("scp "); + ldadDataCommand.append("scp -q "); ldadDataCommand.append(faxScriptFilename); ldadDataCommand.append(" ldad@ls1:"); ldadDataCommand.append(ldadScriptFilename); From bf77ad45c56b2d626b03235e57747ed4a00e0fe4 Mon Sep 17 00:00:00 2001 From: David Friedman Date: Tue, 11 Aug 2015 21:08:17 +0000 Subject: [PATCH 19/20] ASM #17841 - WarnGen can format a duplicate second time zone time Change-Id: Ib6462575756af85757f1c4de79f4936c10300b48 Former-commit-id: 2bcda119b2d8cfb9b831868b4ef4df4b3fcae9f6 --- .../base/warngen/VM_global_library.vm | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/VM_global_library.vm b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/VM_global_library.vm index 5ba18f8bf1..9ada31f349 100755 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/VM_global_library.vm +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/VM_global_library.vm @@ -18,6 +18,7 @@ ##### Evan Bookbinder 10-24-2014 Fixed UGC > 500 check for Indep Cities in svrl macros to ignore zone codes ##### Evan Bookbinder 3-30-2015 Fixed wording for Independent Cities not in VA ##### Fixed dupCounties.vm not working due a variable switch in HeadlineLocList and ZoneHeadlineLocList +##### D. Friedman 08-11-2015 ASM #17841. Handle possibly duplicate second time zone time. #################################################################################################### #* Mile Marker Test Code @@ -248,11 +249,9 @@ ${currTime}## ########END MACRO #macro(until $endTime $timeFormat $secondtimezone $watch) -UNTIL ${dateUtil.formatUseNoonMidnight(${endTime}, ${timeFormat.clock}, 15, ${localtimezone})}## -#if(${secondtimezone}) -/${dateUtil.formatUseNoonMidnight(${watch.getEndTime()}, ${timeFormat.clock}, 15, ${secondtimezone})}/## -#end - FOR ## +#set($time1 = ${dateUtil.formatUseNoonMidnight(${endTime}, ${timeFormat.clock}, 15, ${localtimezone})}) +#set($time2 = ${dateUtil.formatUseNoonMidnight(${watch.getEndTime()}, ${timeFormat.clock}, 15, ${secondtimezone})}) +UNTIL #formatTwoTimes($time1, $time2) FOR ## #end #macro(insertsvrwatches $watches $list $secondtimezone $dateUtil $timeFormat) @@ -1227,17 +1226,16 @@ ${partOfArea}${area.name}... ######### MACRO TO GENERATE SECOND BULLET (UNTIL XXXX AMPM TZ (DAY) IN WARNINGS ########## #macro(secondBullet $dateUtil $expire $timeFormat $localtimezone $secondtimezone $duration) #if(${duration} >= 360) -UNTIL ${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.plain}, 15, ${localtimezone})}## +#set($time1 = ${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.plain}, 15, ${localtimezone})}) #else -UNTIL ${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.clock}, 15, ${localtimezone})}## +#set($time1 = ${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.clock}, 15, ${localtimezone})}) #end -#if(${secondtimezone}) #if(${duration} >= 360) -/${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.plain}, 15, ${secondtimezone})}/## +#set($time2 = ${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.plain}, 15, ${secondtimezone})}) #else -/${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.clock}, 15, ${secondtimezone})}/## -#end +#set($time2 = ${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.clock}, 15, ${secondtimezone})}) #end +UNTIL #formatTwoTimes($time1, $time2)## #end ########END MACRO @@ -1254,10 +1252,9 @@ UNTIL ${dateUtil.formatUseNoonMidnight(${expire}, ${timeFormat.clock}, 15, ${loc ####overload eventTime with global corEventTime variable ###set($time = ${corEventTime}) ###end -AT ${dateUtil.format(${time}, ${timeFormat.clock}, ${localtimezone})}## -#if(${secondtimezone}) - /${dateUtil.format(${time}, ${timeFormat.clock}, ${secondtimezone})}/## -#end +#set($time1=${dateUtil.format(${time}, ${timeFormat.clock}, ${localtimezone})}) +#set($time2=${dateUtil.format(${time}, ${timeFormat.clock}, ${secondtimezone})}) +AT #formatTwoTimes($time1 $time2)## #end ########END MACRO @@ -1553,3 +1550,12 @@ ${location}. #end #end #end + +## formatTwoTimes - If one non-null string is given, output that string. If +## two distinct non-null strings are given, output time1/time2/. +#macro(formatTwoTimes $time1 $time2) +${time1}## +#if($time2 && $time1 != $time2) +/${time2}/## +#end +#end From fb78df96fceb3b65aa61eec6849ebb7a5a2f4d65 Mon Sep 17 00:00:00 2001 From: "Sean.Webb" Date: Thu, 13 Aug 2015 12:16:11 -0400 Subject: [PATCH 20/20] ASM #17882 - Added -q to ssh command Change-Id: I77618654b2947fd2e9cb7b8bcb3f0aa3499832e0 Former-commit-id: 06e53fa398363b0ea64b6d9c3fdd4c666890a024 --- .../src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java index 29965f0b8f..c6cb8ccb7c 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/fax/FaxSender.java @@ -156,7 +156,7 @@ public class FaxSender { * DR4550 - the sshCommand should be: * ssh -n ls1 -l ldad $LDAD_EXTERNAL_HOME/bin/faxSender.csh filename */ - sshCommand.append("ssh -n ls1 -l ldad "); + sshCommand.append("ssh -q -n ls1 -l ldad "); sshCommand.append(System.getenv("LDAD_EXTERNAL_HOME")); sshCommand.append("/bin/faxSender.csh "); sshCommand.append(ldadScriptFilename);