Merge branch 'asm_15.1.1' of ssh://10.201.30.8:29418/AWIPS2_baseline into master_15.1.1
Former-commit-id: f83dc651e89ba0a1beaa360fd8d14eda90a5bc29
This commit is contained in:
commit
f185d26495
7 changed files with 82 additions and 60 deletions
|
@ -82,6 +82,8 @@ import com.raytheon.uf.viz.d2d.core.D2DLoadProperties;
|
||||||
* like A1.
|
* like A1.
|
||||||
* May 5, 2014 3265 bsteffen Better handling of resources returning
|
* May 5, 2014 3265 bsteffen Better handling of resources returning
|
||||||
* null dataTimes.
|
* null dataTimes.
|
||||||
|
* Jul 30, 2015 17761 D. Friedman Allow resources to return data times based
|
||||||
|
* on base frame times.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -424,7 +426,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher {
|
||||||
config = config.clone();
|
config = config.clone();
|
||||||
if ((config.getDataTimes() == null)
|
if ((config.getDataTimes() == null)
|
||||||
|| (config.getDataTimes().length < 1)) {
|
|| (config.getDataTimes().length < 1)) {
|
||||||
config.setDataTimes(getLatestTimes(rsc));
|
config.setDataTimes(getLatestTimes(rsc, timeSteps));
|
||||||
}
|
}
|
||||||
populateConfiguration(config);
|
populateConfiguration(config);
|
||||||
TimeMatcher tm = new TimeMatcher();
|
TimeMatcher tm = new TimeMatcher();
|
||||||
|
@ -586,7 +588,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher {
|
||||||
rsc.getLoadProperties()).clone();
|
rsc.getLoadProperties()).clone();
|
||||||
if ((config.getDataTimes() == null)
|
if ((config.getDataTimes() == null)
|
||||||
|| (config.getDataTimes().length < 1)) {
|
|| (config.getDataTimes().length < 1)) {
|
||||||
config.setDataTimes(getLatestTimes(rsc));
|
config.setDataTimes(getLatestTimes(rsc, null));
|
||||||
if ((config.getDataTimes() == null)
|
if ((config.getDataTimes() == null)
|
||||||
|| (config.getDataTimes().length < 1)) {
|
|| (config.getDataTimes().length < 1)) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -707,10 +709,11 @@ public class D2DTimeMatcher extends AbstractTimeMatcher {
|
||||||
* product times.
|
* product times.
|
||||||
*
|
*
|
||||||
* @param rsc
|
* @param rsc
|
||||||
|
* @param timeSteps
|
||||||
* @return
|
* @return
|
||||||
* @throws VizException
|
* @throws VizException
|
||||||
*/
|
*/
|
||||||
protected DataTime[] getLatestTimes(AbstractVizResource<?, ?> rsc)
|
protected DataTime[] getLatestTimes(AbstractVizResource<?, ?> rsc, DataTime[] timeSteps)
|
||||||
throws VizException {
|
throws VizException {
|
||||||
DataTime[] availableTimes = null;
|
DataTime[] availableTimes = null;
|
||||||
|
|
||||||
|
@ -727,7 +730,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (availableTimes == null) {
|
if (availableTimes == null) {
|
||||||
availableTimes = rsc.getDataTimes();
|
availableTimes = rsc.getMatchedDataTimes(timeSteps);
|
||||||
Arrays.sort(availableTimes);
|
Arrays.sort(availableTimes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ import com.raytheon.viz.ui.input.EditableManager;
|
||||||
* adjustAngle to protected.
|
* adjustAngle to protected.
|
||||||
* Mar 15, 2013 15693 mgamazaychikov Added magnification to display state.
|
* Mar 15, 2013 15693 mgamazaychikov Added magnification to display state.
|
||||||
* Jun 10, 2014 3263 bsteffen Synchronize dataTimes
|
* Jun 10, 2014 3263 bsteffen Synchronize dataTimes
|
||||||
|
* Jul 30, 2015 17761 D. Friedman Fix time matching.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -123,7 +124,7 @@ public abstract class AbstractStormTrackResource extends
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataTime[] getDataTimes() {
|
public DataTime[] getMatchedDataTimes(DataTime[] timeSteps) {
|
||||||
synchronized (this.dataTimes) {
|
synchronized (this.dataTimes) {
|
||||||
|
|
||||||
if (timeMatchBasis) {
|
if (timeMatchBasis) {
|
||||||
|
@ -142,12 +143,11 @@ public abstract class AbstractStormTrackResource extends
|
||||||
this.fillDataTimeArray(earliestTime, variance);
|
this.fillDataTimeArray(earliestTime, variance);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FramesInfo info = descriptor.getFramesInfo();
|
|
||||||
dataTimes.clear();
|
dataTimes.clear();
|
||||||
this.maximumFrameCount = this.descriptor.getNumberOfFrames();
|
this.maximumFrameCount = this.descriptor.getNumberOfFrames();
|
||||||
// First time called
|
// First time called
|
||||||
if (info.getFrameTimes() != null) {
|
if (timeSteps != null) {
|
||||||
for (DataTime dt : info.getFrameTimes()) {
|
for (DataTime dt : timeSteps) {
|
||||||
dataTimes.add(dt);
|
dataTimes.add(dt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,10 +258,6 @@ public abstract class AbstractStormTrackResource extends
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
DataTime[] frameTimes = descriptor.getFramesInfo().getFrameTimes();
|
|
||||||
if (frameTimes != null) {
|
|
||||||
descriptor.getTimeMatchingMap().put(this, frameTimes);
|
|
||||||
}
|
|
||||||
return getResourceName();
|
return getResourceName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
# level of site customization
|
# level of site customization
|
||||||
# Apr 09,2012 436 randerso Merged RNK's MakeHazards_Elevation procedure
|
# Apr 09,2012 436 randerso Merged RNK's MakeHazards_Elevation procedure
|
||||||
# Feb 12,2014 17058 ryu Extend converter for Collections$EmptyList objects.
|
# 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
|
# Author: randerso
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
@ -37,7 +38,7 @@ class Procedure (SmartScript.SmartScript):
|
||||||
self._dataManager = dbss
|
self._dataManager = dbss
|
||||||
self._afterInit = 0 #flag indicating init is done.
|
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
|
self._natlBaseETN = 1001
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
# Updated 3/27/09 Shannon for tropical and AF.W
|
# Updated 3/27/09 Shannon for tropical and AF.W
|
||||||
# Updated 3/29/10 Shannon for tropical
|
# Updated 3/29/10 Shannon for tropical
|
||||||
# Updated 1/12/11 Shannon to remove HI/TI hazards and fix typos
|
# 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:
|
class CallToActions:
|
||||||
|
@ -377,7 +378,7 @@ Listen to NOAA Weather Radio or local media for further information.""",
|
||||||
|
|
||||||
def ctaFWW(self):
|
def ctaFWW(self):
|
||||||
return [
|
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):
|
def ctaFZA(self):
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# Jul 10,2012 436 randerso Separated configuration data from the
|
# Jul 10,2012 436 randerso Separated configuration data from the
|
||||||
# MakeHazard procedure
|
# MakeHazard procedure
|
||||||
|
# Jul 29, 2015 17770 lshi Add tcmList template for WP basin
|
||||||
#
|
#
|
||||||
# Author: randerso
|
# Author: randerso
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
@ -144,6 +145,9 @@ tcmList = [] # Comment out for HLS sites
|
||||||
# Uncomment line below for CPac basin sites
|
# Uncomment line below for CPac basin sites
|
||||||
#tcmList = ["TCMCP1", "TCMCP2", "TCMCP3", "TCMCP4", "TCMCP5"]
|
#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
|
# Dictionary mapping Hazard Types to applicable local effect areas
|
||||||
# that can be intersected with the zone edit areas.
|
# that can be intersected with the zone edit areas.
|
||||||
# You should not define localEffectAreas entries for Tropical Cyclone
|
# You should not define localEffectAreas entries for Tropical Cyclone
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
<value>TR.W</value>
|
<value>TR.W</value>
|
||||||
<value>SS.A</value>
|
<value>SS.A</value>
|
||||||
<value>SS.W</value>
|
<value>SS.W</value>
|
||||||
|
<value>TY.A</value>
|
||||||
|
<value>TY.W</value>
|
||||||
</set>
|
</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="tropicalEtnPhensigs">
|
<property name="tropicalEtnPhensigs">
|
||||||
|
@ -37,6 +39,8 @@
|
||||||
<value>TR.W</value>
|
<value>TR.W</value>
|
||||||
<value>SS.A</value>
|
<value>SS.A</value>
|
||||||
<value>SS.W</value>
|
<value>SS.W</value>
|
||||||
|
<value>TY.A</value>
|
||||||
|
<value>TY.W</value>
|
||||||
</set>
|
</set>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
|
@ -67,6 +67,7 @@ import org.eclipse.ui.progress.UIJob;
|
||||||
import org.opengis.referencing.FactoryException;
|
import org.opengis.referencing.FactoryException;
|
||||||
import org.opengis.referencing.operation.TransformException;
|
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.db.objects.GridLocation;
|
||||||
import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteDefinition;
|
import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteDefinition;
|
||||||
import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey;
|
import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey;
|
||||||
|
@ -114,6 +115,7 @@ import com.raytheon.viz.ui.statusline.StatusStore;
|
||||||
* Apr 09,2012 436 randerso Merged RNK's MakeHazards_Elevation procedure
|
* Apr 09,2012 436 randerso Merged RNK's MakeHazards_Elevation procedure
|
||||||
* May 30,2012 2028 randerso Cleaned up dialog layout
|
* May 30,2012 2028 randerso Cleaned up dialog layout
|
||||||
* Nov 13,2014 646 lshi Fixed hard coded endTimeSlider's Max value
|
* 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
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -136,20 +138,20 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
|
|
||||||
private static final String EDIT_AREA_MSG = "USING ACTIVE EDIT AREA";
|
private static final String EDIT_AREA_MSG = "USING ACTIVE EDIT AREA";
|
||||||
|
|
||||||
private List<String> tropicalHaz;
|
private final List<String> tropicalHaz;
|
||||||
|
|
||||||
private int natlBaseETN;
|
private final int natlBaseETN;
|
||||||
|
|
||||||
private Map<String, List<String>> localEffectAreas;
|
private final Map<String, List<String>> localEffectAreas;
|
||||||
|
|
||||||
private Map<String, List<Object>> localAreaData;
|
private final Map<String, List<Object>> localAreaData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Zoom step size.
|
* Zoom step size.
|
||||||
*/
|
*/
|
||||||
private static final double ZOOM_STEP = 0.75;
|
private static final double ZOOM_STEP = 0.75;
|
||||||
|
|
||||||
private Map<String, List<String>> hazardDict;
|
private final Map<String, List<String>> hazardDict;
|
||||||
|
|
||||||
private Text etnSegNumberField;
|
private Text etnSegNumberField;
|
||||||
|
|
||||||
|
@ -157,9 +159,9 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
|
|
||||||
private Label startTimeLabel, endTimeLabel;
|
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;
|
private ZoneSelector zoneSelector;
|
||||||
|
|
||||||
|
@ -180,9 +182,9 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
/**
|
/**
|
||||||
* The Python script to load and run methods from.
|
* The Python script to load and run methods from.
|
||||||
*/
|
*/
|
||||||
private String defaultHazardType;
|
private final String defaultHazardType;
|
||||||
|
|
||||||
private Map<String, List<String>> mapNames;
|
private final Map<String, List<String>> mapNames;
|
||||||
|
|
||||||
private Group hazardTypeGroup;
|
private Group hazardTypeGroup;
|
||||||
|
|
||||||
|
@ -194,11 +196,11 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
|
|
||||||
private Label usingLabel;
|
private Label usingLabel;
|
||||||
|
|
||||||
private int defaultMapWidth;
|
private final int defaultMapWidth;
|
||||||
|
|
||||||
private RGB mapColor;
|
private RGB mapColor;
|
||||||
|
|
||||||
private int timeScaleEndTime;
|
private final int timeScaleEndTime;
|
||||||
|
|
||||||
private double areaThreshold = DEFAULT_AREA_THRESHOLD;
|
private double areaThreshold = DEFAULT_AREA_THRESHOLD;
|
||||||
|
|
||||||
|
@ -210,9 +212,9 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
|
|
||||||
private String defaultSegment;
|
private String defaultSegment;
|
||||||
|
|
||||||
private DataManager dataManager;
|
private final DataManager dataManager;
|
||||||
|
|
||||||
private List<String> tcmList;
|
private final List<String> tcmList;
|
||||||
|
|
||||||
private String tcmProduct = null;
|
private String tcmProduct = null;
|
||||||
|
|
||||||
|
@ -232,6 +234,14 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
|
|
||||||
private org.eclipse.swt.widgets.List hazardGroupList;
|
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<String, String> BASINS = ImmutableMap.of("AT", "10", "EP", "20", "CP", "30", "WP", "40");
|
||||||
|
|
||||||
public MakeHazardDialog(Shell parent, DataManager dataManager,
|
public MakeHazardDialog(Shell parent, DataManager dataManager,
|
||||||
String colorName, int defaultMapWidth, int timeScaleEndTime,
|
String colorName, int defaultMapWidth, int timeScaleEndTime,
|
||||||
float areaThreshold, String defaultHazardType,
|
float areaThreshold, String defaultHazardType,
|
||||||
|
@ -605,8 +615,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
int segNum = getSegment();
|
int segNum = getSegment();
|
||||||
String segmentNumber = "";
|
String segmentNumber = "";
|
||||||
// Validate the segment number
|
// Validate the segment number
|
||||||
if ((this.tropicalHaz.contains(phenSig))
|
if ((this.tropicalHaz.contains(phenSig))) {
|
||||||
&& !(this.dataManager.getSiteID().equals("GUM"))) {
|
|
||||||
// if ETN is already correctly assigned, use it
|
// if ETN is already correctly assigned, use it
|
||||||
if (segNum >= this.natlBaseETN) {
|
if (segNum >= this.natlBaseETN) {
|
||||||
segmentNumber = Integer.toString(segNum);
|
segmentNumber = Integer.toString(segNum);
|
||||||
|
@ -682,16 +691,18 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
String altFileName = getAltInfoFilename(tcmProduct);
|
String altFileName = getAltInfoFilename(tcmProduct);
|
||||||
String stormNum = altFileName.substring(2, 4);
|
if (altFileName != null) {
|
||||||
|
String nationalBase = BASINS.get("AT");
|
||||||
System.out.println("storm number is " + stormNum);
|
String baseETN = altFileName.substring(0, 2);
|
||||||
|
String baseEtnCode = BASINS.get(baseETN);
|
||||||
String nationalBase = "10";
|
if (baseEtnCode != null) {
|
||||||
tropicalETN = nationalBase + stormNum;
|
nationalBase = baseEtnCode;
|
||||||
|
} else {
|
||||||
System.out.println("Tropical ETN is: " + tropicalETN);
|
statusHandler.warn("Undefined basin ID: " + baseETN + ", defaulting to AT");
|
||||||
System.out.println("length of tropical ETN is: "
|
}
|
||||||
+ tropicalETN.length());
|
String stormNum = altFileName.substring(2, 4);
|
||||||
|
tropicalETN = nationalBase + stormNum;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return tropicalETN;
|
return tropicalETN;
|
||||||
}
|
}
|
||||||
|
@ -699,10 +710,12 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
||||||
private String getAltInfoFilename(String[] tcmProduct) {
|
private String getAltInfoFilename(String[] tcmProduct) {
|
||||||
String altFilename = null;
|
String altFilename = null;
|
||||||
for (int i = 0; i < tcmProduct.length; i++) {
|
for (int i = 0; i < tcmProduct.length; i++) {
|
||||||
if (tcmProduct[i].contains("NATIONAL HURRICANE CENTER")) {
|
for (String title : WMO_TITLES) {
|
||||||
String[] parts = tcmProduct[i].split("\\s");
|
if (tcmProduct[i].contains(title)) {
|
||||||
altFilename = parts[parts.length - 1];
|
String[] parts = tcmProduct[i].split("\\s");
|
||||||
break;
|
altFilename = parts[parts.length - 1];
|
||||||
|
return altFilename;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return altFilename;
|
return altFilename;
|
||||||
|
|
Loading…
Add table
Reference in a new issue