Issue #2906 removed wmo header, timeObs and timeNominal from sfcobs HDF5

times still in DB, accesible from point data view
BUFR obs decoder populates WMO header for consistency

(cherry picked from commit 4e976fafed [formerly c5400855f507015ab0a10cb0ce17ff7ba92a6220])


Former-commit-id: 8a7b2d30ba08c7e6bb80161788c0803f99622fda
This commit is contained in:
Brian Clements 2014-04-22 09:10:45 -05:00 committed by Steve Harris
parent 2c1d1cb953
commit 2b4bdeb10b
4 changed files with 5 additions and 36 deletions

View file

@ -20,9 +20,6 @@
-->
<pointDataDescription>
<dimension name="maxInterWinds" length="6"/>
<parameter name="timeObs" numDims="1" type="LONG" unit="seconds since 1-1-1970" />
<parameter name="timeNominal" numDims="1" type="LONG" unit="seconds since 1-1-1970" />
<parameter name="wmoHeader" numDims="1" type="STRING" />
<parameter name="rawReport" numDims="1" type="STRING" />
<parameter name="temperature" numDims="1" type="FLOAT" unit="K" />
<parameter name="dewpoint" numDims="1" type="FLOAT" unit="K" />

View file

@ -28,4 +28,6 @@
<parameter name="dataURI" queryName="dataURI" type="STRING" />
<parameter name="refTime" queryName="dataTime.refTime" numDims="1" type="LONG" unit="ms"/>
<parameter name="forecastHr" queryName="dataTime.fcstTime" numDims="1" type="INT" unit="h" dbunit="s"/>
<parameter name="timeObs" queryName="timeObs" numDims="1" type="LONG" dbunit="ms" unit="s" />
<parameter name="timeNominal" queryName="refHour" numDims="1" type="LONG" dbunit="ms" unit="s" />
</pointDataDbDescription>

View file

@ -39,7 +39,6 @@ import com.raytheon.uf.common.pointdata.PointDataDescription;
import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
/**
* Populates point data views from fields in obs common records.
@ -53,6 +52,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* Oct 1, 2009 jkorman Initial creation
* Feb 15,2011 5705 cjeanbap Added wmoHeader to HDR_PARAMS_LIST.
* Apr 04,2014 2906 bclement made getDescription() and static constants public
* Apr 22,2014 2906 bclement removed WMO header, timeObs and timeNominal from HDF5 (times still in DB)
*
* </pre>
*
@ -217,7 +217,6 @@ public class SfcObsPointDataTransform {
sb.append("reportType,");
sb.append("dataURI,");
sb.append("rawReport,");
sb.append("wmoHeader,");
HDR_PARAMS_LIST = sb.toString();
}
@ -371,11 +370,8 @@ public class SfcObsPointDataTransform {
PointDataView pdv = container.append();
if (pdv != null) {
pdv.setLong(TIME_OBS, record.getTimeObs().getTimeInMillis());
pdv.setLong(TIME_NOMINAL, record.getRefHour().getTimeInMillis());
pdv.setString(RAW_REPORT, record.getObsText());
pdv.setString(WMO_HEADER, record.getWmoHeader());
pdv.setFloat(TEMPERATURE, getFloat(record.getTemp()));
pdv.setFloat(DEWPOINT, getFloat(record.getDwpt()));
@ -621,31 +617,11 @@ public class SfcObsPointDataTransform {
SurfaceObsLocation loc = obs.getLocation();
loc.setElevation(elev);
long tt = pdv.getNumber(TIME_OBS).longValue();
obs.setTimeObs(TimeTools.newCalendar(tt));
tt = pdv.getNumber(TIME_NOMINAL).longValue();
obs.setRefHour(TimeTools.newCalendar(tt));
obs.setObsText(pdv.getString(RAW_REPORT));
obs.setWmoHeader(pdv.getString(WMO_HEADER));
}
return obs;
}
/**
*
* @param value
* @return
*/
private static int getInt(Double value) {
int retValue = INT_DEFAULT;
if (value != null) {
retValue = value.intValue();
}
return retValue;
}
private static int getInt(Integer value) {
int retValue = INT_DEFAULT;
if (value != null) {
@ -654,14 +630,6 @@ public class SfcObsPointDataTransform {
return retValue;
}
private static int getInt(Float value) {
int retValue = INT_DEFAULT;
if (value != null) {
retValue = value.intValue();
}
return retValue;
}
private static float getFloat(Double value) {
float retValue = FLOAT_DEFAULT;
if (value != null) {

View file

@ -85,6 +85,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 21, 2014 2906 bclement Initial creation
* Apr 21, 2014 2906 bclement populated wmo header in record for consistency
*
* </pre>
*
@ -299,6 +300,7 @@ public abstract class AbstractBufrSfcObsDecoder {
}
/* shef converter looks for WMO header in obs text */
currentRecord.setObsText(header.getWmoHeader());
currentRecord.setWmoHeader(header.getWmoHeader());
}
/**