Merge branch 'master_14.3.1' into asm_14.3.1

Former-commit-id: e64a61bb41b43b995a6b6e3b3c468aa0fa3c84ed
This commit is contained in:
Fay.Liang 2015-01-14 12:01:19 -05:00
commit deb2adb1fc
7 changed files with 1107 additions and 1060 deletions

View file

@ -32,7 +32,8 @@ import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 6, 2014 3026 mpduff Initial creation
* May 6, 2014 3026 mpduff Initial creation.
* Jan 6, 2015 3026 mpduff Added Bias HPE.
*
* </pre>
*
@ -43,6 +44,8 @@ import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
public class HpeUtils {
private static final String HPE = "HPE";
private static final String BIAS_HPE = "BiasHPE";
/**
* Determine if this title represents an HPE model.
*
@ -64,6 +67,7 @@ public class HpeUtils {
if (title == null) {
return false;
}
return HPE.equals(title);
return HPE.equals(title) || BIAS_HPE.equals(title);
}
}

View file

@ -11,7 +11,7 @@ package com.raytheon.viz.mpe.ui;
* ------------ ---------- ----------- --------------------------
* Jun 9, 2011 rgeorge Initial creation
* Jun 30, 2014 17457 snaples Updated getCv_use to return name
*
* Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts.
* </pre>
*
* @author rgeorge
@ -56,7 +56,7 @@ public enum DisplayFieldData {
mlqmosaic("mpe_mlqmosaic_dir", "Q2 MultiSensor Mosaic", 3600, "PRECIP_ACCUM"),
//best estimate QPE
Xmrg("rfcwide_xmrg_dir", "Best Estimate QPE (in)"), //
Xmrg("rfcwide_xmrg_dir", "Best Estimate QPE (in)", 3600, "PRECIP_ACCUM" ), //
p3lMosaic("rfcwide_p3lmosaic_dir",
"P3 Local Bias Corrected Radar-Derived Precip (in)", 3600, "PRECIP_ACCUM"), //
@ -146,11 +146,18 @@ public enum DisplayFieldData {
}
}
public String getFieldName() {
return name().toUpperCase();
}
/**
* @return the cv_use
*/
public String getCv_use() {
cv_use = name().toUpperCase();
if (cv_use == null) {
cv_use = getFieldName();
}
return cv_use;
}

View file

@ -16,6 +16,14 @@
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts.
* </pre>
**/
package com.raytheon.viz.mpe.ui.actions;
@ -116,7 +124,7 @@ public class SaveBestEstimate {
String rfc = MPEDataManager.getInstance().getRFC();
update_rwr_save(rfc, editDate, bestEstField.getCv_use());
update_rwr_save(rfc, editDate, bestEstField.getFieldName());
XmrgFile xmrgFile = MPEDisplayManager.getXmrgFile(bestEstField,
editDate);

View file

@ -56,7 +56,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* Polygon values will now be
* displayed for polygons with
* the "sub" action.
*
* Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts.
* </pre>
*
* @author mpduff
@ -286,8 +286,8 @@ public class DeletePolygonDlg extends CaveSWTDialog {
polygonListBox.removeAll();
String type = displayManager.getDisplayFieldType().getCv_use()
.toUpperCase();
String type = displayManager.getDisplayFieldType().getFieldName();
productTF.setText(type);
polygonList = PolygonEditManager.getPolygonEdits(fieldData, editDate);
recreatePolygonListBox();
@ -314,7 +314,7 @@ public class DeletePolygonDlg extends CaveSWTDialog {
PolygonEditAction action = data.getEditAction();
if (action == PolygonEditAction.SUB) {
String value = data.getSubDrawSource().getCv_use();
String value = data.getSubDrawSource().getFieldName();
polygonListBox.add(String.format(format2, number, displayed,
persist, action.toPrettyName(), value));
} else {

View file

@ -16,6 +16,14 @@
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts.
* </pre>
**/
package com.raytheon.viz.mpe.ui.dialogs.polygon;
@ -233,7 +241,7 @@ public class PolygonEditManager {
String polyEditStr = editAction.toPrettyName()
+ " "
+ (subDrawSource != null ? subDrawSource.getCv_use()
+ (subDrawSource != null ? subDrawSource.getFieldName()
: String.format("%6.2f", precipValue)) + " "
+ editPoints.length + " " + (visible ? "1" : "0");
toUse.append(idx + " " + polyEditStr + "\n");
@ -288,7 +296,7 @@ public class PolygonEditManager {
}
private static File getHourlyEditFile(DisplayFieldData fieldData, Date date) {
String fieldname = fieldData.getCv_use();
String fieldname = fieldData.getFieldName();
String polygonDir = MPEDisplayManager.getPolygonEditDir();
/* Build the polygon filename. */
@ -299,7 +307,7 @@ public class PolygonEditManager {
private static File getPersistentEditFile(DisplayFieldData fieldData,
Date date) {
String fieldname = fieldData.getCv_use();
String fieldname = fieldData.getFieldName();
String polygonDir = MPEDisplayManager.getPolygonEditDir();
/* Build the persistent polygon filename. */
String persistentFilename = String.format("%s/DrawPoly%s", polygonDir,
@ -345,7 +353,7 @@ public class PolygonEditManager {
DisplayFieldData subData = null;
for (DisplayFieldData fieldData : DisplayFieldData
.values()) {
if (fieldData.getCv_use()
if (fieldData.getFieldName()
.equalsIgnoreCase(subCvUse)) {
subData = fieldData;
break;

View file

@ -16,6 +16,14 @@
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts.
* </pre>
**/
package com.raytheon.viz.mpe.ui.rsc;
@ -580,7 +588,7 @@ public class DisplayMeanArealPrecipResource extends
// this will accumulate all hours requested and display it
// this holds current xmrg values
short[] tempdata = null;
String cv_use = displayMgr.getDisplayFieldType().getCv_use();
String cv_use = displayMgr.getDisplayFieldType().getFieldName();
String dirname = appsDefaults.getToken(displayMgr.getDisplayFieldType()
.getDirToken());
String fname = "";

View file

@ -18,6 +18,8 @@ package gov.noaa.nws.ncep.edex.uengine.tasks.profile;
* dataStore.retrieveGroups()
* Oct 15, 2012 2473 bsteffen Remove ncgrib
* 03/2014 1116 T. Lee Added DpD
* 01/2015 DR#16959 Chin Chen Added DpT support to fix DR 16959 NSHARP freezes when loading a sounding from
* HiRes-ARW/NMM models
* </pre>
*
* @author Chin Chen
@ -66,12 +68,12 @@ import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
//import org.opengis.geometry.Envelope;
public class MdlSoundingQuery {
private static final String D2DGRIB_TBL_NAME = "grid";
private static final String GRID_TBL_NAME = "grid";
private static String D2D_PARMS = "GH, uW, vW,T, DWPK, SPFH,OMEG, RH, DpD";
private static String GRID_PARMS = "GH, uW, vW,T, DWPK, SPFH,OMEG, RH, DpD, DpT";
private enum D2DParmNames {
GH, uW, vW, T, DWPK, SPFH, OMEG, RH, DpD
private enum GridParmNames {
GH, uW, vW, T, DWPK, SPFH, OMEG, RH, DpD, DpT
};
public static UnitConverter kelvinToCelsius = SI.KELVIN
@ -415,7 +417,7 @@ public class MdlSoundingQuery {
public static NcSoundingModel getMdls(String pluginName) {
NcSoundingModel mdls = new NcSoundingModel();
Object[] mdlName = null;
if (pluginName.equalsIgnoreCase(D2DGRIB_TBL_NAME)) {
if (pluginName.equalsIgnoreCase(GRID_TBL_NAME)) {
CoreDao dao = new CoreDao(DaoConfig.forClass(GridInfoRecord.class));
String queryStr = new String(
"Select Distinct modelname FROM grib_models ORDER BY modelname");
@ -437,7 +439,7 @@ public class MdlSoundingQuery {
ISpatialObject spatialArea = null;
MathTransform crsFromLatLon = null;
if (pluginName.equalsIgnoreCase(D2DGRIB_TBL_NAME)) {
if (pluginName.equalsIgnoreCase(GRID_TBL_NAME)) {
CoreDao dao = new CoreDao(DaoConfig.forClass(GridRecord.class));
DatabaseQuery query = new DatabaseQuery(GridRecord.class.getName());
@ -524,7 +526,7 @@ public class MdlSoundingQuery {
ISpatialObject spatialArea = null;
MathTransform crsFromLatLon = null;
if (pluginName.equalsIgnoreCase(D2DGRIB_TBL_NAME)) {
if (pluginName.equalsIgnoreCase(GRID_TBL_NAME)) {
CoreDao dao = new CoreDao(DaoConfig.forClass(GridRecord.class));
DatabaseQuery query = new DatabaseQuery(GridRecord.class.getName());
@ -597,7 +599,7 @@ public class MdlSoundingQuery {
public static Float getModelSfcPressure(Point pnt, String refTime,
String validTime, String pluginName, String modelName) {
if (pluginName.equalsIgnoreCase(D2DGRIB_TBL_NAME)) {
if (pluginName.equalsIgnoreCase(GRID_TBL_NAME)) {
CoreDao dao = new CoreDao(DaoConfig.forClass(GridRecord.class));
DatabaseQuery query = new DatabaseQuery(GridRecord.class.getName());
@ -662,7 +664,7 @@ public class MdlSoundingQuery {
List<NcSoundingProfile> soundingProfileList = new ArrayList<NcSoundingProfile>();
List<float[]> fdataArrayList = new ArrayList<float[]>();
// long t01 = System.currentTimeMillis();
if (pluginName.equalsIgnoreCase(D2DGRIB_TBL_NAME)) {
if (pluginName.equalsIgnoreCase(GRID_TBL_NAME)) {
List<GridRecord> recList = new ArrayList<GridRecord>();
;
TableQuery query;
@ -670,7 +672,7 @@ public class MdlSoundingQuery {
query = new TableQuery("metadata", GridRecord.class.getName());
query.addParameter(GridConstants.MASTER_LEVEL_NAME, "MB");
query.addParameter(GridConstants.DATASET_ID, modelName);
query.addList(GridConstants.PARAMETER_ABBREVIATION, D2D_PARMS);
query.addList(GridConstants.PARAMETER_ABBREVIATION, GRID_PARMS);
query.addParameter("dataTime.refTime", refTime);
query.addParameter("dataTime.validPeriod.start", validTime);
query.setSortBy(GridConstants.LEVEL_ONE, false);
@ -707,7 +709,8 @@ public class MdlSoundingQuery {
float fdata = fdataArray[i];
if (rec1.getLevel().getLevelonevalue() == pressure) {
String prm = rec1.getParameter().getAbbreviation();
switch (D2DParmNames.valueOf(prm)) {
//System.out.println("prm="+prm+" value="+fdata);
switch (GridParmNames.valueOf(prm)) {
case GH:
soundingLy.setGeoHeight(fdata);
break;
@ -743,6 +746,15 @@ public class MdlSoundingQuery {
case DpD:
soundingLy.setDpd(fdata);
break;
case DpT:
soundingLy.setDewpoint((float) kelvinToCelsius
.convert(fdata));
break;
case SPFH:
soundingLy.setSpecHumidity(fdata);
break;
default:
break;
}
}
}
@ -939,7 +951,7 @@ public class MdlSoundingQuery {
String pluginName, String modelName) {
// List<?>vals = null;
if (pluginName.equalsIgnoreCase(D2DGRIB_TBL_NAME)) {
if (pluginName.equalsIgnoreCase(GRID_TBL_NAME)) {
CoreDao dao = new CoreDao(DaoConfig.forClass(GridRecord.class));
DatabaseQuery query = new DatabaseQuery(GridRecord.class.getName());
query.addDistinctParameter(GridConstants.LEVEL_ONE);
@ -990,7 +1002,7 @@ public class MdlSoundingQuery {
Point pnt = null;
if (pluginName.equalsIgnoreCase(D2DGRIB_TBL_NAME)) {
if (pluginName.equalsIgnoreCase(GRID_TBL_NAME)) {
CoreDao dao = new CoreDao(DaoConfig.forClass(GridRecord.class));
DatabaseQuery query = new DatabaseQuery(GridRecord.class.getName());