Merge branch 'master_14.3.1' into master_14.3.2

Former-commit-id: 795b472fff [formerly 06061eee19] [formerly 795b472fff [formerly 06061eee19] [formerly 77863309a9 [formerly 0edb5ba1c9cad9e2933ab86d57ec5e4f355d244d]]]
Former-commit-id: 77863309a9
Former-commit-id: b4051b9fe8 [formerly 22fc1baada]
Former-commit-id: 7839f80035
This commit is contained in:
Fay.Liang 2014-12-22 14:43:32 -05:00
commit 155d0783d2
26 changed files with 221 additions and 201 deletions

Binary file not shown.

View file

@ -65,6 +65,7 @@ import com.raytheon.viz.grid.rsc.general.D2DGridResource;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 5, 2014 3026 mpduff Initial creation
* Dec 16, 2014 3026 mpduff Change location of text
*
* </pre>
*
@ -121,7 +122,7 @@ public class HpeLabelResource extends
.getResourcesByTypeAsType(D2DGridResource.class);
if (!list.isEmpty()) {
double[] pixel = paintProps.getView().getDisplayCoords(
new double[] { 125, 50 }, target);
new double[] { 125, 100 }, target);
RGB color = getCapability(ColorableCapability.class).getColor();
for (D2DGridResource rsc : list) {
GridRecord currentGridRec = rsc.getCurrentGridRecord();

View file

@ -185,6 +185,7 @@ import com.vividsolutions.jts.geom.Point;
* May 05, 2014 3026 mpduff Display Hpe bias source.
* May 19, 2014 DR 16096 gzhang Make getBasin() protected for FFMPDataGenerator.
* Nov 10, 2014 3026 dhladky HPE BIAS displays.
* Dec 16, 2014 3026 mpduff Change location of text
* </pre>
*
* @author dhladky
@ -1466,7 +1467,7 @@ public class FFMPResource extends
private void paintProductString(IGraphicsTarget target,
PaintProperties paintProps) throws VizException {
double[] pixel = paintProps.getView().getDisplayCoords(
new double[] { 110, 50 }, target);
new double[] { 110, 100 }, target);
StringBuilder sb = new StringBuilder();
if (isAutoRefresh || isQuery) {
sb.append("FFMP ").append(df.format(getTime())).append(" hour ")
@ -3152,7 +3153,7 @@ public class FFMPResource extends
boolean guid = false;
Date oldestRefTime = getOldestTime();
Date mostRecentRefTime = getPaintTime().getRefTime();
Date barrierTime = getTableTime();// DR 16148
Date minUriTime = getTimeOrderedKeys().get(0);// DR 16148
@ -3167,10 +3168,11 @@ public class FFMPResource extends
if (rateBasin != null) {
for (Date date : rateBasin.getValues().keySet()) {
if (date.before(minUriTime) || date.before(barrierTime) || date.after(mostRecentRefTime))
if (date.before(minUriTime) || date.before(barrierTime)
|| date.after(mostRecentRefTime))
continue;// DR 16148
double dtime = FFMPGuiUtils.getTimeDiff(mostRecentRefTime,
date);
fgd.setRate(dtime, (double) rateBasin.getValue(date));
@ -3195,8 +3197,9 @@ public class FFMPResource extends
if (qpeBasin != null) {
for (Date date : qpeBasin.getValues().keySet()) {
if (date.before(minUriTime) || date.before(barrierTime) || date.after(mostRecentRefTime))
if (date.before(minUriTime) || date.before(barrierTime)
|| date.after(mostRecentRefTime))
continue;// DR 16148
double dtime = FFMPGuiUtils.getTimeDiff(mostRecentRefTime,
@ -4141,8 +4144,9 @@ public class FFMPResource extends
}
/**
* This method creates the upper left legend text for HPE derived QPE sources.
* It is only used for HPE QPE sources.
* This method creates the upper left legend text for HPE derived QPE
* sources. It is only used for HPE QPE sources.
*
* @param date
* @return
*/
@ -4160,18 +4164,18 @@ public class FFMPResource extends
}
/**
* HPE source lookup job
* HPE source lookup job
*
* <pre>
*
*
* SOFTWARE HISTORY
*
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 11, 2014 3026 dhladky Initial creation
*
*
* </pre>
*
*
* @author dhladky
* @version 1.0
*/

View file

@ -28,12 +28,12 @@ import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
@ -62,6 +62,7 @@ import com.raytheon.viz.grid.util.RadarAdapter;
* Dec 13, 2011 bsteffen Initial creation
* Feb 21, 2014 DR 16744 D. Friedman Add radar/grid updates
* Apr 1, 2014 DR 17220 D. Friedman Handle uninitialized grid inventory
* Dec 15, 2014 3923 bsteffen Retrieve pdo for grid instead of dataURI.
*
* </pre>
*
@ -179,14 +180,14 @@ public class ThinClientDataUpdateTree extends DataUpdateTree {
newQuery.put("insertTime", new RequestConstraint(time,
ConstraintType.GREATER_THAN));
dbRequest.setConstraints(newQuery);
dbRequest.addRequestField("dataURI");
DbQueryResponse response = null;
try {
response = (DbQueryResponse) ThriftClient.sendRequest(dbRequest);
for (String dataURI : response.getFieldObjects("dataURI",
String.class)) {
for (PluginDataObject pdo : response
.getEntityObjects(PluginDataObject.class)) {
AlertMessage am = new AlertMessage();
am.dataURI = dataURI;
am.dataURI = pdo.getDataURI();
am.decodedAlert = RecordFactory.getInstance().loadMapFromUri(
am.dataURI);
messages.add(am);

View file

@ -4,7 +4,7 @@
Darrel Kingfield NOAA/NSSL/CIMMS 09-02-2014 Initial File Creation
-->
<menuContributionFile>
<include installTo="menu:org.eclipse.ui.main.menu?after=radar"
<include installTo="menu:mrms?after=MRMS_MENU_START"
fileName="menus/mrms/mrms.xml">
</include>
</menuContributionFile>

View file

@ -5,8 +5,6 @@
-->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- Set the initial top level menu -->
<contribute xsi:type="subMenu" menuText="MRMS">
<contribute xsi:type="titleItem" titleText="---Multiple-Radar/Multiple-Sensor---" id="MRMS-SVR"/>
<contribute xsi:type="subinclude" fileName="menus/mrms/mrmsProducts.xml"/>
</contribute>
<contribute xsi:type="titleItem" titleText="---Multiple-Radar/Multiple-Sensor---" id="MRMS-SVR"/>
<contribute xsi:type="subinclude" fileName="menus/mrms/mrmsProducts.xml"/>
</menuTemplate>

View file

@ -53,4 +53,21 @@
name="Grid"
category="com.raytheon.uf.viz.productbrowser.productbrowserpreferencespage"/>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu?after=radar">
<menu
id="mrms"
label="MRMS">
<visibleWhen>
<reference
definitionId="com.raytheon.uf.viz.d2d.ui.inD2DActionSet">
</reference>
</visibleWhen>
<separator name="MRMS_MENU_START" visible="false"/>
</menu>
</menuContribution>
</extension>
</plugin>

View file

@ -45,7 +45,6 @@ import com.raytheon.viz.mpe.util.MakeRsel;
import com.raytheon.viz.mpe.util.QCStations;
import com.raytheon.viz.mpe.util.QCTStations;
import com.raytheon.viz.mpe.util.ReadFreezingStationList;
import com.raytheon.viz.mpe.util.ReadPrecipStationList;
import com.raytheon.viz.mpe.util.ReadTemperatureStationList;
import com.raytheon.viz.mpe.util.RenderPcp;
import com.raytheon.viz.mpe.util.RenderT;
@ -442,8 +441,8 @@ public class OtherPrecipOptions {
MakeRsel mr = new MakeRsel();
// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
Calendar tmtime = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
ReadPrecipStationList rp = new ReadPrecipStationList();
int num_stations = rp.getNumPstations();
// ReadPrecipStationList rp = new ReadPrecipStationList();
int num_stations = dqc.precip_stations.size();
String s = appsDefaults.getToken(dqc_ending_6hour_obstime_tok);
int dqc_ending_6hour_obstime = ((!(null == s)) ? Integer.parseInt(s)
: -1);

View file

@ -165,7 +165,6 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog {
cal.setTime(prevDate);
if( prevHydDate == null ){
// prevHydDate = prevDate;
prevHydDate = displayMgr.getCurrentEditDate();
hydroCal.setTime(prevHydDate);

View file

@ -387,6 +387,7 @@ public class EditPrecipStationsDialog extends AbstractMPEDialog implements
if (srain.data > -98) {
if (time_pos == HOURS_24 && srain.data >= 0) {
snow = true;
System.out.println("Snow data is true for station.");
}
}
@ -476,6 +477,7 @@ public class EditPrecipStationsDialog extends AbstractMPEDialog implements
"Snow water change is %5.2f in.", srain.data));
if (time_pos == HOURS_24 && srain.data >= 0) {
snow = true;
System.out.println("Snow water change is available for " + selectedStation.hb5);
}
}

View file

@ -210,8 +210,8 @@ public class QcPrecipOptionsDialog extends AbstractMPEDialog {
Shell parent = this.getParent();
Display display = parent.getDisplay();
MPEDisplayManager displayMgr = MPEDisplayManager.getCurrent();
Date prevDate = displayMgr.getCurrentEditDate();
Date currDate = ChooseDataPeriodDialog.prevDate;
Date prevDate = ChooseDataPeriodDialog.getCurrentHydroEditDate();
Date currDate = ChooseDataPeriodDialog.prevHydDate;
String QcArea = ChooseDataPeriodDialog.prevArea;
AppsDefaults appDefaults = AppsDefaults.getInstance();
DisplayFieldData df = displayMgr.getDisplayFieldType();

View file

@ -1045,7 +1045,7 @@ public class DailyQcUtils {
*/
Calendar currentTime = Calendar
.getInstance(TimeZone.getTimeZone("GMT"));
// btime.set(Calendar.DAY_OF_MONTH, hydro_curDay);
emonth = btime.get(Calendar.MONTH);
Calendar otime = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
otime.setTime(btime.getTime());

View file

@ -112,7 +112,7 @@ public class ReadQPFGrids {
} else {
iflag = 0;
}
for (i = 0; i < gmaxi; i++) {
for (i = 0; i < (dqc.getHrap_grid().maxi); i++) {
if (iflag == 0) {
kbuf = in.readLine().trim();
@ -130,7 +130,7 @@ public class ReadQPFGrids {
// if (ghrapi > minhrapi && ghrapi <= maxhrapi) {
for (j = 0; j < gmaxj; j++) {
for (j = 0; j < (dqc.getHrap_grid().maxj); j++) {
// ghrapj = gminj + j;
//

View file

@ -86,6 +86,7 @@ public class ReadSnowData {
}
}
in = new BufferedReader(new FileReader(prece));
System.out.println("Reading Snow data from : " + prece);
// int p = 1;
// String sn = cbuf;
@ -168,6 +169,7 @@ public class ReadSnowData {
dqc.pdata[i].stn[j].srain[kk].data = Float.parseFloat(qbuf);
dqc.pdata[i].stn[j].srain[kk].qual = 8;
System.out.println("Loading Snow Data for Station "+ hb5 +" with value: "+ dqc.pdata[i].stn[j].srain[kk].data);
break;

View file

@ -28,6 +28,8 @@ import java.util.Set;
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
import com.raytheon.uf.common.datadelivery.registry.DataType;
import com.raytheon.uf.common.datadelivery.registry.SharedSubscription;
import com.raytheon.uf.common.datadelivery.registry.SiteSubscription;
import com.raytheon.uf.common.datadelivery.registry.Subscription;
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
@ -48,6 +50,7 @@ import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
* Oct 24, 2013 2292 mpduff Initial creation
* Nov 01, 2013 2292 dhladky Don't check against yourself for duplication
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
* Dec 08, 2014 3891 dhladky Allow for promotion of site subscriptions to shared.
*
* </pre>
*
@ -80,9 +83,21 @@ public class SubscriptionOverlapHandler implements
DataType dataType = subscription.getDataSetType();
Set<String> overlappingSubscriptions = new HashSet<String>();
for (Subscription potentialDuplicate : potentialDuplicates) {
// don't check against yourself
if (potentialDuplicate.getId().equals(subscription.getId())) {
continue;
// Check for special promotion case
if (subscription instanceof SharedSubscription
&& potentialDuplicate instanceof SiteSubscription) {
// Not as stringent a check as the ID's won't be equal
// but the names still will
if (potentialDuplicate.getName().equals(
subscription.getName())) {
continue;
}
} else {
// Normal sequence, don't check self
if (potentialDuplicate.getId().equals(
subscription.getId())) {
continue;
}
}
OverlapData od = OverlapDataFactory.getOverlapData(
subscription, potentialDuplicate);

View file

@ -21,6 +21,7 @@ package com.raytheon.uf.edex.plugin.hpe.util;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.SortedMap;
@ -44,7 +45,7 @@ import com.raytheon.uf.edex.plugin.hpe.util.HpeEnums.HpeDataSource;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 26, 2014 3026 mpduff Initial creation
* Nov 12, 2014 3026 mpduff Fix handling of query results
* Nov 12, 2014 3026 mpduff Fix handling of query results and query by current hour
*
* </pre>
*
@ -94,6 +95,16 @@ public class HpeDataAccessor {
Date recdate, String productName) throws Exception {
SortedMap<String, List<BiasDynRecord>> dataMap = new TreeMap<String, List<BiasDynRecord>>();
/*
* Bias data are by the hour. Get the current hour to query on
*/
long ms = recdate.getTime();
Calendar currentHour = TimeUtil.newGmtCalendar();
currentHour.setTimeInMillis(ms);
currentHour.set(Calendar.MINUTE, 0);
currentHour.set(Calendar.SECOND, 0);
currentHour.set(Calendar.MILLISECOND, 0);
HpeRadarResult hpeResult = getHpeRadarResult(recdate, productName);
HpeDataSource source = hpeResult.getRadarDataSource();
@ -115,7 +126,8 @@ public class HpeDataAccessor {
query.append(" from ").append(table);
query.append(" where office_id ").append(" = '").append(office)
.append("'");
query.append(" and obstime = '").append(sdf.get().format(recdate));
query.append(" and obstime = '").append(
sdf.get().format(currentHour.getTime()));
query.append("'").append(" order by radid asc, memspan_ind asc");
Object[] results = dao.executeSQLQuery(query.toString());
@ -126,14 +138,14 @@ public class HpeDataAccessor {
rec.setRadarId((String) oa[0]);
rec.setOfficeId((String) oa[1]);
rec.setObsTime((Date) oa[2]);
rec.setMemspanIndex((Integer) oa[3]);
rec.setNumPairs((Float) oa[4]);
rec.setMemspanIndex((Short) oa[3]);
rec.setNumPairs((Double) oa[4]);
rec.setSumGages((Float) oa[5]);
rec.setSumRadars((Float) oa[6]);
rec.setBias((Float) oa[7]);
if (!dataMap.containsKey(rec.getOfficeId())) {
dataMap.put(rec.getOfficeId(),
if (!dataMap.containsKey(rec.getRadarId())) {
dataMap.put(rec.getRadarId(),
new ArrayList<BiasDynRecord>());
}

View file

@ -41,6 +41,7 @@ import com.raytheon.uf.edex.plugin.hpe.util.HpeEnums.HpeDataSource;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 26, 2014 3026 mpduff Initial creation
* Dec 16, 2014 3026 mpduff Add default value if numPairs < npairBiasSelect
*
* </pre>
*
@ -172,7 +173,11 @@ public class HpeLabelGenerator {
sb.append(bias).append(SLASH)
.append((int) rec.getNumPairs());
sb.append(StringUtil.NEWLINE);
return sb.toString();
} else {
sb.append("1.00").append(SLASH)
.append((int) rec.getNumPairs());
sb.append(StringUtil.NEWLINE);
return sb.toString();
}
}

View file

@ -1,5 +1,6 @@
#!/bin/bash
if [ ${#AWIPS_HOME} = 0 ]
then
path_to_script=`readlink -f $0`
@ -8,6 +9,12 @@ fi
. ${AWIPS_HOME}/GFESuite/ServiceBackup/configuration/svcbu.env
if [ ${#IFPS_LOG} = 0 ]
then
echo "ERROR: environment variable IFPS_LOG is undfined, exit."
exit 1
fi
find ${IFPS_LOG}/* -mtime +7 -exec rm -fr {} \; 2>/dev/null

View file

@ -14,6 +14,7 @@
* 01/13/2014 Chin Chen TTR829- when interpolation, edit graph is allowed
* 02/03/2014 1106 Chin Chen Need to be able to use clicking on the Src,Time, or StnId to select display
* 08/12/2014 Chin Chen fixed issue that "load archive file with wrong time line displayed"
* 12/04/2014 DR16888 Chin Chen fixed issue that "Comp(Src) button not functioning properly in NSHARP display"
* </pre>
*
* @author Chin Chen
@ -575,11 +576,12 @@ public class NsharpResourceHandler {
* The following code is to create a list of stns within the range
* of user defined radius (minimum distance) to "current" station
* and also has data loaded with same time line as "current" time
* line. Note that we have two time line formats, yymmdd/hh(day)Vxxx
* and yymmdd/hh(day). A same time line is compared by yymmdd/hh
* line. Note that we have two time line formats, MM.DDVxxx(day)
* and MM.DD(day). A same time line is compared by MM.DD
* only. All qualified stations, including current station, found
* will be listed and used for SND comparison.
*/
String TIME_COMPARE_STRING = "MM.DD";
compSndSelectedElemList.clear();
// CompSndSelectedElem curStnTimeIndexCouple = new
// CompSndSelectedElem(currentStnElementListIndex,currentTimeElementListIndex,currentSndElementListIndex);
@ -593,7 +595,12 @@ public class NsharpResourceHandler {
.get(currentSndElementListIndex).getStnInfo();
gc.setStartingGeographicPoint(currentStnInfo.getLongitude(),
currentStnInfo.getLatitude());
int timeLineLengthToComp = "yymmdd/hh".length();
// String curTimeString = timeElementList.get(currentTimeElementListIndex).getElementDescription();
int timeLineLengthToComp = TIME_COMPARE_STRING.length();
String currentTimeLineToComp = timeElementList
.get(currentTimeElementListIndex).getElementDescription()
.substring(0, timeLineLengthToComp);
@ -1862,15 +1869,15 @@ public class NsharpResourceHandler {
NsharpStationInfo stnInfo, boolean fromArchive) {
// // testing code // stnInfo.setStnId("KUKI");
// Set<String> keysettest = new HashSet<String>(soundMap.keySet());
// for (String key : keysettest) {
// List<NcSoundingLayer> sndLy = soundMap.remove(key); // String
// Set<String> keysettest = new HashSet<String>(soundMap.keySet());
// for (String key : keysettest) {
// List<NcSoundingLayer> sndLy = soundMap.remove(key); // String
// // newkey=
// // key.replace("NCUAIR", "gpduair"); // String newkey =
// // key.replace("NAMS", "SSS");
// String newkey = key.replace("140303/12", "120109/12");
// soundMap.put(newkey, sndLy);
// } //
// String newkey =key.replace("NCUAIR", "gpduair"); // String newkey =
// String newkey= key.replace("NAMS", "SSS");
//String newkey = key.replace("130925/00(Wed)V000", "130925/00(Thu)V000");
// soundMap.put(newkey, sndLy);
// }
// // stnInfo.setSndType(stnInfo.getSndType().replace("NCUAIR", //
// // "gpduair")); // stnInfo.setSndType(stnInfo.getSndType().replace(
// // "NAMS","SSS"));
@ -2620,7 +2627,10 @@ public class NsharpResourceHandler {
break;
}
if (compareSndIsOn) {
handleUserPickNewTimeLine(currentTimeElementListIndex) ;
return;
}
curTimeLinePage = currentTimeElementListIndex / numTimeLinePerPage
+ 1;
setCurSndProfileProp();
@ -2757,6 +2767,9 @@ public class NsharpResourceHandler {
// we should get out of here
break;
} else if (compareSndIsOn) {
handleUserPickNewTimeLine(targetIndex) ;
return;
/* Chin TBD 12112014
boolean found = false;
if (currentStnElementListIndex >= 0
&& currentSndElementListIndex >= 0
@ -2782,6 +2795,7 @@ public class NsharpResourceHandler {
if (!found) {
currentSndElementListIndex = -1;
} else {
int colorIndex = NsharpConstants.LINE_COMP1;
for (NsharpOperationElement elm : sndElementList) {
if (elm.getActionState() == NsharpConstants.ActState.INACTIVE)
@ -2797,11 +2811,13 @@ public class NsharpResourceHandler {
if (colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
// no matter we find current snd type for this stn or
// not
// we should get out of here
break;
*/
} else {
break;
}

View file

@ -14,6 +14,7 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
* May 08, 2013 1847 bsteffen Allow painting with no Wind Data.
* 02/03/2014 1106 Chin Chen Need to be able to use clicking on the Src,Time, or StnId to select display
* 08/04/2014 Chin Chen fixed effective level line drawing, height marker drawing
* 12/11/2014 DR16888 Chin Chen fixed issue that "Comp(Src) button not functioning properly in NSHARP display"
*
* </pre>
*
@ -1860,7 +1861,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
boolean overlayIsOn = rscHandler.isOverlayIsOn();
if (graphConfigProperty != null) {
if (graphConfigProperty.isTemp() == true && !compareStnIsOn
&& !compareTmIsOn) {
&& !compareTmIsOn && !compareSndIsOn) {
if (editGraphOn)
plotPressureTempEditPoints(target, world,
NsharpConstants.color_red, TEMP_TYPE,
@ -1868,7 +1869,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
}
// dew point curve
if (graphConfigProperty.isDewp() == true && !compareStnIsOn
&& !compareTmIsOn) {
&& !compareTmIsOn && !compareSndIsOn) {
if (editGraphOn)
plotPressureTempEditPoints(target, world,
NsharpConstants.color_green, DEWPOINT_TYPE,
@ -1876,7 +1877,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
}
// plot wet bulb trace
if (graphConfigProperty.isWetBulb() == true
&& !compareStnIsOn && !compareTmIsOn) {
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
NsharpLineProperty lp = linePropertyMap
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
target.drawWireframeShape(wetBulbTraceRscShape,
@ -1885,7 +1886,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
}
// plot virtual temperature trace
if (graphConfigProperty.isVTemp() == true
&& !compareStnIsOn && !compareTmIsOn) {
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
NsharpLineProperty lp = linePropertyMap
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
target.drawWireframeShape(vtempTraceCurveRscShape,
@ -1894,7 +1895,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
}
// virtual temperature parcel trace curve
if (graphConfigProperty.isParcelTv() == true
&& !compareStnIsOn && !compareTmIsOn
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn
&& !overlayIsOn) {
if (soundingLys.size() > 0) {
NsharpLineProperty lp = linePropertyMap
@ -1906,7 +1907,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
}
if (graphConfigProperty.isDcape() == true
&& dacpeTraceRscShape != null && !compareStnIsOn
&& dacpeTraceRscShape != null && !compareStnIsOn && !compareSndIsOn
&& !compareTmIsOn && !overlayIsOn) {
if (soundingLys.size() > 0) {
NsharpLineProperty lp = linePropertyMap
@ -1918,7 +1919,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
}
}
if (graphConfigProperty.isEffLayer() == true
&& !compareStnIsOn && !compareTmIsOn) {
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
// draw effective layer lines
// drawEffectiveLayerLines(target);
target.drawWireframeShape(effectiveLayerLineShape,
@ -1927,7 +1928,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
}
// cloud
if (graphConfigProperty.isCloud() == true
&& !compareStnIsOn && !compareTmIsOn) {
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
if (cloudFMShape != null)
target.drawShadedShape(cloudFMShape, 1f);
if (cloudFMLabelShape != null)
@ -1938,7 +1939,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
target.drawShadedShape(cloudCEShape, 1f);
}
if (graphConfigProperty.isOmega() == true
&& !compareStnIsOn && !compareTmIsOn) {
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
if (NsharpLoadDialog.getAccess() != null
&& (NsharpLoadDialog.getAccess()
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
@ -1950,7 +1951,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
}
} else {
// by default, draw everything
if (!compareStnIsOn && !compareTmIsOn) {
if (!compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
if (editGraphOn)
plotPressureTempEditPoints(target, world,
NsharpConstants.color_red, TEMP_TYPE,

View file

@ -15,6 +15,8 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
* 05/23/2014 Chin Chen update SHIP, STP Stats based on bigsharp version 2013Jun12
* 08/18/2014 Chin Chen implemented SARS, FIRE, HAIL, WINTER SPC graphs based on
* bigsharp version 2013Jun12
* 12/03/2014 DR#16884 Chin Chen fixed issue, NSHARP crashes if user loops a product and
* then clicks WINTER/FIRE buttons in Toolbar
*
* </pre>
*
@ -109,21 +111,11 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
private float nonSupercell[] = { 8.2f, 12.2f, 14.4f, 15.8f, 17.0f, 20.0f,
23.2f, 27.0f, 30.4f, 32.0f };
private String hailSize[][] = {
{ "", "<1", "1-1.5", "1.75", "2", "2.5", "2.75", "3-4", ">4" },
{ "+1 STD", "1.9", "2.0", "2.3", "2.8", "2.9", "3.0", "3.0", "3.0" },
{ "AVG", "1.5", "1.5", "1.8", "2.3", "2.5", "2.5", "2.6", "2.7" },
{ "-1 STD", "1.1", "1.1", "1.3", "1.7", "2.1", "2.1", "2.2", "2.4" } };
private RGB white = NsharpConstants.color_white;
private RGB cyan = NsharpConstants.color_cyan_md;
private RGB hailSizeColor[][] = {
{ white, white, white, white, white, white, white, white, white },
{ white, cyan, cyan, cyan, cyan, cyan, cyan, cyan, cyan },
{ white, cyan, cyan, cyan, cyan, cyan, cyan, cyan, cyan },
{ white, cyan, cyan, cyan, cyan, cyan, cyan, cyan, cyan } };
private NsharpNative.NsharpLibrary.HailInfoStr hailInfo = new NsharpNative.NsharpLibrary.HailInfoStr();
@ -133,6 +125,18 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
private NsharpNative.NsharpLibrary.WinterInfoStr winterInfo = new NsharpNative.NsharpLibrary.WinterInfoStr();
private String hailSize[][] = {
{ "", "<1", "1-1.5", "1.75", "2", "2.5", "2.75", "3-4", ">4" },
{ "+1 STD", "1.9", "2.0", "2.3", "2.8", "2.9", "3.0", "3.0", "3.0" },
{ "AVG", "1.5", "1.5", "1.8", "2.3", "2.5", "2.5", "2.6", "2.7" },
{ "-1 STD", "1.1", "1.1", "1.3", "1.7", "2.1", "2.1", "2.2", "2.4" } };
private RGB hailSizeColor[][] = {
{ white, white, white, white, white, white, white, white, white },
{ white, cyan, cyan, cyan, cyan, cyan, cyan, cyan, cyan },
{ white, cyan, cyan, cyan, cyan, cyan, cyan, cyan, cyan },
{ white, cyan, cyan, cyan, cyan, cyan, cyan, cyan, cyan } };
public NsharpSpcGraphsPaneResource(AbstractResourceData resourceData,
LoadProperties loadProperties, NsharpAbstractPaneDescriptor desc) {
super(resourceData, loadProperties, desc);
@ -140,21 +144,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
rightGraph = NsharpPaletteWindow.getRightGraph();
}
private void underDevelopment(int side) throws VizException {
double xpos;
if (side == left)
xpos = spcLeftXOrig + spcFrameWidth / 2;
else
xpos = spcRightXOrig + spcFrameWidth / 2;
DrawableString str = new DrawableString("under development",
NsharpConstants.color_green);
str.font = font12;
str.horizontalAlignment = HorizontalAlignment.LEFT;
str.verticallAlignment = VerticalAlignment.TOP;
ypos = spcYOrig + spcHeight / 2;
str.setCoordinates(xpos, ypos);
target.drawStrings(str);
}
private void setXyStartingPosition(int side) {
ystart = spcYOrig;
@ -298,35 +287,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
// System.out.println("java hail str #"+ (i+1)+ " "+ hailStr);
}
/*
* ypos = spcYEnd - 4 * charHeight; for(int i=0; i < 2; i++){ String
* supStr = new String(sarsInfo.getTorStr(), (i*60), 60);
* //System.out.println("tor str #"+ (1+ i)+ " "+ supStr); RGB strColor
* = NsharpConstants.gempakColorToRGB.get(sarsInfo.getTorStrColor());
* supStr = supStr.substring(0, supStr.indexOf('\0'));// get rid of
* tailing null char(s), as DrawableString will print them out
* DrawableString supercellMatchStr = new DrawableString(supStr,
* strColor); supercellMatchStr.font = font10;
* supercellMatchStr.horizontalAlignment = HorizontalAlignment.LEFT;
* supercellMatchStr.verticallAlignment = VerticalAlignment.TOP; xpos =
* xstart ; ypos = ypos + charHeight;
* supercellMatchStr.setCoordinates(xpos, ypos);
* strList.add(supercellMatchStr);
*
* String sighailStr = new String(sarsInfo.getSighailStr(), (i*60), 60);
* //System.out.println("sighail str #"+ (1+ i)+ " "+ sighailStr); RGB
* strColor1 =
* NsharpConstants.gempakColorToRGB.get(sarsInfo.getSighailStrColor());
* sighailStr = sighailStr.substring(0, sighailStr.indexOf('\0'));// get
* rid of tailing null char(s), as DrawableString will print them out
* DrawableString sighailMatchStr = new DrawableString(sighailStr,
* strColor1); sighailMatchStr.font = font10;
* sighailMatchStr.horizontalAlignment = HorizontalAlignment.LEFT;
* sighailMatchStr.verticallAlignment = VerticalAlignment.TOP; xpos =
* xstart + 0.51 *spcFrameWidth; sighailMatchStr.setCoordinates(xpos,
* ypos); strList.add(sighailMatchStr); }
*/
target.drawStrings(strList.toArray(new DrawableString[strList.size()]));
target.drawLine(lineList.toArray(new DrawableLine[lineList.size()]));
}
@ -1621,13 +1581,15 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
// logic statements for Thompson et al. (2012) WAF sample
// 39 sigtor, 28 non-sigtor supercells
if (cin >= 10) {
// setcolor(7)
psigt_stpcin = "0.58";
stpcColor = NsharpConstants.color_magenta;// setcolor(7);
stpcColor = NsharpConstants.color_magenta;;
}
// 39 sigtor, 32 non-sigtor supercells
else if (cin >= 8) {
// setcolor(7)
psigt_stpcin = "0.55";
stpcColor = NsharpConstants.color_magenta;// setcolor(7);
stpcColor = NsharpConstants.color_magenta;
}
// 54 sigtor, 104 non-sigtor supercells
else if (cin >= 6) {
@ -1745,17 +1707,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
valueStp.verticallAlignment = VerticalAlignment.TOP;
valueStp.setCoordinates(tboxValueStart, ypos);
strList.add(valueStp);
// reset parcel to previous "oldlplchoice" , TBD
/*
* float pres; if(oldlplchoice ==
* NsharpNativeConstants.PARCELTYPE_USER_DEFINED){
* if(NsharpParcelDialog.getAccess() != null){ pres =
* NsharpParcelDialog.getAccess().getUserDefdParcelMb(); } else pres =
* NsharpNativeConstants.parcelToLayerMap.get(oldlplchoice); } else pres
* = NsharpNativeConstants.parcelToLayerMap.get(oldlplchoice);
* nsharpNative.nsharpLib.define_parcel(oldlplchoice,pres);
*/
target.drawStrings(strList.toArray(new DrawableString[strList.size()]));
target.drawLine(lineList.toArray(new DrawableLine[lineList.size()]));
@ -1876,7 +1827,7 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
short oldlplchoice;
_parcel pcl = new _parcel();
;
_lplvalues lpvls = new _lplvalues();
nsharpNative.nsharpLib.get_lpvaluesData(lpvls);
// oldlplchoice = lpvls.flag;
@ -1931,12 +1882,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
lineList.add(ebsline);
}
float pres;
/*
* if(oldlplchoice == NsharpNativeConstants.PARCELTYPE_USER_DEFINED){
* if(NsharpParcelDialog.getAccess() != null){ pres =
* NsharpParcelDialog.getAccess().getUserDefdParcelMb(); } else pres =
* NsharpNativeConstants.parcelToLayerMap.get(oldlplchoice); } else
*/
oldlplchoice = rscHandler.getCurrentParcel();
pres = NsharpNativeConstants.parcelToLayerMap.get(oldlplchoice);
nsharpNative.nsharpLib.define_parcel(oldlplchoice, pres);
@ -1958,20 +1903,17 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
hRatio = paintProps.getView().getExtent().getWidth()
/ paintProps.getCanvasBounds().width;
DrawableLine line = new DrawableLine();
line.setCoordinates(spcRightXOrig, spcYOrig);
line.addPoint(spcRightXOrig, spcYOrig + spcHeight);
line.lineStyle = LineStyle.SOLID;
line.basics.color = NsharpConstants.color_white;
line.width = 1;
line.setCoordinates(spcRightXOrig, spcYOrig);
line.addPoint(spcRightXOrig, spcYOrig + spcHeight);
target.drawLine(line);
PixelExtent spcExt = new PixelExtent(new Rectangle((int) spcLeftXOrig,
(int) spcYOrig, (int) spcWidth, (int) spcHeight));
target.drawRect(spcExt, NsharpConstants.color_white, 1f, 1f); // box
// border
// line
PixelExtent extent = new PixelExtent(new Rectangle((int) spcLeftXOrig,
(int) spcYOrig, (int) spcFrameWidth, (int) spcHeight));
// target.setupClippingPlane(extent);
switch (leftGraph) {
case EBS:
plotEBS(left);
@ -1995,10 +1937,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
plotSars(left);
break;
}
// target.clearClippingPlane();
extent = new PixelExtent(new Rectangle((int) spcRightXOrig,
(int) spcYOrig, (int) spcFrameWidth, (int) spcHeight));
// target.setupClippingPlane(extent);
switch (rightGraph) {
case EBS:
plotEBS(right);
@ -2022,7 +1960,7 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
plotSars(right);
break;
}
// target.clearClippingPlane();
}
@Override
@ -2030,19 +1968,46 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
super.initInternal(target);
}
/*
* private void disposeEbsShape(){ if(ebsBkgLblShape != null)
* ebsBkgLblShape.dispose(); if(ebsBkgLineShape != null)
* ebsBkgLineShape.dispose(); if(ebsSupercellShape != null)
* ebsSupercellShape.dispose(); if(ebsMrglSupShape != null)
* ebsMrglSupShape.dispose(); if(ebsNonSupSgape != null)
* ebsNonSupSgape.dispose(); }
*/
@Override
protected void disposeInternal() {
super.disposeInternal();
}
public NsharpConstants.SPCGraph getLeftGraph() {
return leftGraph;
}
public void setGraphs(NsharpConstants.SPCGraph leftGraph,
NsharpConstants.SPCGraph rightGraph) {
this.leftGraph = leftGraph;
this.rightGraph = rightGraph;
getSpcGraphsInfo();
rscHandler.refreshPane();
}
public NsharpConstants.SPCGraph getRightGraph() {
return rightGraph;
}
public synchronized void getSpcGraphsInfo() {
if (rightGraph == NsharpConstants.SPCGraph.SARS
|| leftGraph == NsharpConstants.SPCGraph.SARS) {
nsharpNative.nsharpLib.getSarsInfo(sarsInfo);
}
if (leftGraph == NsharpConstants.SPCGraph.WINTER
|| rightGraph == NsharpConstants.SPCGraph.WINTER) {
nsharpNative.nsharpLib.getWinterInfo(winterInfo);
}
if (rightGraph == NsharpConstants.SPCGraph.FIRE
|| leftGraph == NsharpConstants.SPCGraph.FIRE) {
nsharpNative.nsharpLib.getFireInfo(fireInfo);
}
if (leftGraph == NsharpConstants.SPCGraph.HAIL
|| rightGraph == NsharpConstants.SPCGraph.HAIL) {
nsharpNative.nsharpLib.getHailInfo(hailInfo);
}
}
@Override
public void handleResize() {
@ -2064,38 +2029,4 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
spcYEnd = ext.getMaxY();
}
public NsharpConstants.SPCGraph getLeftGraph() {
return leftGraph;
}
public void setGraphs(NsharpConstants.SPCGraph leftGraph,
NsharpConstants.SPCGraph rightGraph) {
this.leftGraph = leftGraph;
this.rightGraph = rightGraph;
getSpcGraphsInfo();
rscHandler.refreshPane();
}
public NsharpConstants.SPCGraph getRightGraph() {
return rightGraph;
}
public void getSpcGraphsInfo() {
if (leftGraph == NsharpConstants.SPCGraph.WINTER
|| rightGraph == NsharpConstants.SPCGraph.WINTER) {
nsharpNative.nsharpLib.getWinterInfo(winterInfo);
}
if (leftGraph == NsharpConstants.SPCGraph.FIRE
|| rightGraph == NsharpConstants.SPCGraph.FIRE) {
nsharpNative.nsharpLib.getFireInfo(fireInfo);
}
if (leftGraph == NsharpConstants.SPCGraph.HAIL
|| rightGraph == NsharpConstants.SPCGraph.HAIL) {
nsharpNative.nsharpLib.getHailInfo(hailInfo);
}
if (leftGraph == NsharpConstants.SPCGraph.SARS
|| rightGraph == NsharpConstants.SPCGraph.SARS) {
nsharpNative.nsharpLib.getSarsInfo(sarsInfo);
}
}
}

View file

@ -790,12 +790,12 @@ public class NsharpNative {
@Override
protected List getFieldOrder() {
return Arrays.asList(new String[] { "oprh", "layerDepth",
"meanLayerRh", "meanLayerMixRat", "meanLayerPw",
"meanLayerOmega", "initPhase", "tempProfile1",
"tempProfile2", "tempProfile3", "wetbulbProfile1",
"wetbulbProfile2", "wetbulbProfile3", "bestGuess1",
"bestGuess2" });
return Arrays.asList(new String[] { "mopw", "oprh",
"layerDepth", "meanLayerRh", "meanLayerMixRat",
"meanLayerPw", "meanLayerOmega", "initPhase",
"tempProfile1", "tempProfile2", "tempProfile3",
"wetbulbProfile1", "wetbulbProfile2",
"wetbulbProfile3", "bestGuess1", "bestGuess2" });
}
}

View file

@ -1603,6 +1603,7 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
} else {
hailBtn.setEnabled(false);
}
hailBtn.setEnabled(false); //Chin ::: temporarily disable HAIL button
hailBtn.addListener(SWT.MouseUp, new Listener() {
public void handleEvent(Event event) {
if (leftGraph != NsharpConstants.SPCGraph.HAIL

View file

@ -11,7 +11,7 @@
Name: awips2-java
Summary: AWIPS II Java Distribution
Version: %{_java_version}
Release: 2
Release: 3
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: %{_build_arch}
@ -177,7 +177,7 @@ rm -f %{_build_root}/awips2/java/bin/jmc
# The licenses
mkdir -p %{_build_root}/awips2/java/licenses
LEGAL_DIR="%{_baseline_workspace}/rpms/legal"
cp -v ${LEGAL_DIR}/*.txt ${LEGAL_DIR}/*.pdf \
cp -v ${LEGAL_DIR}/*.pdf \
%{_build_root}/awips2/java/licenses
if [ $? -ne 0 ]; then
exit 1

View file

@ -64,6 +64,11 @@ getCamelAndWrapperPids() {
if [ "$_camel_pid" != "" ]; then
# grab wrapper pid from edex process, run throw awk to throw away leading white space
_wrapper_pid=`ps --no-headers -p $_camel_pid -o ppid | awk '{print $1}'`
# if wrapper died, camel's parent will be 1, don't report that as the wrapper
if [ "$_wrapper_pid" == "1" ]
then
_wrapper_pid=""
fi
else
# camel not up, double check wrapper pid file
pidfile=${EDEX_INSTALL}/bin/${1}.pid
@ -138,7 +143,11 @@ stopEDEX() {
savepid=$_wrapper_pid
while [ "${_wrapper_pid}${_camel_pid}" != "" ]; do
if [ "$_wrapper_pid" != "$savepid" ]; then
echo "WARNING: EDEX ${1} instance running under new pid, started by another user?"
# only display warning when other wrapper starts (not if wrapper died)
if [ -n "$_wrapper_pid" ]
then
echo "WARNING: EDEX ${1} instance running under new pid, started by another user?"
fi
return 1
fi