Merge branch 'master_14.3.1' into master_14.3.2
Conflicts: edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/doConfig.py Former-commit-id: 307e986b8e9ce89ad1eb7b28f88afe82c2596f30
This commit is contained in:
commit
15f28c0245
27 changed files with 1559 additions and 1653 deletions
|
@ -175,11 +175,11 @@
|
||||||
|
|
||||||
<ini-substitutions>
|
<ini-substitutions>
|
||||||
<max-memory>
|
<max-memory>
|
||||||
<value>256M</value>
|
<value>384M</value>
|
||||||
</max-memory>
|
</max-memory>
|
||||||
|
|
||||||
<max-perm>
|
<max-perm>
|
||||||
<value>64M</value>
|
<value>96M</value>
|
||||||
</max-perm>
|
</max-perm>
|
||||||
</ini-substitutions>
|
</ini-substitutions>
|
||||||
</memory-setting>
|
</memory-setting>
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
<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="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"/> -->
|
||||||
</menuTemplate>
|
</menuTemplate>
|
||||||
|
|
|
@ -84,8 +84,6 @@ import com.raytheon.viz.mpe.util.DailyQcUtils;
|
||||||
public class DrawDQCStations {
|
public class DrawDQCStations {
|
||||||
|
|
||||||
private static DrawDQCStations instance = null;
|
private static DrawDQCStations instance = null;
|
||||||
|
|
||||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
|
||||||
|
|
||||||
private static final List<NamedColorUseSet> pColorSetGroup = MPEColors
|
private static final List<NamedColorUseSet> pColorSetGroup = MPEColors
|
||||||
.build_mpe_colors();
|
.build_mpe_colors();
|
||||||
|
@ -101,13 +99,13 @@ public class DrawDQCStations {
|
||||||
|
|
||||||
int points_flag;
|
int points_flag;
|
||||||
|
|
||||||
boolean qpf_on = MPEDisplayManager.getCurrent().isQpf();
|
boolean qpf_on = false;
|
||||||
|
|
||||||
boolean flf_on = false;
|
boolean flf_on = false;
|
||||||
|
|
||||||
boolean maxmin_on = false;
|
boolean maxmin_on = false;
|
||||||
|
|
||||||
int isom = dqc.isom;
|
int isom = DailyQcUtils.isom;
|
||||||
|
|
||||||
int pcpn_time_step = 0;
|
int pcpn_time_step = 0;
|
||||||
|
|
||||||
|
@ -119,7 +117,7 @@ public class DrawDQCStations {
|
||||||
|
|
||||||
public static int grids_flag = 0;
|
public static int grids_flag = 0;
|
||||||
|
|
||||||
int dflag[] = dqc.dflag;
|
int dflag[] = DailyQcUtils.dflag;
|
||||||
|
|
||||||
int pcpn_time = 0;
|
int pcpn_time = 0;
|
||||||
|
|
||||||
|
@ -298,25 +296,25 @@ public class DrawDQCStations {
|
||||||
time_pos = 0;
|
time_pos = 0;
|
||||||
display_flag = 0;
|
display_flag = 0;
|
||||||
hed = 0;
|
hed = 0;
|
||||||
plot_view = dqc.plot_view;
|
plot_view = DailyQcUtils.plot_view;
|
||||||
contour_flag = dqc.contour_flag;
|
contour_flag = DailyQcUtils.contour_flag;
|
||||||
points_flag = dqc.points_flag;
|
points_flag = DailyQcUtils.points_flag;
|
||||||
qpf_on = MPEDisplayManager.getCurrent().isQpf();
|
qpf_on = MPEDisplayManager.getCurrent().isQpf();
|
||||||
flf_on = MPEDisplayManager.getCurrent().isZflag();
|
flf_on = MPEDisplayManager.getCurrent().isZflag();
|
||||||
maxmin_on = MPEDisplayManager.getCurrent().isMaxmin();
|
maxmin_on = MPEDisplayManager.getCurrent().isMaxmin();
|
||||||
tbuf = new StringBuilder();
|
tbuf = new StringBuilder();
|
||||||
isom = dqc.isom;
|
isom = DailyQcUtils.isom;
|
||||||
pcpn_time_step = MPEDisplayManager.pcpn_time_step;
|
pcpn_time_step = MPEDisplayManager.pcpn_time_step;
|
||||||
map_flag = dqc.map_flag;
|
map_flag = DailyQcUtils.map_flag;
|
||||||
pcp_flag = dqc.pcp_flag;
|
pcp_flag = DailyQcUtils.pcp_flag;
|
||||||
pcpn_day = dqc.pcpn_day;
|
pcpn_day = DailyQcUtils.pcpn_day;
|
||||||
grids_flag = dqc.grids_flag;
|
grids_flag = DailyQcUtils.grids_flag;
|
||||||
dflag = dqc.dflag;
|
dflag = DailyQcUtils.dflag;
|
||||||
pcpn_time = dqc.pcpn_time;
|
pcpn_time = DailyQcUtils.pcpn_time;
|
||||||
// pdata = DailyQcUtils.pdata;
|
// pdata = DailyQcUtils.pdata;
|
||||||
old_isom = dqc.old_isom;
|
old_isom = DailyQcUtils.old_isom;
|
||||||
// tdata = DailyQcUtils.tdata;
|
// tdata = DailyQcUtils.tdata;
|
||||||
// zdata = DailyQcUtils.zdata;
|
// zdata = DailyQcUtils.zdata;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* get the token dqc_preprocessor_basetime, the default value is 12Z
|
* get the token dqc_preprocessor_basetime, the default value is 12Z
|
||||||
|
@ -431,14 +429,17 @@ public class DrawDQCStations {
|
||||||
if (contour_flag == 1) {
|
if (contour_flag == 1) {
|
||||||
|
|
||||||
Set<DisplayMode> mode = mpd.getDisplayMode();
|
Set<DisplayMode> mode = mpd.getDisplayMode();
|
||||||
if (md.getResourceList().containsRsc(pgp)) {
|
if (display.getDescriptor().getResourceList()
|
||||||
md.getResourceList().removeRsc(pgp);
|
.containsRsc(pgp)) {
|
||||||
|
display.getDescriptor().getResourceList()
|
||||||
|
.removeRsc(pgp);
|
||||||
pgp.dispose();
|
pgp.dispose();
|
||||||
}
|
}
|
||||||
if (mode.contains(DisplayMode.Contour)) {
|
if (mode.contains(DisplayMode.Contour)) {
|
||||||
// we are ok
|
// we are ok
|
||||||
} else {
|
} else {
|
||||||
mpd.toggleDisplayMode(DisplayMode.Contour);
|
mpd.toggleDisplayMode(DisplayMode.Contour);
|
||||||
|
mode = mpd.getDisplayMode();
|
||||||
if (mode.contains(DisplayMode.Image)) {
|
if (mode.contains(DisplayMode.Image)) {
|
||||||
mpd.toggleDisplayMode(DisplayMode.Image);
|
mpd.toggleDisplayMode(DisplayMode.Image);
|
||||||
}
|
}
|
||||||
|
@ -717,7 +718,7 @@ public class DrawDQCStations {
|
||||||
|
|
||||||
Calendar ltime = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
Calendar ltime = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||||
StringBuilder mbuf = new StringBuilder();
|
StringBuilder mbuf = new StringBuilder();
|
||||||
int dqcEndingObsTime = dqc.getEnding6HourObsTime();
|
int dqcEndingObsTime = DailyQcUtils.getEnding6HourObsTime();
|
||||||
tbuf = new StringBuilder();
|
tbuf = new StringBuilder();
|
||||||
|
|
||||||
if (qpf_on == true) {
|
if (qpf_on == true) {
|
||||||
|
@ -731,10 +732,10 @@ public class DrawDQCStations {
|
||||||
|
|
||||||
/* Precipitation period is always 12z-12z. */
|
/* Precipitation period is always 12z-12z. */
|
||||||
if ((pcpn_time < 2) && (pcpn_time_step == 0)) {
|
if ((pcpn_time < 2) && (pcpn_time_step == 0)) {
|
||||||
ltime.setTime(dqc.pdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.pdata[pcpn_day].data_time);
|
||||||
ltime.add(Calendar.SECOND, -86400);
|
ltime.add(Calendar.SECOND, -86400);
|
||||||
} else {
|
} else {
|
||||||
ltime.setTime(dqc.pdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.pdata[pcpn_day].data_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
tbuf.append("Precipitation ");
|
tbuf.append("Precipitation ");
|
||||||
|
@ -784,18 +785,18 @@ public class DrawDQCStations {
|
||||||
tbuf.append(" ending at 12z");
|
tbuf.append(" ending at 12z");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.pdata[pcpn_day].level == 1) {
|
if (DailyQcUtils.pdata[pcpn_day].level == 1) {
|
||||||
tbuf.append(" - Level 1");
|
tbuf.append(" - Level 1");
|
||||||
} else if (dqc.pdata[pcpn_day].level == 2) {
|
} else if (DailyQcUtils.pdata[pcpn_day].level == 2) {
|
||||||
tbuf.append(" - Level 2");
|
tbuf.append(" - Level 2");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.pdata[pcpn_day].used[ptime_pos] == 4) {
|
if (DailyQcUtils.pdata[pcpn_day].used[ptime_pos] == 4) {
|
||||||
tbuf.append(" Saved");
|
tbuf.append(" Saved");
|
||||||
} else if ((dqc.pdata[pcpn_day].used[ptime_pos] == 3)
|
} else if ((DailyQcUtils.pdata[pcpn_day].used[ptime_pos] == 3)
|
||||||
|| (dqc.pdata[pcpn_day].used[ptime_pos] == 2)) {
|
|| (DailyQcUtils.pdata[pcpn_day].used[ptime_pos] == 2)) {
|
||||||
tbuf.append(" Modified");
|
tbuf.append(" Modified");
|
||||||
} else if (dqc.pdata[pcpn_day].used[ptime_pos] == 1) {
|
} else if (DailyQcUtils.pdata[pcpn_day].used[ptime_pos] == 1) {
|
||||||
tbuf.append(" Not Modified");
|
tbuf.append(" Not Modified");
|
||||||
} else {
|
} else {
|
||||||
tbuf.append(" - No Data");
|
tbuf.append(" - No Data");
|
||||||
|
@ -810,19 +811,19 @@ public class DrawDQCStations {
|
||||||
if (dqcEndingObsTime == 12) {
|
if (dqcEndingObsTime == 12) {
|
||||||
/* Times: 18, 00, 06, 12 */
|
/* Times: 18, 00, 06, 12 */
|
||||||
if (pcpn_time < 1) {
|
if (pcpn_time < 1) {
|
||||||
ltime.setTime(dqc.zdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.zdata[pcpn_day].data_time);
|
||||||
ltime.add(Calendar.SECOND, -86400);
|
ltime.add(Calendar.SECOND, -86400);
|
||||||
} else {
|
} else {
|
||||||
ltime.setTime(dqc.zdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.zdata[pcpn_day].data_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Times 12, 18, 00, 06 */
|
/* Times 12, 18, 00, 06 */
|
||||||
if (pcpn_time < 2) {
|
if (pcpn_time < 2) {
|
||||||
ltime.setTime(dqc.zdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.zdata[pcpn_day].data_time);
|
||||||
ltime.add(Calendar.SECOND, -86400);
|
ltime.add(Calendar.SECOND, -86400);
|
||||||
} else {
|
} else {
|
||||||
ltime.setTime(dqc.zdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.zdata[pcpn_day].data_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -882,20 +883,20 @@ public class DrawDQCStations {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.zdata[pcpn_day].level[ptime_pos] == 1) {
|
if (DailyQcUtils.zdata[pcpn_day].level[ptime_pos] == 1) {
|
||||||
tbuf.append(" - Level 1");
|
tbuf.append(" - Level 1");
|
||||||
} else if (dqc.zdata[pcpn_day].level[ptime_pos] == 2) {
|
} else if (DailyQcUtils.zdata[pcpn_day].level[ptime_pos] == 2) {
|
||||||
tbuf.append(" - Level 2");
|
tbuf.append(" - Level 2");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.zdata[pcpn_day].used[ptime_pos] == 6) {
|
if (DailyQcUtils.zdata[pcpn_day].used[ptime_pos] == 6) {
|
||||||
tbuf.append(" Calculated");
|
tbuf.append(" Calculated");
|
||||||
} else if (dqc.zdata[pcpn_day].used[ptime_pos] == 4) {
|
} else if (DailyQcUtils.zdata[pcpn_day].used[ptime_pos] == 4) {
|
||||||
tbuf.append(" Saved");
|
tbuf.append(" Saved");
|
||||||
} else if ((dqc.zdata[pcpn_day].used[ptime_pos] == 3)
|
} else if ((DailyQcUtils.zdata[pcpn_day].used[ptime_pos] == 3)
|
||||||
|| (dqc.zdata[pcpn_day].used[ptime_pos] == 2)) {
|
|| (DailyQcUtils.zdata[pcpn_day].used[ptime_pos] == 2)) {
|
||||||
tbuf.append(" Modified");
|
tbuf.append(" Modified");
|
||||||
} else if (dqc.zdata[pcpn_day].used[ptime_pos] == 1) {
|
} else if (DailyQcUtils.zdata[pcpn_day].used[ptime_pos] == 1) {
|
||||||
tbuf.append(" Not Modified");
|
tbuf.append(" Not Modified");
|
||||||
} else {
|
} else {
|
||||||
tbuf.append(" - No Data");
|
tbuf.append(" - No Data");
|
||||||
|
@ -915,18 +916,18 @@ public class DrawDQCStations {
|
||||||
|
|
||||||
if (dqcEndingObsTime == 12) {
|
if (dqcEndingObsTime == 12) {
|
||||||
if ((pcpn_time < 1) && (pcpn_time_step == 0)) {
|
if ((pcpn_time < 1) && (pcpn_time_step == 0)) {
|
||||||
ltime.setTime(dqc.tdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.tdata[pcpn_day].data_time);
|
||||||
ltime.add(Calendar.SECOND, -86400);
|
ltime.add(Calendar.SECOND, -86400);
|
||||||
} else {
|
} else {
|
||||||
ltime.setTime(dqc.tdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.tdata[pcpn_day].data_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ((pcpn_time < 2) && (pcpn_time_step == 0)) {
|
if ((pcpn_time < 2) && (pcpn_time_step == 0)) {
|
||||||
ltime.setTime(dqc.tdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.tdata[pcpn_day].data_time);
|
||||||
ltime.add(Calendar.SECOND, -86400);
|
ltime.add(Calendar.SECOND, -86400);
|
||||||
} else {
|
} else {
|
||||||
ltime.setTime(dqc.tdata[pcpn_day].data_time);
|
ltime.setTime(DailyQcUtils.tdata[pcpn_day].data_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -994,18 +995,18 @@ public class DrawDQCStations {
|
||||||
tbuf.append(" ending at 12z");
|
tbuf.append(" ending at 12z");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.tdata[pcpn_day].level[ptime_pos] == 1) {
|
if (DailyQcUtils.tdata[pcpn_day].level[ptime_pos] == 1) {
|
||||||
tbuf.append(" - Level 1");
|
tbuf.append(" - Level 1");
|
||||||
} else if (dqc.tdata[pcpn_day].level[ptime_pos] == 2) {
|
} else if (DailyQcUtils.tdata[pcpn_day].level[ptime_pos] == 2) {
|
||||||
tbuf.append(" - Level 2");
|
tbuf.append(" - Level 2");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.tdata[pcpn_day].used[ptime_pos] == 4) {
|
if (DailyQcUtils.tdata[pcpn_day].used[ptime_pos] == 4) {
|
||||||
tbuf.append(" Saved");
|
tbuf.append(" Saved");
|
||||||
} else if ((dqc.tdata[pcpn_day].used[ptime_pos] == 3)
|
} else if ((DailyQcUtils.tdata[pcpn_day].used[ptime_pos] == 3)
|
||||||
|| (dqc.tdata[pcpn_day].used[ptime_pos] == 2)) {
|
|| (DailyQcUtils.tdata[pcpn_day].used[ptime_pos] == 2)) {
|
||||||
tbuf.append(" Modified");
|
tbuf.append(" Modified");
|
||||||
} else if (dqc.tdata[pcpn_day].used[ptime_pos] == 1) {
|
} else if (DailyQcUtils.tdata[pcpn_day].used[ptime_pos] == 1) {
|
||||||
tbuf.append(" Not Modified");
|
tbuf.append(" Not Modified");
|
||||||
} else {
|
} else {
|
||||||
tbuf.append(" - No Data");
|
tbuf.append(" - No Data");
|
||||||
|
|
|
@ -36,7 +36,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jun 17, 2009 snaples Initial creation
|
* Jun 17, 2009 snaples Initial creation
|
||||||
* May 06, 2011 #8994 jpiatt Added set precipitation value as zero
|
* May 06, 2011 #8994 jpiatt Added set precipitation value as zero
|
||||||
*
|
* Sep 04, 2014 283 cgobs Fixed possible selection of filtered-out gages
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author snaples
|
* @author snaples
|
||||||
|
@ -45,15 +45,13 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
|
|
||||||
public class GroupEditPrecipStns {
|
public class GroupEditPrecipStns {
|
||||||
|
|
||||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
|
||||||
|
|
||||||
public void group_edit_precip_stations(ReferencedCoordinate rcoord) {
|
public void group_edit_precip_stations(ReferencedCoordinate rcoord) {
|
||||||
int time_pos;
|
int time_pos;
|
||||||
int i, m, k;
|
int i, m, k;
|
||||||
float lat, lon;
|
float lat, lon;
|
||||||
double testdist, maxdist;
|
double testdist, maxdist;
|
||||||
int isave;
|
int isave;
|
||||||
int max_stations = dqc.precip_stations.size();
|
int max_stations = DailyQcUtils.precip_stations.size();
|
||||||
Coordinate coord = new Coordinate();
|
Coordinate coord = new Coordinate();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -64,7 +62,7 @@ public class GroupEditPrecipStns {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MPEDisplayManager.pcpn_time_step == 0) {
|
if (MPEDisplayManager.pcpn_time_step == 0) {
|
||||||
time_pos = dqc.pcpn_time;
|
time_pos = DailyQcUtils.pcpn_time;
|
||||||
} else {
|
} else {
|
||||||
time_pos = 4;
|
time_pos = 4;
|
||||||
|
|
||||||
|
@ -78,47 +76,61 @@ public class GroupEditPrecipStns {
|
||||||
* mouse click point.
|
* mouse click point.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < max_stations; i++) {
|
for (i = 0; i < max_stations; i++) {
|
||||||
if (dqc.pdata[dqc.pcpn_day].stn[i].frain[time_pos].data < 0) {
|
if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data < 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.pdata[dqc.pcpn_day].stn[i].frain[time_pos].data < QcPrecipOptionsDialog
|
//precip filter
|
||||||
|
if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data < QcPrecipOptionsDialog
|
||||||
.getPointFilterValue()) {
|
.getPointFilterValue()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//reverse precip filter
|
||||||
|
if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data > QcPrecipOptionsDialog
|
||||||
|
.getPointFilterReverseValue()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//elevation filter
|
||||||
|
if (DailyQcUtils.precip_stations.get(i).elev < DailyQcUtils.elevation_filter_value)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Retrieve the latitude and longitude of this station. */
|
/* Retrieve the latitude and longitude of this station. */
|
||||||
lat = dqc.precip_stations.get(i).lat;
|
lat = DailyQcUtils.precip_stations.get(i).lat;
|
||||||
lon = dqc.precip_stations.get(i).lon;
|
lon = DailyQcUtils.precip_stations.get(i).lon;
|
||||||
|
|
||||||
if (dqc.precip_stations.get(i).tip == 0
|
if (DailyQcUtils.precip_stations.get(i).tip == 0
|
||||||
&& dqc.gage_char[0] == -1) {
|
&& DailyQcUtils.gage_char[0] == -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.precip_stations.get(i).tip == 1
|
if (DailyQcUtils.precip_stations.get(i).tip == 1
|
||||||
&& dqc.gage_char[1] == -1) {
|
&& DailyQcUtils.gage_char[1] == -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (m = 0; m < dqc.tsmax; m++) {
|
for (m = 0; m < DailyQcUtils.tsmax; m++) {
|
||||||
|
|
||||||
if ((dqc.precip_stations.get(i).parm.substring(3, 5)
|
if ((DailyQcUtils.precip_stations.get(i).parm.substring(3, 5)
|
||||||
.equalsIgnoreCase(dqc.ts[m].abr))
|
.equalsIgnoreCase(DailyQcUtils.ts[m].abr))
|
||||||
&& dqc.dflag[m + 1] == 1) {
|
&& DailyQcUtils.dflag[m + 1] == 1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m == dqc.tsmax) {
|
if (m == DailyQcUtils.tsmax) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (m = 0; m < 9; m++) {
|
for (m = 0; m < 9; m++) {
|
||||||
|
|
||||||
if (m == dqc.pdata[dqc.pcpn_day].stn[i].frain[time_pos].qual
|
if (m == DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].qual
|
||||||
&& dqc.qflag[m] == 1) {
|
&& DailyQcUtils.qflag[m] == 1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,19 +155,19 @@ public class GroupEditPrecipStns {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.pdata[dqc.pcpn_day].stn[isave].frain[time_pos].qual != GroupEditStationsDialog.group_qual) {
|
if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[time_pos].qual != GroupEditStationsDialog.group_qual) {
|
||||||
QcPrecipOptionsDialog.renderGridsBtn.setEnabled(true);
|
QcPrecipOptionsDialog.renderGridsBtn.setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].frain[time_pos].qual = (short) GroupEditStationsDialog.group_qual;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[time_pos].qual = (short) GroupEditStationsDialog.group_qual;
|
||||||
|
|
||||||
if (GroupEditStationsDialog.group_qual == 1
|
if (GroupEditStationsDialog.group_qual == 1
|
||||||
&& time_pos == 4
|
&& time_pos == 4
|
||||||
&& dqc.pdata[dqc.pcpn_day].stn[isave].sflag[time_pos] == 1) {
|
&& DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].sflag[time_pos] == 1) {
|
||||||
|
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].frain[time_pos].data = dqc.pdata[dqc.pcpn_day].stn[isave].rrain[time_pos].data;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[time_pos].data = DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].rrain[time_pos].data;
|
||||||
|
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].sflag[time_pos] = -1;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].sflag[time_pos] = -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +176,7 @@ public class GroupEditPrecipStns {
|
||||||
|| GroupEditStationsDialog.group_qual == 0 || GroupEditStationsDialog.group_qual == 8)) {
|
|| GroupEditStationsDialog.group_qual == 0 || GroupEditStationsDialog.group_qual == 8)) {
|
||||||
|
|
||||||
for (k = 0; k < 4; k++) {
|
for (k = 0; k < 4; k++) {
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].frain[k].qual = (short) GroupEditStationsDialog.group_qual;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[k].qual = (short) GroupEditStationsDialog.group_qual;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -176,12 +188,12 @@ public class GroupEditPrecipStns {
|
||||||
* and QC codes to "Manual"
|
* and QC codes to "Manual"
|
||||||
*/
|
*/
|
||||||
if (GroupEditStationsDialog.group_qual == 2) {
|
if (GroupEditStationsDialog.group_qual == 2) {
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].frain[time_pos].data = 0.0f;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[time_pos].data = 0.0f;
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].frain[time_pos].qual = 2;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[time_pos].qual = 2;
|
||||||
if ((dqc.pdata[dqc.pcpn_day].stn[isave].frain[4].data - 0.0) < 0.0001) {
|
if ((DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[4].data - 0.0) < 0.0001) {
|
||||||
for (k = 0; k < 4; k++) {
|
for (k = 0; k < 4; k++) {
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].frain[k].data = 0.0f;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[k].data = 0.0f;
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].frain[k].qual = 2;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[k].qual = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,23 +202,23 @@ public class GroupEditPrecipStns {
|
||||||
|
|
||||||
if (time_pos != 4
|
if (time_pos != 4
|
||||||
&& GroupEditStationsDialog.group_qual == 1
|
&& GroupEditStationsDialog.group_qual == 1
|
||||||
&& dqc.pdata[dqc.pcpn_day].stn[isave].frain[4].qual != 5
|
&& DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[4].qual != 5
|
||||||
&& dqc.pdata[dqc.pcpn_day].stn[isave].frain[4].qual != 4) {
|
&& DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[4].qual != 4) {
|
||||||
dqc.pdata[dqc.pcpn_day].stn[isave].frain[4].qual = (short) GroupEditStationsDialog.group_qual;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[isave].frain[4].qual = (short) GroupEditStationsDialog.group_qual;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (k = 0; k < 5; k++) {
|
for (k = 0; k < 5; k++) {
|
||||||
|
|
||||||
if (k < 4) {
|
if (k < 4) {
|
||||||
time_pos = dqc.pcpn_day * 4 + k;
|
time_pos = DailyQcUtils.pcpn_day * 4 + k;
|
||||||
} else {
|
} else {
|
||||||
time_pos = 40 + dqc.pcpn_day;
|
time_pos = 40 + DailyQcUtils.pcpn_day;
|
||||||
}
|
}
|
||||||
|
|
||||||
dqc.pcp_in_use[time_pos] = -1;
|
DailyQcUtils.pcp_in_use[time_pos] = -1;
|
||||||
|
|
||||||
if (dqc.pdata[dqc.pcpn_day].used[k] != 0) {
|
if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].used[k] != 0) {
|
||||||
dqc.pdata[dqc.pcpn_day].used[k] = 2;
|
DailyQcUtils.pdata[DailyQcUtils.pcpn_day].used[k] = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1032,7 +1032,7 @@ public class SaveLevel2Data {
|
||||||
|
|
||||||
/* build map file */
|
/* build map file */
|
||||||
System.out.println("Building MAP .");
|
System.out.println("Building MAP .");
|
||||||
found: for (m = 0; mean_areal_precip_global[m].hb5 != ""; m++) {
|
found: for (m = 0; mean_areal_precip_global[m] != null; m++) {
|
||||||
for (k = 0; k < 4; k++) {
|
for (k = 0; k < 4; k++) {
|
||||||
|
|
||||||
num = j * 4 + 3 - k;
|
num = j * 4 + 3 - k;
|
||||||
|
@ -1047,9 +1047,11 @@ public class SaveLevel2Data {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mean_areal_precip_global[m].hb5 == "") {
|
if (mean_areal_precip_global[m] != null) {
|
||||||
|
if (mean_areal_precip_global[m].hb5 == "") {
|
||||||
System.out.println("MAP.hb5 is empty, continuing. ");
|
System.out.println("MAP.hb5 is empty, continuing. ");
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gm.setTime(dqc.pdata[j].data_time);
|
gm.setTime(dqc.pdata[j].data_time);
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.eclipse.swt.graphics.Font;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Button;
|
import org.eclipse.swt.widgets.Button;
|
||||||
|
import org.eclipse.swt.widgets.Combo;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Group;
|
import org.eclipse.swt.widgets.Group;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
|
@ -63,6 +64,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* Jan 29, 2014 16561 snaples Updated processDrawPrecipValue to remove polygon wireframe after setting value.
|
* Jan 29, 2014 16561 snaples Updated processDrawPrecipValue to remove polygon wireframe after setting value.
|
||||||
* Feb 2, 2014 16201 snaples Added saved data flag support
|
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||||
* Apr 28, 2014 16707 snaples Added code to save and set location of dialog box when moved.
|
* Apr 28, 2014 16707 snaples Added code to save and set location of dialog box when moved.
|
||||||
|
* Jan 12, 2015 16993 snaples Restored code for Substitute Field Combo box.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -78,6 +80,9 @@ public class DrawPolygonDlg extends CaveSWTDialog {
|
||||||
|
|
||||||
private static final String MAKE_PERSISTENT = "Make Persistent";
|
private static final String MAKE_PERSISTENT = "Make Persistent";
|
||||||
|
|
||||||
|
private DisplayFieldData[] displayFieldDataArray;
|
||||||
|
private String[] displayTypeNameArray;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bold Font.
|
* Bold Font.
|
||||||
*/
|
*/
|
||||||
|
@ -88,6 +93,11 @@ public class DrawPolygonDlg extends CaveSWTDialog {
|
||||||
*/
|
*/
|
||||||
private Font font = null;
|
private Font font = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The field type selection Combo control.
|
||||||
|
*/
|
||||||
|
private Combo fieldTypeCombo = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The precip value spinner control.
|
* The precip value spinner control.
|
||||||
*/
|
*/
|
||||||
|
@ -227,7 +237,7 @@ public class DrawPolygonDlg extends CaveSWTDialog {
|
||||||
GridData gd = new GridData(345, SWT.DEFAULT);
|
GridData gd = new GridData(345, SWT.DEFAULT);
|
||||||
subGroup.setLayoutData(gd);
|
subGroup.setLayoutData(gd);
|
||||||
|
|
||||||
getSubChecks(subGroup);
|
createFieldCombo(subGroup);
|
||||||
|
|
||||||
// Create Substitute button
|
// Create Substitute button
|
||||||
final Button subBtn = new Button(subGroup, SWT.PUSH);
|
final Button subBtn = new Button(subGroup, SWT.PUSH);
|
||||||
|
@ -349,398 +359,80 @@ public class DrawPolygonDlg extends CaveSWTDialog {
|
||||||
* @param groupComp
|
* @param groupComp
|
||||||
* The group composite
|
* The group composite
|
||||||
*/
|
*/
|
||||||
private void getSubChecks(Group groupComp) {
|
private void createFieldCombo(Group groupComp) {
|
||||||
// Spacer
|
// Spacer
|
||||||
Label spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
// Create a container to hold the label and the combo box.
|
||||||
|
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||||
|
Composite prodListComp = new Composite(shell, SWT.NONE);
|
||||||
|
GridLayout prodListCompLayout = new GridLayout(2, false);
|
||||||
|
prodListComp.setLayout(prodListCompLayout);
|
||||||
|
prodListComp.setLayoutData(gd);
|
||||||
|
|
||||||
Button radarMosaicChk = new Button(groupComp, SWT.RADIO);
|
gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
|
||||||
GridData gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
Label fieldTypeLabel = new Label(prodListComp, SWT.CENTER);
|
||||||
radarMosaicChk.setLayoutData(gd);
|
fieldTypeLabel.setText(SUBSTITUTE_VALUE_TEXT);
|
||||||
radarMosaicChk.setText("Radar Mosaic");
|
fieldTypeLabel.setLayoutData(gd);
|
||||||
radarMosaicChk.setFont(font);
|
|
||||||
radarMosaicChk.setLayoutData(gd);
|
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||||
// Default to radar mosaic on dialog creation
|
fieldTypeCombo = new Combo(groupComp, SWT.LEFT | SWT.DROP_DOWN
|
||||||
radarMosaicChk.setSelection(true);
|
| SWT.READ_ONLY);
|
||||||
subType = DisplayFieldData.rMosaic;
|
|
||||||
radarMosaicChk.addSelectionListener(new SelectionAdapter() {
|
if (displayFieldDataArray == null)
|
||||||
|
{
|
||||||
|
displayFieldDataArray = MPEDisplayManager.mpe_qpe_fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Label spaceLabel = new Label(groupComp, SWT.NONE);
|
||||||
|
// spaceLabel.setText("***** ");
|
||||||
|
|
||||||
|
int selectedFieldIndex = 0;
|
||||||
|
|
||||||
|
//find the index of the selected field
|
||||||
|
for (selectedFieldIndex = 0; selectedFieldIndex < displayFieldDataArray.length; selectedFieldIndex++)
|
||||||
|
{
|
||||||
|
if (displayFieldDataArray[selectedFieldIndex] == subType)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//create and initialize the display field type name array
|
||||||
|
displayTypeNameArray = new String[displayFieldDataArray.length];
|
||||||
|
|
||||||
|
for (int i = 0; i < displayFieldDataArray.length; i++) {
|
||||||
|
|
||||||
|
String fieldName = displayFieldDataArray[i].toString();
|
||||||
|
// System.out.println("DrawPolygon.createFieldCombo(): FieldName = :" + fieldName + ":");
|
||||||
|
displayTypeNameArray[i] = fieldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
//select the field
|
||||||
|
fieldTypeCombo.setTextLimit(35);
|
||||||
|
fieldTypeCombo.setLayoutData(gd);
|
||||||
|
fieldTypeCombo.setItems(displayTypeNameArray);
|
||||||
|
fieldTypeCombo.select(selectedFieldIndex);
|
||||||
|
|
||||||
|
fieldTypeCombo.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
subType = DisplayFieldData.rMosaic;
|
String selectedFieldString = fieldTypeCombo.getText();
|
||||||
}
|
// System.out.println("DrawPolygon.createFieldCombo(): selectedFieldString = " +
|
||||||
|
// selectedFieldString);
|
||||||
|
|
||||||
|
subType = DisplayFieldData.fromDisplayNameString(selectedFieldString);
|
||||||
|
|
||||||
|
// if (subType != null)
|
||||||
|
// {
|
||||||
|
// System.out.println("DrawPolygon.createFieldCombo(): subType = " +
|
||||||
|
// subType.toString());
|
||||||
|
// }
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button avgRadarMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
avgRadarMosaicChk.setLayoutData(gd);
|
|
||||||
avgRadarMosaicChk.setText("Average Radar Mosaic");
|
|
||||||
avgRadarMosaicChk.setFont(font);
|
|
||||||
avgRadarMosaicChk.setLayoutData(gd);
|
|
||||||
avgRadarMosaicChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.avgrMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button maxRadarMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
maxRadarMosaicChk.setLayoutData(gd);
|
|
||||||
maxRadarMosaicChk.setText("Max Radar Mosaic");
|
|
||||||
maxRadarMosaicChk.setFont(font);
|
|
||||||
maxRadarMosaicChk.setLayoutData(gd);
|
|
||||||
maxRadarMosaicChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.maxrMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button fieldBiasRadarMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
fieldBiasRadarMosaicChk.setLayoutData(gd);
|
|
||||||
fieldBiasRadarMosaicChk.setText("Field Bias Radar Mosaic");
|
|
||||||
fieldBiasRadarMosaicChk.setFont(font);
|
|
||||||
fieldBiasRadarMosaicChk.setLayoutData(gd);
|
|
||||||
fieldBiasRadarMosaicChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.bMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button localBiasRadarMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
localBiasRadarMosaicChk.setLayoutData(gd);
|
|
||||||
localBiasRadarMosaicChk.setText("Local Bias Radar Mosaic");
|
|
||||||
localBiasRadarMosaicChk.setFont(font);
|
|
||||||
localBiasRadarMosaicChk.setLayoutData(gd);
|
|
||||||
localBiasRadarMosaicChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.lMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button gageOnlyChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
gageOnlyChk.setLayoutData(gd);
|
|
||||||
gageOnlyChk.setText("Gage Only Analysis");
|
|
||||||
gageOnlyChk.setFont(font);
|
|
||||||
gageOnlyChk.setLayoutData(gd);
|
|
||||||
gageOnlyChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.gageOnly;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button multiSensorMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
multiSensorMosaicChk.setLayoutData(gd);
|
|
||||||
multiSensorMosaicChk.setText("Multisensor Mosaic");
|
|
||||||
multiSensorMosaicChk.setFont(font);
|
|
||||||
multiSensorMosaicChk.setLayoutData(gd);
|
|
||||||
multiSensorMosaicChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.mMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button localBiasMultiSensorMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
localBiasMultiSensorMosaicChk.setLayoutData(gd);
|
|
||||||
localBiasMultiSensorMosaicChk.setText("Local Bias Multisensor Mosaic");
|
|
||||||
localBiasMultiSensorMosaicChk.setFont(font);
|
|
||||||
localBiasMultiSensorMosaicChk.setLayoutData(gd);
|
|
||||||
localBiasMultiSensorMosaicChk
|
|
||||||
.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.mlMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button satPrecipChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
satPrecipChk.setLayoutData(gd);
|
|
||||||
satPrecipChk.setText("Satellite Precip");
|
|
||||||
satPrecipChk.setFont(font);
|
|
||||||
satPrecipChk.setLayoutData(gd);
|
|
||||||
satPrecipChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.satPre;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button localBiasSatPrecipChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
localBiasSatPrecipChk.setLayoutData(gd);
|
|
||||||
localBiasSatPrecipChk.setText("Local Bias Satellite Precip");
|
|
||||||
localBiasSatPrecipChk.setFont(font);
|
|
||||||
localBiasSatPrecipChk.setLayoutData(gd);
|
|
||||||
localBiasSatPrecipChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.lsatPre;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button satRadarMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
satRadarMosaicChk.setLayoutData(gd);
|
|
||||||
satRadarMosaicChk.setText("Satellite Radar Mosaic");
|
|
||||||
satRadarMosaicChk.setFont(font);
|
|
||||||
satRadarMosaicChk.setLayoutData(gd);
|
|
||||||
satRadarMosaicChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.srMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button satGageMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
satGageMosaicChk.setLayoutData(gd);
|
|
||||||
satGageMosaicChk.setText("Satellite Gage Mosaic");
|
|
||||||
satGageMosaicChk.setFont(font);
|
|
||||||
satGageMosaicChk.setLayoutData(gd);
|
|
||||||
satGageMosaicChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.sgMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button satRadarGageMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
satRadarGageMosaicChk.setLayoutData(gd);
|
|
||||||
satRadarGageMosaicChk.setText("Satellite Radar Gage Mosaic");
|
|
||||||
satRadarGageMosaicChk.setFont(font);
|
|
||||||
satRadarGageMosaicChk.setLayoutData(gd);
|
|
||||||
satRadarGageMosaicChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.srgMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button triangulatedLocalBiasMosaicChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
triangulatedLocalBiasMosaicChk.setLayoutData(gd);
|
|
||||||
triangulatedLocalBiasMosaicChk
|
|
||||||
.setText("Triangulated Local Bias Mosaic");
|
|
||||||
triangulatedLocalBiasMosaicChk.setFont(font);
|
|
||||||
triangulatedLocalBiasMosaicChk.setLayoutData(gd);
|
|
||||||
triangulatedLocalBiasMosaicChk
|
|
||||||
.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.p3lMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button bestEstQPEChk = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
bestEstQPEChk.setLayoutData(gd);
|
|
||||||
bestEstQPEChk.setText("Best Estimate QPE");
|
|
||||||
bestEstQPEChk.setFont(font);
|
|
||||||
bestEstQPEChk.setLayoutData(gd);
|
|
||||||
bestEstQPEChk.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.Xmrg;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button rfcFieldBiasMosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
rfcFieldBiasMosaic.setLayoutData(gd);
|
|
||||||
rfcFieldBiasMosaic.setText("RFC Field Bias Mosaic");
|
|
||||||
rfcFieldBiasMosaic.setFont(font);
|
|
||||||
rfcFieldBiasMosaic.setLayoutData(gd);
|
|
||||||
rfcFieldBiasMosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.rfcbMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button rfcMultiSensorMosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
rfcMultiSensorMosaic.setLayoutData(gd);
|
|
||||||
rfcMultiSensorMosaic.setText("RFC Multisensor Mosaic");
|
|
||||||
rfcMultiSensorMosaic.setFont(font);
|
|
||||||
rfcMultiSensorMosaic.setLayoutData(gd);
|
|
||||||
rfcMultiSensorMosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.rfcmMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button rawQ2Mosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
rawQ2Mosaic.setLayoutData(gd);
|
|
||||||
rawQ2Mosaic.setText("Raw Q2 Mosaic");
|
|
||||||
rawQ2Mosaic.setFont(font);
|
|
||||||
rawQ2Mosaic.setLayoutData(gd);
|
|
||||||
rawQ2Mosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.qmosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button localBQ2Mosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
localBQ2Mosaic.setLayoutData(gd);
|
|
||||||
localBQ2Mosaic.setText("Local Bias Q2 Mosaic");
|
|
||||||
localBQ2Mosaic.setFont(font);
|
|
||||||
localBQ2Mosaic.setLayoutData(gd);
|
|
||||||
localBQ2Mosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.lqmosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button mQ2Mosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
mQ2Mosaic.setLayoutData(gd);
|
|
||||||
mQ2Mosaic.setText("Multisensor Q2 Mosaic");
|
|
||||||
mQ2Mosaic.setFont(font);
|
|
||||||
mQ2Mosaic.setLayoutData(gd);
|
|
||||||
mQ2Mosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.mlqmosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button local1Mosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
local1Mosaic.setLayoutData(gd);
|
|
||||||
local1Mosaic.setText("Local Field #1");
|
|
||||||
local1Mosaic.setFont(font);
|
|
||||||
local1Mosaic.setLayoutData(gd);
|
|
||||||
local1Mosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.localField1;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button local2Mosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
local2Mosaic.setLayoutData(gd);
|
|
||||||
local2Mosaic.setText("Local Field #2");
|
|
||||||
local2Mosaic.setFont(font);
|
|
||||||
local2Mosaic.setLayoutData(gd);
|
|
||||||
local2Mosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.localField2;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button local3Mosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
local3Mosaic.setLayoutData(gd);
|
|
||||||
local3Mosaic.setText("Local Field #3");
|
|
||||||
local3Mosaic.setFont(font);
|
|
||||||
local3Mosaic.setLayoutData(gd);
|
|
||||||
local3Mosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.localField3;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
spaceLabel = new Label(groupComp, SWT.NONE);
|
|
||||||
spaceLabel.setText(" ");
|
|
||||||
|
|
||||||
Button rfcQpeMosaic = new Button(groupComp, SWT.RADIO);
|
|
||||||
gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);
|
|
||||||
rfcQpeMosaic.setLayoutData(gd);
|
|
||||||
rfcQpeMosaic.setText("RFC QPE Mosaic");
|
|
||||||
rfcQpeMosaic.setFont(font);
|
|
||||||
rfcQpeMosaic.setLayoutData(gd);
|
|
||||||
rfcQpeMosaic.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent event) {
|
|
||||||
subType = DisplayFieldData.rfcMosaic;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the selection.
|
* Process the selection.
|
||||||
|
|
|
@ -58,8 +58,6 @@ public class PostAnalysisManager
|
||||||
private XmrgFile.XmrgHeader xmrgHeader = null;
|
private XmrgFile.XmrgHeader xmrgHeader = null;
|
||||||
private boolean misbin[][] = getMisBin();
|
private boolean misbin[][] = getMisBin();
|
||||||
|
|
||||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
|
||||||
|
|
||||||
private static final double MISSING_VALUE = -9999.0;
|
private static final double MISSING_VALUE = -9999.0;
|
||||||
|
|
||||||
private static final double MM_PER_INCH = 25.4;
|
private static final double MM_PER_INCH = 25.4;
|
||||||
|
@ -88,14 +86,14 @@ public class PostAnalysisManager
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getSelectedDate()
|
public static Date getSelectedDate()
|
||||||
{
|
{
|
||||||
Date date = dqc.pdata[dqc.pcpn_day].data_time;
|
Date date = DailyQcUtils.pdata[DailyQcUtils.pcpn_day].data_time;
|
||||||
|
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSelectedDateString()
|
public static String getSelectedDateString()
|
||||||
{
|
{
|
||||||
String header = "postAnalysisManager.getSelectedDateString(): ";
|
String header = "postAnalysisManager.getSelectedDateString(): ";
|
||||||
|
|
||||||
|
@ -116,7 +114,7 @@ public class PostAnalysisManager
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String get24HourGageOnlyFilePath()
|
public static String get24HourGageOnlyFilePath()
|
||||||
{
|
{
|
||||||
String filePath = null;
|
String filePath = null;
|
||||||
final String mpe_grid_precip_dir_tok = "mpe_grid_precip_dir";
|
final String mpe_grid_precip_dir_tok = "mpe_grid_precip_dir";
|
||||||
|
@ -124,9 +122,9 @@ public class PostAnalysisManager
|
||||||
|
|
||||||
String mpe_grid_precip_dir = ad.getToken(mpe_grid_precip_dir_tok);
|
String mpe_grid_precip_dir = ad.getToken(mpe_grid_precip_dir_tok);
|
||||||
|
|
||||||
String currentQcArea = dqc.currentQcArea;
|
String currentQcArea = DailyQcUtils.currentQcArea;
|
||||||
|
|
||||||
String dateString = getSelectedDateString();
|
String dateString = PostAnalysisManager.getSelectedDateString();
|
||||||
|
|
||||||
// String dateString = "20140112";
|
// String dateString = "20140112";
|
||||||
|
|
||||||
|
@ -232,7 +230,7 @@ public class PostAnalysisManager
|
||||||
|
|
||||||
String[] fileNameArray = fileDirectory.list();
|
String[] fileNameArray = fileDirectory.list();
|
||||||
|
|
||||||
int precipDay = dqc.pcpn_day;
|
int precipDay = DailyQcUtils.pcpn_day;
|
||||||
|
|
||||||
|
|
||||||
List<String> filteredFileNameList = filterFileNames(precipDay, fileNameArray);
|
List<String> filteredFileNameList = filterFileNames(precipDay, fileNameArray);
|
||||||
|
@ -270,9 +268,9 @@ public class PostAnalysisManager
|
||||||
return endTime;
|
return endTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double[][] get24HourTotalPrecip(int height, int width, double scaleFactor)
|
public static double[][] get24HourTotalPrecip(int height, int width, double scaleFactor)
|
||||||
{
|
{
|
||||||
Date endDate = getSelectedDate();
|
Date endDate = PostAnalysisManager.getSelectedDate();
|
||||||
// System.out.println("PostAnalysisManager.getEndTime() = " + endDate);
|
// System.out.println("PostAnalysisManager.getEndTime() = " + endDate);
|
||||||
double missingValue = -999.0;
|
double missingValue = -999.0;
|
||||||
|
|
||||||
|
@ -352,8 +350,8 @@ public class PostAnalysisManager
|
||||||
double distanceSquared;
|
double distanceSquared;
|
||||||
double nearestDistanceSquared = 9999999.0;
|
double nearestDistanceSquared = 9999999.0;
|
||||||
|
|
||||||
int XOR = dqc.getHrap_grid().hrap_minx;
|
int XOR = DailyQcUtils.getHrap_grid().hrap_minx;
|
||||||
int YOR = dqc.getHrap_grid().hrap_miny;
|
int YOR = DailyQcUtils.getHrap_grid().hrap_miny;
|
||||||
|
|
||||||
// Find the distance to the nearest precip station from this HRAP
|
// Find the distance to the nearest precip station from this HRAP
|
||||||
// bin at [i][j]
|
// bin at [i][j]
|
||||||
|
@ -389,7 +387,7 @@ public class PostAnalysisManager
|
||||||
{
|
{
|
||||||
String header = "PostAnalysisManager.create3DGridArray(): ";
|
String header = "PostAnalysisManager.create3DGridArray(): ";
|
||||||
|
|
||||||
Hrap_Grid hrap_grid = dqc.getHrap_grid();
|
Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
||||||
int maxI = hrap_grid.maxi;
|
int maxI = hrap_grid.maxi;
|
||||||
int maxJ = hrap_grid.maxj;
|
int maxJ = hrap_grid.maxj;
|
||||||
|
|
||||||
|
@ -408,7 +406,7 @@ public class PostAnalysisManager
|
||||||
{
|
{
|
||||||
//String header = "PostAnalysisManager.create2DGridArray(): ";
|
//String header = "PostAnalysisManager.create2DGridArray(): ";
|
||||||
|
|
||||||
Hrap_Grid hrap_grid = dqc.getHrap_grid();
|
Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
||||||
int maxCols = hrap_grid.maxi;
|
int maxCols = hrap_grid.maxi;
|
||||||
int maxRows = hrap_grid.maxj;
|
int maxRows = hrap_grid.maxj;
|
||||||
|
|
||||||
|
@ -992,7 +990,7 @@ public class PostAnalysisManager
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Hrap_Grid grid = dqc.getHrap_grid();
|
Hrap_Grid grid = DailyQcUtils.getHrap_grid();
|
||||||
|
|
||||||
int maxJ = grid.maxj;
|
int maxJ = grid.maxj;
|
||||||
int maxI = grid.maxi;
|
int maxI = grid.maxi;
|
||||||
|
@ -1249,8 +1247,8 @@ public class PostAnalysisManager
|
||||||
|
|
||||||
{
|
{
|
||||||
String header = "PostAnalysisManager.mergeData(): ";
|
String header = "PostAnalysisManager.mergeData(): ";
|
||||||
int MAXX = dqc.getHrap_grid().maxi;
|
int MAXX = DailyQcUtils.getHrap_grid().maxi;
|
||||||
int MAXY = dqc.getHrap_grid().maxj;
|
int MAXY = DailyQcUtils.getHrap_grid().maxj;
|
||||||
|
|
||||||
double logRHat;
|
double logRHat;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -1258,10 +1256,10 @@ public class PostAnalysisManager
|
||||||
double weightingFactor;
|
double weightingFactor;
|
||||||
int precipStationCount;
|
int precipStationCount;
|
||||||
|
|
||||||
// List<Station> precipStationList = dqc.precip_stations;
|
List<Station> precipStationList = DailyQcUtils.precip_stations;
|
||||||
|
|
||||||
|
|
||||||
precipStationCount = dqc.precip_stations.size();
|
precipStationCount = precipStationList.size();
|
||||||
|
|
||||||
logRHat = Math.log((double) rhat);
|
logRHat = Math.log((double) rhat);
|
||||||
|
|
||||||
|
@ -1316,7 +1314,7 @@ public class PostAnalysisManager
|
||||||
//System.out.println(header + "merge section");
|
//System.out.println(header + "merge section");
|
||||||
|
|
||||||
weightingFactor = computeObservedWeight (i, j, logRHat,
|
weightingFactor = computeObservedWeight (i, j, logRHat,
|
||||||
dqc.precip_stations, precipStationCount, estimatedScale);
|
precipStationList, precipStationCount, estimatedScale);
|
||||||
|
|
||||||
double mergedValueInInches = weightingFactor * gageOnlyGridValueInInches +
|
double mergedValueInInches = weightingFactor * gageOnlyGridValueInInches +
|
||||||
(1.0 - weightingFactor) * qpeInches;
|
(1.0 - weightingFactor) * qpeInches;
|
||||||
|
|
|
@ -63,7 +63,6 @@ public class SummedHourlyMpeDlg extends BasePostAnalysisDlg
|
||||||
|
|
||||||
private static final int SECONDS_PER_HOUR = 3600;
|
private static final int SECONDS_PER_HOUR = 3600;
|
||||||
private static final int SECONDS_PER_DAY = 24 * SECONDS_PER_HOUR;
|
private static final int SECONDS_PER_DAY = 24 * SECONDS_PER_HOUR;
|
||||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
|
||||||
|
|
||||||
/** Bundle file location */
|
/** Bundle file location */
|
||||||
//private static final String BUNDLE_LOC = "bundles/MPE/postAnalysisBundle.xml";
|
//private static final String BUNDLE_LOC = "bundles/MPE/postAnalysisBundle.xml";
|
||||||
|
@ -80,11 +79,10 @@ public class SummedHourlyMpeDlg extends BasePostAnalysisDlg
|
||||||
|
|
||||||
setResourceType1(PAResourceType.XMRG);
|
setResourceType1(PAResourceType.XMRG);
|
||||||
setResourceType2(PAResourceType.ASCII_XMRG);
|
setResourceType2(PAResourceType.ASCII_XMRG);
|
||||||
PostAnalysisManager paMgr = new PostAnalysisManager();
|
|
||||||
|
|
||||||
// 24 accumulated 1-hour precip grids
|
// 24 accumulated 1-hour precip grids
|
||||||
|
|
||||||
Hrap_Grid grid = dqc.getHrap_grid();
|
Hrap_Grid grid = DailyQcUtils.getHrap_grid();
|
||||||
int wfoMinX = grid.hrap_minx;
|
int wfoMinX = grid.hrap_minx;
|
||||||
int wfoMinY = grid.hrap_miny;
|
int wfoMinY = grid.hrap_miny;
|
||||||
int width = grid.maxi;
|
int width = grid.maxi;
|
||||||
|
@ -97,7 +95,7 @@ public class SummedHourlyMpeDlg extends BasePostAnalysisDlg
|
||||||
|
|
||||||
|
|
||||||
float scaleFactor = 25.4f * 100.0f;
|
float scaleFactor = 25.4f * 100.0f;
|
||||||
double[][] totalPrecipGrid = paMgr.get24HourTotalPrecip(height, width, scaleFactor);
|
double[][] totalPrecipGrid = PostAnalysisManager.get24HourTotalPrecip(height, width, scaleFactor);
|
||||||
|
|
||||||
|
|
||||||
//floatArray units are hundredths of MM
|
//floatArray units are hundredths of MM
|
||||||
|
@ -106,7 +104,7 @@ public class SummedHourlyMpeDlg extends BasePostAnalysisDlg
|
||||||
setDataArray1(floatArray);
|
setDataArray1(floatArray);
|
||||||
|
|
||||||
//24 hour gage only
|
//24 hour gage only
|
||||||
String dataFilePath2 = paMgr.get24HourGageOnlyFilePath();
|
String dataFilePath2 = PostAnalysisManager.get24HourGageOnlyFilePath();
|
||||||
setDataFileName2(dataFilePath2);
|
setDataFileName2(dataFilePath2);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -116,12 +114,12 @@ public class SummedHourlyMpeDlg extends BasePostAnalysisDlg
|
||||||
private float[] convertToFloatArray(double[][] totalPrecipGrid, float unitConversionFactor)
|
private float[] convertToFloatArray(double[][] totalPrecipGrid, float unitConversionFactor)
|
||||||
{
|
{
|
||||||
String header = "SummedHourlyMpeDlg.convertToFloatArray(qpeAccum24hr): ";
|
String header = "SummedHourlyMpeDlg.convertToFloatArray(qpeAccum24hr): ";
|
||||||
Hrap_Grid hrap_grid = dqc.getHrap_grid();
|
Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
||||||
int maxCols = hrap_grid.maxi;
|
int maxCols = hrap_grid.maxi;
|
||||||
int maxRows = hrap_grid.maxj;
|
int maxRows = hrap_grid.maxj;
|
||||||
int precipDay = dqc.pcpn_day;
|
int precipDay = DailyQcUtils.pcpn_day;
|
||||||
|
|
||||||
System.out.println(header + "DailyQcUtils.pcpn_day = " + dqc.pcpn_day);
|
System.out.println(header + "DailyQcUtils.pcpn_day = " + DailyQcUtils.pcpn_day);
|
||||||
System.out.println(header + "precipDay = " + precipDay);
|
System.out.println(header + "precipDay = " + precipDay);
|
||||||
float[] valueArray = new float[maxRows*maxCols];
|
float[] valueArray = new float[maxRows*maxCols];
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,8 @@ import com.raytheon.viz.mpe.ui.actions.DrawDQCStations;
|
||||||
import com.raytheon.viz.mpe.ui.actions.OtherPrecipOptions;
|
import com.raytheon.viz.mpe.ui.actions.OtherPrecipOptions;
|
||||||
import com.raytheon.viz.mpe.util.CreateMap;
|
import com.raytheon.viz.mpe.util.CreateMap;
|
||||||
import com.raytheon.viz.mpe.util.DailyQcUtils;
|
import com.raytheon.viz.mpe.util.DailyQcUtils;
|
||||||
|
import com.raytheon.viz.mpe.util.DailyQcUtils.Hrap_Grid;
|
||||||
|
import com.raytheon.viz.mpe.util.DailyQcUtils.Pcp;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
import com.vividsolutions.jts.geom.GeometryFactory;
|
import com.vividsolutions.jts.geom.GeometryFactory;
|
||||||
|
|
||||||
|
@ -97,10 +99,6 @@ public class PlotGriddedPrecipResource extends
|
||||||
IMpeResource {
|
IMpeResource {
|
||||||
|
|
||||||
MPEDisplayManager displayMgr = null;
|
MPEDisplayManager displayMgr = null;
|
||||||
|
|
||||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
|
||||||
|
|
||||||
private DrawDQCStations ddq = DrawDQCStations.getInstance();
|
|
||||||
|
|
||||||
private GriddedImageDisplay2 gridDisplay;
|
private GriddedImageDisplay2 gridDisplay;
|
||||||
|
|
||||||
|
@ -124,11 +122,11 @@ public class PlotGriddedPrecipResource extends
|
||||||
|
|
||||||
int display_flag;
|
int display_flag;
|
||||||
|
|
||||||
// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
||||||
|
|
||||||
// Pcp pcp = DailyQcUtils.pcp;
|
Pcp pcp = DailyQcUtils.pcp;
|
||||||
|
|
||||||
// Pcp spf = DailyQcUtils.spf;
|
Pcp spf = DailyQcUtils.spf;
|
||||||
|
|
||||||
private ColorMapParameters parameters = new ColorMapParameters();
|
private ColorMapParameters parameters = new ColorMapParameters();
|
||||||
|
|
||||||
|
@ -143,7 +141,7 @@ public class PlotGriddedPrecipResource extends
|
||||||
this.colorSet = colorSet;
|
this.colorSet = colorSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorMap precip_colormap = ddq.colorMap;
|
ColorMap precip_colormap = DrawDQCStations.colorMap;
|
||||||
|
|
||||||
RGB color = null;
|
RGB color = null;
|
||||||
|
|
||||||
|
@ -154,8 +152,8 @@ public class PlotGriddedPrecipResource extends
|
||||||
public void plot_gridded_precip(String prefix, int num, int mnum) {
|
public void plot_gridded_precip(String prefix, int num, int mnum) {
|
||||||
int pcpn_time_step = MPEDisplayManager.pcpn_time_step;
|
int pcpn_time_step = MPEDisplayManager.pcpn_time_step;
|
||||||
int rsmode = OtherPrecipOptions.rsmode;
|
int rsmode = OtherPrecipOptions.rsmode;
|
||||||
boolean wfo_all = dqc.wfo_all;
|
boolean wfo_all = DailyQcUtils.wfo_all;
|
||||||
int[] wfo_in_use = dqc.wfo_in_use;
|
int[] wfo_in_use = DailyQcUtils.wfo_in_use;
|
||||||
CreateMap cm = new CreateMap();
|
CreateMap cm = new CreateMap();
|
||||||
float value = 0;
|
float value = 0;
|
||||||
|
|
||||||
|
@ -225,37 +223,37 @@ public class PlotGriddedPrecipResource extends
|
||||||
if (num == 0) {
|
if (num == 0) {
|
||||||
i1 = 0;
|
i1 = 0;
|
||||||
}
|
}
|
||||||
if (dqc.pcp_in_use[num + mnum] != -1
|
if (DailyQcUtils.pcp_in_use[num + mnum] != -1
|
||||||
&& dqc.pcp_in_use[num + mnum - i1] != -1) {
|
&& DailyQcUtils.pcp_in_use[num + mnum - i1] != -1) {
|
||||||
cm.read_file(file, num + mnum, dqc.spf);
|
cm.read_file(file, num + mnum, spf);
|
||||||
cm.read_file(file, num + mnum - i1, dqc.pcp);
|
cm.read_file(file, num + mnum - i1, pcp);
|
||||||
|
|
||||||
for (i = 0; i < (dqc.getHrap_grid().maxi - dqc.getHrap_grid().hrap_minx) - 1; i++) {
|
for (i = 0; i < (hrap_grid.maxi - hrap_grid.hrap_minx) - 1; i++) {
|
||||||
for (j = 0; j < dqc.getHrap_grid().maxj - dqc.getHrap_grid().hrap_miny - 1; j++) {
|
for (j = 0; j < hrap_grid.maxj - hrap_grid.hrap_miny - 1; j++) {
|
||||||
dqc.spf.value[i][j] = (dqc.spf.value[i][j] + dqc.pcp.value[i][j]) / 2;
|
spf.value[i][j] = (spf.value[i][j] + pcp.value[i][j]) / 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (dqc.pcp_in_use[num + mnum] == 1) {
|
} else if (DailyQcUtils.pcp_in_use[num + mnum] == 1) {
|
||||||
cm.read_file(file, num + mnum, dqc.spf);
|
cm.read_file(file, num + mnum, spf);
|
||||||
} else if (dqc.pcp_in_use[num + mnum - i1] == 1) {
|
} else if (DailyQcUtils.pcp_in_use[num + mnum - i1] == 1) {
|
||||||
cm.read_file(file, num + mnum - i1, dqc.spf);
|
cm.read_file(file, num + mnum - i1, spf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.pcp_in_use[num] == -1) {
|
if (DailyQcUtils.pcp_in_use[num] == -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cm.read_file(file, num, dqc.pcp);
|
cm.read_file(file, num, pcp);
|
||||||
|
|
||||||
buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi * dqc.getHrap_grid().maxj);
|
buf = FloatBuffer.allocate(hrap_grid.maxi * hrap_grid.maxj);
|
||||||
|
|
||||||
/* Get value in the HRAP grid bins. */
|
/* Get value in the HRAP grid bins. */
|
||||||
// for (i = 0; i < (hrap_grid.maxi); i++) {
|
// for (i = 0; i < (hrap_grid.maxi); i++) {
|
||||||
// for (j = 0; j < hrap_grid.maxj; j++) {
|
// for (j = 0; j < hrap_grid.maxj; j++) {
|
||||||
for (j = dqc.getHrap_grid().maxj - 1; j >= 0; j--) {
|
for (j = hrap_grid.maxj - 1; j >= 0; j--) {
|
||||||
for (i = 0; i < dqc.getHrap_grid().maxi; i++) {
|
for (i = 0; i < hrap_grid.maxi; i++) {
|
||||||
if (dqc.getHrap_grid().owner[i][j] == -1) {
|
if (hrap_grid.owner[i][j] == -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,14 +264,14 @@ public class PlotGriddedPrecipResource extends
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dqc.getHrap_grid().owner[i][j] == wfo_in_use[m]) {
|
if (hrap_grid.owner[i][j] == wfo_in_use[m]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Float fg = 0f;
|
Float fg = 0f;
|
||||||
value = dqc.pcp.value[i][j];
|
value = pcp.value[i][j];
|
||||||
// fg = (float) (value / 100.0);
|
// fg = (float) (value / 100.0);
|
||||||
if (fg.isNaN() || value < 0) {
|
if (fg.isNaN() || value < 0) {
|
||||||
fg = -9999f;
|
fg = -9999f;
|
||||||
|
@ -302,8 +300,8 @@ public class PlotGriddedPrecipResource extends
|
||||||
}
|
}
|
||||||
buf.rewind();
|
buf.rewind();
|
||||||
|
|
||||||
Rectangle extent = new Rectangle(dqc.getHrap_grid().hrap_minx,
|
Rectangle extent = new Rectangle(hrap_grid.hrap_minx,
|
||||||
dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi, dqc.getHrap_grid().maxj);
|
hrap_grid.hrap_miny, hrap_grid.maxi, hrap_grid.maxj);
|
||||||
|
|
||||||
if (extent.x == 0 && extent.y == 0) {
|
if (extent.x == 0 && extent.y == 0) {
|
||||||
Rectangle coord = null;
|
Rectangle coord = null;
|
||||||
|
@ -388,7 +386,7 @@ public class PlotGriddedPrecipResource extends
|
||||||
int x = p.x - extent.x;
|
int x = p.x - extent.x;
|
||||||
int y = p.y - extent.y;
|
int y = p.y - extent.y;
|
||||||
|
|
||||||
short s = (short) dqc.pcp.value[x][y];
|
short s = (short) pcp.value[x][y];
|
||||||
|
|
||||||
double d = parameters.getDataToDisplayConverter().convert(s);
|
double d = parameters.getDataToDisplayConverter().convert(s);
|
||||||
|
|
||||||
|
@ -464,20 +462,21 @@ public class PlotGriddedPrecipResource extends
|
||||||
@Override
|
@Override
|
||||||
protected void initInternal(IGraphicsTarget target) throws VizException {
|
protected void initInternal(IGraphicsTarget target) throws VizException {
|
||||||
this.target = target;
|
this.target = target;
|
||||||
time_pos = ddq.time_pos;
|
time_pos = DrawDQCStations.time_pos;
|
||||||
plot_gridded_precip(ddq.prefix, time_pos, 100);
|
plot_gridded_precip(DrawDQCStations.prefix, time_pos, 100);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintInternal(IGraphicsTarget target,
|
protected void paintInternal(IGraphicsTarget target,
|
||||||
PaintProperties paintProps) throws VizException {
|
PaintProperties paintProps) throws VizException {
|
||||||
if (buf == null || dqc.grids_flag != 1
|
if (buf == null || (DailyQcUtils.grids_flag != 1 && DailyQcUtils.contour_flag != 1)
|
||||||
|| displayMgr.isQpf() != true) {
|
|| displayMgr.isQpf() != true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<DisplayMode> mode = displayMgr.getDisplayMode();
|
Set<DisplayMode> mode = displayMgr.getDisplayMode();
|
||||||
|
System.out.println("Mode is: "+mode.toString());
|
||||||
|
|
||||||
if (mode.contains(DisplayMode.Image)) {
|
if (mode.contains(DisplayMode.Image)) {
|
||||||
if (gridDisplay == null) {
|
if (gridDisplay == null) {
|
||||||
|
@ -514,11 +513,11 @@ public class PlotGriddedPrecipResource extends
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (ddq.qcmode == "") {
|
if (DrawDQCStations.qcmode == "") {
|
||||||
return "No Data Available";
|
return "No Data Available";
|
||||||
}
|
}
|
||||||
|
|
||||||
return ddq.qcmode;
|
return DrawDQCStations.qcmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -151,7 +151,7 @@ public class PointPrecipPlotResource extends
|
||||||
|
|
||||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
||||||
|
|
||||||
private DrawDQCStations ddq = DrawDQCStations.getInstance();
|
// private DrawDQCStations ddq = DrawDQCStations.getInstance();
|
||||||
|
|
||||||
static int prevPcpnDay;
|
static int prevPcpnDay;
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ public class PointPrecipPlotResource extends
|
||||||
kv.append(":");
|
kv.append(":");
|
||||||
kv.append(pm);
|
kv.append(pm);
|
||||||
dataMap.put(kv.toString(), gageData);
|
dataMap.put(kv.toString(), gageData);
|
||||||
pdataMap.put(kv.toString(), dqc.pdata[dqc.pcpn_day].stn[i]);
|
pdataMap.put(kv.toString(), DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i]);
|
||||||
|
|
||||||
/* Create a small envelope around the point */
|
/* Create a small envelope around the point */
|
||||||
Coordinate p1 = new Coordinate(xy.x + .02, xy.y + .02);
|
Coordinate p1 = new Coordinate(xy.x + .02, xy.y + .02);
|
||||||
|
@ -223,11 +223,11 @@ public class PointPrecipPlotResource extends
|
||||||
data.add("STATION: "
|
data.add("STATION: "
|
||||||
+ gageData.hb5
|
+ gageData.hb5
|
||||||
+ " VALUE: "
|
+ " VALUE: "
|
||||||
+ dqc.pdata[dqc.pcpn_day].stn[i].frain[time_pos].data);
|
+ DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data);
|
||||||
strTree.insert(env, data);
|
strTree.insert(env, data);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
prevPcpnDay = dqc.pcpn_day;
|
prevPcpnDay = DailyQcUtils.pcpn_day;
|
||||||
}
|
}
|
||||||
// target.setNeedsRefresh(true);
|
// target.setNeedsRefresh(true);
|
||||||
}
|
}
|
||||||
|
@ -292,8 +292,8 @@ public class PointPrecipPlotResource extends
|
||||||
throws VizException {
|
throws VizException {
|
||||||
|
|
||||||
if (MPEDisplayManager.getCurrent().isQpf() == true
|
if (MPEDisplayManager.getCurrent().isQpf() == true
|
||||||
&& (dqc.points_flag == 1)) {
|
&& (DailyQcUtils.points_flag == 1)) {
|
||||||
int type = dqc.plot_view;
|
int type = DailyQcUtils.plot_view;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int m = 0;
|
int m = 0;
|
||||||
int dcmode = OtherPrecipOptions.dcmode;
|
int dcmode = OtherPrecipOptions.dcmode;
|
||||||
|
@ -311,7 +311,7 @@ public class PointPrecipPlotResource extends
|
||||||
String val = "";
|
String val = "";
|
||||||
|
|
||||||
if (MPEDisplayManager.pcpn_time_step == 0) {
|
if (MPEDisplayManager.pcpn_time_step == 0) {
|
||||||
time_pos = dqc.pcpn_time;
|
time_pos = DailyQcUtils.pcpn_time;
|
||||||
} else {
|
} else {
|
||||||
time_pos = 4;
|
time_pos = 4;
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,7 @@ public class PointPrecipPlotResource extends
|
||||||
double[] centerpixels = descriptor.worldToPixel(new double[] { c.x,
|
double[] centerpixels = descriptor.worldToPixel(new double[] { c.x,
|
||||||
c.y });
|
c.y });
|
||||||
color = RGBColors.getRGBColor(color_map_n[15]);
|
color = RGBColors.getRGBColor(color_map_n[15]);
|
||||||
if (dqc.points_flag == 1
|
if (DailyQcUtils.points_flag == 1
|
||||||
&& QcPrecipOptionsDialog.isOpen == true
|
&& QcPrecipOptionsDialog.isOpen == true
|
||||||
&& MPEDisplayManager.getCurrent().isQpf() == true) {
|
&& MPEDisplayManager.getCurrent().isQpf() == true) {
|
||||||
} else {
|
} else {
|
||||||
|
@ -360,7 +360,7 @@ public class PointPrecipPlotResource extends
|
||||||
|
|
||||||
for (m = 0; m < tsmax; m++) {
|
for (m = 0; m < tsmax; m++) {
|
||||||
if (station.parm.substring(3, 5).equalsIgnoreCase(dqc.ts[m].abr)
|
if (station.parm.substring(3, 5).equalsIgnoreCase(dqc.ts[m].abr)
|
||||||
&& dqc.dflag[m + 1] == 1) {
|
&& DailyQcUtils.dflag[m + 1] == 1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -388,8 +388,8 @@ public class PointPrecipPlotResource extends
|
||||||
|
|
||||||
/* locate station in data stream */
|
/* locate station in data stream */
|
||||||
if ((type == 4 || type == 5)
|
if ((type == 4 || type == 5)
|
||||||
&& (dqc.pdata[dqc.pcpn_day].used[time_pos] == 0)
|
&& (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].used[time_pos] == 0)
|
||||||
&& (dqc.pdata[dqc.pcpn_day].level == 0)) {
|
&& (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].level == 0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((type == 4 || type == 5)
|
if ((type == 4 || type == 5)
|
||||||
|
@ -429,8 +429,8 @@ public class PointPrecipPlotResource extends
|
||||||
tbuf = station.name;
|
tbuf = station.name;
|
||||||
|
|
||||||
} else if (type == 4) {
|
} else if (type == 4) {
|
||||||
if ((dqc.pdata[dqc.pcpn_day].used[time_pos] == 0)
|
if ((DailyQcUtils.pdata[DailyQcUtils.pcpn_day].used[time_pos] == 0)
|
||||||
&& (dqc.pdata[dqc.pcpn_day].level == 0)) {
|
&& (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].level == 0)) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -454,8 +454,8 @@ public class PointPrecipPlotResource extends
|
||||||
tbuf = mbuf;
|
tbuf = mbuf;
|
||||||
|
|
||||||
} else if (type == 5) {
|
} else if (type == 5) {
|
||||||
if ((dqc.pdata[dqc.pcpn_day].used[time_pos] == 0)
|
if ((DailyQcUtils.pdata[DailyQcUtils.pcpn_day].used[time_pos] == 0)
|
||||||
&& (dqc.pdata[dqc.pcpn_day].level == 0)) {
|
&& (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].level == 0)) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -716,7 +716,7 @@ public class PointPrecipPlotResource extends
|
||||||
// Fonts are shared and cached, no need to init or dispose
|
// Fonts are shared and cached, no need to init or dispose
|
||||||
font = fontFactory.getMPEFont(MPEDisplayManager.getFontId());
|
font = fontFactory.getMPEFont(MPEDisplayManager.getFontId());
|
||||||
|
|
||||||
if (dqc.points_flag == 1 && displayMgr.isQpf() == true) {
|
if (DailyQcUtils.points_flag == 1 && displayMgr.isQpf() == true) {
|
||||||
Iterator<String> iter = dataMap.keySet().iterator();
|
Iterator<String> iter = dataMap.keySet().iterator();
|
||||||
|
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
|
@ -972,11 +972,11 @@ public class PointPrecipPlotResource extends
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (ddq.qcmode == "") {
|
if (DrawDQCStations.qcmode == "") {
|
||||||
return "No Data Available";
|
return "No Data Available";
|
||||||
}
|
}
|
||||||
|
|
||||||
return ddq.qcmode;
|
return DrawDQCStations.qcmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class DailyQcUtils {
|
||||||
|
|
||||||
private String lastQcArea = "";
|
private String lastQcArea = "";
|
||||||
|
|
||||||
public String currentQcArea;
|
public static String currentQcArea;
|
||||||
|
|
||||||
private Date currDate;
|
private Date currDate;
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class DailyQcUtils {
|
||||||
|
|
||||||
public int init_maxmin = -1;
|
public int init_maxmin = -1;
|
||||||
|
|
||||||
public int pcp_in_use[] = new int[500];
|
public static int pcp_in_use[] = new int[500];
|
||||||
|
|
||||||
boolean newarea = false;
|
boolean newarea = false;
|
||||||
|
|
||||||
|
@ -171,13 +171,13 @@ public class DailyQcUtils {
|
||||||
|
|
||||||
public int method = 2;
|
public int method = 2;
|
||||||
|
|
||||||
public boolean wfo_all = false;
|
public static boolean wfo_all = false;
|
||||||
|
|
||||||
public boolean render_all = true;
|
public boolean render_all = true;
|
||||||
|
|
||||||
public int wfo_orig;
|
public int wfo_orig;
|
||||||
|
|
||||||
public int[] wfo_in_use = new int[20];
|
public static int[] wfo_in_use = new int[20];
|
||||||
|
|
||||||
public String[] tag = new String[20];
|
public String[] tag = new String[20];
|
||||||
|
|
||||||
|
@ -261,39 +261,39 @@ public class DailyQcUtils {
|
||||||
|
|
||||||
public String mpe_show_missing_gage;
|
public String mpe_show_missing_gage;
|
||||||
|
|
||||||
public int isom = -1;
|
public static int isom = -1;
|
||||||
|
|
||||||
public int old_isom = -1;
|
public static int old_isom = -1;
|
||||||
|
|
||||||
public ArrayList<Station> precip_stations = new ArrayList<Station>();
|
public static ArrayList<Station> precip_stations = new ArrayList<Station>();
|
||||||
|
|
||||||
public ArrayList<Station> temperature_stations = new ArrayList<Station>();
|
public static ArrayList<Station> temperature_stations = new ArrayList<Station>();
|
||||||
|
|
||||||
public ArrayList<Station> freezing_stations = new ArrayList<Station>();
|
public static ArrayList<Station> freezing_stations = new ArrayList<Station>();
|
||||||
|
|
||||||
public Pdata pdata[];
|
public static Pdata pdata[];
|
||||||
|
|
||||||
public Tdata tdata[];
|
public static Tdata tdata[];
|
||||||
|
|
||||||
public Zdata zdata[];
|
public static Zdata zdata[];
|
||||||
|
|
||||||
private Hrap_Grid hrap_grid = new Hrap_Grid();
|
private static Hrap_Grid hrap_grid = new Hrap_Grid();
|
||||||
|
|
||||||
// public static Hrap_Grid hrap_tgrid = new Hrap_Grid();
|
// public static Hrap_Grid hrap_tgrid = new Hrap_Grid();
|
||||||
|
|
||||||
public static String type = "QME ";
|
public static String type = "QME ";
|
||||||
|
|
||||||
public Ts[] ts;
|
public static Ts[] ts;
|
||||||
|
|
||||||
public int tsmax = 0;
|
public static int tsmax = 0;
|
||||||
|
|
||||||
public Maps mean_areal_precip_global[];
|
public Maps mean_areal_precip_global[];
|
||||||
|
|
||||||
public Pcp pcp = new Pcp();
|
public static Pcp pcp = new Pcp();
|
||||||
|
|
||||||
public Pcp spf = new Pcp();
|
public static Pcp spf = new Pcp();
|
||||||
|
|
||||||
public Pcp tpf = new Pcp();
|
public static Pcp tpf = new Pcp();
|
||||||
|
|
||||||
public Bad_Daily_Values bad_values[];
|
public Bad_Daily_Values bad_values[];
|
||||||
|
|
||||||
|
@ -443,15 +443,15 @@ public class DailyQcUtils {
|
||||||
|
|
||||||
public static int hrgt12z = -1;
|
public static int hrgt12z = -1;
|
||||||
|
|
||||||
public int[] dflag = new int[10];
|
public static int[] dflag = new int[10];
|
||||||
|
|
||||||
public int[] qflag = new int[10];
|
public static int[] qflag = new int[10];
|
||||||
|
|
||||||
public float pxtemp = 1.0f;
|
public float pxtemp = 1.0f;
|
||||||
|
|
||||||
public int dmvalue = (int) (1.0 * 100 * 3.28 / .55);
|
public int dmvalue = (int) (1.0 * 100 * 3.28 / .55);
|
||||||
|
|
||||||
public int elevation_filter_value = 0;
|
public static int elevation_filter_value = 0;
|
||||||
|
|
||||||
public int temperature_filter_value = -50;
|
public int temperature_filter_value = -50;
|
||||||
|
|
||||||
|
@ -474,27 +474,27 @@ public class DailyQcUtils {
|
||||||
/* Function which associates the Gage QC edit levels with a value. */
|
/* Function which associates the Gage QC edit levels with a value. */
|
||||||
public int funct[] = { 8, 0, 6, 2, 3, 4, 5, 1, 7, 9 };
|
public int funct[] = { 8, 0, 6, 2, 3, 4, 5, 1, 7, 9 };
|
||||||
|
|
||||||
public int gage_char[] = new int[2];
|
public static int gage_char[] = new int[2];
|
||||||
|
|
||||||
public int plot_view = 0;
|
public static int plot_view = 0;
|
||||||
|
|
||||||
public boolean frzlvl_flag = true;
|
public boolean frzlvl_flag = true;
|
||||||
|
|
||||||
public int find_station_flag = -1;
|
public int find_station_flag = -1;
|
||||||
|
|
||||||
public int pcpn_time = 0;
|
public static int pcpn_time = 0;
|
||||||
|
|
||||||
public int pcp_flag = -1;
|
public static int pcp_flag = -1;
|
||||||
|
|
||||||
public int pcpn_day = 0;
|
public static int pcpn_day = 0;
|
||||||
|
|
||||||
public int contour_flag = -1;
|
public static int contour_flag = -1;
|
||||||
|
|
||||||
public int points_flag = 1;
|
public static int points_flag = 1;
|
||||||
|
|
||||||
public int grids_flag = -1;
|
public static int grids_flag = -1;
|
||||||
|
|
||||||
public int map_flag = -1;
|
public static int map_flag = -1;
|
||||||
|
|
||||||
static int curHrMinSec = -1;
|
static int curHrMinSec = -1;
|
||||||
|
|
||||||
|
@ -903,7 +903,7 @@ public class DailyQcUtils {
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getEnding6HourObsTime() {
|
public static int getEnding6HourObsTime() {
|
||||||
String s = appsDefaults.getToken(dqc_ending_6hour_obstime_tok);
|
String s = appsDefaults.getToken(dqc_ending_6hour_obstime_tok);
|
||||||
int value = ((!(null == s)) ? Integer.parseInt(s) : -1);
|
int value = ((!(null == s)) ? Integer.parseInt(s) : -1);
|
||||||
|
|
||||||
|
@ -917,6 +917,9 @@ public class DailyQcUtils {
|
||||||
String currntQcArea, int days, boolean autoqc) {
|
String currntQcArea, int days, boolean autoqc) {
|
||||||
currentQcArea = currntQcArea;
|
currentQcArea = currntQcArea;
|
||||||
currDate = currentDate;
|
currDate = currentDate;
|
||||||
|
if (prevDate == null){
|
||||||
|
prevDate = currDate;
|
||||||
|
}
|
||||||
selDate = prevDate;
|
selDate = prevDate;
|
||||||
auto_dailyqc_flag = autoqc;
|
auto_dailyqc_flag = autoqc;
|
||||||
qcDays = MPEDataManager.getInstance().getDQCDays();
|
qcDays = MPEDataManager.getInstance().getDQCDays();
|
||||||
|
@ -2127,7 +2130,7 @@ public class DailyQcUtils {
|
||||||
/**
|
/**
|
||||||
* @return the hrap_grid
|
* @return the hrap_grid
|
||||||
*/
|
*/
|
||||||
public Hrap_Grid getHrap_grid() {
|
public static Hrap_Grid getHrap_grid() {
|
||||||
return hrap_grid;
|
return hrap_grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,8 +90,9 @@ public class MeanMonthlyPrecip {
|
||||||
displayUnit = NonSI.INCH;
|
displayUnit = NonSI.INCH;
|
||||||
dataUnit = SI.MILLIMETER;
|
dataUnit = SI.MILLIMETER;
|
||||||
cmc.setDisplayUnit(displayUnit);
|
cmc.setDisplayUnit(displayUnit);
|
||||||
|
cmc.setColorMapUnit(SI.MILLIMETER);
|
||||||
cmc.setDataUnit(dataUnit);
|
cmc.setDataUnit(dataUnit);
|
||||||
UnitConverter dataToImage = cmc.getDataToImageConverter();
|
UnitConverter dataToImage = cmc.getColorMapToDisplayConverter();//cmc.getDataToImageConverter();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Loop over the months. Determine for which months PRISM data are
|
* Loop over the months. Determine for which months PRISM data are
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
# doConfig - validate and convert serverConfig into simple Java objects
|
# doConfig - validate and convert serverConfig into simple Java objects
|
||||||
#
|
#
|
||||||
# this file was originally config.py
|
# this file was originally config.py
|
||||||
# it was renamed to avoid a conflict with jep's built-in config module
|
# it was renamed to avoid a conflict with jep's built-in config module
|
||||||
#
|
#
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -35,37 +35,37 @@
|
||||||
# 11/18/2014 #4953 randerso Added check for empty unit string
|
# 11/18/2014 #4953 randerso Added check for empty unit string
|
||||||
#
|
#
|
||||||
########################################################################
|
########################################################################
|
||||||
import types
|
import types
|
||||||
|
|
||||||
from java.util import ArrayList,LinkedHashMap
|
from java.util import ArrayList,LinkedHashMap
|
||||||
from java.lang import Integer,Float
|
from java.lang import Integer,Float
|
||||||
from com.vividsolutions.jts.geom import Coordinate
|
from com.vividsolutions.jts.geom import Coordinate
|
||||||
from java.awt import Point
|
from java.awt import Point
|
||||||
|
|
||||||
Databases = {}
|
Databases = {}
|
||||||
Projections = {}
|
Projections = {}
|
||||||
DiscreteDef = LinkedHashMap() #from parseKeys()
|
DiscreteDef = LinkedHashMap() #from parseKeys()
|
||||||
|
|
||||||
# Check a python sequence to see that
|
# Check a python sequence to see that
|
||||||
# it matches the format.
|
# it matches the format.
|
||||||
# data: is a sequence of objects
|
# data: is a sequence of objects
|
||||||
# fmt : is a parallel sequence of type objects
|
# fmt : is a parallel sequence of type objects
|
||||||
# message : optional message to print on exception
|
# message : optional message to print on exception
|
||||||
#
|
#
|
||||||
# Returns data.
|
# Returns data.
|
||||||
# If len(data) != len(fmt)
|
# If len(data) != len(fmt)
|
||||||
# or the type of each element in data does not
|
# or the type of each element in data does not
|
||||||
# match the coresponding type in fmt, then
|
# match the coresponding type in fmt, then
|
||||||
# a TypeError is raised.
|
# a TypeError is raised.
|
||||||
# Example: a, b = check(([1, 3], "foo"), (list, str))
|
# Example: a, b = check(([1, 3], "foo"), (list, str))
|
||||||
def check(data, fmt, message, allData = None):
|
def check(data, fmt, message, allData = None):
|
||||||
if len(data) != len(fmt):
|
if len(data) != len(fmt):
|
||||||
m = message + ": Wrong number of items found, " + \
|
m = message + ": Wrong number of items found, " + \
|
||||||
"Expected " + `len(fmt)` + ", got " + `len(data)` + \
|
"Expected " + `len(fmt)` + ", got " + `len(data)` + \
|
||||||
" Input: " + `data`
|
" Input: " + `data`
|
||||||
if allData is not None:
|
if allData is not None:
|
||||||
m = m + ' All: ' + `allData`
|
m = m + ' All: ' + `allData`
|
||||||
raise AssertionError, m
|
raise AssertionError, m
|
||||||
for i in xrange(len(data)):
|
for i in xrange(len(data)):
|
||||||
obj = data[i]
|
obj = data[i]
|
||||||
if hasattr(obj, "jclassname"):
|
if hasattr(obj, "jclassname"):
|
||||||
|
@ -73,328 +73,328 @@ def check(data, fmt, message, allData = None):
|
||||||
else:
|
else:
|
||||||
t = type(obj)
|
t = type(obj)
|
||||||
|
|
||||||
if t != fmt[i]:
|
if t != fmt[i]:
|
||||||
m = message + ": Wrong data type found, " + \
|
m = message + ": Wrong data type found, " + \
|
||||||
"Expected " + `fmt[i]` + ", got " + `t` + \
|
"Expected " + `fmt[i]` + ", got " + `t` + \
|
||||||
" for position #" + `i+1` + " Input: " + `data`
|
" for position #" + `i+1` + " Input: " + `data`
|
||||||
if allData is not None:
|
if allData is not None:
|
||||||
m = m + ' All: ' + `allData`
|
m = m + ' All: ' + `allData`
|
||||||
raise AssertionError, m
|
raise AssertionError, m
|
||||||
return data
|
return data
|
||||||
|
|
||||||
# dictionary check, keys are strings, values/subvalues as specified
|
# dictionary check, keys are strings, values/subvalues as specified
|
||||||
def dictCheck(dictionary, value, subvalue, configName):
|
def dictCheck(dictionary, value, subvalue, configName):
|
||||||
map = LinkedHashMap()
|
map = LinkedHashMap()
|
||||||
if type(dictionary) == dict:
|
if type(dictionary) == dict:
|
||||||
for k in dictionary.keys():
|
for k in dictionary.keys():
|
||||||
if type(k) != str:
|
if type(k) != str:
|
||||||
raise TypeError, configName + " key [" + `k` + "] not a str"
|
raise TypeError, configName + " key [" + `k` + "] not a str"
|
||||||
l = dictionary[k]
|
l = dictionary[k]
|
||||||
if type(l) != value:
|
if type(l) != value:
|
||||||
raise TypeError, configName + " value [" + `l` + "] not a " \
|
raise TypeError, configName + " value [" + `l` + "] not a " \
|
||||||
+ `value`
|
+ `value`
|
||||||
if value == list or value == tuple:
|
if value == list or value == tuple:
|
||||||
n = ArrayList()
|
n = ArrayList()
|
||||||
for m in l:
|
for m in l:
|
||||||
if type(m) != subvalue:
|
if type(m) != subvalue:
|
||||||
raise TypeError, configName + " value [" + `l` \
|
raise TypeError, configName + " value [" + `l` \
|
||||||
+ "] isn't a " + `subvalue` + ": " + `m`
|
+ "] isn't a " + `subvalue` + ": " + `m`
|
||||||
elif subvalue == int:
|
elif subvalue == int:
|
||||||
n.add(Integer(m))
|
n.add(Integer(m))
|
||||||
elif subvalue == float:
|
elif subvalue == float:
|
||||||
n.add(Float(m))
|
n.add(Float(m))
|
||||||
else:
|
else:
|
||||||
n.add(m)
|
n.add(m)
|
||||||
map.put(k, n)
|
map.put(k, n)
|
||||||
else:
|
else:
|
||||||
if value == int:
|
if value == int:
|
||||||
map.put(k,Integer(l))
|
map.put(k,Integer(l))
|
||||||
elif value == float:
|
elif value == float:
|
||||||
map.put(k,Float(l))
|
map.put(k,Float(l))
|
||||||
else:
|
else:
|
||||||
map.put(k, l)
|
map.put(k, l)
|
||||||
else:
|
else:
|
||||||
raise TypeError, configName + " not a dict:" + `dictionary`
|
raise TypeError, configName + " not a dict:" + `dictionary`
|
||||||
return map
|
return map
|
||||||
|
|
||||||
def getWx(wxtypes, wxvisibilities):
|
def getWx(wxtypes, wxvisibilities):
|
||||||
from com.raytheon.uf.common.dataplugin.gfe.weather import WeatherCoverage, WeatherIntensity, WeatherAttribute
|
from com.raytheon.uf.common.dataplugin.gfe.weather import WeatherCoverage, WeatherIntensity, WeatherAttribute
|
||||||
from com.raytheon.edex.plugin.gfe.config import SimpleWeatherTypeConfig
|
from com.raytheon.edex.plugin.gfe.config import SimpleWeatherTypeConfig
|
||||||
types = ArrayList()
|
types = ArrayList()
|
||||||
for t in wxtypes:
|
for t in wxtypes:
|
||||||
symbol, description, cov, inten, attr = \
|
symbol, description, cov, inten, attr = \
|
||||||
check(t, (str, str, list, list, list), "Error in WeatherType")
|
check(t, (str, str, list, list, list), "Error in WeatherType")
|
||||||
coverages = ArrayList()
|
coverages = ArrayList()
|
||||||
intensities = ArrayList()
|
intensities = ArrayList()
|
||||||
attributes = ArrayList()
|
attributes = ArrayList()
|
||||||
for c in cov:
|
for c in cov:
|
||||||
csym, cdes = check(c, (str, str), "Error in Weather Coverage", t)
|
csym, cdes = check(c, (str, str), "Error in Weather Coverage", t)
|
||||||
coverages.add(WeatherCoverage(csym, cdes))
|
coverages.add(WeatherCoverage(csym, cdes))
|
||||||
for i in inten:
|
for i in inten:
|
||||||
isym, ides = check(i, (str, str), "Error in Weather Intensity", t)
|
isym, ides = check(i, (str, str), "Error in Weather Intensity", t)
|
||||||
intensities.add(WeatherIntensity(isym, ides))
|
intensities.add(WeatherIntensity(isym, ides))
|
||||||
for a in attr:
|
for a in attr:
|
||||||
asym, ades = check(a, (str, str), "Error in Weather Attributes", t)
|
asym, ades = check(a, (str, str), "Error in Weather Attributes", t)
|
||||||
attributes.add(WeatherAttribute(asym, ades))
|
attributes.add(WeatherAttribute(asym, ades))
|
||||||
|
|
||||||
types.add(SimpleWeatherTypeConfig(symbol, description, coverages,
|
types.add(SimpleWeatherTypeConfig(symbol, description, coverages,
|
||||||
intensities, attributes))
|
intensities, attributes))
|
||||||
vis = ArrayList()
|
vis = ArrayList()
|
||||||
for v in wxvisibilities:
|
for v in wxvisibilities:
|
||||||
vis.add(v)
|
vis.add(v)
|
||||||
return (vis, types)
|
return (vis, types)
|
||||||
|
|
||||||
#note that DiscreteDef is a dictionary that contains the following
|
#note that DiscreteDef is a dictionary that contains the following
|
||||||
#coded strings: ['OVERLAPS', 'AuxLength', sym1, des1, sym2, des2, ....]
|
#coded strings: ['OVERLAPS', 'AuxLength', sym1, des1, sym2, des2, ....]
|
||||||
#We do this to pass to C++ as a InitDict, which
|
#We do this to pass to C++ as a InitDict, which
|
||||||
#is a Dict<TextString, SeqOf<TextString>.
|
#is a Dict<TextString, SeqOf<TextString>.
|
||||||
def parseKeys(name, overlaps, auxLength, keys):
|
def parseKeys(name, overlaps, auxLength, keys):
|
||||||
if not DiscreteDef.containsKey(name):
|
if not DiscreteDef.containsKey(name):
|
||||||
ts = ArrayList()
|
ts = ArrayList()
|
||||||
if overlaps:
|
if overlaps:
|
||||||
ts.add("OVERLAPS")
|
ts.add("OVERLAPS")
|
||||||
else:
|
else:
|
||||||
ts.add("MUTEXC")
|
ts.add("MUTEXC")
|
||||||
ts.add(`auxLength`)
|
ts.add(`auxLength`)
|
||||||
for symdes in keys:
|
for symdes in keys:
|
||||||
sym, des = check(symdes, (str, str),
|
sym, des = check(symdes, (str, str),
|
||||||
"Error in DiscreteKey Definition", keys)
|
"Error in DiscreteKey Definition", keys)
|
||||||
ts.add(sym)
|
ts.add(sym)
|
||||||
ts.add(des)
|
ts.add(des)
|
||||||
if overlaps and len(keys) > 0 and keys[0][0] != "<None>":
|
if overlaps and len(keys) > 0 and keys[0][0] != "<None>":
|
||||||
s = "1st discrete key must be <None> for OVERLAP-defined " +\
|
s = "1st discrete key must be <None> for OVERLAP-defined " +\
|
||||||
"weather element. [" + name + "]" + `keys`
|
"weather element. [" + name + "]" + `keys`
|
||||||
raise Exception, s
|
raise Exception, s
|
||||||
DiscreteDef.put(name, ts);
|
DiscreteDef.put(name, ts);
|
||||||
|
|
||||||
def createParm(parminfo, domain, tc):
|
def createParm(parminfo, domain, tc):
|
||||||
from com.raytheon.edex.plugin.gfe.config import SimpleGridParmConfig
|
from com.raytheon.edex.plugin.gfe.config import SimpleGridParmConfig
|
||||||
|
|
||||||
m = "Format Error in Weather Element Definition"
|
m = "Format Error in Weather Element Definition"
|
||||||
if len(parminfo) < 2:
|
if len(parminfo) < 2:
|
||||||
raise TypeError, m + ': ' + `parminfo`
|
raise TypeError, m + ': ' + `parminfo`
|
||||||
|
|
||||||
dim, origin, extent, timezone, projection,officeType = domain
|
dim, origin, extent, timezone, projection,officeType = domain
|
||||||
|
|
||||||
if parminfo[1] == 'Scalar' or parminfo[1] == 'Vector':
|
if parminfo[1] == 'Scalar' or parminfo[1] == 'Vector':
|
||||||
parmInfoFmt = (str, str, str, str, float, float, int, int)
|
parmInfoFmt = (str, str, str, str, float, float, int, int)
|
||||||
name, type, units, description, max, min, precision, \
|
name, type, units, description, max, min, precision, \
|
||||||
rateParm = check(parminfo, parmInfoFmt, m)
|
rateParm = check(parminfo, parmInfoFmt, m)
|
||||||
|
|
||||||
elif parminfo[1] == 'Weather':
|
elif parminfo[1] == 'Weather':
|
||||||
name, type, units, description = \
|
name, type, units, description = \
|
||||||
check(parminfo, (str, str, str, str), m)
|
check(parminfo, (str, str, str, str), m)
|
||||||
max = 0
|
max = 0
|
||||||
min = 0
|
min = 0
|
||||||
precision = 0
|
precision = 0
|
||||||
rateParm = False
|
rateParm = False
|
||||||
|
|
||||||
elif parminfo[1] == 'Discrete':
|
elif parminfo[1] == 'Discrete':
|
||||||
if len(parminfo) == 6:
|
if len(parminfo) == 6:
|
||||||
parmInfoFmt = (str, str, str, str, int, list)
|
parmInfoFmt = (str, str, str, str, int, list)
|
||||||
name, type, units, description, overlaps, keys = \
|
name, type, units, description, overlaps, keys = \
|
||||||
check(parminfo, parmInfoFmt, m)
|
check(parminfo, parmInfoFmt, m)
|
||||||
auxSize = 0
|
auxSize = 0
|
||||||
else:
|
else:
|
||||||
parmInfoFmt = (str, str, str, str, int, list, int)
|
parmInfoFmt = (str, str, str, str, int, list, int)
|
||||||
name, type, units, description, overlaps, keys, auxSize = \
|
name, type, units, description, overlaps, keys, auxSize = \
|
||||||
check(parminfo, parmInfoFmt, m)
|
check(parminfo, parmInfoFmt, m)
|
||||||
max = 0.0
|
max = 0.0
|
||||||
min = 0.0
|
min = 0.0
|
||||||
precision = 0
|
precision = 0
|
||||||
rateParm = False
|
rateParm = False
|
||||||
parseKeys(name, overlaps, auxSize, keys)
|
parseKeys(name, overlaps, auxSize, keys)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise Exception, "Illegal WE type specified for " + `parminfo[0]`
|
raise Exception, "Illegal WE type specified for " + `parminfo[0]`
|
||||||
|
|
||||||
#don't add parms with your own office type in the name.
|
#don't add parms with your own office type in the name.
|
||||||
if name.find(officeType) != -1:
|
if name.find(officeType) != -1:
|
||||||
return None #skip this one
|
return None #skip this one
|
||||||
|
|
||||||
if len(units) == 0:
|
if len(units) == 0:
|
||||||
raise Exception, 'Unit string must not be empty. For unitless quantities enter "1"'
|
raise Exception, 'Unit string must not be empty. For unitless quantities enter "1"'
|
||||||
|
|
||||||
updateProjections(projection)
|
updateProjections(projection)
|
||||||
start, repeat, duration = tc
|
start, repeat, duration = tc
|
||||||
timeIndependentParm = (repeat == 0 and duration == 0)
|
timeIndependentParm = (repeat == 0 and duration == 0)
|
||||||
|
|
||||||
# return WeatherElement(name, type, units, description, max, min,
|
# return WeatherElement(name, type, units, description, max, min,
|
||||||
# precision, timeIndependentParm, dim, origin,
|
# precision, timeIndependentParm, dim, origin,
|
||||||
# extent, start, repeat, duration, rateParm)
|
# extent, start, repeat, duration, rateParm)
|
||||||
return SimpleGridParmConfig(name, type, units, description, 1.0*max, 1.0*min,
|
return SimpleGridParmConfig(name, type, units, description, 1.0*max, 1.0*min,
|
||||||
precision, timeIndependentParm, Point(dim[0], dim[1]), Coordinate(origin[0], origin[1]),
|
precision, timeIndependentParm, Point(dim[0], dim[1]), Coordinate(origin[0], origin[1]),
|
||||||
Coordinate(extent[0], extent[1]), start, repeat, duration, rateParm)
|
Coordinate(extent[0], extent[1]), start, repeat, duration, rateParm)
|
||||||
|
|
||||||
def getDB(site, projID, dbinfo):
|
def getDB(site, projID, dbinfo):
|
||||||
from com.raytheon.edex.plugin.gfe.config import SimpleModelConfig
|
from com.raytheon.edex.plugin.gfe.config import SimpleModelConfig
|
||||||
|
|
||||||
dbinfoFmt = (str, str, str, int, int, int, int)
|
dbinfoFmt = (str, str, str, int, int, int, int)
|
||||||
name, format, type, single, official, numVer, purgeAge = \
|
name, format, type, single, official, numVer, purgeAge = \
|
||||||
check(dbinfo, dbinfoFmt, "Error in Database Attribute Definition")
|
check(dbinfo, dbinfoFmt, "Error in Database Attribute Definition")
|
||||||
|
|
||||||
if not Databases.has_key(name+type):
|
if not Databases.has_key(name+type):
|
||||||
Databases[name+type] = SimpleModelConfig(site, format, type, name, projID,
|
Databases[name+type] = SimpleModelConfig(site, format, type, name, projID,
|
||||||
single, official, numVer, purgeAge)
|
single, official, numVer, purgeAge)
|
||||||
|
|
||||||
return Databases[name+type]
|
return Databases[name+type]
|
||||||
|
|
||||||
def parseDBItm(site, domain, item):
|
def parseDBItm(site, domain, item):
|
||||||
# import serverConfig
|
# import serverConfig
|
||||||
# domain = serverConfig.SITES[site]
|
# domain = serverConfig.SITES[site]
|
||||||
|
|
||||||
dbinfo, parminfo = check(item, (tuple, list),
|
dbinfo, parminfo = check(item, (tuple, list),
|
||||||
"Database Definition or Parm Group Format Error")
|
"Database Definition or Parm Group Format Error")
|
||||||
projID = domain[4][0]
|
projID = domain[4][0]
|
||||||
|
|
||||||
db = getDB(site, projID, dbinfo)
|
db = getDB(site, projID, dbinfo)
|
||||||
grids = db.grids
|
grids = db.grids
|
||||||
for ptc in parminfo:
|
for ptc in parminfo:
|
||||||
parms, tc = check(ptc, (list, tuple),
|
parms, tc = check(ptc, (list, tuple),
|
||||||
"Parm Group/Time Constraint Tuple Error")
|
"Parm Group/Time Constraint Tuple Error")
|
||||||
check(tc, (int, int, int), "Time Constraint Format Error", ptc)
|
check(tc, (int, int, int), "Time Constraint Format Error", ptc)
|
||||||
for parm in parms:
|
for parm in parms:
|
||||||
grids.add(createParm(parm, domain, tc))
|
grids.add(createParm(parm, domain, tc))
|
||||||
db.grids = grids
|
db.grids = grids
|
||||||
|
|
||||||
def updateProjections(projection):
|
def updateProjections(projection):
|
||||||
from com.raytheon.uf.common.dataplugin.gfe.config import ProjectionData
|
from com.raytheon.uf.common.dataplugin.gfe.config import ProjectionData
|
||||||
# extract projection data
|
# extract projection data
|
||||||
projFmt = (str,
|
projFmt = (str,
|
||||||
"com.raytheon.uf.common.dataplugin.gfe.config.ProjectionData$ProjectionType",
|
"com.raytheon.uf.common.dataplugin.gfe.config.ProjectionData$ProjectionType",
|
||||||
tuple, tuple, tuple, float, float, tuple, tuple, float, float, float)
|
tuple, tuple, tuple, float, float, tuple, tuple, float, float, float)
|
||||||
projID, ptype, pllll, pllur, pllo, pspo, pspt, pgpll, pgpur, pli, \
|
projID, ptype, pllll, pllur, pllo, pspo, pspt, pgpll, pgpur, pli, \
|
||||||
plc, plo = check(projection, projFmt, "Format error in Projection")
|
plc, plo = check(projection, projFmt, "Format error in Projection")
|
||||||
check(pllll, (float, float),
|
check(pllll, (float, float),
|
||||||
"Format error lower left long/lat in Projection", projection)
|
"Format error lower left long/lat in Projection", projection)
|
||||||
check(pllur, (float, float),
|
check(pllur, (float, float),
|
||||||
"Format error upper right long/lat in Projection", projection)
|
"Format error upper right long/lat in Projection", projection)
|
||||||
check(pllo, (float, float),
|
check(pllo, (float, float),
|
||||||
"Format error long/lat origin in Projection", projection)
|
"Format error long/lat origin in Projection", projection)
|
||||||
check(pgpll, (int, int),
|
check(pgpll, (int, int),
|
||||||
"Format error lower left grid point in Projection", projection)
|
"Format error lower left grid point in Projection", projection)
|
||||||
check(pgpur, (int, int),
|
check(pgpur, (int, int),
|
||||||
"Format error upper right grid point in Projection", projection)
|
"Format error upper right grid point in Projection", projection)
|
||||||
|
|
||||||
if not Projections.has_key(projID):
|
if not Projections.has_key(projID):
|
||||||
Projections[projID] = ProjectionData(projID, ptype,
|
Projections[projID] = ProjectionData(projID, ptype,
|
||||||
Coordinate(pllll[0],pllll[1]),
|
Coordinate(pllll[0],pllll[1]),
|
||||||
Coordinate(pllur[0],pllur[1]),
|
Coordinate(pllur[0],pllur[1]),
|
||||||
Coordinate(pllo[0],pllo[1]),
|
Coordinate(pllo[0],pllo[1]),
|
||||||
pspo, pspt,
|
pspo, pspt,
|
||||||
Point(pgpll[0], pgpll[1]),
|
Point(pgpll[0], pgpll[1]),
|
||||||
Point(pgpur[0], pgpur[1]),
|
Point(pgpur[0], pgpur[1]),
|
||||||
pli, plc, plo)
|
pli, plc, plo)
|
||||||
|
|
||||||
def parseGridLocation(domain):
|
def parseGridLocation(domain):
|
||||||
from com.raytheon.edex.plugin.gfe.config import SimpleGridLocation
|
from com.raytheon.edex.plugin.gfe.config import SimpleGridLocation
|
||||||
|
|
||||||
#if office type is present:
|
#if office type is present:
|
||||||
if len(domain) == 6:
|
if len(domain) == 6:
|
||||||
domainFmt = (list,tuple,tuple,str,tuple,str)
|
domainFmt = (list,tuple,tuple,str,tuple,str)
|
||||||
gridSize, origin, extent, tz, proj, officeType = check(domain, domainFmt, "Format error in SITES line")
|
gridSize, origin, extent, tz, proj, officeType = check(domain, domainFmt, "Format error in SITES line")
|
||||||
#if office type is not present:
|
#if office type is not present:
|
||||||
else:
|
else:
|
||||||
domainFmt = (list, tuple, tuple, str, tuple)
|
domainFmt = (list, tuple, tuple, str, tuple)
|
||||||
gridSize, origin, extent, tz, proj = check(domain, domainFmt,
|
gridSize, origin, extent, tz, proj = check(domain, domainFmt,
|
||||||
"Format error in SITES line")
|
"Format error in SITES line")
|
||||||
check(gridSize, (int, int), "GridSize format error from SITES", domain)
|
check(gridSize, (int, int), "GridSize format error from SITES", domain)
|
||||||
check(origin, (float, float), "Origin format error from SITES", domain)
|
check(origin, (float, float), "Origin format error from SITES", domain)
|
||||||
check(extent, (float, float), "Extent format error from SITES", domain)
|
check(extent, (float, float), "Extent format error from SITES", domain)
|
||||||
|
|
||||||
projFmt = (str,
|
projFmt = (str,
|
||||||
"com.raytheon.uf.common.dataplugin.gfe.config.ProjectionData$ProjectionType",
|
"com.raytheon.uf.common.dataplugin.gfe.config.ProjectionData$ProjectionType",
|
||||||
tuple, tuple, tuple, float, float, tuple, tuple, float, float, float)
|
tuple, tuple, tuple, float, float, tuple, tuple, float, float, float)
|
||||||
projID, projType, llll, llur, llo, sp1, sp2, gpll, gpur, li, lc, lo = \
|
projID, projType, llll, llur, llo, sp1, sp2, gpll, gpur, li, lc, lo = \
|
||||||
check(proj, projFmt, "Format error in Projection")
|
check(proj, projFmt, "Format error in Projection")
|
||||||
check(llll, (float, float),
|
check(llll, (float, float),
|
||||||
"Format error lower left long/lat in Projection", proj)
|
"Format error lower left long/lat in Projection", proj)
|
||||||
check(llur, (float, float),
|
check(llur, (float, float),
|
||||||
"Format error upper right long/lat in Projection", proj)
|
"Format error upper right long/lat in Projection", proj)
|
||||||
check(llo, (float, float),
|
check(llo, (float, float),
|
||||||
"Format error long/lat origin in Projection", proj)
|
"Format error long/lat origin in Projection", proj)
|
||||||
check(gpll, (int, int),
|
check(gpll, (int, int),
|
||||||
"Format error lower left grid point in Projection", proj)
|
"Format error lower left grid point in Projection", proj)
|
||||||
check(gpur, (int, int),
|
check(gpur, (int, int),
|
||||||
"Format error upper right grid point in Projection", proj)
|
"Format error upper right grid point in Projection", proj)
|
||||||
|
|
||||||
gloc = SimpleGridLocation(Point(gridSize[0], gridSize[1]),
|
gloc = SimpleGridLocation(Point(gridSize[0], gridSize[1]),
|
||||||
Coordinate(origin[0], origin[1]),
|
Coordinate(origin[0], origin[1]),
|
||||||
Coordinate(extent[0], extent[1]),
|
Coordinate(extent[0], extent[1]),
|
||||||
projID, projType,
|
projID, projType,
|
||||||
Coordinate(llll[0], llll[1]),
|
Coordinate(llll[0], llll[1]),
|
||||||
Coordinate(llur[0], llur[1]),
|
Coordinate(llur[0], llur[1]),
|
||||||
Coordinate(llo[0], llo[1]),
|
Coordinate(llo[0], llo[1]),
|
||||||
sp1, sp2,
|
sp1, sp2,
|
||||||
Point(gpll[0], gpll[1]),
|
Point(gpll[0], gpll[1]),
|
||||||
Point(gpur[0], gpur[1]),
|
Point(gpur[0], gpur[1]),
|
||||||
li, lc, lo)
|
li, lc, lo)
|
||||||
return gloc
|
return gloc
|
||||||
|
|
||||||
def parse(site, databases, wxtypes, wxvisibilities, allSites, inProjections):
|
def parse(site, databases, wxtypes, wxvisibilities, allSites, inProjections):
|
||||||
from com.raytheon.edex.plugin.gfe.config import SimpleGridLocation
|
from com.raytheon.edex.plugin.gfe.config import SimpleGridLocation
|
||||||
domain = parseGridLocation(allSites[site])
|
domain = parseGridLocation(allSites[site])
|
||||||
for itm in databases:
|
for itm in databases:
|
||||||
parseDBItm(site, allSites[site], itm)
|
parseDBItm(site, allSites[site], itm)
|
||||||
|
|
||||||
if type(wxtypes) != list:
|
if type(wxtypes) != list:
|
||||||
raise TypeError, "Format Error in WeatherTypes, not a list: " \
|
raise TypeError, "Format Error in WeatherTypes, not a list: " \
|
||||||
+ `wxtypes`
|
+ `wxtypes`
|
||||||
if type(wxvisibilities) != list:
|
if type(wxvisibilities) != list:
|
||||||
raise TypeError, "Format Error in visibilities, not a list: " \
|
raise TypeError, "Format Error in visibilities, not a list: " \
|
||||||
+ `wxvisibilities`
|
+ `wxvisibilities`
|
||||||
vis, types = getWx(wxtypes, wxvisibilities)
|
vis, types = getWx(wxtypes, wxvisibilities)
|
||||||
|
|
||||||
models = ArrayList()
|
models = ArrayList()
|
||||||
for key in Databases.keys():
|
for key in Databases.keys():
|
||||||
models.add(Databases[key])
|
models.add(Databases[key])
|
||||||
|
|
||||||
projections = ArrayList()
|
projections = ArrayList()
|
||||||
if type(inProjections) != list:
|
if type(inProjections) != list:
|
||||||
raise TypeError, "Format Error in Projections, not a list: " \
|
raise TypeError, "Format Error in Projections, not a list: " \
|
||||||
+ `inProjections`
|
+ `inProjections`
|
||||||
for p in inProjections:
|
for p in inProjections:
|
||||||
updateProjections(p)
|
updateProjections(p)
|
||||||
for key in Projections.keys():
|
for key in Projections.keys():
|
||||||
projections.add(Projections[key])
|
projections.add(Projections[key])
|
||||||
|
|
||||||
allSiteIDs = ArrayList()
|
allSiteIDs = ArrayList()
|
||||||
allOfficeTypes = ArrayList()
|
allOfficeTypes = ArrayList()
|
||||||
for key in allSites.keys():
|
for key in allSites.keys():
|
||||||
allSiteIDs.add(key)
|
allSiteIDs.add(key)
|
||||||
try:
|
try:
|
||||||
ot = allSites[key][5]
|
ot = allSites[key][5]
|
||||||
if type(ot) != str:
|
if type(ot) != str:
|
||||||
raise TypeError, "Format Error in office type, not a str:",allSites[key]
|
raise TypeError, "Format Error in office type, not a str:",allSites[key]
|
||||||
except:
|
except:
|
||||||
ot = "wfo" #assumes wfo if not present
|
ot = "wfo" #assumes wfo if not present
|
||||||
allOfficeTypes.add(ot)
|
allOfficeTypes.add(ot)
|
||||||
|
|
||||||
siteId = ArrayList()
|
siteId = ArrayList()
|
||||||
siteId.add(site)
|
siteId.add(site)
|
||||||
|
|
||||||
timeZone = ArrayList()
|
timeZone = ArrayList()
|
||||||
timeZone.add(allSites[site][3])
|
timeZone.add(allSites[site][3])
|
||||||
|
|
||||||
return models, projections, vis, types, DiscreteDef, allSiteIDs, domain, siteId, timeZone, allOfficeTypes
|
return models, projections, vis, types, DiscreteDef, allSiteIDs, domain, siteId, timeZone, allOfficeTypes
|
||||||
|
|
||||||
def d2dParse(d2dmodels):
|
def d2dParse(d2dmodels):
|
||||||
dict = LinkedHashMap()
|
dict = LinkedHashMap()
|
||||||
for entry in d2dmodels:
|
for entry in d2dmodels:
|
||||||
if type(entry) is types.TupleType:
|
if type(entry) is types.TupleType:
|
||||||
d2dModelName, gfeModelName = check(entry, (str, str),
|
d2dModelName, gfeModelName = check(entry, (str, str),
|
||||||
"Format error in D2DMODELS entry", d2dmodels)
|
"Format error in D2DMODELS entry", d2dmodels)
|
||||||
|
|
||||||
dict.put(d2dModelName, gfeModelName)
|
dict.put(d2dModelName, gfeModelName)
|
||||||
|
|
||||||
elif type(entry) is types.StringType:
|
elif type(entry) is types.StringType:
|
||||||
d2dModelName = entry
|
d2dModelName = entry
|
||||||
dict.put(d2dModelName, d2dModelName)
|
dict.put(d2dModelName, d2dModelName)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise SyntaxError, "Invalid syntax for D2DMODELS" + `d2dmodels`
|
raise SyntaxError, "Invalid syntax for D2DMODELS" + `d2dmodels`
|
||||||
|
|
||||||
return dict
|
return dict
|
||||||
|
|
||||||
def netcdfParse(netcdfDirs):
|
def netcdfParse(netcdfDirs):
|
||||||
dict = LinkedHashMap()
|
dict = LinkedHashMap()
|
||||||
|
@ -417,139 +417,107 @@ def netcdfParse(netcdfDirs):
|
||||||
raise SyntaxError, "Invalid syntax for NETCDFDIRS" + `netcdfDirs`
|
raise SyntaxError, "Invalid syntax for NETCDFDIRS" + `netcdfDirs`
|
||||||
|
|
||||||
return dict
|
return dict
|
||||||
|
|
||||||
def parseSat(satdata):
|
def parseSat(satdata):
|
||||||
rval = LinkedHashMap()
|
rval = LinkedHashMap()
|
||||||
for e in satdata:
|
for e in satdata:
|
||||||
if type(e) is types.TupleType:
|
if type(e) is types.TupleType:
|
||||||
direct, name = check(e, (str, str),
|
direct, name = check(e, (str, str),
|
||||||
"Format error in SATDATA entry", satdata)
|
"Format error in SATDATA entry", satdata)
|
||||||
rval.put(direct, name)
|
rval.put(direct, name)
|
||||||
else:
|
else:
|
||||||
raise SyntaxError, "Invalid syntax for SATDATA" + `satdata`
|
raise SyntaxError, "Invalid syntax for SATDATA" + `satdata`
|
||||||
return rval
|
return rval
|
||||||
|
|
||||||
def otherParse(serverhost, mhsid, port,
|
def otherParse(serverhost, mhsid, port,
|
||||||
initmodules, accumElem,
|
initmodules, accumElem,
|
||||||
initskips, d2ddbver, logfilepurge, prddir, home,
|
initskips, d2ddbver, logfilepurge, prddir, home,
|
||||||
extraWEPrec, vtecRequestTime, autoConfigureNotifyTextProd,
|
extraWEPrec, vtecRequestTime, autoConfigureNotifyTextProd,
|
||||||
iscRoutingTableAddress, requestedISCsites, requestISC, sendiscOnSave,
|
iscRoutingTableAddress, requestedISCsites, requestISC, sendiscOnSave,
|
||||||
sendiscOnPublish, requestedISCparms, transmitScript):
|
sendiscOnPublish, requestedISCparms, transmitScript):
|
||||||
if type(serverhost) != str:
|
if type(serverhost) != str:
|
||||||
raise TypeError, "GFESUITE_HOST not an str: " + `serverhost`
|
raise TypeError, "GFESUITE_HOST not an str: " + `serverhost`
|
||||||
if type(mhsid) != str:
|
if type(mhsid) != str:
|
||||||
raise TypeError, "GFESUITE_MHSID not an str: " + `mhsid`
|
raise TypeError, "GFESUITE_MHSID not an str: " + `mhsid`
|
||||||
if type(vtecRequestTime) != int:
|
if type(vtecRequestTime) != int:
|
||||||
raise TypeError, "VTECPartners: VTEC_REMOTE_TABLE_FETCH_TIME " + \
|
raise TypeError, "VTECPartners: VTEC_REMOTE_TABLE_FETCH_TIME " + \
|
||||||
"not an int: " + `vtecRequestTime`
|
"not an int: " + `vtecRequestTime`
|
||||||
if type(port) != int:
|
if type(port) != int:
|
||||||
raise TypeError, "GFESUITE_PORT not an int: " + `port`
|
raise TypeError, "GFESUITE_PORT not an int: " + `port`
|
||||||
javainitmodules = dictCheck(initmodules, list, str, "INITMODULES")
|
initmodules = dictCheck(initmodules, list, str, "INITMODULES")
|
||||||
accumElem = dictCheck(accumElem, list, str, "D2DAccumulativeElements")
|
accumElem = dictCheck(accumElem, list, str, "D2DAccumulativeElements")
|
||||||
initskips = dictCheck(initskips, list, int, "INITSKIPS")
|
initskips = dictCheck(initskips, list, int, "INITSKIPS")
|
||||||
d2ddbver = dictCheck(d2ddbver, int, None, "D2DDBVERSIONS")
|
d2ddbver = dictCheck(d2ddbver, int, None, "D2DDBVERSIONS")
|
||||||
if type(logfilepurge) != int:
|
if type(logfilepurge) != int:
|
||||||
raise TypeError, "LOG_FILE_PURGE_AFTER not an int: " + `logfilepurge`
|
raise TypeError, "LOG_FILE_PURGE_AFTER not an int: " + `logfilepurge`
|
||||||
if type(autoConfigureNotifyTextProd) != int:
|
if type(autoConfigureNotifyTextProd) != int:
|
||||||
raise TypeError, "AUTO_CONFIGURE_NOTIFYTEXTPROD not an int: " + \
|
raise TypeError, "AUTO_CONFIGURE_NOTIFYTEXTPROD not an int: " + \
|
||||||
`logfilepurge`
|
`logfilepurge`
|
||||||
if type(prddir) != str:
|
if type(prddir) != str:
|
||||||
raise TypeError, "GFESUITE_PRDDIR not an str: " + `prddir`
|
raise TypeError, "GFESUITE_PRDDIR not an str: " + `prddir`
|
||||||
if type(home) != str:
|
if type(home) != str:
|
||||||
raise TypeError, "GFESUITE_HOME not an str: " + `home`
|
raise TypeError, "GFESUITE_HOME not an str: " + `home`
|
||||||
if type(extraWEPrec) != list:
|
if type(extraWEPrec) != list:
|
||||||
raise TypeError, "ExtraWEPrec not an list: " + `extraWEPrec`
|
raise TypeError, "ExtraWEPrec not an list: " + `extraWEPrec`
|
||||||
else:
|
else:
|
||||||
extraWEPrecision = LinkedHashMap()
|
extraWEPrecision = LinkedHashMap()
|
||||||
for e in extraWEPrec:
|
for e in extraWEPrec:
|
||||||
if type(e) == str:
|
if type(e) == str:
|
||||||
extraWEPrecision.put(e, Integer(1))
|
extraWEPrecision.put(e, Integer(1))
|
||||||
elif type(e) == tuple and len(e) == 2 and type(e[0]) == str and \
|
elif type(e) == tuple and len(e) == 2 and type(e[0]) == str and \
|
||||||
type(e[1]) == int:
|
type(e[1]) == int:
|
||||||
extraWEPrecision.put(e[0], Integer(e[1]))
|
extraWEPrecision.put(e[0], Integer(e[1]))
|
||||||
else:
|
|
||||||
raise TypeError, \
|
|
||||||
"Entry in ExtraWEPrec not str or (str, int): " + `e`
|
|
||||||
|
|
||||||
iscRoutingTableAddress = dictCheck(iscRoutingTableAddress,str,str,"ISC_ROUTING_TABLE_ADDRESS")
|
|
||||||
#if type(iscRoutingTableAddress) not in [str, types.NoneType]:
|
|
||||||
# raise TypeError, "ISC_ROUTING_TABLE_ADDRESS not None or a str: " + \
|
|
||||||
# `iscRoutingTableAddress`
|
|
||||||
#elif iscRoutingTableAddress is None:
|
|
||||||
# iscRoutingTableAddress = ""
|
|
||||||
|
|
||||||
reqISCsites = ArrayList()
|
|
||||||
if type(requestedISCsites) not in [list, types.NoneType]:
|
|
||||||
raise TypeError, "REQUESTED_ISC_SITES not None or a list: " + \
|
|
||||||
`requestedISCsites`
|
|
||||||
elif type(requestedISCsites) is list:
|
|
||||||
for r in requestedISCsites:
|
|
||||||
if type(r) != str:
|
|
||||||
raise TypeError, "REQUESTED_ISC_SITES not list of strings: " + \
|
|
||||||
`requestedISCsites`
|
|
||||||
else:
|
|
||||||
reqISCsites.add(r);
|
|
||||||
|
|
||||||
reqISCparms = ArrayList()
|
|
||||||
if type(requestedISCparms) not in [list, types.NoneType]:
|
|
||||||
raise TypeError, "REQUESTED_ISC_PARMS not None or a list: " + \
|
|
||||||
`requestedISCparms`
|
|
||||||
elif type(requestedISCparms) is list:
|
|
||||||
for r in requestedISCparms:
|
|
||||||
if type(r) != str:
|
|
||||||
raise TypeError, "REQUESTED_ISC_PARMS not list of strings: " + \
|
|
||||||
`requestedISCparms`
|
|
||||||
else:
|
|
||||||
reqISCparms.add(r)
|
|
||||||
|
|
||||||
if type(requestISC) != int:
|
|
||||||
raise TypeError, "REQUEST_ISC not an int: " + `requestISC`
|
|
||||||
if type(sendiscOnSave) != int:
|
|
||||||
raise TypeError, "SEND_ISC_ON_SAVE not an int: " + `sendiscOnSave`
|
|
||||||
if type(sendiscOnPublish) != int:
|
|
||||||
raise TypeError, "SEND_ISC_ON_PUBLISH not an int: " + `sendiscOnPublish`
|
|
||||||
|
|
||||||
if type(transmitScript) not in [str, types.NoneType]:
|
|
||||||
raise TypeError, "TRANSMIT_SCRIPT not None or str: " + `transmitScript`
|
|
||||||
elif transmitScript is None:
|
|
||||||
transmitScript = ""
|
|
||||||
|
|
||||||
# build model to init mapping
|
|
||||||
modelToInit = {}
|
|
||||||
for module in initmodules:
|
|
||||||
for model in initmodules[module]:
|
|
||||||
if modelToInit.has_key(model):
|
|
||||||
modelToInit[model].append(module)
|
|
||||||
else:
|
else:
|
||||||
modelToInit[model] = [module]
|
raise TypeError, \
|
||||||
|
"Entry in ExtraWEPrec not str or (str, int): " + `e`
|
||||||
# check for duplicate init modules
|
|
||||||
for model in modelToInit:
|
|
||||||
modules = modelToInit[model]
|
|
||||||
if len(modules) > 1:
|
|
||||||
message = "Multiple smartInit modules " + str(modules) + \
|
|
||||||
" are enabled for D2D model: " + model + ". " + str(modules[1:]) + \
|
|
||||||
" will be disabled. Please edit your localConfig.py file and disable all but one."
|
|
||||||
|
|
||||||
# log error message to edex log
|
iscRoutingTableAddress = dictCheck(iscRoutingTableAddress,str,str,"ISC_ROUTING_TABLE_ADDRESS")
|
||||||
import LogStream
|
#if type(iscRoutingTableAddress) not in [str, types.NoneType]:
|
||||||
LogStream.logProblem(message);
|
# raise TypeError, "ISC_ROUTING_TABLE_ADDRESS not None or a str: " + \
|
||||||
|
# `iscRoutingTableAddress`
|
||||||
# log error to alertViz
|
#elif iscRoutingTableAddress is None:
|
||||||
from com.raytheon.uf.edex.core import EDEXUtil
|
# iscRoutingTableAddress = ""
|
||||||
from com.raytheon.uf.common.status import UFStatus_Priority as Priority
|
|
||||||
EDEXUtil.sendMessageAlertViz(Priority.ERROR,
|
|
||||||
"com.raytheon.edex.plugin.gfe", "GFE", "GFE", message,
|
|
||||||
message, None)
|
|
||||||
|
|
||||||
# remove duplicate
|
reqISCsites = ArrayList()
|
||||||
for module in modules[1:]:
|
if type(requestedISCsites) not in [list, types.NoneType]:
|
||||||
javainitmodules.remove(module)
|
raise TypeError, "REQUESTED_ISC_SITES not None or a list: " + \
|
||||||
|
`requestedISCsites`
|
||||||
return serverhost, mhsid, \
|
elif type(requestedISCsites) is list:
|
||||||
port, javainitmodules, accumElem, \
|
for r in requestedISCsites:
|
||||||
initskips, d2ddbver, logfilepurge, prddir, home,\
|
if type(r) != str:
|
||||||
extraWEPrecision, vtecRequestTime, \
|
raise TypeError, "REQUESTED_ISC_SITES not list of strings: " + \
|
||||||
autoConfigureNotifyTextProd, \
|
`requestedISCsites`
|
||||||
iscRoutingTableAddress, reqISCsites, requestISC, sendiscOnSave, \
|
else:
|
||||||
sendiscOnPublish, reqISCparms, transmitScript
|
reqISCsites.add(r);
|
||||||
|
|
||||||
|
reqISCparms = ArrayList()
|
||||||
|
if type(requestedISCparms) not in [list, types.NoneType]:
|
||||||
|
raise TypeError, "REQUESTED_ISC_PARMS not None or a list: " + \
|
||||||
|
`requestedISCparms`
|
||||||
|
elif type(requestedISCparms) is list:
|
||||||
|
for r in requestedISCparms:
|
||||||
|
if type(r) != str:
|
||||||
|
raise TypeError, "REQUESTED_ISC_PARMS not list of strings: " + \
|
||||||
|
`requestedISCparms`
|
||||||
|
else:
|
||||||
|
reqISCparms.add(r)
|
||||||
|
|
||||||
|
if type(requestISC) != int:
|
||||||
|
raise TypeError, "REQUEST_ISC not an int: " + `requestISC`
|
||||||
|
if type(sendiscOnSave) != int:
|
||||||
|
raise TypeError, "SEND_ISC_ON_SAVE not an int: " + `sendiscOnSave`
|
||||||
|
if type(sendiscOnPublish) != int:
|
||||||
|
raise TypeError, "SEND_ISC_ON_PUBLISH not an int: " + `sendiscOnPublish`
|
||||||
|
|
||||||
|
if type(transmitScript) not in [str, types.NoneType]:
|
||||||
|
raise TypeError, "TRANSMIT_SCRIPT not None or str: " + `transmitScript`
|
||||||
|
elif transmitScript is None:
|
||||||
|
transmitScript = ""
|
||||||
|
|
||||||
|
return serverhost, mhsid, \
|
||||||
|
port, initmodules, accumElem, \
|
||||||
|
initskips, d2ddbver, logfilepurge, prddir, home,\
|
||||||
|
extraWEPrecision, vtecRequestTime, \
|
||||||
|
autoConfigureNotifyTextProd, \
|
||||||
|
iscRoutingTableAddress, reqISCsites, requestISC, sendiscOnSave, \
|
||||||
|
sendiscOnPublish, reqISCparms, transmitScript
|
||||||
|
|
|
@ -13,6 +13,11 @@
|
||||||
THIS CHANGE WAS DONE SO THAT CONFIGURATIONS COULD BE MADE IN ONE LOCATION
|
THIS CHANGE WAS DONE SO THAT CONFIGURATIONS COULD BE MADE IN ONE LOCATION
|
||||||
AND NOT ACROSS 20-30 TEMPLATES. A COUNTY-BASED and ZONE-BASED COUNTERPART
|
AND NOT ACROSS 20-30 TEMPLATES. A COUNTY-BASED and ZONE-BASED COUNTERPART
|
||||||
EXISTS TO THIS FILE.
|
EXISTS TO THIS FILE.
|
||||||
|
|
||||||
|
SOFTWARE HISTORY
|
||||||
|
Date Ticket# Engineer Description
|
||||||
|
01/20/15 RM #14929 Qinglu Lin Changed false to true for <withinPolygon> tags in <pathcastConfig>,
|
||||||
|
<pointSource variable="otherPoints>, and <pointSource variable="locationList">.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- CREATE DEFAULT OBJECTS. THIS SHOULD GENERALLY NOT BE TOUCHED-->
|
<!-- CREATE DEFAULT OBJECTS. THIS SHOULD GENERALLY NOT BE TOUCHED-->
|
||||||
|
@ -96,10 +101,7 @@
|
||||||
<!-- CREATE pathcastConfig OBJECT FOR PATHCAST (4TH BULLET) -->
|
<!-- CREATE pathcastConfig OBJECT FOR PATHCAST (4TH BULLET) -->
|
||||||
<pathcastConfig>
|
<pathcastConfig>
|
||||||
<type>AREA</type>
|
<type>AREA</type>
|
||||||
<!-- the withinPolygon variable set to false will bring in points
|
<withinPolygon>true</withinPolygon>
|
||||||
outside of the polygon which is necessary for the pathcast to reference
|
|
||||||
points that are near the water but not on the water -->
|
|
||||||
<withinPolygon>false</withinPolygon>
|
|
||||||
<inclusionPercent>1</inclusionPercent>
|
<inclusionPercent>1</inclusionPercent>
|
||||||
<distanceThreshold>10.0</distanceThreshold>
|
<distanceThreshold>10.0</distanceThreshold>
|
||||||
<interval>5</interval>
|
<interval>5</interval>
|
||||||
|
@ -131,7 +133,7 @@
|
||||||
<inclusionPercent>1</inclusionPercent>
|
<inclusionPercent>1</inclusionPercent>
|
||||||
<type>AREA</type>
|
<type>AREA</type>
|
||||||
<searchMethod>TRACK</searchMethod>
|
<searchMethod>TRACK</searchMethod>
|
||||||
<withinPolygon>false</withinPolygon>
|
<withinPolygon>true</withinPolygon>
|
||||||
<maxResults>10</maxResults>
|
<maxResults>10</maxResults>
|
||||||
<distanceThreshold>10</distanceThreshold>
|
<distanceThreshold>10</distanceThreshold>
|
||||||
<sortBy>
|
<sortBy>
|
||||||
|
@ -154,7 +156,7 @@
|
||||||
<inclusionPercent>1</inclusionPercent>
|
<inclusionPercent>1</inclusionPercent>
|
||||||
<type>AREA</type>
|
<type>AREA</type>
|
||||||
<searchMethod>TRACK</searchMethod>
|
<searchMethod>TRACK</searchMethod>
|
||||||
<withinPolygon>false</withinPolygon>
|
<withinPolygon>true</withinPolygon>
|
||||||
<maxResults>20</maxResults>
|
<maxResults>20</maxResults>
|
||||||
<distanceThreshold>10</distanceThreshold>
|
<distanceThreshold>10</distanceThreshold>
|
||||||
<filter>
|
<filter>
|
||||||
|
|
|
@ -182,6 +182,42 @@ MpeRUCFreezingLevel : ON
|
||||||
MpeLightningSrv : ON
|
MpeLightningSrv : ON
|
||||||
#====================================================================================
|
#====================================================================================
|
||||||
|
|
||||||
|
#===================== run_report_alarm Configuration ===============================
|
||||||
|
# These settings modify behavior of the EDEX RunReportAlarmSrv service, which
|
||||||
|
# replaced the original run_report_alarm script ported from A1 hydro.
|
||||||
|
#
|
||||||
|
## Mandatory Arguments:
|
||||||
|
## alarm_product_id : The product id that will be used to write the alarm
|
||||||
|
## report product into the textdb.
|
||||||
|
##
|
||||||
|
## Optional Arguments:
|
||||||
|
## alarm_file_suffix : A Java date/time format string that will be used as
|
||||||
|
## the alarm report's file extension when the product is
|
||||||
|
## written to disk. Product file path is
|
||||||
|
## ${whfs_product_dir}/PRODUCT_ID.FILE_SUFFIX.
|
||||||
|
##
|
||||||
|
## alarm_report_mode : Report mode. Valid values are one of the following:
|
||||||
|
## ALL, FRESH, RECENT, UNREPORTED, NEAREST, NEAR_NOW,
|
||||||
|
## LATEST_MAXFCST, or NEW_OR_INCREASED.
|
||||||
|
##
|
||||||
|
## alarm_filter : Additional filtering options for the product.
|
||||||
|
## Valid values can one or many of the following:
|
||||||
|
## 'O', 'F', 'T', 'M', 'R', 'L', 'U', 'D'.
|
||||||
|
##
|
||||||
|
## alarm_pe_filter : Physical element filter.
|
||||||
|
##
|
||||||
|
## alarm_minutes : For certain report modes, creates a window going back
|
||||||
|
## or forward the specified number of minutes.
|
||||||
|
## Valid values are 1 - 999999.
|
||||||
|
##
|
||||||
|
## alarm_verbose : Whether or not to create a "verbose mode" report.
|
||||||
|
## Valid values are TRUE or FALSE.
|
||||||
|
##
|
||||||
|
|
||||||
|
alarm_product_id : CCCACRXXX
|
||||||
|
alarm_file_suffix : MMdd.HHmm
|
||||||
|
alarm_report_mode : NEAREST
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
# Executable directory tokens.
|
# Executable directory tokens.
|
||||||
|
@ -207,7 +243,7 @@ server_name : ONLINE # Informix database server name
|
||||||
db_name : hd_ob92lwx # IHFS database name
|
db_name : hd_ob92lwx # IHFS database name
|
||||||
damcat_db_name : dc_ob5xxx # Dam Catalog database name
|
damcat_db_name : dc_ob5xxx # Dam Catalog database name
|
||||||
hdb_db_name : ob81_histdata # Historical database.
|
hdb_db_name : ob81_histdata # Historical database.
|
||||||
pghost : localhost # The machine PostGres is running on
|
pghost : dx1f # The machine PostGres is running on
|
||||||
pguser : awips # The user allowed to access PostGres
|
pguser : awips # The user allowed to access PostGres
|
||||||
pgport : 5432 # The PostGres Server port
|
pgport : 5432 # The PostGres Server port
|
||||||
adb_name : adb_ob7xxx # RFC archive database name
|
adb_name : adb_ob7xxx # RFC archive database name
|
||||||
|
@ -1896,7 +1932,11 @@ mpe_post_output : $(mpe_fieldgen_product_dir)/post_analysis
|
||||||
# add ,RDMOSAIC,BDMOSAIC,LDMOSAIC,MDMOSAIC,MLDMOSAIC,AVGRDMOSAIC,MAXRDMOSAIC,SRDMOSAIC,SRDGMOSAIC to existing mpe_generate_list token
|
# add ,RDMOSAIC,BDMOSAIC,LDMOSAIC,MDMOSAIC,MLDMOSAIC,AVGRDMOSAIC,MAXRDMOSAIC,SRDMOSAIC,SRDGMOSAIC to existing mpe_generate_list token
|
||||||
|
|
||||||
# ================== end of SSHP Directory Structure tokens ========================
|
# ================== end of SSHP Directory Structure tokens ========================
|
||||||
|
# nrldb tokens
|
||||||
|
nrldb_log : $(whfs_log_dir)/nrldb
|
||||||
|
nrldb_data : $(whfs_local_data_dir)/nrldb
|
||||||
|
nrldb_config : $(whfs_config_dir)/nrldb
|
||||||
|
nrldb_tmp : /awips/hydroapps/whfs/local/data/output
|
||||||
|
|
||||||
# The syntax needed in the file is:
|
# The syntax needed in the file is:
|
||||||
#
|
#
|
||||||
|
|
|
@ -19,6 +19,9 @@ import java.util.List;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------- ------- -------- -----------
|
* ------- ------- -------- -----------
|
||||||
* 04/23/2012 229 Chin Chen Initial coding
|
* 04/23/2012 229 Chin Chen Initial coding
|
||||||
|
* 01/27/2015 DR#17006,
|
||||||
|
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||||
|
* in Volume Browser
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -37,9 +40,10 @@ public class NsharpSoundingElementStateProperty {
|
||||||
private int compColorIndex;
|
private int compColorIndex;
|
||||||
private List<NcSoundingLayer> sndLyLst;
|
private List<NcSoundingLayer> sndLyLst;
|
||||||
private List<NcSoundingLayer> sndLyLstBk;
|
private List<NcSoundingLayer> sndLyLstBk;
|
||||||
|
private boolean goodData = true; //#5929
|
||||||
public NsharpSoundingElementStateProperty(String elementDescription,
|
public NsharpSoundingElementStateProperty(String elementDescription,
|
||||||
String stnDescription,
|
String stnDescription,
|
||||||
String timeDescription, NsharpStationInfo stnInfo, List<NcSoundingLayer> sndLyLst) {
|
String timeDescription, NsharpStationInfo stnInfo, List<NcSoundingLayer> sndLyLst, boolean goodData) {
|
||||||
super();
|
super();
|
||||||
this.elementDescription = elementDescription;
|
this.elementDescription = elementDescription;
|
||||||
//this.elementState = elementState;
|
//this.elementState = elementState;
|
||||||
|
@ -49,6 +53,7 @@ public class NsharpSoundingElementStateProperty {
|
||||||
this.sndType = stnInfo.getSndType();
|
this.sndType = stnInfo.getSndType();
|
||||||
this.compColorIndex = NsharpConstants.LINE_COMP1;;
|
this.compColorIndex = NsharpConstants.LINE_COMP1;;
|
||||||
this.sndLyLst = sndLyLst;
|
this.sndLyLst = sndLyLst;
|
||||||
|
this.goodData = goodData; //#5929
|
||||||
sndLyLstBk= new ArrayList<NcSoundingLayer>(sndLyLst.size());
|
sndLyLstBk= new ArrayList<NcSoundingLayer>(sndLyLst.size());
|
||||||
for(NcSoundingLayer ly : sndLyLst){
|
for(NcSoundingLayer ly : sndLyLst){
|
||||||
try {
|
try {
|
||||||
|
@ -134,5 +139,13 @@ public class NsharpSoundingElementStateProperty {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isGoodData() {
|
||||||
|
return goodData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoodData(boolean goodData) {
|
||||||
|
this.goodData = goodData;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -13,7 +13,10 @@
|
||||||
* 05/02/2012 229 Chin Chen Initial coding for multiple display panes implementation
|
* 05/02/2012 229 Chin Chen Initial coding for multiple display panes implementation
|
||||||
* 03/11/2013 972 Greg Hull rm paneNumber
|
* 03/11/2013 972 Greg Hull rm paneNumber
|
||||||
* 03/11/2013 2491 bsteffen extend IDescriptor derictly for better serialization detection.
|
* 03/11/2013 2491 bsteffen extend IDescriptor derictly for better serialization detection.
|
||||||
|
* 01/13/2015 DR#17008,
|
||||||
|
* task#5930 Chin Chen NSHARP Hodograph Does Not Loop in D2D Lite Configuration
|
||||||
|
* moved "setFrameCoordinator()" from NsharpSkewTPaneDescriptor to here,
|
||||||
|
* so it can be used by other descriptor
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -24,6 +27,7 @@ package gov.noaa.nws.ncep.ui.nsharp.display;
|
||||||
|
|
||||||
import gov.noaa.nws.ncep.ui.nsharp.display.rsc.NsharpAbstractPaneResource;
|
import gov.noaa.nws.ncep.ui.nsharp.display.rsc.NsharpAbstractPaneResource;
|
||||||
import gov.noaa.nws.ncep.ui.nsharp.display.rsc.NsharpResourceHandler;
|
import gov.noaa.nws.ncep.ui.nsharp.display.rsc.NsharpResourceHandler;
|
||||||
|
import gov.noaa.nws.ncep.viz.ui.display.NCLoopProperties;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -34,15 +38,14 @@ import org.geotools.referencing.crs.DefaultEngineeringCRS;
|
||||||
|
|
||||||
import com.raytheon.uf.viz.core.PixelExtent;
|
import com.raytheon.uf.viz.core.PixelExtent;
|
||||||
import com.raytheon.uf.viz.core.datastructure.LoopProperties;
|
import com.raytheon.uf.viz.core.datastructure.LoopProperties;
|
||||||
|
import com.raytheon.uf.viz.core.drawables.FrameCoordinator;
|
||||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||||
|
import com.raytheon.uf.viz.core.drawables.IFrameCoordinator;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.viz.core.graphing.GraphDescriptor;
|
import com.raytheon.viz.core.graphing.GraphDescriptor;
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
public class NsharpAbstractPaneDescriptor extends GraphDescriptor implements
|
public class NsharpAbstractPaneDescriptor extends GraphDescriptor implements
|
||||||
IDescriptor {
|
IDescriptor {
|
||||||
// @XmlElement
|
|
||||||
// protected int paneNumber;
|
|
||||||
|
|
||||||
protected NsharpResourceHandler rscHandler=null;
|
protected NsharpResourceHandler rscHandler=null;
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,14 +56,6 @@ public class NsharpAbstractPaneDescriptor extends GraphDescriptor implements
|
||||||
public void setRscHandler(NsharpResourceHandler rscHandler) {
|
public void setRscHandler(NsharpResourceHandler rscHandler) {
|
||||||
this.rscHandler = rscHandler;
|
this.rscHandler = rscHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public int getPaneNumber() {
|
|
||||||
// return paneNumber;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setPaneNumber(int paneNumber) {
|
|
||||||
// this.paneNumber = paneNumber;
|
|
||||||
// }
|
|
||||||
|
|
||||||
public NsharpAbstractPaneDescriptor() {
|
public NsharpAbstractPaneDescriptor() {
|
||||||
super();
|
super();
|
||||||
|
@ -106,4 +101,64 @@ public class NsharpAbstractPaneDescriptor extends GraphDescriptor implements
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//DR17008
|
||||||
|
protected void setFrameCoordinator() {
|
||||||
|
frameCoordinator = new FrameCoordinator(this) {
|
||||||
|
@Override
|
||||||
|
/*
|
||||||
|
* Chin Note: this function handles keyboard up/down/left/right arrow keys for station and time line stepping.
|
||||||
|
*/
|
||||||
|
public void changeFrame(
|
||||||
|
IFrameCoordinator.FrameChangeOperation operation,
|
||||||
|
IFrameCoordinator.FrameChangeMode mode) {
|
||||||
|
if(rscHandler == null)
|
||||||
|
return;
|
||||||
|
//System.out.println("NsharpSkewTPaneDescriptor changeFrame(operation) called op="+operation+" mode"+mode);
|
||||||
|
if(mode == IFrameCoordinator.FrameChangeMode.SPACE_ONLY){
|
||||||
|
//up/down arrow keys for stepping stations
|
||||||
|
//editor.getRscHandler().setSteppingStnIdList(operation);
|
||||||
|
rscHandler.setSteppingStnIdList(operation);
|
||||||
|
} else if(mode == IFrameCoordinator.FrameChangeMode.TIME_ONLY || mode == IFrameCoordinator.FrameChangeMode.TIME_AND_SPACE){
|
||||||
|
//left/right arrow keys for stepping time lines
|
||||||
|
//editor.getRscHandler().setSteppingTimeLine(operation, mode);
|
||||||
|
rscHandler.setSteppingTimeLine(operation, mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see com.raytheon.uf.viz.core.drawables.FrameCoordinator#changeFrame(com.raytheon.uf.viz.core.datastructure.LoopProperties)
|
||||||
|
* This function handling nsharp looping.
|
||||||
|
* Chin: 12.8.1: let skewtPaneDescriptor handle looping. All other pane descriptor will do nothing. Otherwise, we will looping X times faster when we
|
||||||
|
* have X number of panes configured and each pane move frame once.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void changeFrame(LoopProperties loopProperties) {
|
||||||
|
if(rscHandler == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
long waitTime = Long.MAX_VALUE;
|
||||||
|
//System.out.println("NsharpSkewTPaneDescriptor changeFrame(loop) called, loopDirection= "+loopDirection + " fwd="+loopProperties.getFwdFrameTime()+
|
||||||
|
// " back="+loopProperties.getRevFrameTime() + " 1st dt="+loopProperties.getFirstFrameDwell()+ " lasDt="+loopProperties.getLastFrameDwell());
|
||||||
|
if(loopProperties.getMode() == LoopProperties.LoopMode.Forward || loopProperties.getMode() == LoopProperties.LoopMode.Cycle)
|
||||||
|
waitTime = loopProperties.getFwdFrameTime();
|
||||||
|
else
|
||||||
|
waitTime = loopProperties.getRevFrameTime();
|
||||||
|
int frameSize= rscHandler.getTimeElementListSize();
|
||||||
|
int curFrameIndex = rscHandler.getCurrentTimeElementListIndex();
|
||||||
|
if(curFrameIndex == 0)
|
||||||
|
waitTime = loopProperties.getFirstFrameDwell();
|
||||||
|
else if(curFrameIndex == frameSize-1)
|
||||||
|
waitTime = loopProperties.getLastFrameDwell();
|
||||||
|
|
||||||
|
loopProperties.drawAfterWait(waitTime);
|
||||||
|
//System.out.println("wait time="+waitTime);
|
||||||
|
if (loopProperties.isShouldDraw()) {
|
||||||
|
rscHandler.setLoopingDataTimeLine(loopProperties);
|
||||||
|
//System.out.println("loopinp step");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@ package gov.noaa.nws.ncep.ui.nsharp.display;
|
||||||
* 06/14/2011 11-5 Chin Chen migration
|
* 06/14/2011 11-5 Chin Chen migration
|
||||||
* 03/11/2013 972 Greg Hull rm paneNum and editorNum; rm AbstractNcEditor
|
* 03/11/2013 972 Greg Hull rm paneNum and editorNum; rm AbstractNcEditor
|
||||||
* 03/25/2013 972 Greg Hull rm unused Add/RemoveListeners.
|
* 03/25/2013 972 Greg Hull rm unused Add/RemoveListeners.
|
||||||
|
* 01/13/2015 DR#17008,
|
||||||
|
* task#5930 Chin Chen NSHARP Hodograph Does Not Loop in D2D Lite Configuration
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -178,7 +180,7 @@ public class NsharpEditor extends AbstractEditor implements
|
||||||
private int futureHeightHint;
|
private int futureHeightHint;
|
||||||
|
|
||||||
private int futureWidthHint;
|
private int futureWidthHint;
|
||||||
|
|
||||||
private String paneConfigurationName;
|
private String paneConfigurationName;
|
||||||
|
|
||||||
private IRenderableDisplay[] displayArray;
|
private IRenderableDisplay[] displayArray;
|
||||||
|
@ -1382,13 +1384,17 @@ public class NsharpEditor extends AbstractEditor implements
|
||||||
DISPLAY_SPC_GRAPHS = -1;
|
DISPLAY_SPC_GRAPHS = -1;
|
||||||
} else if (paneConfigurationName // d2dlite start
|
} else if (paneConfigurationName // d2dlite start
|
||||||
.equals(NsharpConstants.PANE_LITE_D2D_CFG_STR)) {
|
.equals(NsharpConstants.PANE_LITE_D2D_CFG_STR)) {
|
||||||
if (rscHandler != null
|
//5930
|
||||||
&& rscHandler.getCurrentGraphMode() == NsharpConstants.GRAPH_HODO) {
|
NsharpPaletteWindow win = NsharpPaletteWindow.getInstance();
|
||||||
DISPLAY_HODO = 0;
|
if (win != null &&
|
||||||
|
win.getCurrentGraphMode() == NsharpConstants.GRAPH_HODO) {
|
||||||
|
//#5930if (rscHandler != null
|
||||||
|
// && rscHandler.getCurrentGraphMode() == NsharpConstants.GRAPH_HODO) {
|
||||||
|
DISPLAY_HODO = 0 ;
|
||||||
DISPLAY_TIMESTN = DISPLAY_HODO + 1;
|
DISPLAY_TIMESTN = DISPLAY_HODO + 1;
|
||||||
DISPLAY_SKEWT = -1;
|
DISPLAY_SKEWT = -1;
|
||||||
} else {
|
} else {
|
||||||
DISPLAY_SKEWT = 0;
|
DISPLAY_SKEWT = 0;
|
||||||
DISPLAY_TIMESTN = DISPLAY_SKEWT + 1;
|
DISPLAY_TIMESTN = DISPLAY_SKEWT + 1;
|
||||||
DISPLAY_HODO = -1;
|
DISPLAY_HODO = -1;
|
||||||
}
|
}
|
||||||
|
@ -1459,8 +1465,12 @@ public class NsharpEditor extends AbstractEditor implements
|
||||||
// d2dlite start
|
// d2dlite start
|
||||||
} else if (paneConfigurationName
|
} else if (paneConfigurationName
|
||||||
.equals(NsharpConstants.PANE_LITE_D2D_CFG_STR)) {
|
.equals(NsharpConstants.PANE_LITE_D2D_CFG_STR)) {
|
||||||
if (rscHandler != null
|
//5930
|
||||||
&& rscHandler.getCurrentGraphMode() == NsharpConstants.GRAPH_HODO) {
|
NsharpPaletteWindow win = NsharpPaletteWindow.getInstance();
|
||||||
|
if (win != null &&
|
||||||
|
win.getCurrentGraphMode() == NsharpConstants.GRAPH_HODO) {
|
||||||
|
//#5930 if (rscHandler != null
|
||||||
|
//&& rscHandler.getCurrentGraphMode() == NsharpConstants.GRAPH_HODO) {
|
||||||
displayArray[DISPLAY_HODO] = new NsharpHodoPaneDisplay(
|
displayArray[DISPLAY_HODO] = new NsharpHodoPaneDisplay(
|
||||||
new PixelExtent(NsharpConstants.HODO_DISPLAY_REC),
|
new PixelExtent(NsharpConstants.HODO_DISPLAY_REC),
|
||||||
DISPLAY_HODO);
|
DISPLAY_HODO);
|
||||||
|
@ -1610,9 +1620,11 @@ public class NsharpEditor extends AbstractEditor implements
|
||||||
nsharpComp = new Composite[DISPLAY_TOTAL];
|
nsharpComp = new Composite[DISPLAY_TOTAL];
|
||||||
displayPane = new VizDisplayPane[DISPLAY_TOTAL];
|
displayPane = new VizDisplayPane[DISPLAY_TOTAL];
|
||||||
|
|
||||||
EditorInput edInput = new EditorInput(new NCLoopProperties(),
|
//EditorInput edInput = new EditorInput(new NsharpLoopProperties(),
|
||||||
|
// displayArray);
|
||||||
|
//CHIN task#5930 use same loop properties
|
||||||
|
EditorInput edInput = new EditorInput(this.editorInput.getLoopProperties(),
|
||||||
displayArray);
|
displayArray);
|
||||||
|
|
||||||
this.setInput(edInput);
|
this.setInput(edInput);
|
||||||
this.displaysToLoad = displayArray;
|
this.displaysToLoad = displayArray;
|
||||||
for (IRenderableDisplay display : displayArray) {
|
for (IRenderableDisplay display : displayArray) {
|
||||||
|
@ -2130,4 +2142,10 @@ public class NsharpEditor extends AbstractEditor implements
|
||||||
// +
|
// +
|
||||||
// pane.toString()+" newRenderableDisplay="+newRenderableDisplay.toString());
|
// pane.toString()+" newRenderableDisplay="+newRenderableDisplay.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPaneConfigurationName() {
|
||||||
|
return paneConfigurationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -11,6 +11,8 @@
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------- ------- -------- -----------
|
* ------- ------- -------- -----------
|
||||||
* 05/02/2012 229 Chin Chen Initial coding for multiple display panes implementation
|
* 05/02/2012 229 Chin Chen Initial coding for multiple display panes implementation
|
||||||
|
* 01/13/2015 DR#17008,
|
||||||
|
* task#5930 Chin Chen NSHARP Hodograph Does Not Loop in D2D Lite Configuration
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -19,7 +21,9 @@
|
||||||
*/
|
*/
|
||||||
package gov.noaa.nws.ncep.ui.nsharp.display;
|
package gov.noaa.nws.ncep.ui.nsharp.display;
|
||||||
|
|
||||||
|
import gov.noaa.nws.ncep.ui.nsharp.NsharpConstants;
|
||||||
import gov.noaa.nws.ncep.ui.nsharp.display.rsc.NsharpHodoPaneResource;
|
import gov.noaa.nws.ncep.ui.nsharp.display.rsc.NsharpHodoPaneResource;
|
||||||
|
import gov.noaa.nws.ncep.viz.common.ui.NmapCommon;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -28,19 +32,36 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
import com.raytheon.uf.viz.core.PixelExtent;
|
import com.raytheon.uf.viz.core.PixelExtent;
|
||||||
|
import com.raytheon.uf.viz.core.drawables.IFrameCoordinator;
|
||||||
|
import com.raytheon.uf.viz.d2d.core.time.D2DTimeMatcher;
|
||||||
|
import com.raytheon.viz.ui.perspectives.VizPerspectiveListener;
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
@XmlType(name = "nsharpHodoPaneDescriptor")
|
@XmlType(name = "nsharpHodoPaneDescriptor")
|
||||||
public class NsharpHodoPaneDescriptor extends NsharpAbstractPaneDescriptor {
|
public class NsharpHodoPaneDescriptor extends NsharpAbstractPaneDescriptor {
|
||||||
|
|
||||||
public NsharpHodoPaneDescriptor(PixelExtent pe) {
|
public NsharpHodoPaneDescriptor(PixelExtent pe) {
|
||||||
super(pe);
|
super(pe);
|
||||||
//System.out.println("NsharpHodoPaneDescriptor created " + this.toString());
|
if((NsharpEditor.getActiveNsharpEditor() != null) && (NsharpEditor.getActiveNsharpEditor().getPaneConfigurationName().equals(NsharpConstants.PANE_LITE_D2D_CFG_STR)))
|
||||||
|
{
|
||||||
|
setTimeMatcher(new D2DTimeMatcher());
|
||||||
|
setFrameCoordinator();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public NsharpHodoPaneDescriptor(PixelExtent pe, int paneNumber) {
|
public NsharpHodoPaneDescriptor(PixelExtent pe, int paneNumber) {
|
||||||
super(pe, paneNumber);
|
super(pe, paneNumber);
|
||||||
|
if((NsharpEditor.getActiveNsharpEditor() != null) && (NsharpEditor.getActiveNsharpEditor().getPaneConfigurationName().equals(NsharpConstants.PANE_LITE_D2D_CFG_STR)))
|
||||||
|
{
|
||||||
|
setTimeMatcher(new D2DTimeMatcher());
|
||||||
|
setFrameCoordinator();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public NsharpHodoPaneDescriptor() {
|
public NsharpHodoPaneDescriptor() {
|
||||||
super();
|
super();
|
||||||
|
if((NsharpEditor.getActiveNsharpEditor() != null) && (NsharpEditor.getActiveNsharpEditor().getPaneConfigurationName().equals(NsharpConstants.PANE_LITE_D2D_CFG_STR)))
|
||||||
|
{
|
||||||
|
setTimeMatcher(new D2DTimeMatcher());
|
||||||
|
setFrameCoordinator();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public NsharpHodoPaneResource getHodoResource() {
|
public NsharpHodoPaneResource getHodoResource() {
|
||||||
List<NsharpHodoPaneResource> list = resourceList
|
List<NsharpHodoPaneResource> list = resourceList
|
||||||
|
@ -50,5 +71,35 @@ public class NsharpHodoPaneDescriptor extends NsharpAbstractPaneDescriptor {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
@Override
|
||||||
|
/*
|
||||||
|
* Chin Note: this function handles time line stepping from NC Perspective tool bar left/right/first/last arrow Buttons.
|
||||||
|
*/
|
||||||
|
public void changeFrame(FrameChangeOperation operation, FrameChangeMode mode) {
|
||||||
|
synchronized (this) {
|
||||||
|
//Chin Note: there are multiple (6) panes.
|
||||||
|
//We only need to step one timeline. Therefore, we handle stepping by skewt pane.
|
||||||
|
//However, for D2D LITE display configuration, when switched to HODO pane, skewT pane is no longer
|
||||||
|
//in charge. therefore, we have to handle this special case here by HODO pane.
|
||||||
|
|
||||||
|
if((rscHandler == null) ||(!rscHandler.getPaneConfigurationName().equals(NsharpConstants.PANE_LITE_D2D_CFG_STR)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( VizPerspectiveListener.getCurrentPerspectiveManager()!= null){
|
||||||
|
//System.out.println("changeFrame: current perspective ="+VizPerspectiveListener.getCurrentPerspectiveManager().getPerspectiveId());
|
||||||
|
if(!VizPerspectiveListener.getCurrentPerspectiveManager().getPerspectiveId().equals(NmapCommon.NatlCntrsPerspectiveID)){
|
||||||
|
if(mode != FrameChangeMode.TIME_ONLY)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// we will have to do conversion here
|
||||||
|
IFrameCoordinator.FrameChangeOperation dop = IFrameCoordinator.FrameChangeOperation.valueOf(operation.name());
|
||||||
|
IFrameCoordinator.FrameChangeMode dmode = IFrameCoordinator.FrameChangeMode.valueOf(mode.name());
|
||||||
|
rscHandler.setSteppingTimeLine(dop, dmode);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------- ------- -------- -----------
|
* ------- ------- -------- -----------
|
||||||
* 05/02/2012 229 Chin Chen Initial coding for multiple display panes implementation
|
* 05/02/2012 229 Chin Chen Initial coding for multiple display panes implementation
|
||||||
|
* 01/13/2015 DR#17008,
|
||||||
|
* task#5930 Chin Chen NSHARP Hodograph Does Not Loop in D2D Lite Configuration
|
||||||
|
* moved "setFrameCoordinator()" to NsharpAbstractPaneDescriptor,
|
||||||
|
* so it can be used by other descriptor
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -29,8 +33,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
import com.raytheon.uf.viz.core.PixelExtent;
|
import com.raytheon.uf.viz.core.PixelExtent;
|
||||||
import com.raytheon.uf.viz.core.datastructure.LoopProperties;
|
|
||||||
import com.raytheon.uf.viz.core.drawables.FrameCoordinator;
|
|
||||||
import com.raytheon.uf.viz.core.drawables.IFrameCoordinator;
|
import com.raytheon.uf.viz.core.drawables.IFrameCoordinator;
|
||||||
import com.raytheon.uf.viz.d2d.core.time.D2DTimeMatcher;
|
import com.raytheon.uf.viz.d2d.core.time.D2DTimeMatcher;
|
||||||
import com.raytheon.viz.ui.perspectives.VizPerspectiveListener;
|
import com.raytheon.viz.ui.perspectives.VizPerspectiveListener;
|
||||||
|
@ -54,69 +56,7 @@ public class NsharpSkewTPaneDescriptor extends NsharpAbstractPaneDescriptor {
|
||||||
setTimeMatcher(new D2DTimeMatcher());
|
setTimeMatcher(new D2DTimeMatcher());
|
||||||
setFrameCoordinator();
|
setFrameCoordinator();
|
||||||
}
|
}
|
||||||
|
public NsharpSkewTPaneResource getSkewtResource() {
|
||||||
private void setFrameCoordinator() {
|
|
||||||
frameCoordinator = new FrameCoordinator(this) {
|
|
||||||
@Override
|
|
||||||
/*
|
|
||||||
* Chin Note: this function handles keyboard up/down/left/right arrow keys for station and time line stepping.
|
|
||||||
*/
|
|
||||||
public void changeFrame(
|
|
||||||
IFrameCoordinator.FrameChangeOperation operation,
|
|
||||||
IFrameCoordinator.FrameChangeMode mode) {
|
|
||||||
//NsharpEditor editor = NsharpEditor.getActiveNsharpEditor() ;
|
|
||||||
//if(editor== null || editor.getRscHandler()==null)
|
|
||||||
// return;
|
|
||||||
if(rscHandler == null)
|
|
||||||
return;
|
|
||||||
//System.out.println("NsharpSkewTPaneDescriptor changeFrame(operation) called op="+operation+" mode"+mode);
|
|
||||||
if(mode == IFrameCoordinator.FrameChangeMode.SPACE_ONLY){
|
|
||||||
//up/down arrow keys for stepping stations
|
|
||||||
//editor.getRscHandler().setSteppingStnIdList(operation);
|
|
||||||
rscHandler.setSteppingStnIdList(operation);
|
|
||||||
} else if(mode == IFrameCoordinator.FrameChangeMode.TIME_ONLY || mode == IFrameCoordinator.FrameChangeMode.TIME_AND_SPACE){
|
|
||||||
//left/right arrow keys for stepping time lines
|
|
||||||
//editor.getRscHandler().setSteppingTimeLine(operation, mode);
|
|
||||||
rscHandler.setSteppingTimeLine(operation, mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see com.raytheon.uf.viz.core.drawables.FrameCoordinator#changeFrame(com.raytheon.uf.viz.core.datastructure.LoopProperties)
|
|
||||||
* This function handling nsharp looping.
|
|
||||||
* Chin: 12.8.1: let skewtPaneDescriptor handle looping. All other pane descriptor will do nothing. Otherwise, we will looping X times faster when we
|
|
||||||
* have X number of panes configured and each pane move frame once.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void changeFrame(LoopProperties loopProperties) {
|
|
||||||
if(rscHandler == null)
|
|
||||||
return;
|
|
||||||
long waitTime = Long.MAX_VALUE;
|
|
||||||
//System.out.println("NsharpSkewTPaneDescriptor changeFrame(loop) called, loopDirection= "+loopDirection + " fwd="+loopProperties.getFwdFrameTime()+
|
|
||||||
// " back="+loopProperties.getRevFrameTime() + " 1st dt="+loopProperties.getFirstFrameDwell()+ " lasDt="+loopProperties.getLastFrameDwell());
|
|
||||||
if(loopProperties.getMode() == LoopProperties.LoopMode.Forward || loopProperties.getMode() == LoopProperties.LoopMode.Cycle)
|
|
||||||
waitTime = loopProperties.getFwdFrameTime();
|
|
||||||
else
|
|
||||||
waitTime = loopProperties.getRevFrameTime();
|
|
||||||
int frameSize= rscHandler.getTimeElementListSize();
|
|
||||||
int curFrameIndex = rscHandler.getCurrentTimeElementListIndex();
|
|
||||||
if(curFrameIndex == 0)
|
|
||||||
waitTime = loopProperties.getFirstFrameDwell();
|
|
||||||
else if(curFrameIndex == frameSize-1)
|
|
||||||
waitTime = loopProperties.getLastFrameDwell();
|
|
||||||
|
|
||||||
loopProperties.drawAfterWait(waitTime);
|
|
||||||
|
|
||||||
if (loopProperties.isShouldDraw()) {
|
|
||||||
rscHandler.setLoopingDataTimeLine(loopProperties);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
public NsharpSkewTPaneResource getSkewtResource() {
|
|
||||||
List<NsharpSkewTPaneResource> list = resourceList
|
List<NsharpSkewTPaneResource> list = resourceList
|
||||||
.getResourcesByTypeAsType(NsharpSkewTPaneResource.class);
|
.getResourcesByTypeAsType(NsharpSkewTPaneResource.class);
|
||||||
if (list != null && !list.isEmpty()) {
|
if (list != null && !list.isEmpty()) {
|
||||||
|
|
|
@ -13,6 +13,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
||||||
* 04/23/2012 229 Chin Chen Initial coding
|
* 04/23/2012 229 Chin Chen Initial coding
|
||||||
* 04/23/2014 Chin Chen Add d2d lite page
|
* 04/23/2014 Chin Chen Add d2d lite page
|
||||||
* 08/11/2014 Chin Chen fix typo
|
* 08/11/2014 Chin Chen fix typo
|
||||||
|
* 01/27/2015 DR#17006,
|
||||||
|
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||||
|
* in Volume Browser
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -60,7 +63,8 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
||||||
// number of this page. index 0
|
// number of this page. index 0
|
||||||
// point to a dummy.
|
// point to a dummy.
|
||||||
|
|
||||||
private static final String NO_DATA = "NO VALID DATA AVAILABLE";
|
private static final String NO_DATA = "NO VALID DATA AVAILABLE FOR THIS PAGE";
|
||||||
|
private static final String INSUFFICIENT_DATA = "INSUFFICIENT DATA FOR PARAMETERS COMPUTATION";
|
||||||
|
|
||||||
// private double charHeight = NsharpConstants.CHAR_HEIGHT_;
|
// private double charHeight = NsharpConstants.CHAR_HEIGHT_;
|
||||||
private double curY;
|
private double curY;
|
||||||
|
@ -160,7 +164,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
||||||
handleResize();
|
handleResize();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((soundingLys != null) && (soundingLys.size() >= 4)) {
|
if ((soundingLys != null) && (rscHandler.isGoodData())) {//#5929
|
||||||
this.defaultFont.setSmoothing(false);
|
this.defaultFont.setSmoothing(false);
|
||||||
this.defaultFont.setScaleFont(false);
|
this.defaultFont.setScaleFont(false);
|
||||||
// write to panels
|
// write to panels
|
||||||
|
@ -187,6 +191,9 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else { //#5929
|
||||||
|
drawInsuffDataMessage(target, panelRectArray[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -239,6 +246,28 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
||||||
super.resetData(soundingLys, prevsoundingLys);
|
super.resetData(soundingLys, prevsoundingLys);
|
||||||
currentParcel = NsharpNativeConstants.PARCELTYPE_MOST_UNSTABLE;
|
currentParcel = NsharpNativeConstants.PARCELTYPE_MOST_UNSTABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") //#5929
|
||||||
|
private void drawInsuffDataMessage(IGraphicsTarget target, Rectangle rect)
|
||||||
|
throws VizException {
|
||||||
|
IFont myfont;
|
||||||
|
if (paneConfigurationName.equals(NsharpConstants.PANE_LITE_D2D_CFG_STR))
|
||||||
|
myfont = font9;
|
||||||
|
else
|
||||||
|
myfont = font20;
|
||||||
|
|
||||||
|
defineCharHeight(myfont);
|
||||||
|
myfont.setSmoothing(false);
|
||||||
|
myfont.setScaleFont(false);
|
||||||
|
sumP1Visible = true;
|
||||||
|
extent = new PixelExtent(rect);
|
||||||
|
target.setupClippingPlane(extent);
|
||||||
|
target.drawString(myfont, INSUFFICIENT_DATA, rect.x,
|
||||||
|
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
||||||
|
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void drawPanel(IGraphicsTarget target, int pageOrderNumber,
|
private void drawPanel(IGraphicsTarget target, int pageOrderNumber,
|
||||||
int dsiplayPanelNumber) throws VizException {
|
int dsiplayPanelNumber) throws VizException {
|
||||||
|
@ -344,7 +373,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
||||||
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
||||||
// have enough raw data
|
// have enough raw data
|
||||||
if ((nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0)) {
|
if ((nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0)) {
|
||||||
target.drawString(myfont, " " + NO_DATA, rect.x,
|
target.drawString(myfont, NO_DATA, rect.x,
|
||||||
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
||||||
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
||||||
return;
|
return;
|
||||||
|
@ -1053,7 +1082,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
||||||
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
||||||
// have enough raw data
|
// have enough raw data
|
||||||
if (nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0) {
|
if (nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0) {
|
||||||
target.drawString(myfont, " " + NO_DATA, rect.x,
|
target.drawString(myfont,NO_DATA, rect.x,
|
||||||
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
||||||
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
||||||
return;
|
return;
|
||||||
|
@ -3749,7 +3778,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
||||||
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
||||||
// have enough raw data
|
// have enough raw data
|
||||||
if ((nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0)) {
|
if ((nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0)) {
|
||||||
target.drawString(myfont, " " + NO_DATA, rect.x,
|
target.drawString(myfont, NO_DATA, rect.x,
|
||||||
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
||||||
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -10,6 +10,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------- ------- -------- -----------
|
* ------- ------- -------- -----------
|
||||||
* 04/23/2012 229 Chin Chen Initial coding
|
* 04/23/2012 229 Chin Chen Initial coding
|
||||||
|
* 01/27/2015 DR#17006,
|
||||||
|
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||||
|
* in Volume Browser
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -127,7 +130,7 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
||||||
hodoWindRscShapeList.add(shNcolor);
|
hodoWindRscShapeList.add(shNcolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float surfaceLevel = soundingLays.get(0).getGeoHeight(); //#5929
|
||||||
for (NcSoundingLayer layer : soundingLays){
|
for (NcSoundingLayer layer : soundingLays){
|
||||||
if(layer.getPressure() < 100 || layer.getWindSpeed() <0)
|
if(layer.getPressure() < 100 || layer.getWindSpeed() <0)
|
||||||
continue;
|
continue;
|
||||||
|
@ -138,15 +141,15 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
||||||
double [][] lines = {{world.mapX(c0.x), world.mapY(c0.y)},{world
|
double [][] lines = {{world.mapX(c0.x), world.mapY(c0.y)},{world
|
||||||
.mapX(c1.x), world.mapY(c1.y)}};
|
.mapX(c1.x), world.mapY(c1.y)}};
|
||||||
if(incolor == null){
|
if(incolor == null){
|
||||||
if(layer.getGeoHeight() <nsharpNative.nsharpLib.msl(3000)){
|
//use MSL here, so Converts height from (meters) AGL to MSL. #5929
|
||||||
//red
|
if(layer.getGeoHeight() < (3000+surfaceLevel)){
|
||||||
shapeR.addLineSegment(lines);
|
shapeR.addLineSegment(lines);
|
||||||
}
|
}
|
||||||
else if(layer.getGeoHeight() < nsharpNative.nsharpLib.msl(6000))
|
else if(layer.getGeoHeight() < (6000+surfaceLevel))
|
||||||
shapeG.addLineSegment(lines);
|
shapeG.addLineSegment(lines);
|
||||||
else if(layer.getGeoHeight() < nsharpNative.nsharpLib.msl(9000))
|
else if(layer.getGeoHeight() < (9000+surfaceLevel))
|
||||||
shapeY.addLineSegment(lines);
|
shapeY.addLineSegment(lines);
|
||||||
else if(layer.getGeoHeight() < nsharpNative.nsharpLib.msl(12000))
|
else if(layer.getGeoHeight() < (12000+surfaceLevel))
|
||||||
shapeC.addLineSegment(lines);
|
shapeC.addLineSegment(lines);
|
||||||
else
|
else
|
||||||
shapeV.addLineSegment(lines);
|
shapeV.addLineSegment(lines);
|
||||||
|
@ -177,6 +180,7 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
||||||
}
|
}
|
||||||
hodoWindRscShapeList.clear();
|
hodoWindRscShapeList.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
world = hodoBackground.computeWorld();
|
world = hodoBackground.computeWorld();
|
||||||
boolean compareStnIsOn = rscHandler.isCompareStnIsOn();
|
boolean compareStnIsOn = rscHandler.isCompareStnIsOn();
|
||||||
int currentTimeListIndex = rscHandler.getCurrentTimeElementListIndex();
|
int currentTimeListIndex = rscHandler.getCurrentTimeElementListIndex();
|
||||||
|
@ -575,7 +579,7 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hodoBackground.paintInternal(target, paintProps);
|
hodoBackground.paintInternal(target, paintProps);
|
||||||
if((soundingLys != null) && (soundingLys.size()>= 4))
|
if((soundingLys != null) && (soundingLys.size()> 2) )
|
||||||
{
|
{
|
||||||
this.font10.setSmoothing(false);
|
this.font10.setSmoothing(false);
|
||||||
this.font10.setScaleFont(false);
|
this.font10.setScaleFont(false);
|
||||||
|
@ -602,13 +606,11 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
||||||
}
|
}
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
if(cursorInHodo){
|
if(cursorInHodo){
|
||||||
|
|
||||||
drawHodoDynamicData(target, currentZoomLevel);
|
drawHodoDynamicData(target, currentZoomLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,6 +10,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------- ------- -------- -----------
|
* ------- ------- -------- -----------
|
||||||
* 04/23/2012 229 Chin Chen Initial coding
|
* 04/23/2012 229 Chin Chen Initial coding
|
||||||
|
* 01/27/2015 DR#17006,
|
||||||
|
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||||
|
* in Volume Browser
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -181,7 +184,7 @@ public class NsharpInsetPaneResource extends NsharpAbstractPaneResource{
|
||||||
//Chin, since we only display 4 insets and their backgrounds have same size, only draws 4 backgrounds.
|
//Chin, since we only display 4 insets and their backgrounds have same size, only draws 4 backgrounds.
|
||||||
//psblWatchTypeBackground.paint(target, paintProps);
|
//psblWatchTypeBackground.paint(target, paintProps);
|
||||||
//thetaEPresureBackground.paint(target, paintProps);
|
//thetaEPresureBackground.paint(target, paintProps);
|
||||||
if((soundingLys != null) && (soundingLys.size()>= 4))
|
if((soundingLys != null) && rscHandler.isGoodData()) //#5929)
|
||||||
{
|
{
|
||||||
this.font10.setSmoothing(false);
|
this.font10.setSmoothing(false);
|
||||||
this.font10.setScaleFont(false);
|
this.font10.setScaleFont(false);
|
||||||
|
@ -294,7 +297,7 @@ public class NsharpInsetPaneResource extends NsharpAbstractPaneResource{
|
||||||
return;
|
return;
|
||||||
//System.out.println("createRscWireFrameShapes called");
|
//System.out.println("createRscWireFrameShapes called");
|
||||||
disposeInsetWireFrameShapes();
|
disposeInsetWireFrameShapes();
|
||||||
if(soundingLys != null){
|
if(soundingLys != null && rscHandler.isGoodData()){ //#5929
|
||||||
|
|
||||||
WGraphics WGc= thetaEPresureBackground.getWorld();
|
WGraphics WGc= thetaEPresureBackground.getWorld();
|
||||||
createRscThetaEPressureShape(WGc);
|
createRscThetaEPressureShape(WGc);
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
* 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"
|
* 12/04/2014 DR16888 Chin Chen fixed issue that "Comp(Src) button not functioning properly in NSHARP display"
|
||||||
|
* 01/27/2015 DR#17006,
|
||||||
|
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||||
|
* in Volume Browser
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author Chin Chen
|
* @author Chin Chen
|
||||||
|
@ -161,6 +164,8 @@ public class NsharpResourceHandler {
|
||||||
|
|
||||||
private int[] pageDisplayOrderNumberArray = new int[NsharpConstants.PAGE_MAX_NUMBER + 1];
|
private int[] pageDisplayOrderNumberArray = new int[NsharpConstants.PAGE_MAX_NUMBER + 1];
|
||||||
|
|
||||||
|
//#5929
|
||||||
|
private boolean goodData=false;
|
||||||
// index is the real page defined in NsharpConstants to be shown, value is
|
// index is the real page defined in NsharpConstants to be shown, value is
|
||||||
// the order number of this page.
|
// the order number of this page.
|
||||||
// index 0 point to a dummy.
|
// index 0 point to a dummy.
|
||||||
|
@ -188,7 +193,7 @@ public class NsharpResourceHandler {
|
||||||
private int currentSoundingLayerIndex = 0;
|
private int currentSoundingLayerIndex = 0;
|
||||||
|
|
||||||
private int hodoEditingSoundingLayerIndex = 0;
|
private int hodoEditingSoundingLayerIndex = 0;
|
||||||
|
|
||||||
private boolean plotInteractiveTemp = false;
|
private boolean plotInteractiveTemp = false;
|
||||||
|
|
||||||
private Coordinate interactiveTempPointCoordinate;
|
private Coordinate interactiveTempPointCoordinate;
|
||||||
|
@ -981,6 +986,7 @@ public class NsharpResourceHandler {
|
||||||
if (skewtPaneRsc != null)
|
if (skewtPaneRsc != null)
|
||||||
skewtPaneRsc
|
skewtPaneRsc
|
||||||
.setCurrentSkewTEditMode(NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT);
|
.setCurrentSkewTEditMode(NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT);
|
||||||
|
elem.setGoodData(checkDataIntegrity(soundingLys));//#5929
|
||||||
resetData();
|
resetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -993,7 +999,12 @@ public class NsharpResourceHandler {
|
||||||
|
|
||||||
// update active sounding layer and picked stn info
|
// update active sounding layer and picked stn info
|
||||||
// re-populate snd data to nsharp native code lib for later calculating
|
// re-populate snd data to nsharp native code lib for later calculating
|
||||||
nsharpNative.populateSndgData(soundingLys);
|
//#5929 dont populate sounding data if data is bad
|
||||||
|
|
||||||
|
if(getCurSoundingElementStateProperty()!=null)
|
||||||
|
goodData= getCurSoundingElementStateProperty().isGoodData();
|
||||||
|
if(goodData)
|
||||||
|
nsharpNative.populateSndgData(soundingLys);
|
||||||
|
|
||||||
if (skewtPaneRsc != null)
|
if (skewtPaneRsc != null)
|
||||||
skewtPaneRsc.resetData(soundingLys, previousSoundingLys);
|
skewtPaneRsc.resetData(soundingLys, previousSoundingLys);
|
||||||
|
@ -1013,7 +1024,7 @@ public class NsharpResourceHandler {
|
||||||
// if soundingLys is null, then we stop here, after reset data.
|
// if soundingLys is null, then we stop here, after reset data.
|
||||||
if (soundingLys == null)
|
if (soundingLys == null)
|
||||||
return;
|
return;
|
||||||
if (soundingLys.size() > 0) {
|
if (soundingLys.size() > 0 && (goodData)) {
|
||||||
// set initial hodohouseC
|
// set initial hodohouseC
|
||||||
|
|
||||||
// ----- set hodo circle at Bunkers Right, Chin according to TTR6065
|
// ----- set hodo circle at Bunkers Right, Chin according to TTR6065
|
||||||
|
@ -1044,11 +1055,7 @@ public class NsharpResourceHandler {
|
||||||
* that really meant to reset parcel type.
|
* that really meant to reset parcel type.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
// Chin: TBD remove handle resize here to fix sizing issue when swapped
|
|
||||||
// nsharp from side pane back to main pane
|
|
||||||
// but, may cause other problem?
|
|
||||||
// if(skewtPaneRsc!=null)
|
|
||||||
// skewtPaneRsc.handleResize();
|
|
||||||
if (skewtPaneRsc != null)
|
if (skewtPaneRsc != null)
|
||||||
skewtPaneRsc.createRscWireFrameShapes();
|
skewtPaneRsc.createRscWireFrameShapes();
|
||||||
if (hodoPaneRsc != null)
|
if (hodoPaneRsc != null)
|
||||||
|
@ -1057,7 +1064,7 @@ public class NsharpResourceHandler {
|
||||||
insetPaneRsc.createInsetWireFrameShapes();
|
insetPaneRsc.createInsetWireFrameShapes();
|
||||||
if (witoPaneRsc != null)
|
if (witoPaneRsc != null)
|
||||||
witoPaneRsc.createAllWireFrameShapes();
|
witoPaneRsc.createAllWireFrameShapes();
|
||||||
if (spcGraphsPaneRsc != null) {
|
if (spcGraphsPaneRsc != null && (goodData) ){//#5929
|
||||||
// Chin: SPC graphs performance concern, as it need to call get
|
// Chin: SPC graphs performance concern, as it need to call get
|
||||||
// info functions from bigSharo.so and cause long delay.
|
// info functions from bigSharo.so and cause long delay.
|
||||||
// Therefore, do it once only when reset data.
|
// Therefore, do it once only when reset data.
|
||||||
|
@ -1177,7 +1184,7 @@ public class NsharpResourceHandler {
|
||||||
|
|
||||||
private void addElementToTableAndLists(String stnId_timeLine_sndType,
|
private void addElementToTableAndLists(String stnId_timeLine_sndType,
|
||||||
String stnId, String tmLine, String sndType,
|
String stnId, String tmLine, String sndType,
|
||||||
NsharpStationInfo stnInfo, List<NcSoundingLayer> sndLyLst) {
|
NsharpStationInfo stnInfo, List<NcSoundingLayer> sndLyLst, boolean goodData) {
|
||||||
// System.out.println("stn to be added "+ stnId + " timeline "+tmLine);
|
// System.out.println("stn to be added "+ stnId + " timeline "+tmLine);
|
||||||
NsharpSoundingElementStateProperty newSndPropElem = null;
|
NsharpSoundingElementStateProperty newSndPropElem = null;
|
||||||
int tmIndex = getIndexFromElementList(tmLine, timeElementList);
|
int tmIndex = getIndexFromElementList(tmLine, timeElementList);
|
||||||
|
@ -1197,7 +1204,7 @@ public class NsharpResourceHandler {
|
||||||
// NsharpSoundingElementStateProperty object
|
// NsharpSoundingElementStateProperty object
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||||
sndLyLst);
|
sndLyLst,goodData); //#5929
|
||||||
stnTimeSndTable.get(stnIndex).get(tmIndex)
|
stnTimeSndTable.get(stnIndex).get(tmIndex)
|
||||||
.set(sndTpyeIndex, newSndPropElem);
|
.set(sndTpyeIndex, newSndPropElem);
|
||||||
}
|
}
|
||||||
|
@ -1214,7 +1221,7 @@ public class NsharpResourceHandler {
|
||||||
// NsharpSoundingElementStateProperty object
|
// NsharpSoundingElementStateProperty object
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||||
sndLyLst);
|
sndLyLst,goodData);
|
||||||
stnTimeSndTable.get(currentStnElementListIndex)
|
stnTimeSndTable.get(currentStnElementListIndex)
|
||||||
.get(currentTimeElementListIndex)
|
.get(currentTimeElementListIndex)
|
||||||
.set(currentSndElementListIndex, newSndPropElem);
|
.set(currentSndElementListIndex, newSndPropElem);
|
||||||
|
@ -1231,7 +1238,7 @@ public class NsharpResourceHandler {
|
||||||
// NsharpSoundingElementStateProperty object
|
// NsharpSoundingElementStateProperty object
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||||
sndLyLst);
|
sndLyLst,goodData);
|
||||||
stnTimeSndTable.get(currentStnElementListIndex)
|
stnTimeSndTable.get(currentStnElementListIndex)
|
||||||
.get(currentTimeElementListIndex)
|
.get(currentTimeElementListIndex)
|
||||||
.set(currentSndElementListIndex, newSndPropElem);
|
.set(currentSndElementListIndex, newSndPropElem);
|
||||||
|
@ -1253,7 +1260,7 @@ public class NsharpResourceHandler {
|
||||||
// NsharpSoundingElementStateProperty object
|
// NsharpSoundingElementStateProperty object
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||||
sndLyLst);
|
sndLyLst,goodData);
|
||||||
stnTimeSndTable.get(currentStnElementListIndex)
|
stnTimeSndTable.get(currentStnElementListIndex)
|
||||||
.get(currentTimeElementListIndex)
|
.get(currentTimeElementListIndex)
|
||||||
.set(currentSndElementListIndex, newSndPropElem);
|
.set(currentSndElementListIndex, newSndPropElem);
|
||||||
|
@ -1274,7 +1281,7 @@ public class NsharpResourceHandler {
|
||||||
// NsharpSoundingElementStateProperty object
|
// NsharpSoundingElementStateProperty object
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||||
sndLyLst);
|
sndLyLst,goodData);
|
||||||
stnTimeSndTable.get(currentStnElementListIndex)
|
stnTimeSndTable.get(currentStnElementListIndex)
|
||||||
.get(currentTimeElementListIndex)
|
.get(currentTimeElementListIndex)
|
||||||
.set(currentSndElementListIndex, newSndPropElem);
|
.set(currentSndElementListIndex, newSndPropElem);
|
||||||
|
@ -1296,7 +1303,7 @@ public class NsharpResourceHandler {
|
||||||
// NsharpSoundingElementStateProperty object
|
// NsharpSoundingElementStateProperty object
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||||
sndLyLst);
|
sndLyLst,goodData);
|
||||||
stnTimeSndTable.get(currentStnElementListIndex)
|
stnTimeSndTable.get(currentStnElementListIndex)
|
||||||
.get(currentTimeElementListIndex)
|
.get(currentTimeElementListIndex)
|
||||||
.set(currentSndElementListIndex, newSndPropElem);
|
.set(currentSndElementListIndex, newSndPropElem);
|
||||||
|
@ -1321,7 +1328,7 @@ public class NsharpResourceHandler {
|
||||||
// NsharpSoundingElementStateProperty object
|
// NsharpSoundingElementStateProperty object
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||||
sndLyLst);
|
sndLyLst,goodData);
|
||||||
stnTimeSndTable.get(currentStnElementListIndex)
|
stnTimeSndTable.get(currentStnElementListIndex)
|
||||||
.get(currentTimeElementListIndex)
|
.get(currentTimeElementListIndex)
|
||||||
.set(currentSndElementListIndex, newSndPropElem);
|
.set(currentSndElementListIndex, newSndPropElem);
|
||||||
|
@ -1357,7 +1364,7 @@ public class NsharpResourceHandler {
|
||||||
// one new loaded sounding data
|
// one new loaded sounding data
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId,
|
stnId_timeLine_sndType, stnId,
|
||||||
tmLine, stnInfo, sndLyLst);
|
tmLine, stnInfo, sndLyLst,goodData);
|
||||||
|
|
||||||
sndlistForTm.add(newSndPropElem);
|
sndlistForTm.add(newSndPropElem);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1405,7 +1412,7 @@ public class NsharpResourceHandler {
|
||||||
|
|
||||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||||
sndLyLst);
|
sndLyLst,goodData);
|
||||||
newList.add(newSndPropElem);
|
newList.add(newSndPropElem);
|
||||||
newListList.add(newList);
|
newListList.add(newList);
|
||||||
stnTimeSndTable.add(newListList);
|
stnTimeSndTable.add(newListList);
|
||||||
|
@ -1862,6 +1869,21 @@ public class NsharpResourceHandler {
|
||||||
*
|
*
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
//task#5929
|
||||||
|
private boolean checkDataIntegrity(List<NcSoundingLayer> sndLayers){
|
||||||
|
boolean gooddata = false;
|
||||||
|
int numberOfTemp=0;
|
||||||
|
int numberOfGoodDewPt=0;
|
||||||
|
for(NcSoundingLayer layer: sndLayers){
|
||||||
|
if(layer.getTemperature() > -999)
|
||||||
|
numberOfTemp++;
|
||||||
|
if(layer.getDewpoint() > -999)
|
||||||
|
numberOfGoodDewPt++;
|
||||||
|
}
|
||||||
|
if(numberOfGoodDewPt >= 2 && numberOfTemp>=2)
|
||||||
|
gooddata=true;
|
||||||
|
return gooddata;
|
||||||
|
}
|
||||||
|
|
||||||
// This api peforms real load data function
|
// This api peforms real load data function
|
||||||
private void addRsc(boolean displayNewData,
|
private void addRsc(boolean displayNewData,
|
||||||
|
@ -1875,8 +1897,8 @@ public class NsharpResourceHandler {
|
||||||
// // newkey=
|
// // newkey=
|
||||||
// String newkey =key.replace("NCUAIR", "gpduair"); // String newkey =
|
// String newkey =key.replace("NCUAIR", "gpduair"); // String newkey =
|
||||||
// String newkey= key.replace("NAMS", "SSS");
|
// String newkey= key.replace("NAMS", "SSS");
|
||||||
//String newkey = key.replace("130925/00(Wed)V000", "130925/00(Thu)V000");
|
// String newkey = key.replace("130925/17(Wed)V017", "131001/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(
|
||||||
|
@ -1931,9 +1953,15 @@ public class NsharpResourceHandler {
|
||||||
// based on this KEY string format "KGRI 100616/03(Wed)Vxxx GFSSND"
|
// based on this KEY string format "KGRI 100616/03(Wed)Vxxx GFSSND"
|
||||||
String stnId, sndType, timeLine, timeLine_sndType, stnId_timeLine_sndType;
|
String stnId, sndType, timeLine, timeLine_sndType, stnId_timeLine_sndType;
|
||||||
List<NcSoundingLayer> sndLyLst;
|
List<NcSoundingLayer> sndLyLst;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
stnId_timeLine_sndType = tempTimeLineArr[i].toString();
|
stnId_timeLine_sndType = tempTimeLineArr[i].toString();
|
||||||
|
if(stnId_timeLine_sndType.equals("N/A"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
sndLyLst = soundMap.get(stnId_timeLine_sndType);
|
sndLyLst = soundMap.get(stnId_timeLine_sndType);
|
||||||
|
|
||||||
stnId = stnId_timeLine_sndType.substring(0,
|
stnId = stnId_timeLine_sndType.substring(0,
|
||||||
stnId_timeLine_sndType.indexOf(" "));
|
stnId_timeLine_sndType.indexOf(" "));
|
||||||
timeLine_sndType = stnId_timeLine_sndType
|
timeLine_sndType = stnId_timeLine_sndType
|
||||||
|
@ -2022,8 +2050,10 @@ public class NsharpResourceHandler {
|
||||||
// No more needed? timeLine = timeLine.replace(" ", "-"); //fixed
|
// No more needed? timeLine = timeLine.replace(" ", "-"); //fixed
|
||||||
// DR15325 - sorting time line issue in D2D
|
// DR15325 - sorting time line issue in D2D
|
||||||
// add time line to stnTimeTable and set its index
|
// add time line to stnTimeTable and set its index
|
||||||
|
//task#5929
|
||||||
|
boolean goodData = checkDataIntegrity( sndLyLst);
|
||||||
addElementToTableAndLists(stnId_timeLine_sndType, stnId, timeLine,
|
addElementToTableAndLists(stnId_timeLine_sndType, stnId, timeLine,
|
||||||
sndType, stnInfo, sndLyLst);
|
sndType, stnInfo, sndLyLst, goodData);
|
||||||
}
|
}
|
||||||
if (displayNewData) {
|
if (displayNewData) {
|
||||||
// Set default parcel trace data
|
// Set default parcel trace data
|
||||||
|
@ -2627,10 +2657,7 @@ public class NsharpResourceHandler {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (compareSndIsOn) {
|
|
||||||
handleUserPickNewTimeLine(currentTimeElementListIndex) ;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
curTimeLinePage = currentTimeElementListIndex / numTimeLinePerPage
|
curTimeLinePage = currentTimeElementListIndex / numTimeLinePerPage
|
||||||
+ 1;
|
+ 1;
|
||||||
setCurSndProfileProp();
|
setCurSndProfileProp();
|
||||||
|
@ -2767,9 +2794,6 @@ 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
|
||||||
|
@ -2795,7 +2819,6 @@ 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)
|
||||||
|
@ -2811,13 +2834,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
@ -4043,7 +4064,13 @@ public class NsharpResourceHandler {
|
||||||
// re-populate snd data to nsharp native code lib for later calculating
|
// re-populate snd data to nsharp native code lib for later calculating
|
||||||
Collections.sort(soundingLys,
|
Collections.sort(soundingLys,
|
||||||
NsharpDataHandling.reversePressureHeightWindComparator());
|
NsharpDataHandling.reversePressureHeightWindComparator());
|
||||||
nsharpNative.populateSndgData(soundingLys);
|
//#5929
|
||||||
|
goodData = checkDataIntegrity( soundingLys);
|
||||||
|
if(getCurSoundingElementStateProperty()!=null){
|
||||||
|
getCurSoundingElementStateProperty().setGoodData(goodData);
|
||||||
|
}
|
||||||
|
if(goodData)
|
||||||
|
nsharpNative.populateSndgData(soundingLys);
|
||||||
// get storm motion wind data after populate sounding from NsharpLib
|
// get storm motion wind data after populate sounding from NsharpLib
|
||||||
// refresh test area if it is shown now
|
// refresh test area if it is shown now
|
||||||
NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess();
|
NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess();
|
||||||
|
@ -4069,6 +4096,13 @@ public class NsharpResourceHandler {
|
||||||
}
|
}
|
||||||
if (dataPaneRsc != null)
|
if (dataPaneRsc != null)
|
||||||
dataPaneRsc.setSoundingLys(soundingLys);
|
dataPaneRsc.setSoundingLys(soundingLys);
|
||||||
|
|
||||||
|
if (spcGraphsPaneRsc != null && (goodData) ){//#5929
|
||||||
|
// Chin: SPC graphs performance concern, as it need to call get
|
||||||
|
// info functions from bigSharo.so and cause long delay.
|
||||||
|
// Therefore, do it once only when reset data.
|
||||||
|
spcGraphsPaneRsc.getSpcGraphsInfo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addNewLayer(float tp, float dp, float ws, float wd,
|
public void addNewLayer(float tp, float dp, float ws, float wd,
|
||||||
|
@ -4086,7 +4120,13 @@ public class NsharpResourceHandler {
|
||||||
// re-populate snd data to nsharp native code lib for later calculating
|
// re-populate snd data to nsharp native code lib for later calculating
|
||||||
Collections.sort(soundingLys,
|
Collections.sort(soundingLys,
|
||||||
NsharpDataHandling.reversePressureHeightWindComparator());
|
NsharpDataHandling.reversePressureHeightWindComparator());
|
||||||
nsharpNative.populateSndgData(soundingLys);
|
//#5929
|
||||||
|
goodData = checkDataIntegrity( soundingLys);
|
||||||
|
if(getCurSoundingElementStateProperty()!=null){
|
||||||
|
getCurSoundingElementStateProperty().setGoodData(goodData);
|
||||||
|
}
|
||||||
|
if(goodData)
|
||||||
|
nsharpNative.populateSndgData(soundingLys);
|
||||||
// get storm motion wind data after populate sounding from NsharpLib
|
// get storm motion wind data after populate sounding from NsharpLib
|
||||||
// refresh text area if it is shown now
|
// refresh text area if it is shown now
|
||||||
NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess();
|
NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess();
|
||||||
|
@ -4112,6 +4152,12 @@ public class NsharpResourceHandler {
|
||||||
}
|
}
|
||||||
if (dataPaneRsc != null)
|
if (dataPaneRsc != null)
|
||||||
dataPaneRsc.setSoundingLys(soundingLys);
|
dataPaneRsc.setSoundingLys(soundingLys);
|
||||||
|
if (spcGraphsPaneRsc != null && (goodData) ){//#5929
|
||||||
|
// Chin: SPC graphs performance concern, as it need to call get
|
||||||
|
// info functions from bigSharo.so and cause long delay.
|
||||||
|
// Therefore, do it once only when reset data.
|
||||||
|
spcGraphsPaneRsc.getSpcGraphsInfo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGraphConfigProperty(NsharpGraphProperty graphConfigProperty) {
|
public void setGraphConfigProperty(NsharpGraphProperty graphConfigProperty) {
|
||||||
|
@ -4440,4 +4486,9 @@ public class NsharpResourceHandler {
|
||||||
refreshPane();
|
refreshPane();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
//#5929
|
||||||
|
public boolean isGoodData() {
|
||||||
|
return goodData;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,9 @@ 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"
|
* 01/27/2015 DR#17006,
|
||||||
|
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||||
|
* in Volume Browser
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -1740,6 +1742,8 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
||||||
// box
|
// box
|
||||||
}
|
}
|
||||||
target.drawStrings(str, latlonstr);
|
target.drawStrings(str, latlonstr);
|
||||||
|
if(wwTypeColor == null)
|
||||||
|
wwTypeColor = NsharpConstants.color_gold;
|
||||||
target.drawRect(boxExt, wwTypeColor, 2f, 1f); // box border line colored
|
target.drawRect(boxExt, wwTypeColor, 2f, 1f); // box border line colored
|
||||||
// with "Psbl Watch Type"
|
// with "Psbl Watch Type"
|
||||||
// color
|
// color
|
||||||
|
@ -1768,7 +1772,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
||||||
// to check a scenario that sounding data is removed while
|
// to check a scenario that sounding data is removed while
|
||||||
// thread is locked
|
// thread is locked
|
||||||
if (soundingLys == null
|
if (soundingLys == null
|
||||||
|| (soundingLys != null && soundingLys.size() <= 0)) {
|
|| (soundingLys != null && soundingLys.size() < 2)) {
|
||||||
reentryLock.unlock();
|
reentryLock.unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1779,7 +1783,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
||||||
} else if (justBackToMainPane) {
|
} else if (justBackToMainPane) {
|
||||||
reentryLock.lock();
|
reentryLock.lock();
|
||||||
if (soundingLys == null
|
if (soundingLys == null
|
||||||
|| (soundingLys != null && soundingLys.size() <= 0)) {
|
|| (soundingLys != null && soundingLys.size() < 2)) {
|
||||||
reentryLock.unlock();
|
reentryLock.unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1828,376 +1832,384 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
||||||
this.font12.setScaleFont(false);
|
this.font12.setScaleFont(false);
|
||||||
// nsharpNative.populateSndgData(soundingLys);
|
// nsharpNative.populateSndgData(soundingLys);
|
||||||
if (currentGraphMode == NsharpConstants.GRAPH_SKEWT) {
|
if (currentGraphMode == NsharpConstants.GRAPH_SKEWT) {
|
||||||
target.setupClippingPlane(pe);
|
|
||||||
// plot temp curve, when constructing pressureTempRscShapeList,
|
|
||||||
// it already considered
|
|
||||||
// comparison, overlay, etc..so, just draw it.
|
|
||||||
for (NsharpShapeAndLineProperty shapeNLp : pressureTempRscShapeList) {
|
|
||||||
target.drawWireframeShape(shapeNLp.getShape(), shapeNLp
|
|
||||||
.getLp().getLineColor(), shapeNLp.getLp()
|
|
||||||
.getLineWidth(), shapeNLp.getLp().getLineStyle(),
|
|
||||||
font10);// commonLinewidth*2,commonLineStyle,font10);
|
|
||||||
}
|
|
||||||
// plot real temp parcel trace, when constructing
|
|
||||||
// parcelRtShapeList, it already considered
|
|
||||||
// comparison, overlay, etc..so, just draw it.
|
|
||||||
// color is following comparison/overlay lines' configuration.
|
|
||||||
// line width and line style are following parcel line
|
|
||||||
// configuration
|
|
||||||
if (graphConfigProperty.isParcel() == true) {
|
|
||||||
NsharpLineProperty parcelLp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL]);
|
|
||||||
for (NsharpShapeAndLineProperty shapeNLp : parcelRtShapeList) {
|
|
||||||
target.drawWireframeShape(shapeNLp.getShape(), shapeNLp
|
|
||||||
.getLp().getLineColor(), parcelLp
|
|
||||||
.getLineWidth(), parcelLp.getLineStyle(),
|
|
||||||
font10);// commonLinewidth*2,commonLineStyle,font10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
boolean compareStnIsOn = rscHandler.isCompareStnIsOn();
|
|
||||||
boolean compareSndIsOn = rscHandler.isCompareSndIsOn();
|
|
||||||
boolean compareTmIsOn = rscHandler.isCompareTmIsOn();
|
|
||||||
boolean editGraphOn = rscHandler.isEditGraphOn();
|
|
||||||
boolean overlayIsOn = rscHandler.isOverlayIsOn();
|
|
||||||
if (graphConfigProperty != null) {
|
|
||||||
if (graphConfigProperty.isTemp() == true && !compareStnIsOn
|
|
||||||
&& !compareTmIsOn && !compareSndIsOn) {
|
|
||||||
if (editGraphOn)
|
|
||||||
plotPressureTempEditPoints(target, world,
|
|
||||||
NsharpConstants.color_red, TEMP_TYPE,
|
|
||||||
this.soundingLys);
|
|
||||||
}
|
|
||||||
// dew point curve
|
|
||||||
if (graphConfigProperty.isDewp() == true && !compareStnIsOn
|
|
||||||
&& !compareTmIsOn && !compareSndIsOn) {
|
|
||||||
if (editGraphOn)
|
|
||||||
plotPressureTempEditPoints(target, world,
|
|
||||||
NsharpConstants.color_green, DEWPOINT_TYPE,
|
|
||||||
this.soundingLys);
|
|
||||||
}
|
|
||||||
// plot wet bulb trace
|
|
||||||
if (graphConfigProperty.isWetBulb() == true
|
|
||||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
|
||||||
NsharpLineProperty lp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
|
|
||||||
target.drawWireframeShape(wetBulbTraceRscShape,
|
|
||||||
lp.getLineColor(), lp.getLineWidth(),
|
|
||||||
lp.getLineStyle(), font10);
|
|
||||||
}
|
|
||||||
// plot virtual temperature trace
|
|
||||||
if (graphConfigProperty.isVTemp() == true
|
|
||||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
|
||||||
NsharpLineProperty lp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
|
|
||||||
target.drawWireframeShape(vtempTraceCurveRscShape,
|
|
||||||
lp.getLineColor(), lp.getLineWidth(),
|
|
||||||
lp.getLineStyle(), font10);
|
|
||||||
}
|
|
||||||
// virtual temperature parcel trace curve
|
|
||||||
if (graphConfigProperty.isParcelTv() == true
|
|
||||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn
|
|
||||||
&& !overlayIsOn) {
|
|
||||||
if (soundingLys.size() > 0) {
|
|
||||||
NsharpLineProperty lp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_TV]);
|
|
||||||
target.drawWireframeShape(parcelVtTraceRscShape,
|
|
||||||
lp.getLineColor(), lp.getLineWidth(),
|
|
||||||
lp.getLineStyle(), font10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (graphConfigProperty.isDcape() == true
|
target.setupClippingPlane(pe);
|
||||||
&& dacpeTraceRscShape != null && !compareStnIsOn && !compareSndIsOn
|
// plot temp curve, when constructing pressureTempRscShapeList,
|
||||||
&& !compareTmIsOn && !overlayIsOn) {
|
// it already considered
|
||||||
if (soundingLys.size() > 0) {
|
// comparison, overlay, etc..so, just draw it.
|
||||||
NsharpLineProperty lp = linePropertyMap
|
for (NsharpShapeAndLineProperty shapeNLp : pressureTempRscShapeList) {
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]);
|
target.drawWireframeShape(shapeNLp.getShape(), shapeNLp
|
||||||
target.drawWireframeShape(dacpeTraceRscShape,
|
.getLp().getLineColor(), shapeNLp.getLp()
|
||||||
lp.getLineColor(), lp.getLineWidth(),
|
.getLineWidth(), shapeNLp.getLp().getLineStyle(),
|
||||||
lp.getLineStyle(), font10);
|
font10);// commonLinewidth*2,commonLineStyle,font10);
|
||||||
|
}
|
||||||
|
// plot real temp parcel trace, when constructing
|
||||||
|
// parcelRtShapeList, it already considered
|
||||||
|
// comparison, overlay, etc..so, just draw it.
|
||||||
|
// color is following comparison/overlay lines' configuration.
|
||||||
|
// line width and line style are following parcel line
|
||||||
|
// configuration
|
||||||
|
if (graphConfigProperty.isParcel() == true && rscHandler.isGoodData()) { //#5929
|
||||||
|
NsharpLineProperty parcelLp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL]);
|
||||||
|
for (NsharpShapeAndLineProperty shapeNLp : parcelRtShapeList) {
|
||||||
|
target.drawWireframeShape(shapeNLp.getShape(), shapeNLp
|
||||||
|
.getLp().getLineColor(), parcelLp
|
||||||
|
.getLineWidth(), parcelLp.getLineStyle(),
|
||||||
|
font10);// commonLinewidth*2,commonLineStyle,font10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean compareStnIsOn = rscHandler.isCompareStnIsOn();
|
||||||
|
boolean compareSndIsOn = rscHandler.isCompareSndIsOn();
|
||||||
|
boolean compareTmIsOn = rscHandler.isCompareTmIsOn();
|
||||||
|
boolean editGraphOn = rscHandler.isEditGraphOn();
|
||||||
|
boolean overlayIsOn = rscHandler.isOverlayIsOn();
|
||||||
|
if (graphConfigProperty != null) {
|
||||||
|
if (graphConfigProperty.isTemp() == true && !compareStnIsOn
|
||||||
|
&& !compareTmIsOn) {
|
||||||
|
if (editGraphOn)
|
||||||
|
plotPressureTempEditPoints(target, world,
|
||||||
|
NsharpConstants.color_red, TEMP_TYPE,
|
||||||
|
this.soundingLys);
|
||||||
|
}
|
||||||
|
// dew point curve
|
||||||
|
if (graphConfigProperty.isDewp() == true && !compareStnIsOn
|
||||||
|
&& !compareTmIsOn) {
|
||||||
|
if (editGraphOn)
|
||||||
|
plotPressureTempEditPoints(target, world,
|
||||||
|
NsharpConstants.color_green, DEWPOINT_TYPE,
|
||||||
|
this.soundingLys);
|
||||||
|
}
|
||||||
|
// plot wet bulb trace
|
||||||
|
if (graphConfigProperty.isWetBulb() == true && rscHandler.isGoodData() //#5929
|
||||||
|
&& !compareStnIsOn && !compareTmIsOn) {
|
||||||
|
NsharpLineProperty lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
|
||||||
|
target.drawWireframeShape(wetBulbTraceRscShape,
|
||||||
|
lp.getLineColor(), lp.getLineWidth(),
|
||||||
|
lp.getLineStyle(), font10);
|
||||||
|
}
|
||||||
|
// plot virtual temperature trace
|
||||||
|
if (graphConfigProperty.isVTemp() == true && rscHandler.isGoodData() //#5929
|
||||||
|
&& !compareStnIsOn && !compareTmIsOn) {
|
||||||
|
NsharpLineProperty lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
|
||||||
|
target.drawWireframeShape(vtempTraceCurveRscShape,
|
||||||
|
lp.getLineColor(), lp.getLineWidth(),
|
||||||
|
lp.getLineStyle(), font10);
|
||||||
|
}
|
||||||
|
// virtual temperature parcel trace curve
|
||||||
|
if (graphConfigProperty.isParcelTv() == true && rscHandler.isGoodData() //#5929
|
||||||
|
&& !compareStnIsOn && !compareTmIsOn
|
||||||
|
&& !overlayIsOn) {
|
||||||
|
if (soundingLys.size() > 0) {
|
||||||
|
NsharpLineProperty lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_TV]);
|
||||||
|
target.drawWireframeShape(parcelVtTraceRscShape,
|
||||||
|
lp.getLineColor(), lp.getLineWidth(),
|
||||||
|
lp.getLineStyle(), font10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
if (graphConfigProperty.isDcape() == true && rscHandler.isGoodData() //#5929
|
||||||
}
|
&& dacpeTraceRscShape != null && !compareStnIsOn
|
||||||
if (graphConfigProperty.isEffLayer() == true
|
&& !compareTmIsOn && !overlayIsOn) {
|
||||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
if (soundingLys.size() > 0) {
|
||||||
// draw effective layer lines
|
NsharpLineProperty lp = linePropertyMap
|
||||||
// drawEffectiveLayerLines(target);
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]);
|
||||||
target.drawWireframeShape(effectiveLayerLineShape,
|
target.drawWireframeShape(dacpeTraceRscShape,
|
||||||
NsharpConstants.color_cyan_md, 2,
|
lp.getLineColor(), lp.getLineWidth(),
|
||||||
commonLineStyle, font10);
|
lp.getLineStyle(), font10);
|
||||||
}
|
|
||||||
// cloud
|
|
||||||
if (graphConfigProperty.isCloud() == true
|
|
||||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
|
||||||
if (cloudFMShape != null)
|
|
||||||
target.drawShadedShape(cloudFMShape, 1f);
|
|
||||||
if (cloudFMLabelShape != null)
|
|
||||||
target.drawWireframeShape(cloudFMLabelShape,
|
|
||||||
NsharpConstants.color_chocolate,
|
|
||||||
commonLinewidth * 3, commonLineStyle, font9);
|
|
||||||
if (cloudCEShape != null)
|
|
||||||
target.drawShadedShape(cloudCEShape, 1f);
|
|
||||||
}
|
|
||||||
if (graphConfigProperty.isOmega() == true
|
|
||||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
|
||||||
if (NsharpLoadDialog.getAccess() != null
|
|
||||||
&& (NsharpLoadDialog.getAccess()
|
|
||||||
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
|
|
||||||
.getAccess()
|
|
||||||
.getActiveLoadSoundingType() == NsharpLoadDialog.PFC_SND)) {
|
|
||||||
// plot omega
|
|
||||||
drawOmega();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// by default, draw everything
|
|
||||||
if (!compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
|
||||||
if (editGraphOn)
|
|
||||||
plotPressureTempEditPoints(target, world,
|
|
||||||
NsharpConstants.color_red, TEMP_TYPE,
|
|
||||||
this.soundingLys);
|
|
||||||
// dew point curve
|
|
||||||
if (editGraphOn)
|
|
||||||
plotPressureTempEditPoints(target, world,
|
|
||||||
NsharpConstants.color_green, DEWPOINT_TYPE,
|
|
||||||
this.soundingLys);
|
|
||||||
// plot wetbulb trace
|
|
||||||
NsharpLineProperty lp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
|
|
||||||
target.drawWireframeShape(wetBulbTraceRscShape,
|
|
||||||
lp.getLineColor(), lp.getLineWidth(),
|
|
||||||
lp.getLineStyle(), font10);
|
|
||||||
// plot virtual temp trace
|
|
||||||
lp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
|
|
||||||
target.drawWireframeShape(vtempTraceCurveRscShape,
|
|
||||||
lp.getLineColor(), lp.getLineWidth(),
|
|
||||||
lp.getLineStyle(), font10);
|
|
||||||
|
|
||||||
// virtual temperature parcel trace curve
|
}
|
||||||
if (!overlayIsOn) {
|
}
|
||||||
lp = linePropertyMap
|
if (graphConfigProperty.isEffLayer() == true && rscHandler.isGoodData() //#5929
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_TV]);
|
&& !compareStnIsOn && !compareTmIsOn) {
|
||||||
target.drawWireframeShape(parcelVtTraceRscShape,
|
// draw effective layer lines
|
||||||
lp.getLineColor(), lp.getLineWidth(),
|
// drawEffectiveLayerLines(target);
|
||||||
lp.getLineStyle(), font10);
|
target.drawWireframeShape(effectiveLayerLineShape,
|
||||||
if (dacpeTraceRscShape != null) {
|
NsharpConstants.color_cyan_md, 2,
|
||||||
lp = linePropertyMap
|
commonLineStyle, font10);
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]);
|
}
|
||||||
target.drawWireframeShape(dacpeTraceRscShape,
|
// cloud
|
||||||
lp.getLineColor(), lp.getLineWidth(),
|
if (graphConfigProperty.isCloud() == true && rscHandler.isGoodData() //#5929
|
||||||
lp.getLineStyle(), font10);
|
&& !compareStnIsOn && !compareTmIsOn) {
|
||||||
}
|
if (cloudFMShape != null)
|
||||||
}
|
target.drawShadedShape(cloudFMShape, 1f);
|
||||||
// draw effective layer lines
|
if (cloudFMLabelShape != null)
|
||||||
// drawEffectiveLayerLines(target);
|
target.drawWireframeShape(cloudFMLabelShape,
|
||||||
target.drawWireframeShape(effectiveLayerLineShape,
|
NsharpConstants.color_chocolate,
|
||||||
NsharpConstants.color_cyan_md, 2,
|
commonLinewidth * 3, commonLineStyle, font9);
|
||||||
commonLineStyle, font10);
|
if (cloudCEShape != null)
|
||||||
if (NsharpLoadDialog.getAccess() != null
|
target.drawShadedShape(cloudCEShape, 1f);
|
||||||
&& (NsharpLoadDialog.getAccess()
|
}
|
||||||
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
|
if (graphConfigProperty.isOmega() == true
|
||||||
.getAccess()
|
&& !compareStnIsOn && !compareTmIsOn) {
|
||||||
.getActiveLoadSoundingType() == NsharpLoadDialog.PFC_SND)) {
|
if (NsharpLoadDialog.getAccess() != null
|
||||||
// plot omega
|
&& (NsharpLoadDialog.getAccess()
|
||||||
drawOmega();
|
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
|
||||||
}
|
.getAccess()
|
||||||
}
|
.getActiveLoadSoundingType() == NsharpLoadDialog.PFC_SND)) {
|
||||||
}
|
// plot omega
|
||||||
if (plotInteractiveTemp == true) {
|
drawOmega();
|
||||||
if (currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT)
|
}
|
||||||
plotNsharpInteractiveEditingTemp(target,
|
}
|
||||||
currentZoomLevel, world,
|
} else {
|
||||||
NsharpConstants.color_white);
|
// by default, draw everything
|
||||||
else if (currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_MOVELINE)
|
if (!compareStnIsOn && !compareTmIsOn) {
|
||||||
plotNsharpMovingTempLine(target, world,
|
if (editGraphOn)
|
||||||
NsharpConstants.color_white);
|
plotPressureTempEditPoints(target, world,
|
||||||
|
NsharpConstants.color_red, TEMP_TYPE,
|
||||||
|
this.soundingLys);
|
||||||
|
// dew point curve
|
||||||
|
if (editGraphOn)
|
||||||
|
plotPressureTempEditPoints(target, world,
|
||||||
|
NsharpConstants.color_green, DEWPOINT_TYPE,
|
||||||
|
this.soundingLys);
|
||||||
|
if(rscHandler.isGoodData()) { //#5929
|
||||||
|
// plot wetbulb trace
|
||||||
|
NsharpLineProperty lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
|
||||||
|
target.drawWireframeShape(wetBulbTraceRscShape,
|
||||||
|
lp.getLineColor(), lp.getLineWidth(),
|
||||||
|
lp.getLineStyle(), font10);
|
||||||
|
// plot virtual temp trace
|
||||||
|
lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
|
||||||
|
target.drawWireframeShape(vtempTraceCurveRscShape,
|
||||||
|
lp.getLineColor(), lp.getLineWidth(),
|
||||||
|
lp.getLineStyle(), font10);
|
||||||
|
|
||||||
}
|
// virtual temperature parcel trace curve
|
||||||
target.clearClippingPlane();
|
if (!overlayIsOn) {
|
||||||
|
lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_TV]);
|
||||||
|
target.drawWireframeShape(parcelVtTraceRscShape,
|
||||||
|
lp.getLineColor(), lp.getLineWidth(),
|
||||||
|
lp.getLineStyle(), font10);
|
||||||
|
if (dacpeTraceRscShape != null) {
|
||||||
|
lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]);
|
||||||
|
target.drawWireframeShape(dacpeTraceRscShape,
|
||||||
|
lp.getLineColor(), lp.getLineWidth(),
|
||||||
|
lp.getLineStyle(), font10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// draw effective layer lines
|
||||||
|
// drawEffectiveLayerLines(target);
|
||||||
|
target.drawWireframeShape(effectiveLayerLineShape,
|
||||||
|
NsharpConstants.color_cyan_md, 2,
|
||||||
|
commonLineStyle, font10);
|
||||||
|
}
|
||||||
|
if (NsharpLoadDialog.getAccess() != null
|
||||||
|
&& (NsharpLoadDialog.getAccess()
|
||||||
|
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
|
||||||
|
.getAccess()
|
||||||
|
.getActiveLoadSoundingType() == NsharpLoadDialog.PFC_SND)) {
|
||||||
|
// plot omega
|
||||||
|
drawOmega();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (plotInteractiveTemp == true) {
|
||||||
|
if (currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT)
|
||||||
|
plotNsharpInteractiveEditingTemp(target,
|
||||||
|
currentZoomLevel, world,
|
||||||
|
NsharpConstants.color_white);
|
||||||
|
else if (currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_MOVELINE)
|
||||||
|
plotNsharpMovingTempLine(target, world,
|
||||||
|
NsharpConstants.color_white);
|
||||||
|
|
||||||
|
}
|
||||||
|
target.clearClippingPlane();
|
||||||
|
|
||||||
|
// Wind Barb
|
||||||
|
if ((graphConfigProperty != null && graphConfigProperty
|
||||||
|
.isWindBarb() == true) || graphConfigProperty == null) {
|
||||||
|
double xPos = skewTBackground.getWindBarbXPosition();
|
||||||
|
if (overlayIsOn == true && this.previousSoundingLys != null) {
|
||||||
|
drawNsharpWindBarb(
|
||||||
|
target,
|
||||||
|
currentZoomLevel,
|
||||||
|
world,
|
||||||
|
linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_OVERLAY1])
|
||||||
|
.getLineColor(), this.soundingLys,
|
||||||
|
xPos, 100);
|
||||||
|
if (!previousSoundingLys.equals(soundingLys))
|
||||||
|
drawNsharpWindBarb(
|
||||||
|
target,
|
||||||
|
currentZoomLevel,
|
||||||
|
world,
|
||||||
|
linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_OVERLAY2])
|
||||||
|
.getLineColor(),
|
||||||
|
this.previousSoundingLys,
|
||||||
|
xPos - NsharpResourceHandler.BARB_LENGTH,
|
||||||
|
100);
|
||||||
|
} else {
|
||||||
|
if (!compareStnIsOn && !compareTmIsOn
|
||||||
|
&& !compareSndIsOn) {
|
||||||
|
drawNsharpWindBarb(target, currentZoomLevel, world,
|
||||||
|
graphConfigProperty.getWindBarbColor(),
|
||||||
|
this.soundingLys, xPos, 100);
|
||||||
|
} else {
|
||||||
|
int currentTimeListIndex = rscHandler
|
||||||
|
.getCurrentTimeElementListIndex();
|
||||||
|
int currentStnListIndex = rscHandler
|
||||||
|
.getCurrentStnElementListIndex();
|
||||||
|
int currentSndListIndex = rscHandler
|
||||||
|
.getCurrentSndElementListIndex();
|
||||||
|
List<NsharpOperationElement> stnElemList = rscHandler
|
||||||
|
.getStnElementList();
|
||||||
|
List<NsharpOperationElement> timeElemList = rscHandler
|
||||||
|
.getTimeElementList();
|
||||||
|
List<NsharpOperationElement> sndElemList = rscHandler
|
||||||
|
.getSndElementList();
|
||||||
|
List<List<List<NsharpSoundingElementStateProperty>>> stnTimeSndTable = rscHandler
|
||||||
|
.getStnTimeSndTable();
|
||||||
|
if (compareTmIsOn && currentStnListIndex >= 0
|
||||||
|
&& currentSndListIndex >= 0) {
|
||||||
|
int colorIndex;
|
||||||
|
for (NsharpOperationElement elm : timeElemList) {
|
||||||
|
if (elm.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||||
|
&& stnTimeSndTable
|
||||||
|
.get(currentStnListIndex)
|
||||||
|
.get(timeElemList
|
||||||
|
.indexOf(elm))
|
||||||
|
.get(currentSndListIndex) != null) {
|
||||||
|
List<NcSoundingLayer> soundingLayeys = stnTimeSndTable
|
||||||
|
.get(currentStnListIndex)
|
||||||
|
.get(timeElemList.indexOf(elm))
|
||||||
|
.get(currentSndListIndex)
|
||||||
|
.getSndLyLst();
|
||||||
|
colorIndex = stnTimeSndTable
|
||||||
|
.get(currentStnListIndex)
|
||||||
|
.get(timeElemList.indexOf(elm))
|
||||||
|
.get(currentSndListIndex)
|
||||||
|
.getCompColorIndex();
|
||||||
|
NsharpLineProperty lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||||
|
drawNsharpWindBarb(target,
|
||||||
|
currentZoomLevel, world,
|
||||||
|
lp.getLineColor(),
|
||||||
|
soundingLayeys, xPos, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (compareStnIsOn
|
||||||
|
&& currentTimeListIndex >= 0
|
||||||
|
&& currentSndListIndex >= 0) {
|
||||||
|
int colorIndex;
|
||||||
|
for (NsharpOperationElement elm : stnElemList) {
|
||||||
|
if (elm.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||||
|
&& stnTimeSndTable
|
||||||
|
.get(stnElemList
|
||||||
|
.indexOf(elm))
|
||||||
|
.get(currentTimeListIndex)
|
||||||
|
.get(currentSndListIndex) != null) {
|
||||||
|
List<NcSoundingLayer> soundingLayeys = stnTimeSndTable
|
||||||
|
.get(stnElemList.indexOf(elm))
|
||||||
|
.get(currentTimeListIndex)
|
||||||
|
.get(currentSndListIndex)
|
||||||
|
.getSndLyLst();
|
||||||
|
colorIndex = stnTimeSndTable
|
||||||
|
.get(stnElemList.indexOf(elm))
|
||||||
|
.get(currentTimeListIndex)
|
||||||
|
.get(currentSndListIndex)
|
||||||
|
.getCompColorIndex();
|
||||||
|
NsharpLineProperty lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||||
|
drawNsharpWindBarb(target,
|
||||||
|
currentZoomLevel, world,
|
||||||
|
lp.getLineColor(),
|
||||||
|
soundingLayeys, xPos, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (compareSndIsOn
|
||||||
|
&& currentStnListIndex >= 0
|
||||||
|
&& currentTimeListIndex >= 0) {
|
||||||
|
int colorIndex;
|
||||||
|
// start FixMark:nearByStnCompSnd
|
||||||
|
List<NsharpResourceHandler.CompSndSelectedElem> sndCompElementList = rscHandler
|
||||||
|
.getCompSndSelectedElemList();
|
||||||
|
for (NsharpResourceHandler.CompSndSelectedElem compElem : sndCompElementList) {
|
||||||
|
NsharpSoundingElementStateProperty elemProp = stnTimeSndTable
|
||||||
|
.get(compElem.getStnIndex())
|
||||||
|
.get(compElem.getTimeIndex())
|
||||||
|
.get(compElem.getSndIndex());
|
||||||
|
if (sndElemList.get(compElem.getSndIndex())
|
||||||
|
.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||||
|
&& elemProp != null) {
|
||||||
|
List<NcSoundingLayer> soundingLayeys = elemProp
|
||||||
|
.getSndLyLst();
|
||||||
|
colorIndex = elemProp
|
||||||
|
.getCompColorIndex();
|
||||||
|
NsharpLineProperty lp = linePropertyMap
|
||||||
|
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||||
|
drawNsharpWindBarb(target,
|
||||||
|
currentZoomLevel, world,
|
||||||
|
lp.getLineColor(),
|
||||||
|
soundingLayeys, xPos, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* original code for(NsharpOperationElement elm:
|
||||||
|
* sndElemList) { if(elm.getActionState() ==
|
||||||
|
* NsharpConstants.ActState.ACTIVE &&
|
||||||
|
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||||
|
* currentTimeListIndex
|
||||||
|
* ).get(sndElemList.indexOf(elm))!=null){
|
||||||
|
* List<NcSoundingLayer> soundingLayeys =
|
||||||
|
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||||
|
* currentTimeListIndex
|
||||||
|
* ).get(sndElemList.indexOf(
|
||||||
|
* elm)).getSndLyLst(); colorIndex =
|
||||||
|
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||||
|
* currentTimeListIndex
|
||||||
|
* ).get(sndElemList.indexOf(
|
||||||
|
* elm)).getCompColorIndex(); NsharpLineProperty
|
||||||
|
* lp =
|
||||||
|
* linePropertyMap.get(NsharpConstants.lineNameArray
|
||||||
|
* [colorIndex]); drawNsharpWindBarb(target,
|
||||||
|
* currentZoomLevel, world, lp.getLineColor(),
|
||||||
|
* soundingLayeys, xPos,100); } }
|
||||||
|
*/
|
||||||
|
// end start FixMark:nearByStnCompSnd
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// System.out.println("x1 pos"+xPos+ " x2 pos="+ (xPos -
|
||||||
|
// NsharpResourceHandler.BARB_LENGTH));
|
||||||
|
}
|
||||||
|
if( rscHandler.isGoodData() ){ //#5929)
|
||||||
|
drawHeightMark(target);
|
||||||
|
// draw EL, LFC, LCL, FZL, -20C, -30C lines
|
||||||
|
// drawLclLine(target);
|
||||||
|
target.drawWireframeShape(lclShape,
|
||||||
|
NsharpConstants.color_green, 2, LineStyle.SOLID, font10);
|
||||||
|
target.drawWireframeShape(elShape, NsharpConstants.color_red,
|
||||||
|
2, LineStyle.SOLID, font10);
|
||||||
|
target.drawWireframeShape(lfcShape,
|
||||||
|
NsharpConstants.color_yellow, 2, LineStyle.SOLID,
|
||||||
|
font10);
|
||||||
|
target.drawWireframeShape(fzlShape, NsharpConstants.color_cyan,
|
||||||
|
2, LineStyle.SOLID, font10);
|
||||||
|
|
||||||
|
}
|
||||||
|
drawNsharpFileNameAndSampling(target, currentZoomLevel);
|
||||||
|
// draw cursor data
|
||||||
|
if (cursorInSkewT == true && rscHandler.isGoodData()) {
|
||||||
|
if ((curseToggledFontLevel < CURSER_STRING_OFF)
|
||||||
|
&& (cursorTopWindBarb == false || windBarbMagnify == false))
|
||||||
|
drawNsharpSkewtCursorData(target);
|
||||||
|
}
|
||||||
|
|
||||||
// Wind Barb
|
|
||||||
if ((graphConfigProperty != null && graphConfigProperty
|
|
||||||
.isWindBarb() == true) || graphConfigProperty == null) {
|
|
||||||
double xPos = skewTBackground.getWindBarbXPosition();
|
|
||||||
if (overlayIsOn == true && this.previousSoundingLys != null) {
|
|
||||||
drawNsharpWindBarb(
|
|
||||||
target,
|
|
||||||
currentZoomLevel,
|
|
||||||
world,
|
|
||||||
linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_OVERLAY1])
|
|
||||||
.getLineColor(), this.soundingLys,
|
|
||||||
xPos, 100);
|
|
||||||
if (!previousSoundingLys.equals(soundingLys))
|
|
||||||
drawNsharpWindBarb(
|
|
||||||
target,
|
|
||||||
currentZoomLevel,
|
|
||||||
world,
|
|
||||||
linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_OVERLAY2])
|
|
||||||
.getLineColor(),
|
|
||||||
this.previousSoundingLys,
|
|
||||||
xPos - NsharpResourceHandler.BARB_LENGTH,
|
|
||||||
100);
|
|
||||||
} else {
|
|
||||||
if (!compareStnIsOn && !compareTmIsOn
|
|
||||||
&& !compareSndIsOn) {
|
|
||||||
drawNsharpWindBarb(target, currentZoomLevel, world,
|
|
||||||
graphConfigProperty.getWindBarbColor(),
|
|
||||||
this.soundingLys, xPos, 100);
|
|
||||||
} else {
|
|
||||||
int currentTimeListIndex = rscHandler
|
|
||||||
.getCurrentTimeElementListIndex();
|
|
||||||
int currentStnListIndex = rscHandler
|
|
||||||
.getCurrentStnElementListIndex();
|
|
||||||
int currentSndListIndex = rscHandler
|
|
||||||
.getCurrentSndElementListIndex();
|
|
||||||
List<NsharpOperationElement> stnElemList = rscHandler
|
|
||||||
.getStnElementList();
|
|
||||||
List<NsharpOperationElement> timeElemList = rscHandler
|
|
||||||
.getTimeElementList();
|
|
||||||
List<NsharpOperationElement> sndElemList = rscHandler
|
|
||||||
.getSndElementList();
|
|
||||||
List<List<List<NsharpSoundingElementStateProperty>>> stnTimeSndTable = rscHandler
|
|
||||||
.getStnTimeSndTable();
|
|
||||||
if (compareTmIsOn && currentStnListIndex >= 0
|
|
||||||
&& currentSndListIndex >= 0) {
|
|
||||||
int colorIndex;
|
|
||||||
for (NsharpOperationElement elm : timeElemList) {
|
|
||||||
if (elm.getActionState() == NsharpConstants.ActState.ACTIVE
|
|
||||||
&& stnTimeSndTable
|
|
||||||
.get(currentStnListIndex)
|
|
||||||
.get(timeElemList
|
|
||||||
.indexOf(elm))
|
|
||||||
.get(currentSndListIndex) != null) {
|
|
||||||
List<NcSoundingLayer> soundingLayeys = stnTimeSndTable
|
|
||||||
.get(currentStnListIndex)
|
|
||||||
.get(timeElemList.indexOf(elm))
|
|
||||||
.get(currentSndListIndex)
|
|
||||||
.getSndLyLst();
|
|
||||||
colorIndex = stnTimeSndTable
|
|
||||||
.get(currentStnListIndex)
|
|
||||||
.get(timeElemList.indexOf(elm))
|
|
||||||
.get(currentSndListIndex)
|
|
||||||
.getCompColorIndex();
|
|
||||||
NsharpLineProperty lp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
|
||||||
drawNsharpWindBarb(target,
|
|
||||||
currentZoomLevel, world,
|
|
||||||
lp.getLineColor(),
|
|
||||||
soundingLayeys, xPos, 100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (compareStnIsOn
|
|
||||||
&& currentTimeListIndex >= 0
|
|
||||||
&& currentSndListIndex >= 0) {
|
|
||||||
int colorIndex;
|
|
||||||
for (NsharpOperationElement elm : stnElemList) {
|
|
||||||
if (elm.getActionState() == NsharpConstants.ActState.ACTIVE
|
|
||||||
&& stnTimeSndTable
|
|
||||||
.get(stnElemList
|
|
||||||
.indexOf(elm))
|
|
||||||
.get(currentTimeListIndex)
|
|
||||||
.get(currentSndListIndex) != null) {
|
|
||||||
List<NcSoundingLayer> soundingLayeys = stnTimeSndTable
|
|
||||||
.get(stnElemList.indexOf(elm))
|
|
||||||
.get(currentTimeListIndex)
|
|
||||||
.get(currentSndListIndex)
|
|
||||||
.getSndLyLst();
|
|
||||||
colorIndex = stnTimeSndTable
|
|
||||||
.get(stnElemList.indexOf(elm))
|
|
||||||
.get(currentTimeListIndex)
|
|
||||||
.get(currentSndListIndex)
|
|
||||||
.getCompColorIndex();
|
|
||||||
NsharpLineProperty lp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
|
||||||
drawNsharpWindBarb(target,
|
|
||||||
currentZoomLevel, world,
|
|
||||||
lp.getLineColor(),
|
|
||||||
soundingLayeys, xPos, 100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (compareSndIsOn
|
|
||||||
&& currentStnListIndex >= 0
|
|
||||||
&& currentTimeListIndex >= 0) {
|
|
||||||
int colorIndex;
|
|
||||||
// start FixMark:nearByStnCompSnd
|
|
||||||
List<NsharpResourceHandler.CompSndSelectedElem> sndCompElementList = rscHandler
|
|
||||||
.getCompSndSelectedElemList();
|
|
||||||
for (NsharpResourceHandler.CompSndSelectedElem compElem : sndCompElementList) {
|
|
||||||
NsharpSoundingElementStateProperty elemProp = stnTimeSndTable
|
|
||||||
.get(compElem.getStnIndex())
|
|
||||||
.get(compElem.getTimeIndex())
|
|
||||||
.get(compElem.getSndIndex());
|
|
||||||
if (sndElemList.get(compElem.getSndIndex())
|
|
||||||
.getActionState() == NsharpConstants.ActState.ACTIVE
|
|
||||||
&& elemProp != null) {
|
|
||||||
List<NcSoundingLayer> soundingLayeys = elemProp
|
|
||||||
.getSndLyLst();
|
|
||||||
colorIndex = elemProp
|
|
||||||
.getCompColorIndex();
|
|
||||||
NsharpLineProperty lp = linePropertyMap
|
|
||||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
|
||||||
drawNsharpWindBarb(target,
|
|
||||||
currentZoomLevel, world,
|
|
||||||
lp.getLineColor(),
|
|
||||||
soundingLayeys, xPos, 100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* original code for(NsharpOperationElement elm:
|
|
||||||
* sndElemList) { if(elm.getActionState() ==
|
|
||||||
* NsharpConstants.ActState.ACTIVE &&
|
|
||||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
|
||||||
* currentTimeListIndex
|
|
||||||
* ).get(sndElemList.indexOf(elm))!=null){
|
|
||||||
* List<NcSoundingLayer> soundingLayeys =
|
|
||||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
|
||||||
* currentTimeListIndex
|
|
||||||
* ).get(sndElemList.indexOf(
|
|
||||||
* elm)).getSndLyLst(); colorIndex =
|
|
||||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
|
||||||
* currentTimeListIndex
|
|
||||||
* ).get(sndElemList.indexOf(
|
|
||||||
* elm)).getCompColorIndex(); NsharpLineProperty
|
|
||||||
* lp =
|
|
||||||
* linePropertyMap.get(NsharpConstants.lineNameArray
|
|
||||||
* [colorIndex]); drawNsharpWindBarb(target,
|
|
||||||
* currentZoomLevel, world, lp.getLineColor(),
|
|
||||||
* soundingLayeys, xPos,100); } }
|
|
||||||
*/
|
|
||||||
// end start FixMark:nearByStnCompSnd
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// System.out.println("x1 pos"+xPos+ " x2 pos="+ (xPos -
|
|
||||||
// NsharpResourceHandler.BARB_LENGTH));
|
|
||||||
}
|
|
||||||
drawHeightMark(target);
|
|
||||||
// draw EL, LFC, LCL, FZL, -20C, -30C lines
|
|
||||||
// drawLclLine(target);
|
|
||||||
target.drawWireframeShape(lclShape,
|
|
||||||
NsharpConstants.color_green, 2, LineStyle.SOLID, font10);
|
|
||||||
target.drawWireframeShape(elShape, NsharpConstants.color_red,
|
|
||||||
2, LineStyle.SOLID, font10);
|
|
||||||
target.drawWireframeShape(lfcShape,
|
|
||||||
NsharpConstants.color_yellow, 2, LineStyle.SOLID,
|
|
||||||
font10);
|
|
||||||
target.drawWireframeShape(fzlShape, NsharpConstants.color_cyan,
|
|
||||||
2, LineStyle.SOLID, font10);
|
|
||||||
drawNsharpFileNameAndSampling(target, currentZoomLevel);
|
|
||||||
// draw cursor data
|
|
||||||
if (cursorInSkewT == true) {
|
|
||||||
if ((curseToggledFontLevel < CURSER_STRING_OFF)
|
|
||||||
&& (cursorTopWindBarb == false || windBarbMagnify == false))
|
|
||||||
drawNsharpSkewtCursorData(target);
|
|
||||||
}
|
|
||||||
}// end of currentGraphMode= NsharpConstants.GRAPH_SKEWT
|
}// end of currentGraphMode= NsharpConstants.GRAPH_SKEWT
|
||||||
else if (currentGraphMode == NsharpConstants.GRAPH_ICING) {
|
else if (currentGraphMode == NsharpConstants.GRAPH_ICING && rscHandler.isGoodData()) {//#5929
|
||||||
paintIcing(currentZoomLevel, target);
|
paintIcing(currentZoomLevel, target);
|
||||||
} else if (currentGraphMode == NsharpConstants.GRAPH_TURB) {
|
} else if (currentGraphMode == NsharpConstants.GRAPH_TURB && rscHandler.isGoodData()) {//#5929
|
||||||
paintTurbulence(currentZoomLevel, target);
|
paintTurbulence(currentZoomLevel, target);
|
||||||
}
|
}
|
||||||
// drawNsharpFileNameAndSampling(target, currentZoomLevel);
|
// drawNsharpFileNameAndSampling(target, currentZoomLevel);
|
||||||
|
@ -3506,31 +3518,37 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void createRscWireFrameShapes() {
|
public void createRscWireFrameShapes() {
|
||||||
// System.out.println("createRscWireFrameShapes called");
|
// System.out.println("createRscWireFrameShapes called");
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
disposeRscWireFrameShapes();
|
disposeRscWireFrameShapes();
|
||||||
if (soundingLys != null) {
|
if (soundingLys != null){
|
||||||
// createRscOmegaShape();
|
if( rscHandler.isGoodData()) {//#5929
|
||||||
// createRscHeightMarkShape();
|
|
||||||
createRscwetBulbTraceShape();
|
// createRscOmegaShape();
|
||||||
createRscPressTempCurveShapeAll(target);
|
// createRscHeightMarkShape();
|
||||||
createRscVTempTraceShape();
|
createRscwetBulbTraceShape();
|
||||||
createRscParcelRtTraceShapesList(rscHandler.getCurrentParcel(),
|
createRscPressTempCurveShapeAll(target);
|
||||||
rscHandler.getCurrentParcelLayerPressure());// real temp
|
createRscVTempTraceShape();
|
||||||
// trace
|
createRscParcelRtTraceShapesList(rscHandler.getCurrentParcel(),
|
||||||
createRscParcelTraceShapes(rscHandler.getCurrentParcel(),
|
rscHandler.getCurrentParcelLayerPressure());// real temp
|
||||||
rscHandler.getCurrentParcelLayerPressure()); // Virtual
|
// trace
|
||||||
// Temp
|
createRscParcelTraceShapes(rscHandler.getCurrentParcel(),
|
||||||
// Trace
|
rscHandler.getCurrentParcelLayerPressure()); // Virtual
|
||||||
// and
|
// Temp
|
||||||
// DCAPE
|
// Trace
|
||||||
// trace
|
// and
|
||||||
createLCLEtcLinesShape();
|
// DCAPE
|
||||||
createEffectiveLayerLinesShape();
|
// trace
|
||||||
createCloudsShape();
|
createLCLEtcLinesShape();
|
||||||
updatePsblWatchColor();
|
createEffectiveLayerLinesShape();
|
||||||
}
|
createCloudsShape();
|
||||||
}
|
updatePsblWatchColor();
|
||||||
|
}
|
||||||
|
else {//#5929
|
||||||
|
createRscPressTempCurveShapeAll(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disposeRscWireFrameShapes() {
|
public void disposeRscWireFrameShapes() {
|
||||||
|
|
|
@ -17,7 +17,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
||||||
* bigsharp version 2013Jun12
|
* bigsharp version 2013Jun12
|
||||||
* 12/03/2014 DR#16884 Chin Chen fixed issue, NSHARP crashes if user loops a product and
|
* 12/03/2014 DR#16884 Chin Chen fixed issue, NSHARP crashes if user loops a product and
|
||||||
* then clicks WINTER/FIRE buttons in Toolbar
|
* then clicks WINTER/FIRE buttons in Toolbar
|
||||||
*
|
* 01/27/2015 DR#17006,
|
||||||
|
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||||
|
* in Volume Browser
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author Chin Chen
|
* @author Chin Chen
|
||||||
|
@ -1896,7 +1898,7 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
|
||||||
PaintProperties paintProps) throws VizException {
|
PaintProperties paintProps) throws VizException {
|
||||||
super.paintInternal(target, paintProps);
|
super.paintInternal(target, paintProps);
|
||||||
// defineCharHeight(font10);
|
// defineCharHeight(font10);
|
||||||
if (rscHandler == null || rscHandler.getSoundingLys() == null)
|
if (rscHandler == null || rscHandler.getSoundingLys() == null || !rscHandler.isGoodData())//#5929
|
||||||
return;
|
return;
|
||||||
this.font10.setSmoothing(false);
|
this.font10.setSmoothing(false);
|
||||||
this.font10.setScaleFont(false);
|
this.font10.setScaleFont(false);
|
||||||
|
|
|
@ -10,6 +10,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------- ------- -------- -----------
|
* ------- ------- -------- -----------
|
||||||
* 04/23/2012 229 Chin Chen Initial coding
|
* 04/23/2012 229 Chin Chen Initial coding
|
||||||
|
* 01/27/2015 DR#17006,
|
||||||
|
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||||
|
* in Volume Browser
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -159,11 +162,14 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
||||||
float x1 = verticalWindXOrig+ (verticalWindWidth/2);
|
float x1 = verticalWindXOrig+ (verticalWindWidth/2);
|
||||||
target.drawLine(x1, verticalWindYOrig, 0, x1, verticalWindYOrig+verticalWindHeight, 0,
|
target.drawLine(x1, verticalWindYOrig, 0, x1, verticalWindYOrig+verticalWindHeight, 0,
|
||||||
NsharpConstants.color_white, 1, LineStyle.DASHED);
|
NsharpConstants.color_white, 1, LineStyle.DASHED);
|
||||||
target.drawWireframeShape(verticalWindLabelShape, NsharpConstants.color_white,
|
if(verticalWindLabelShape!=null) //#5929
|
||||||
|
target.drawWireframeShape(verticalWindLabelShape, NsharpConstants.color_white,
|
||||||
0.3F, commonLineStyle,font10);
|
0.3F, commonLineStyle,font10);
|
||||||
target.drawWireframeShape(verticalWindRShape, NsharpConstants.color_red,
|
if(verticalWindRShape!=null)
|
||||||
|
target.drawWireframeShape(verticalWindRShape, NsharpConstants.color_red,
|
||||||
0.3F, commonLineStyle,font10);
|
0.3F, commonLineStyle,font10);
|
||||||
target.drawWireframeShape(verticalWindSbShape, NsharpConstants.color_skyblue,
|
if(verticalWindSbShape!=null)
|
||||||
|
target.drawWireframeShape(verticalWindSbShape, NsharpConstants.color_skyblue,
|
||||||
0.3F, commonLineStyle,font10);
|
0.3F, commonLineStyle,font10);
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
}
|
}
|
||||||
|
@ -304,7 +310,7 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
||||||
windBoxWindRscShapeList.add(shNcolor);
|
windBoxWindRscShapeList.add(shNcolor);
|
||||||
|
|
||||||
|
|
||||||
|
float surfaceLevel = soundingLys.get(0).getGeoHeight(); //#5929
|
||||||
//System.out.println("my wolrd minvY="+ myYViewMin+ " maxVY="+myYViewMax+ " YRange="+myYViewRange);
|
//System.out.println("my wolrd minvY="+ myYViewMin+ " maxVY="+myYViewMax+ " YRange="+myYViewRange);
|
||||||
for (NcSoundingLayer layer : soundingLys) {
|
for (NcSoundingLayer layer : soundingLys) {
|
||||||
float pressure = layer.getPressure();
|
float pressure = layer.getPressure();
|
||||||
|
@ -321,13 +327,14 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
||||||
//System.out.println("Wind p="+pressure+" yP="+ windBoxY+ " ratio="+yRatio);
|
//System.out.println("Wind p="+pressure+" yP="+ windBoxY+ " ratio="+yRatio);
|
||||||
float geoHt = layer.getGeoHeight();
|
float geoHt = layer.getGeoHeight();
|
||||||
double [][] lines = {{windBoxX, windBoxY},{windBoxX + (spd) * xRatio,windBoxY}};
|
double [][] lines = {{windBoxX, windBoxY},{windBoxX + (spd) * xRatio,windBoxY}};
|
||||||
if(geoHt <nsharpNative.nsharpLib.msl(3000))
|
//use MSL here, so Converts height from (meters) AGL to MSL. #5929
|
||||||
|
if(geoHt < (3000+surfaceLevel))
|
||||||
shapeR.addLineSegment(lines);
|
shapeR.addLineSegment(lines);
|
||||||
else if(geoHt < nsharpNative.nsharpLib.msl(6000))
|
else if(geoHt < (6000+surfaceLevel))
|
||||||
shapeG.addLineSegment(lines);
|
shapeG.addLineSegment(lines);
|
||||||
else if(geoHt < nsharpNative.nsharpLib.msl(9000))
|
else if(geoHt < (9000+surfaceLevel))
|
||||||
shapeY.addLineSegment(lines);
|
shapeY.addLineSegment(lines);
|
||||||
else if(geoHt < nsharpNative.nsharpLib.msl(12000))
|
else if(geoHt < (12000+surfaceLevel))
|
||||||
shapeC.addLineSegment(lines);
|
shapeC.addLineSegment(lines);
|
||||||
else
|
else
|
||||||
shapeV.addLineSegment(lines);
|
shapeV.addLineSegment(lines);
|
||||||
|
@ -437,7 +444,6 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
||||||
verticalWindLabelShape.compile();
|
verticalWindLabelShape.compile();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create all wire frame shapes at one place.
|
* Create all wire frame shapes at one place.
|
||||||
* Should be used only when a new resource is becoming Current active resource to be displayed.
|
* Should be used only when a new resource is becoming Current active resource to be displayed.
|
||||||
|
@ -447,23 +453,24 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
||||||
if(target== null || rscHandler== null || inSidePane )
|
if(target== null || rscHandler== null || inSidePane )
|
||||||
return;
|
return;
|
||||||
//System.out.println("whitoPane="+this.toString()+" createAllWireFrameShapes called");
|
//System.out.println("whitoPane="+this.toString()+" createAllWireFrameShapes called");
|
||||||
rscHandler.repopulateSndgData();
|
//rscHandler.repopulateSndgData();//#5929 TBD why need this?????
|
||||||
|
|
||||||
disposeAllWireFrameShapes();
|
disposeAllWireFrameShapes();
|
||||||
if(soundingLys != null){
|
if(soundingLys != null){
|
||||||
NsharpGenericPaneBackground skewtBgd = rscHandler.getSkewtPaneRsc().getActiveBackground();
|
NsharpGenericPaneBackground skewtBgd = rscHandler.getSkewtPaneRsc().getActiveBackground();
|
||||||
if(skewtBgd!=null){
|
if(skewtBgd!=null){
|
||||||
vpc = skewtBgd.getViewablePressureContainer(soundingLys);
|
vpc = skewtBgd.getViewablePressureContainer(soundingLys);
|
||||||
vplc = skewtBgd.getViewablePressureLinesContainer();
|
vplc = skewtBgd.getViewablePressureLinesContainer();
|
||||||
}
|
|
||||||
createRscOmegaShape();
|
|
||||||
createRscWindBoxWindShape();
|
|
||||||
createRscVerticalWindShape();
|
|
||||||
}
|
}
|
||||||
//create static shape
|
createRscOmegaShape();
|
||||||
createBkgOmegaShape();
|
createRscWindBoxWindShape();
|
||||||
createBkgWindBoxShape();
|
if(rscHandler.isGoodData())//#5929
|
||||||
|
createRscVerticalWindShape();
|
||||||
|
}
|
||||||
|
//create static shape
|
||||||
|
createBkgOmegaShape();
|
||||||
|
createBkgWindBoxShape();
|
||||||
|
|
||||||
}
|
}
|
||||||
public void createRscWireFrameShapes(){
|
public void createRscWireFrameShapes(){
|
||||||
//System.out.println("createRscWireFrameShapes called");
|
//System.out.println("createRscWireFrameShapes called");
|
||||||
|
@ -477,7 +484,8 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
||||||
}
|
}
|
||||||
createRscOmegaShape();
|
createRscOmegaShape();
|
||||||
createRscWindBoxWindShape();
|
createRscWindBoxWindShape();
|
||||||
createRscVerticalWindShape();
|
if(rscHandler.isGoodData())//#5929
|
||||||
|
createRscVerticalWindShape();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue