Merge branch 'master_14.3.1' into master_14.3.2

Former-commit-id: 0edb5ba1c9cad9e2933ab86d57ec5e4f355d244d
This commit is contained in:
Fay.Liang 2014-12-22 14:43:32 -05:00
commit 06061eee19
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 * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* May 5, 2014 3026 mpduff Initial creation * May 5, 2014 3026 mpduff Initial creation
* Dec 16, 2014 3026 mpduff Change location of text
* *
* </pre> * </pre>
* *
@ -121,7 +122,7 @@ public class HpeLabelResource extends
.getResourcesByTypeAsType(D2DGridResource.class); .getResourcesByTypeAsType(D2DGridResource.class);
if (!list.isEmpty()) { if (!list.isEmpty()) {
double[] pixel = paintProps.getView().getDisplayCoords( double[] pixel = paintProps.getView().getDisplayCoords(
new double[] { 125, 50 }, target); new double[] { 125, 100 }, target);
RGB color = getCapability(ColorableCapability.class).getColor(); RGB color = getCapability(ColorableCapability.class).getColor();
for (D2DGridResource rsc : list) { for (D2DGridResource rsc : list) {
GridRecord currentGridRec = rsc.getCurrentGridRecord(); 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 05, 2014 3026 mpduff Display Hpe bias source.
* May 19, 2014 DR 16096 gzhang Make getBasin() protected for FFMPDataGenerator. * May 19, 2014 DR 16096 gzhang Make getBasin() protected for FFMPDataGenerator.
* Nov 10, 2014 3026 dhladky HPE BIAS displays. * Nov 10, 2014 3026 dhladky HPE BIAS displays.
* Dec 16, 2014 3026 mpduff Change location of text
* </pre> * </pre>
* *
* @author dhladky * @author dhladky
@ -1466,7 +1467,7 @@ public class FFMPResource extends
private void paintProductString(IGraphicsTarget target, private void paintProductString(IGraphicsTarget target,
PaintProperties paintProps) throws VizException { PaintProperties paintProps) throws VizException {
double[] pixel = paintProps.getView().getDisplayCoords( double[] pixel = paintProps.getView().getDisplayCoords(
new double[] { 110, 50 }, target); new double[] { 110, 100 }, target);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (isAutoRefresh || isQuery) { if (isAutoRefresh || isQuery) {
sb.append("FFMP ").append(df.format(getTime())).append(" hour ") sb.append("FFMP ").append(df.format(getTime())).append(" hour ")
@ -3168,7 +3169,8 @@ public class FFMPResource extends
if (rateBasin != null) { if (rateBasin != null) {
for (Date date : rateBasin.getValues().keySet()) { 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 continue;// DR 16148
double dtime = FFMPGuiUtils.getTimeDiff(mostRecentRefTime, double dtime = FFMPGuiUtils.getTimeDiff(mostRecentRefTime,
@ -3196,7 +3198,8 @@ public class FFMPResource extends
for (Date date : qpeBasin.getValues().keySet()) { 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 continue;// DR 16148
double dtime = FFMPGuiUtils.getTimeDiff(mostRecentRefTime, 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. * This method creates the upper left legend text for HPE derived QPE
* It is only used for HPE QPE sources. * sources. It is only used for HPE QPE sources.
*
* @param date * @param date
* @return * @return
*/ */

View file

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

View file

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

View file

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

View file

@ -53,4 +53,21 @@
name="Grid" name="Grid"
category="com.raytheon.uf.viz.productbrowser.productbrowserpreferencespage"/> category="com.raytheon.uf.viz.productbrowser.productbrowserpreferencespage"/>
</extension> </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> </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.QCStations;
import com.raytheon.viz.mpe.util.QCTStations; import com.raytheon.viz.mpe.util.QCTStations;
import com.raytheon.viz.mpe.util.ReadFreezingStationList; 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.ReadTemperatureStationList;
import com.raytheon.viz.mpe.util.RenderPcp; import com.raytheon.viz.mpe.util.RenderPcp;
import com.raytheon.viz.mpe.util.RenderT; import com.raytheon.viz.mpe.util.RenderT;
@ -442,8 +441,8 @@ public class OtherPrecipOptions {
MakeRsel mr = new MakeRsel(); MakeRsel mr = new MakeRsel();
// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid(); // Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
Calendar tmtime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); Calendar tmtime = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
ReadPrecipStationList rp = new ReadPrecipStationList(); // ReadPrecipStationList rp = new ReadPrecipStationList();
int num_stations = rp.getNumPstations(); int num_stations = dqc.precip_stations.size();
String s = appsDefaults.getToken(dqc_ending_6hour_obstime_tok); String s = appsDefaults.getToken(dqc_ending_6hour_obstime_tok);
int dqc_ending_6hour_obstime = ((!(null == s)) ? Integer.parseInt(s) int dqc_ending_6hour_obstime = ((!(null == s)) ? Integer.parseInt(s)
: -1); : -1);

View file

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

View file

@ -387,6 +387,7 @@ public class EditPrecipStationsDialog extends AbstractMPEDialog implements
if (srain.data > -98) { if (srain.data > -98) {
if (time_pos == HOURS_24 && srain.data >= 0) { if (time_pos == HOURS_24 && srain.data >= 0) {
snow = true; 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)); "Snow water change is %5.2f in.", srain.data));
if (time_pos == HOURS_24 && srain.data >= 0) { if (time_pos == HOURS_24 && srain.data >= 0) {
snow = true; 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(); Shell parent = this.getParent();
Display display = parent.getDisplay(); Display display = parent.getDisplay();
MPEDisplayManager displayMgr = MPEDisplayManager.getCurrent(); MPEDisplayManager displayMgr = MPEDisplayManager.getCurrent();
Date prevDate = displayMgr.getCurrentEditDate(); Date prevDate = ChooseDataPeriodDialog.getCurrentHydroEditDate();
Date currDate = ChooseDataPeriodDialog.prevDate; Date currDate = ChooseDataPeriodDialog.prevHydDate;
String QcArea = ChooseDataPeriodDialog.prevArea; String QcArea = ChooseDataPeriodDialog.prevArea;
AppsDefaults appDefaults = AppsDefaults.getInstance(); AppsDefaults appDefaults = AppsDefaults.getInstance();
DisplayFieldData df = displayMgr.getDisplayFieldType(); DisplayFieldData df = displayMgr.getDisplayFieldType();

View file

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

View file

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

View file

@ -86,6 +86,7 @@ public class ReadSnowData {
} }
} }
in = new BufferedReader(new FileReader(prece)); in = new BufferedReader(new FileReader(prece));
System.out.println("Reading Snow data from : " + prece);
// int p = 1; // int p = 1;
// String sn = cbuf; // 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].data = Float.parseFloat(qbuf);
dqc.pdata[i].stn[j].srain[kk].qual = 8; 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; 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.AdhocSubscription;
import com.raytheon.uf.common.datadelivery.registry.DataType; 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.Subscription;
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers; import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler; 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 * Oct 24, 2013 2292 mpduff Initial creation
* Nov 01, 2013 2292 dhladky Don't check against yourself for duplication * Nov 01, 2013 2292 dhladky Don't check against yourself for duplication
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site. * 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> * </pre>
* *
@ -80,9 +83,21 @@ public class SubscriptionOverlapHandler implements
DataType dataType = subscription.getDataSetType(); DataType dataType = subscription.getDataSetType();
Set<String> overlappingSubscriptions = new HashSet<String>(); Set<String> overlappingSubscriptions = new HashSet<String>();
for (Subscription potentialDuplicate : potentialDuplicates) { for (Subscription potentialDuplicate : potentialDuplicates) {
// don't check against yourself // Check for special promotion case
if (potentialDuplicate.getId().equals(subscription.getId())) { if (subscription instanceof SharedSubscription
continue; && 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( OverlapData od = OverlapDataFactory.getOverlapData(
subscription, potentialDuplicate); subscription, potentialDuplicate);

View file

@ -21,6 +21,7 @@ package com.raytheon.uf.edex.plugin.hpe.util;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.SortedMap; import java.util.SortedMap;
@ -44,7 +45,7 @@ import com.raytheon.uf.edex.plugin.hpe.util.HpeEnums.HpeDataSource;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Mar 26, 2014 3026 mpduff Initial creation * 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> * </pre>
* *
@ -94,6 +95,16 @@ public class HpeDataAccessor {
Date recdate, String productName) throws Exception { Date recdate, String productName) throws Exception {
SortedMap<String, List<BiasDynRecord>> dataMap = new TreeMap<String, List<BiasDynRecord>>(); 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); HpeRadarResult hpeResult = getHpeRadarResult(recdate, productName);
HpeDataSource source = hpeResult.getRadarDataSource(); HpeDataSource source = hpeResult.getRadarDataSource();
@ -115,7 +126,8 @@ public class HpeDataAccessor {
query.append(" from ").append(table); query.append(" from ").append(table);
query.append(" where office_id ").append(" = '").append(office) query.append(" where office_id ").append(" = '").append(office)
.append("'"); .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"); query.append("'").append(" order by radid asc, memspan_ind asc");
Object[] results = dao.executeSQLQuery(query.toString()); Object[] results = dao.executeSQLQuery(query.toString());
@ -126,14 +138,14 @@ public class HpeDataAccessor {
rec.setRadarId((String) oa[0]); rec.setRadarId((String) oa[0]);
rec.setOfficeId((String) oa[1]); rec.setOfficeId((String) oa[1]);
rec.setObsTime((Date) oa[2]); rec.setObsTime((Date) oa[2]);
rec.setMemspanIndex((Integer) oa[3]); rec.setMemspanIndex((Short) oa[3]);
rec.setNumPairs((Float) oa[4]); rec.setNumPairs((Double) oa[4]);
rec.setSumGages((Float) oa[5]); rec.setSumGages((Float) oa[5]);
rec.setSumRadars((Float) oa[6]); rec.setSumRadars((Float) oa[6]);
rec.setBias((Float) oa[7]); rec.setBias((Float) oa[7]);
if (!dataMap.containsKey(rec.getOfficeId())) { if (!dataMap.containsKey(rec.getRadarId())) {
dataMap.put(rec.getOfficeId(), dataMap.put(rec.getRadarId(),
new ArrayList<BiasDynRecord>()); new ArrayList<BiasDynRecord>());
} }

View file

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

View file

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
if [ ${#AWIPS_HOME} = 0 ] if [ ${#AWIPS_HOME} = 0 ]
then then
path_to_script=`readlink -f $0` path_to_script=`readlink -f $0`
@ -8,6 +9,12 @@ fi
. ${AWIPS_HOME}/GFESuite/ServiceBackup/configuration/svcbu.env . ${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 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 * 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 * 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" * 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> * </pre>
* *
* @author Chin Chen * @author Chin Chen
@ -575,11 +576,12 @@ public class NsharpResourceHandler {
* The following code is to create a list of stns within the range * The following code is to create a list of stns within the range
* of user defined radius (minimum distance) to "current" station * of user defined radius (minimum distance) to "current" station
* and also has data loaded with same time line as "current" time * 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 * line. Note that we have two time line formats, MM.DDVxxx(day)
* and yymmdd/hh(day). A same time line is compared by yymmdd/hh * and MM.DD(day). A same time line is compared by MM.DD
* only. All qualified stations, including current station, found * only. All qualified stations, including current station, found
* will be listed and used for SND comparison. * will be listed and used for SND comparison.
*/ */
String TIME_COMPARE_STRING = "MM.DD";
compSndSelectedElemList.clear(); compSndSelectedElemList.clear();
// CompSndSelectedElem curStnTimeIndexCouple = new // CompSndSelectedElem curStnTimeIndexCouple = new
// CompSndSelectedElem(currentStnElementListIndex,currentTimeElementListIndex,currentSndElementListIndex); // CompSndSelectedElem(currentStnElementListIndex,currentTimeElementListIndex,currentSndElementListIndex);
@ -593,7 +595,12 @@ public class NsharpResourceHandler {
.get(currentSndElementListIndex).getStnInfo(); .get(currentSndElementListIndex).getStnInfo();
gc.setStartingGeographicPoint(currentStnInfo.getLongitude(), gc.setStartingGeographicPoint(currentStnInfo.getLongitude(),
currentStnInfo.getLatitude()); currentStnInfo.getLatitude());
int timeLineLengthToComp = "yymmdd/hh".length();
// String curTimeString = timeElementList.get(currentTimeElementListIndex).getElementDescription();
int timeLineLengthToComp = TIME_COMPARE_STRING.length();
String currentTimeLineToComp = timeElementList String currentTimeLineToComp = timeElementList
.get(currentTimeElementListIndex).getElementDescription() .get(currentTimeElementListIndex).getElementDescription()
.substring(0, timeLineLengthToComp); .substring(0, timeLineLengthToComp);
@ -1862,15 +1869,15 @@ public class NsharpResourceHandler {
NsharpStationInfo stnInfo, boolean fromArchive) { NsharpStationInfo stnInfo, boolean fromArchive) {
// // testing code // stnInfo.setStnId("KUKI"); // // testing code // stnInfo.setStnId("KUKI");
// Set<String> keysettest = new HashSet<String>(soundMap.keySet()); // Set<String> keysettest = new HashSet<String>(soundMap.keySet());
// for (String key : keysettest) { // for (String key : keysettest) {
// List<NcSoundingLayer> sndLy = soundMap.remove(key); // String // List<NcSoundingLayer> sndLy = soundMap.remove(key); // String
// // newkey= // // newkey=
// // key.replace("NCUAIR", "gpduair"); // String newkey = // String newkey =key.replace("NCUAIR", "gpduair"); // String newkey =
// // key.replace("NAMS", "SSS"); // String newkey= key.replace("NAMS", "SSS");
// String newkey = key.replace("140303/12", "120109/12"); //String newkey = key.replace("130925/00(Wed)V000", "130925/00(Thu)V000");
// soundMap.put(newkey, sndLy); // soundMap.put(newkey, sndLy);
// } // // }
// // stnInfo.setSndType(stnInfo.getSndType().replace("NCUAIR", // // // stnInfo.setSndType(stnInfo.getSndType().replace("NCUAIR", //
// // "gpduair")); // stnInfo.setSndType(stnInfo.getSndType().replace( // // "gpduair")); // stnInfo.setSndType(stnInfo.getSndType().replace(
// // "NAMS","SSS")); // // "NAMS","SSS"));
@ -2620,7 +2627,10 @@ public class NsharpResourceHandler {
break; break;
} }
if (compareSndIsOn) {
handleUserPickNewTimeLine(currentTimeElementListIndex) ;
return;
}
curTimeLinePage = currentTimeElementListIndex / numTimeLinePerPage curTimeLinePage = currentTimeElementListIndex / numTimeLinePerPage
+ 1; + 1;
setCurSndProfileProp(); setCurSndProfileProp();
@ -2757,6 +2767,9 @@ public class NsharpResourceHandler {
// we should get out of here // we should get out of here
break; break;
} else if (compareSndIsOn) { } else if (compareSndIsOn) {
handleUserPickNewTimeLine(targetIndex) ;
return;
/* Chin TBD 12112014
boolean found = false; boolean found = false;
if (currentStnElementListIndex >= 0 if (currentStnElementListIndex >= 0
&& currentSndElementListIndex >= 0 && currentSndElementListIndex >= 0
@ -2782,6 +2795,7 @@ public class NsharpResourceHandler {
if (!found) { if (!found) {
currentSndElementListIndex = -1; currentSndElementListIndex = -1;
} else { } else {
int colorIndex = NsharpConstants.LINE_COMP1; int colorIndex = NsharpConstants.LINE_COMP1;
for (NsharpOperationElement elm : sndElementList) { for (NsharpOperationElement elm : sndElementList) {
if (elm.getActionState() == NsharpConstants.ActState.INACTIVE) if (elm.getActionState() == NsharpConstants.ActState.INACTIVE)
@ -2797,11 +2811,13 @@ public class NsharpResourceHandler {
if (colorIndex > NsharpConstants.LINE_COMP10) if (colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1; colorIndex = NsharpConstants.LINE_COMP1;
} }
} }
// no matter we find current snd type for this stn or // no matter we find current snd type for this stn or
// not // not
// we should get out of here // we should get out of here
break; break;
*/
} else { } else {
break; 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. * 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 * 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 * 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> * </pre>
* *
@ -1860,7 +1861,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
boolean overlayIsOn = rscHandler.isOverlayIsOn(); boolean overlayIsOn = rscHandler.isOverlayIsOn();
if (graphConfigProperty != null) { if (graphConfigProperty != null) {
if (graphConfigProperty.isTemp() == true && !compareStnIsOn if (graphConfigProperty.isTemp() == true && !compareStnIsOn
&& !compareTmIsOn) { && !compareTmIsOn && !compareSndIsOn) {
if (editGraphOn) if (editGraphOn)
plotPressureTempEditPoints(target, world, plotPressureTempEditPoints(target, world,
NsharpConstants.color_red, TEMP_TYPE, NsharpConstants.color_red, TEMP_TYPE,
@ -1868,7 +1869,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
} }
// dew point curve // dew point curve
if (graphConfigProperty.isDewp() == true && !compareStnIsOn if (graphConfigProperty.isDewp() == true && !compareStnIsOn
&& !compareTmIsOn) { && !compareTmIsOn && !compareSndIsOn) {
if (editGraphOn) if (editGraphOn)
plotPressureTempEditPoints(target, world, plotPressureTempEditPoints(target, world,
NsharpConstants.color_green, DEWPOINT_TYPE, NsharpConstants.color_green, DEWPOINT_TYPE,
@ -1876,7 +1877,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
} }
// plot wet bulb trace // plot wet bulb trace
if (graphConfigProperty.isWetBulb() == true if (graphConfigProperty.isWetBulb() == true
&& !compareStnIsOn && !compareTmIsOn) { && !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
NsharpLineProperty lp = linePropertyMap NsharpLineProperty lp = linePropertyMap
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]); .get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
target.drawWireframeShape(wetBulbTraceRscShape, target.drawWireframeShape(wetBulbTraceRscShape,
@ -1885,7 +1886,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
} }
// plot virtual temperature trace // plot virtual temperature trace
if (graphConfigProperty.isVTemp() == true if (graphConfigProperty.isVTemp() == true
&& !compareStnIsOn && !compareTmIsOn) { && !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
NsharpLineProperty lp = linePropertyMap NsharpLineProperty lp = linePropertyMap
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]); .get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
target.drawWireframeShape(vtempTraceCurveRscShape, target.drawWireframeShape(vtempTraceCurveRscShape,
@ -1894,7 +1895,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
} }
// virtual temperature parcel trace curve // virtual temperature parcel trace curve
if (graphConfigProperty.isParcelTv() == true if (graphConfigProperty.isParcelTv() == true
&& !compareStnIsOn && !compareTmIsOn && !compareStnIsOn && !compareTmIsOn && !compareSndIsOn
&& !overlayIsOn) { && !overlayIsOn) {
if (soundingLys.size() > 0) { if (soundingLys.size() > 0) {
NsharpLineProperty lp = linePropertyMap NsharpLineProperty lp = linePropertyMap
@ -1906,7 +1907,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
} }
if (graphConfigProperty.isDcape() == true if (graphConfigProperty.isDcape() == true
&& dacpeTraceRscShape != null && !compareStnIsOn && dacpeTraceRscShape != null && !compareStnIsOn && !compareSndIsOn
&& !compareTmIsOn && !overlayIsOn) { && !compareTmIsOn && !overlayIsOn) {
if (soundingLys.size() > 0) { if (soundingLys.size() > 0) {
NsharpLineProperty lp = linePropertyMap NsharpLineProperty lp = linePropertyMap
@ -1918,7 +1919,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
} }
} }
if (graphConfigProperty.isEffLayer() == true if (graphConfigProperty.isEffLayer() == true
&& !compareStnIsOn && !compareTmIsOn) { && !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
// draw effective layer lines // draw effective layer lines
// drawEffectiveLayerLines(target); // drawEffectiveLayerLines(target);
target.drawWireframeShape(effectiveLayerLineShape, target.drawWireframeShape(effectiveLayerLineShape,
@ -1927,7 +1928,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
} }
// cloud // cloud
if (graphConfigProperty.isCloud() == true if (graphConfigProperty.isCloud() == true
&& !compareStnIsOn && !compareTmIsOn) { && !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
if (cloudFMShape != null) if (cloudFMShape != null)
target.drawShadedShape(cloudFMShape, 1f); target.drawShadedShape(cloudFMShape, 1f);
if (cloudFMLabelShape != null) if (cloudFMLabelShape != null)
@ -1938,7 +1939,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
target.drawShadedShape(cloudCEShape, 1f); target.drawShadedShape(cloudCEShape, 1f);
} }
if (graphConfigProperty.isOmega() == true if (graphConfigProperty.isOmega() == true
&& !compareStnIsOn && !compareTmIsOn) { && !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
if (NsharpLoadDialog.getAccess() != null if (NsharpLoadDialog.getAccess() != null
&& (NsharpLoadDialog.getAccess() && (NsharpLoadDialog.getAccess()
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog .getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
@ -1950,7 +1951,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
} }
} else { } else {
// by default, draw everything // by default, draw everything
if (!compareStnIsOn && !compareTmIsOn) { if (!compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
if (editGraphOn) if (editGraphOn)
plotPressureTempEditPoints(target, world, plotPressureTempEditPoints(target, world,
NsharpConstants.color_red, TEMP_TYPE, 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 * 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 * 08/18/2014 Chin Chen implemented SARS, FIRE, HAIL, WINTER SPC graphs based on
* bigsharp version 2013Jun12 * 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> * </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, private float nonSupercell[] = { 8.2f, 12.2f, 14.4f, 15.8f, 17.0f, 20.0f,
23.2f, 27.0f, 30.4f, 32.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 white = NsharpConstants.color_white;
private RGB cyan = NsharpConstants.color_cyan_md; 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(); 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 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, public NsharpSpcGraphsPaneResource(AbstractResourceData resourceData,
LoadProperties loadProperties, NsharpAbstractPaneDescriptor desc) { LoadProperties loadProperties, NsharpAbstractPaneDescriptor desc) {
super(resourceData, loadProperties, desc); super(resourceData, loadProperties, desc);
@ -140,21 +144,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
rightGraph = NsharpPaletteWindow.getRightGraph(); 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) { private void setXyStartingPosition(int side) {
ystart = spcYOrig; ystart = spcYOrig;
@ -298,35 +287,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
// System.out.println("java hail str #"+ (i+1)+ " "+ hailStr); // 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.drawStrings(strList.toArray(new DrawableString[strList.size()]));
target.drawLine(lineList.toArray(new DrawableLine[lineList.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 // logic statements for Thompson et al. (2012) WAF sample
// 39 sigtor, 28 non-sigtor supercells // 39 sigtor, 28 non-sigtor supercells
if (cin >= 10) { if (cin >= 10) {
// setcolor(7)
psigt_stpcin = "0.58"; psigt_stpcin = "0.58";
stpcColor = NsharpConstants.color_magenta;// setcolor(7); stpcColor = NsharpConstants.color_magenta;;
} }
// 39 sigtor, 32 non-sigtor supercells // 39 sigtor, 32 non-sigtor supercells
else if (cin >= 8) { else if (cin >= 8) {
// setcolor(7)
psigt_stpcin = "0.55"; psigt_stpcin = "0.55";
stpcColor = NsharpConstants.color_magenta;// setcolor(7); stpcColor = NsharpConstants.color_magenta;
} }
// 54 sigtor, 104 non-sigtor supercells // 54 sigtor, 104 non-sigtor supercells
else if (cin >= 6) { else if (cin >= 6) {
@ -1745,17 +1707,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
valueStp.verticallAlignment = VerticalAlignment.TOP; valueStp.verticallAlignment = VerticalAlignment.TOP;
valueStp.setCoordinates(tboxValueStart, ypos); valueStp.setCoordinates(tboxValueStart, ypos);
strList.add(valueStp); 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.drawStrings(strList.toArray(new DrawableString[strList.size()]));
target.drawLine(lineList.toArray(new DrawableLine[lineList.size()])); target.drawLine(lineList.toArray(new DrawableLine[lineList.size()]));
@ -1876,7 +1827,7 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
short oldlplchoice; short oldlplchoice;
_parcel pcl = new _parcel(); _parcel pcl = new _parcel();
;
_lplvalues lpvls = new _lplvalues(); _lplvalues lpvls = new _lplvalues();
nsharpNative.nsharpLib.get_lpvaluesData(lpvls); nsharpNative.nsharpLib.get_lpvaluesData(lpvls);
// oldlplchoice = lpvls.flag; // oldlplchoice = lpvls.flag;
@ -1931,12 +1882,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
lineList.add(ebsline); lineList.add(ebsline);
} }
float pres; 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(); oldlplchoice = rscHandler.getCurrentParcel();
pres = NsharpNativeConstants.parcelToLayerMap.get(oldlplchoice); pres = NsharpNativeConstants.parcelToLayerMap.get(oldlplchoice);
nsharpNative.nsharpLib.define_parcel(oldlplchoice, pres); nsharpNative.nsharpLib.define_parcel(oldlplchoice, pres);
@ -1958,20 +1903,17 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
hRatio = paintProps.getView().getExtent().getWidth() hRatio = paintProps.getView().getExtent().getWidth()
/ paintProps.getCanvasBounds().width; / paintProps.getCanvasBounds().width;
DrawableLine line = new DrawableLine(); DrawableLine line = new DrawableLine();
line.setCoordinates(spcRightXOrig, spcYOrig);
line.addPoint(spcRightXOrig, spcYOrig + spcHeight);
line.lineStyle = LineStyle.SOLID; line.lineStyle = LineStyle.SOLID;
line.basics.color = NsharpConstants.color_white; line.basics.color = NsharpConstants.color_white;
line.width = 1; line.width = 1;
line.setCoordinates(spcRightXOrig, spcYOrig);
line.addPoint(spcRightXOrig, spcYOrig + spcHeight);
target.drawLine(line); target.drawLine(line);
PixelExtent spcExt = new PixelExtent(new Rectangle((int) spcLeftXOrig, PixelExtent spcExt = new PixelExtent(new Rectangle((int) spcLeftXOrig,
(int) spcYOrig, (int) spcWidth, (int) spcHeight)); (int) spcYOrig, (int) spcWidth, (int) spcHeight));
target.drawRect(spcExt, NsharpConstants.color_white, 1f, 1f); // box target.drawRect(spcExt, NsharpConstants.color_white, 1f, 1f); // box
// border // border
// line // line
PixelExtent extent = new PixelExtent(new Rectangle((int) spcLeftXOrig,
(int) spcYOrig, (int) spcFrameWidth, (int) spcHeight));
// target.setupClippingPlane(extent);
switch (leftGraph) { switch (leftGraph) {
case EBS: case EBS:
plotEBS(left); plotEBS(left);
@ -1995,10 +1937,6 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
plotSars(left); plotSars(left);
break; break;
} }
// target.clearClippingPlane();
extent = new PixelExtent(new Rectangle((int) spcRightXOrig,
(int) spcYOrig, (int) spcFrameWidth, (int) spcHeight));
// target.setupClippingPlane(extent);
switch (rightGraph) { switch (rightGraph) {
case EBS: case EBS:
plotEBS(right); plotEBS(right);
@ -2022,7 +1960,7 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
plotSars(right); plotSars(right);
break; break;
} }
// target.clearClippingPlane();
} }
@Override @Override
@ -2030,19 +1968,46 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
super.initInternal(target); 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 @Override
protected void disposeInternal() { protected void disposeInternal() {
super.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 @Override
public void handleResize() { public void handleResize() {
@ -2064,38 +2029,4 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
spcYEnd = ext.getMaxY(); 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 @Override
protected List getFieldOrder() { protected List getFieldOrder() {
return Arrays.asList(new String[] { "oprh", "layerDepth", return Arrays.asList(new String[] { "mopw", "oprh",
"meanLayerRh", "meanLayerMixRat", "meanLayerPw", "layerDepth", "meanLayerRh", "meanLayerMixRat",
"meanLayerOmega", "initPhase", "tempProfile1", "meanLayerPw", "meanLayerOmega", "initPhase",
"tempProfile2", "tempProfile3", "wetbulbProfile1", "tempProfile1", "tempProfile2", "tempProfile3",
"wetbulbProfile2", "wetbulbProfile3", "bestGuess1", "wetbulbProfile1", "wetbulbProfile2",
"bestGuess2" }); "wetbulbProfile3", "bestGuess1", "bestGuess2" });
} }
} }

View file

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

View file

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

View file

@ -64,6 +64,11 @@ getCamelAndWrapperPids() {
if [ "$_camel_pid" != "" ]; then if [ "$_camel_pid" != "" ]; then
# grab wrapper pid from edex process, run throw awk to throw away leading white space # 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}'` _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 else
# camel not up, double check wrapper pid file # camel not up, double check wrapper pid file
pidfile=${EDEX_INSTALL}/bin/${1}.pid pidfile=${EDEX_INSTALL}/bin/${1}.pid
@ -138,7 +143,11 @@ stopEDEX() {
savepid=$_wrapper_pid savepid=$_wrapper_pid
while [ "${_wrapper_pid}${_camel_pid}" != "" ]; do while [ "${_wrapper_pid}${_camel_pid}" != "" ]; do
if [ "$_wrapper_pid" != "$savepid" ]; then 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 return 1
fi fi