ASM #17051 MPE: Daily QC will not display Points+Grids together.
Change-Id: Ic74de62f60769456e7fd2762690e539cc553062a Former-commit-id: 8db85622ff4d0f7202c4d2c2e6eefeefe2ef39c3
This commit is contained in:
parent
d0b7b06d97
commit
540ea64498
4 changed files with 133 additions and 133 deletions
|
@ -85,8 +85,6 @@ 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,23 +296,23 @@ 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;
|
||||||
|
|
||||||
|
@ -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");
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
@ -98,10 +100,6 @@ public class PlotGriddedPrecipResource extends
|
||||||
|
|
||||||
MPEDisplayManager displayMgr = null;
|
MPEDisplayManager displayMgr = null;
|
||||||
|
|
||||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
|
||||||
|
|
||||||
private DrawDQCStations ddq = DrawDQCStations.getInstance();
|
|
||||||
|
|
||||||
private GriddedImageDisplay2 gridDisplay;
|
private GriddedImageDisplay2 gridDisplay;
|
||||||
|
|
||||||
private GriddedContourDisplay contourDisplay;
|
private GriddedContourDisplay contourDisplay;
|
||||||
|
@ -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,23 +261,23 @@ 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();
|
||||||
|
|
||||||
|
@ -289,11 +289,11 @@ public class DailyQcUtils {
|
||||||
|
|
||||||
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,7 +443,7 @@ 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 int[] qflag = new int[10];
|
||||||
|
|
||||||
|
@ -476,25 +476,25 @@ public class DailyQcUtils {
|
||||||
|
|
||||||
public int gage_char[] = new int[2];
|
public 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);
|
||||||
|
|
||||||
|
@ -2130,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue