Issue #2537 Split modelsounding into common/edex plugins.
Change-Id: I34aa58bc13736109bd71f0b0085df6548c4623a8 Former-commit-id: e80e4aa972c394d699feba553d8d13e4f9dd3a03
This commit is contained in:
parent
53d440be2e
commit
f520a26fbd
51 changed files with 1671 additions and 2166 deletions
|
@ -10,7 +10,7 @@
|
|||
</crossSectionAdapter>
|
||||
<crossSectionAdapter
|
||||
adapter="com.raytheon.uf.viz.d2d.xy.adapters.crosssection.PointCSAdapter"
|
||||
class="com.raytheon.edex.plugin.modelsounding.common.SoundingSite"
|
||||
class="com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite"
|
||||
name="Model Sounding Cross Section Adapter">
|
||||
</crossSectionAdapter>
|
||||
<crossSectionAdapter
|
||||
|
@ -119,7 +119,7 @@
|
|||
</timeSeriesAdapter>
|
||||
<timeSeriesAdapter
|
||||
adapter="com.raytheon.uf.viz.d2d.xy.adapters.timeseries.PointDataTimeSeriesAdapter"
|
||||
class="com.raytheon.edex.plugin.modelsounding.common.SoundingSite"
|
||||
class="com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite"
|
||||
name="Model Sounding Time Series Adapter">
|
||||
</timeSeriesAdapter>
|
||||
</extension>
|
||||
|
@ -175,7 +175,7 @@
|
|||
</varHeightAdapter>
|
||||
<varHeightAdapter
|
||||
adapter="com.raytheon.uf.viz.d2d.xy.adapters.varheight.PointDataVarHeightAdapter"
|
||||
class="com.raytheon.edex.plugin.modelsounding.common.SoundingSite"
|
||||
class="com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite"
|
||||
name="Model Sounding Var Height Adapter">
|
||||
</varHeightAdapter>
|
||||
</extension>
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
</requires>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.edex.plugin.modelsounding"
|
||||
id="com.raytheon.uf.common.dataplugin.modelsounding"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
unpack="true"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.sounding"
|
||||
|
|
7
deltaScripts/14.2.1/mdlsndTimeColumns.sh
Normal file
7
deltaScripts/14.2.1/mdlsndTimeColumns.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
# DR #2537 - this update script will drop the fcstseconds and timeobs columns
|
||||
# from the modelsounding table, refTime and forecasttime have the exact same values.
|
||||
|
||||
PSQL="/awips2/psql/bin/psql"
|
||||
|
||||
${PSQL} -U awips -d metadata -c "ALTER TABLE modelsounding DROP COLUMN IF EXISTS fcstseconds, DROP COLUMN IF EXISTS timeobs;"
|
|
@ -1 +0,0 @@
|
|||
com.raytheon.edex.plugin.modelsounding.common.SoundingSite
|
|
@ -1,122 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
/**
|
||||
* Stores temporal information associated with sounding data.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 3, 2013 2161 bkowal Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bkowal
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class SoundingTemporalData {
|
||||
private Calendar obsTime;
|
||||
|
||||
private DataTime dt;
|
||||
|
||||
private long refTime;
|
||||
|
||||
private long validTime;
|
||||
|
||||
private int forecastHr;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public SoundingTemporalData() {
|
||||
this.obsTime = null;
|
||||
this.dt = null;
|
||||
this.refTime = -1L;
|
||||
this.validTime = -1L;
|
||||
this.forecastHr =-1;
|
||||
}
|
||||
|
||||
public Calendar getObsTime() {
|
||||
return obsTime;
|
||||
}
|
||||
|
||||
public void setObsTime(Calendar obsTime) {
|
||||
this.obsTime = obsTime;
|
||||
}
|
||||
|
||||
public DataTime getDt() {
|
||||
return dt;
|
||||
}
|
||||
|
||||
public void setDt(DataTime dt) {
|
||||
this.dt = dt;
|
||||
}
|
||||
|
||||
public long getRefTime() {
|
||||
return refTime;
|
||||
}
|
||||
|
||||
public void setRefTime(long refTime) {
|
||||
this.refTime = refTime;
|
||||
}
|
||||
|
||||
public long getValidTime() {
|
||||
return validTime;
|
||||
}
|
||||
|
||||
public void setValidTime(long validTime) {
|
||||
this.validTime = validTime;
|
||||
}
|
||||
|
||||
public int getForecastHr() {
|
||||
return forecastHr;
|
||||
}
|
||||
|
||||
public void setForecastHr(int forecastHr) {
|
||||
this.forecastHr = forecastHr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
SoundingTemporalData otherIndex = (SoundingTemporalData) object;
|
||||
|
||||
return (otherIndex.refTime == this.refTime)
|
||||
&& (otherIndex.forecastHr == this.forecastHr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("refTime = ");
|
||||
stringBuilder.append(this.refTime);
|
||||
stringBuilder.append(", forecastHr = ");
|
||||
stringBuilder.append(this.forecastHr);
|
||||
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
}
|
|
@ -1,408 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.common;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.edex.pointdata.PointDataQuery;
|
||||
|
||||
/**
|
||||
*
|
||||
* A class for converting point data into sounding sites.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 6, 2011 bsteffen Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ModelSoundingPointDataTransform {
|
||||
|
||||
// Record parameters
|
||||
public static final String P_WMO_HEADER = "wmoHeader";
|
||||
|
||||
public static final String P_DATAURI = "dataURI";
|
||||
|
||||
public static final String P_STATION_NUMBER = "wmoStaNum";
|
||||
|
||||
public static final String P_LATITUDE = "latitude";
|
||||
|
||||
public static final String P_LONGITUDE = "longitude";
|
||||
|
||||
public static final String P_ELEVATION = "elevation";
|
||||
|
||||
public static final String P_STATION_ID = "stationId";
|
||||
|
||||
public static final String P_REF_TIME = "refTime";
|
||||
|
||||
public static final String P_FORECAST_HOUR = "forecastHr";
|
||||
|
||||
public static final String P_NUM_LEVELS = "numProfLvls";
|
||||
|
||||
// Level parameters
|
||||
public static final String P_LVL_PRESS = "pressure";
|
||||
|
||||
public static final String P_LVL_TEMP = "temperature";
|
||||
|
||||
public static final String P_LVL_SPEC_HUM = "specHum";
|
||||
|
||||
public static final String P_LVL_OMEGA = "omega";
|
||||
|
||||
public static final String P_LVL_U_COMP = "uComp";
|
||||
|
||||
public static final String P_LVL_V_COMP = "vComp";
|
||||
|
||||
public static final String P_LVL_CLOUD_COVER = "cldCvr";
|
||||
|
||||
// Surface parameters
|
||||
public static final String P_SFC_PRESS = "sfcPress";
|
||||
|
||||
public static final String P_SEA_LEVEL_PRESS = "seaLvlPress";
|
||||
|
||||
public static final String P_LOW_CLOUD = "lowCld";
|
||||
|
||||
public static final String P_MID_CLOUD = "midCld";
|
||||
|
||||
public static final String P_HIGH_CLOUD = "hiCld";
|
||||
|
||||
public static final String P_CLOUD_PRESS = "prCloud";
|
||||
|
||||
public static final String P_VISIBILITY = "vsby";
|
||||
|
||||
public static final String P_U_STORM = "uStorm";
|
||||
|
||||
public static final String P_V_STORM = "vStorm";
|
||||
|
||||
public static final String P_STORM_REL_HELI = "srHel";
|
||||
|
||||
public static final String P_TOTAL_PRECIP = "totPrecip";
|
||||
|
||||
public static final String P_CONV_PRECIP = "convPrecip";
|
||||
|
||||
public static final String P_SNOW_FALL = "snowFall";
|
||||
|
||||
public static final String P_U_COMP_10M = "u10";
|
||||
|
||||
public static final String P_V_COMP_10M = "v10";
|
||||
|
||||
public static final String P_TEMP_2M = "temp2";
|
||||
|
||||
public static final String P_SPEC_HUM_2M = "q2";
|
||||
|
||||
public static final String P_SNOW_TYPE = "snowTyp";
|
||||
|
||||
public static final String P_ICE_TYPE = "iceTyp";
|
||||
|
||||
public static final String P_FREEZING_RAIN_TYPE = "frzgRainTyp";
|
||||
|
||||
public static final String P_RAIN_TYPE = "rainType";
|
||||
|
||||
// This list deliberately omits data which can be pulled from the dataURI
|
||||
// including location and time information
|
||||
public static final List<String> ALL_DATA = Arrays.asList(P_WMO_HEADER,
|
||||
P_DATAURI, P_ELEVATION, P_STATION_NUMBER, P_NUM_LEVELS, P_LVL_PRESS, P_LVL_TEMP,
|
||||
P_LVL_SPEC_HUM, P_LVL_OMEGA, P_LVL_U_COMP, P_LVL_V_COMP,
|
||||
P_LVL_CLOUD_COVER, P_SFC_PRESS, P_SEA_LEVEL_PRESS, P_LOW_CLOUD,
|
||||
P_MID_CLOUD, P_HIGH_CLOUD, P_CLOUD_PRESS, P_VISIBILITY, P_U_STORM,
|
||||
P_V_STORM, P_STORM_REL_HELI, P_TOTAL_PRECIP, P_CONV_PRECIP,
|
||||
P_SNOW_FALL, P_U_COMP_10M, P_V_COMP_10M, P_TEMP_2M, P_SPEC_HUM_2M,
|
||||
P_SNOW_TYPE, P_ICE_TYPE, P_FREEZING_RAIN_TYPE, P_RAIN_TYPE);
|
||||
|
||||
public static final List<String> LVL_PARAMETERS = Arrays.asList(
|
||||
P_LVL_PRESS, P_LVL_TEMP, P_LVL_SPEC_HUM, P_LVL_OMEGA, P_LVL_U_COMP,
|
||||
P_LVL_V_COMP, P_LVL_CLOUD_COVER);
|
||||
|
||||
/**
|
||||
* Use all point data parameters to build sounding sites for all sites which
|
||||
* match the query defined by fields, values, and operands.
|
||||
*
|
||||
*/
|
||||
public static List<SoundingSite> getSoundingSites(List<String> fields,
|
||||
List<Object> values, List<String> operands) throws Exception {
|
||||
return getSoundingSites(fields, values, operands, ALL_DATA);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the specified point data parameters to build sounding sites for all
|
||||
* sites which match the query defined by fields, values, and operands.
|
||||
*
|
||||
*/
|
||||
public static List<SoundingSite> getSoundingSites(List<String> fields,
|
||||
List<Object> values, List<String> operands, List<String> parameters)
|
||||
throws Exception {
|
||||
StringBuilder parametersString = new StringBuilder();
|
||||
for (String parameter : parameters) {
|
||||
if (parametersString.length() > 0) {
|
||||
parametersString.append(",");
|
||||
}
|
||||
parametersString.append(parameter);
|
||||
}
|
||||
if (!parameters.contains(P_NUM_LEVELS)) {
|
||||
// if you have any level based parameters you must include num
|
||||
// levels
|
||||
for (String lvlParam : LVL_PARAMETERS) {
|
||||
if (parameters.contains(lvlParam)) {
|
||||
parametersString.append(",");
|
||||
parametersString.append(P_NUM_LEVELS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PointDataQuery pdq = new PointDataQuery("modelsounding");
|
||||
pdq.setParameters(parametersString.toString());
|
||||
for (int i = 0; i < fields.size(); i++) {
|
||||
Object value = values.get(i);
|
||||
String valueString = String.valueOf(value);
|
||||
// TODO more generic support of different objects and/or allow
|
||||
// PointDataQuery to handle Objects instead of just String
|
||||
if (value instanceof Date) {
|
||||
valueString = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
|
||||
.format(value);
|
||||
}
|
||||
pdq.addParameter(fields.get(i), valueString, operands.get(i));
|
||||
|
||||
}
|
||||
pdq.requestAllLevels();
|
||||
PointDataContainer pdc = pdq.execute();
|
||||
if (pdc == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return getSoundingSites(pdc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build sounding sites from the data in the container.
|
||||
*
|
||||
* @param pdc
|
||||
* @return
|
||||
*/
|
||||
public static List<SoundingSite> getSoundingSites(PointDataContainer pdc) {
|
||||
List<SoundingSite> sites = new ArrayList<SoundingSite>(
|
||||
pdc.getCurrentSz());
|
||||
for (int i = 0; i < pdc.getCurrentSz(); i++) {
|
||||
sites.add(getSoundingSite(pdc.readRandom(i)));
|
||||
}
|
||||
return sites;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a single sounding site from the data in the view.
|
||||
*
|
||||
* @param pdv
|
||||
* @return
|
||||
*/
|
||||
public static SoundingSite getSoundingSite(PointDataView pdv) {
|
||||
// All the code from here on is boilerplate code for determining what
|
||||
// parameters are in the view and setting the appropriate field in the
|
||||
// Sounding Site.
|
||||
Set<String> parameters = pdv.getContainer().getParameters();
|
||||
SoundingSite site = null;
|
||||
if (parameters.contains(P_DATAURI)) {
|
||||
// Parsing from the dataURI gets several fields for us.
|
||||
site = new SoundingSite(pdv.getString(P_DATAURI));
|
||||
site.setFcstSeconds((long) site.getDataTime().getFcstTime());
|
||||
} else {
|
||||
site = new SoundingSite();
|
||||
site.setLocation(new SurfaceObsLocation());
|
||||
// All of these things would have been in dataURI
|
||||
if (parameters.contains(P_LATITUDE)) {
|
||||
site.getLocation().setLatitude(
|
||||
pdv.getNumber(P_LATITUDE).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_LONGITUDE)) {
|
||||
site.getLocation().setLongitude(
|
||||
pdv.getNumber(P_LONGITUDE).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_STATION_ID)) {
|
||||
site.getLocation().setStationId(pdv.getString(P_STATION_ID));
|
||||
}
|
||||
if (parameters.contains(P_FORECAST_HOUR)) {
|
||||
if (parameters.contains(P_REF_TIME)) {
|
||||
Date refTime = new Date(pdv.getNumber(P_REF_TIME)
|
||||
.longValue() * 1000);
|
||||
int fcstTime = pdv.getNumber(P_FORECAST_HOUR).intValue() * 3600;
|
||||
site.setDataTime(new DataTime(refTime, fcstTime));
|
||||
}
|
||||
site.setFcstSeconds(pdv.getNumber(P_FORECAST_HOUR).longValue() * 3600);
|
||||
} else if (parameters.contains(P_REF_TIME)) {
|
||||
// This might not be the best idea most people will want
|
||||
// forecast time also
|
||||
site.setDataTime(new DataTime(new Date(pdv
|
||||
.getNumber(P_REF_TIME).longValue() * 1000)));
|
||||
}
|
||||
}
|
||||
// Record parameters
|
||||
if (parameters.contains(P_WMO_HEADER)) {
|
||||
site.setWmoHeader(pdv.getString(P_WMO_HEADER));
|
||||
}
|
||||
if (parameters.contains(P_STATION_NUMBER)) {
|
||||
site.setSiteId(String.format("%06d", pdv
|
||||
.getNumber(P_STATION_NUMBER).intValue()));
|
||||
}
|
||||
populateLevels(site, pdv);
|
||||
|
||||
// Surface parameters
|
||||
if (parameters.contains(P_ELEVATION)) {
|
||||
site.getLocation().setElevation(pdv.getNumber(P_ELEVATION).intValue());
|
||||
}
|
||||
if (parameters.contains(P_SFC_PRESS)) {
|
||||
site.setPressSfc(pdv.getNumber(P_SFC_PRESS).intValue());
|
||||
}
|
||||
if (parameters.contains(P_SEA_LEVEL_PRESS)) {
|
||||
site.setPressSLP(pdv.getNumber(P_SEA_LEVEL_PRESS).intValue());
|
||||
}
|
||||
if (parameters.contains(P_LOW_CLOUD)) {
|
||||
site.setCldAmtLo(pdv.getNumber(P_LOW_CLOUD).intValue());
|
||||
}
|
||||
if (parameters.contains(P_MID_CLOUD)) {
|
||||
site.setCldAmtMd(pdv.getNumber(P_MID_CLOUD).intValue());
|
||||
}
|
||||
if (parameters.contains(P_HIGH_CLOUD)) {
|
||||
site.setCldAmtHi(pdv.getNumber(P_HIGH_CLOUD).intValue());
|
||||
}
|
||||
if (parameters.contains(P_CLOUD_PRESS)) {
|
||||
site.setPressCldBase(pdv.getNumber(P_CLOUD_PRESS).intValue());
|
||||
}
|
||||
if (parameters.contains(P_VISIBILITY)) {
|
||||
site.setHorzVis(pdv.getNumber(P_VISIBILITY).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_U_STORM)) {
|
||||
site.setStormUComp(pdv.getNumber(P_U_STORM).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_V_STORM)) {
|
||||
site.setStormVComp(pdv.getNumber(P_V_STORM).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_STORM_REL_HELI)) {
|
||||
site.setStormRelHeli(pdv.getNumber(P_STORM_REL_HELI).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_TOTAL_PRECIP)) {
|
||||
site.setTotPrecip1Hr(pdv.getNumber(P_TOTAL_PRECIP).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_CONV_PRECIP)) {
|
||||
site.setPrecipConv1Hr(pdv.getNumber(P_CONV_PRECIP).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_SNOW_FALL)) {
|
||||
site.setSnowWaterEquiv(pdv.getNumber(P_SNOW_FALL).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_U_COMP_10M)) {
|
||||
site.setUc10M(pdv.getNumber(P_U_COMP_10M).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_V_COMP_10M)) {
|
||||
site.setVc10M(pdv.getNumber(P_V_COMP_10M).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_TEMP_2M)) {
|
||||
site.setTemp2M(pdv.getNumber(P_TEMP_2M).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_SPEC_HUM_2M)) {
|
||||
site.setSpecHum2M(pdv.getNumber(P_SPEC_HUM_2M).doubleValue());
|
||||
}
|
||||
if (parameters.contains(P_SNOW_TYPE)) {
|
||||
site.setSnowType(pdv.getNumber(P_SNOW_TYPE).intValue());
|
||||
}
|
||||
if (parameters.contains(P_ICE_TYPE)) {
|
||||
site.setIceType(pdv.getNumber(P_ICE_TYPE).intValue());
|
||||
}
|
||||
if (parameters.contains(P_FREEZING_RAIN_TYPE)) {
|
||||
site.setFzRainType(pdv.getNumber(P_FREEZING_RAIN_TYPE).intValue());
|
||||
}
|
||||
if (parameters.contains(P_RAIN_TYPE)) {
|
||||
site.setRainType(pdv.getNumber(P_RAIN_TYPE).intValue());
|
||||
}
|
||||
return site;
|
||||
}
|
||||
|
||||
private static void populateLevels(SoundingSite site, PointDataView pdv) {
|
||||
// Level Parameters
|
||||
Set<String> parameters = pdv.getContainer().getParameters();
|
||||
if (parameters.contains(P_NUM_LEVELS)) {
|
||||
int numLevels = pdv.getInt(P_NUM_LEVELS);
|
||||
Number[] pressure = null;
|
||||
Number[] temperature = null;
|
||||
Number[] specHum = null;
|
||||
Number[] omega = null;
|
||||
Number[] uComp = null;
|
||||
Number[] vComp = null;
|
||||
Number[] cloudCover = null;
|
||||
if (parameters.contains(P_LVL_PRESS)) {
|
||||
pressure = pdv.getNumberAllLevels(P_LVL_PRESS);
|
||||
}
|
||||
if (parameters.contains(P_LVL_TEMP)) {
|
||||
temperature = pdv.getNumberAllLevels(P_LVL_TEMP);
|
||||
}
|
||||
if (parameters.contains(P_LVL_SPEC_HUM)) {
|
||||
specHum = pdv.getNumberAllLevels(P_LVL_SPEC_HUM);
|
||||
}
|
||||
if (parameters.contains(P_LVL_OMEGA)) {
|
||||
omega = pdv.getNumberAllLevels(P_LVL_OMEGA);
|
||||
}
|
||||
if (parameters.contains(P_LVL_U_COMP)) {
|
||||
uComp = pdv.getNumberAllLevels(P_LVL_U_COMP);
|
||||
}
|
||||
if (parameters.contains(P_LVL_V_COMP)) {
|
||||
vComp = pdv.getNumberAllLevels(P_LVL_V_COMP);
|
||||
}
|
||||
if (parameters.contains(P_LVL_CLOUD_COVER)) {
|
||||
cloudCover = pdv.getNumberAllLevels(P_LVL_CLOUD_COVER);
|
||||
}
|
||||
for (int j = 0; j < numLevels; j++) {
|
||||
SoundingLevel level = new SoundingLevel();
|
||||
if (pressure != null) {
|
||||
level.setPressure(pressure[j].intValue());
|
||||
}
|
||||
if (temperature != null) {
|
||||
level.setTemperature(temperature[j].doubleValue());
|
||||
}
|
||||
if (specHum != null) {
|
||||
level.setSpecificHumidity(specHum[j].doubleValue());
|
||||
}
|
||||
if (omega != null) {
|
||||
level.setOmega(omega[j].doubleValue());
|
||||
}
|
||||
if (uComp != null) {
|
||||
level.setUcWind(uComp[j].doubleValue());
|
||||
}
|
||||
if (vComp != null) {
|
||||
level.setVcWind(vComp[j].doubleValue());
|
||||
}
|
||||
if (cloudCover != null) {
|
||||
level.setLyrCldCvr(cloudCover[j].intValue());
|
||||
}
|
||||
site.addLevel(level);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* SoilLevel contains the data for a single soil level forecast.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Mar 03, 2008 1026 jkorman Initial implementation.
|
||||
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class SoilLevel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double lyrSoilMoist;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double lyrSoilTemp;
|
||||
|
||||
/**
|
||||
* Construct an empty instance.
|
||||
*/
|
||||
public SoilLevel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lyrSoilMoist
|
||||
*/
|
||||
public Double getLyrSoilMoist() {
|
||||
return lyrSoilMoist;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lyrSoilMoist
|
||||
* the lyrSoilMoist to set
|
||||
*/
|
||||
public void setLyrSoilMoist(Double lyrSoilMoist) {
|
||||
this.lyrSoilMoist = lyrSoilMoist;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lyrSoilTemp
|
||||
*/
|
||||
public Double getLyrSoilTemp() {
|
||||
return lyrSoilTemp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lyrSoilTemp
|
||||
* the lyrSoilTemp to set
|
||||
*/
|
||||
public void setLyrSoilTemp(Double lyrSoilTemp) {
|
||||
this.lyrSoilTemp = lyrSoilTemp;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,332 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* SoundingLevel contains the data for a single vertical level forecast.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Mar 03, 2008 1026 jkorman Initial implementation.
|
||||
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class SoundingLevel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Integer pressure;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double temperature;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double ucWind;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double vcWind;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double specificHumidity;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double omega;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double cldH2OMxRatio;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double iceMxRatio;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Integer lyrCldCvr;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double lyrTurbKE;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double convLatHeat;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double staLatHeat;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double swHeatRate;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Double lwHeatRate;
|
||||
|
||||
/**
|
||||
* Construct an empty instance.
|
||||
*/
|
||||
public SoundingLevel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pressure
|
||||
*/
|
||||
public Integer getPressure() {
|
||||
return pressure;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pressure
|
||||
* the pressure to set
|
||||
*/
|
||||
public void setPressure(Integer pressure) {
|
||||
this.pressure = pressure;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the temperature
|
||||
*/
|
||||
public Double getTemperature() {
|
||||
return temperature;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param temperature
|
||||
* the temperature to set
|
||||
*/
|
||||
public void setTemperature(Double temperature) {
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the u wind component of the horizontal wind.
|
||||
*
|
||||
* @return the uWind
|
||||
*/
|
||||
public Double getUcWind() {
|
||||
return ucWind;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the u wind component of the horizontal wind.
|
||||
*
|
||||
* @param wind
|
||||
* the uWind to set
|
||||
*/
|
||||
public void setUcWind(Double wind) {
|
||||
ucWind = wind;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the v wind component of the horizontal wind.
|
||||
*
|
||||
* @return the vWind
|
||||
*/
|
||||
public Double getVcWind() {
|
||||
return vcWind;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the v wind component of the horizontal wind.
|
||||
*
|
||||
* @param wind
|
||||
* the vWind to set
|
||||
*/
|
||||
public void setVcWind(Double wind) {
|
||||
vcWind = wind;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the specificHumidity
|
||||
*/
|
||||
public Double getSpecificHumidity() {
|
||||
return specificHumidity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param specificHumidity
|
||||
* the specificHumidity to set
|
||||
*/
|
||||
public void setSpecificHumidity(Double specificHumidity) {
|
||||
this.specificHumidity = specificHumidity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the omega
|
||||
*/
|
||||
public Double getOmega() {
|
||||
return omega;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param omega
|
||||
* the omega to set
|
||||
*/
|
||||
public void setOmega(Double omega) {
|
||||
this.omega = omega;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cldH2OMxRatio
|
||||
*/
|
||||
public Double getCldH2OMxRatio() {
|
||||
return cldH2OMxRatio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cldH2OMxRatio
|
||||
* the cldH2OMxRatio to set
|
||||
*/
|
||||
public void setCldH2OMxRatio(Double cldH2OMxRatio) {
|
||||
this.cldH2OMxRatio = cldH2OMxRatio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the iceMxRatio
|
||||
*/
|
||||
public Double getIceMxRatio() {
|
||||
return iceMxRatio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param iceMxRatio
|
||||
* the iceMxRatio to set
|
||||
*/
|
||||
public void setIceMxRatio(Double iceMxRatio) {
|
||||
this.iceMxRatio = iceMxRatio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lyrCldCvr
|
||||
*/
|
||||
public Integer getLyrCldCvr() {
|
||||
return lyrCldCvr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lyrCldCvr
|
||||
* the lyrCldCvr to set
|
||||
*/
|
||||
public void setLyrCldCvr(Integer lyrCldCvr) {
|
||||
this.lyrCldCvr = lyrCldCvr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the convLatHeat
|
||||
*/
|
||||
public Double getConvLatHeat() {
|
||||
return convLatHeat;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param convLatHeat
|
||||
* the convLatHeat to set
|
||||
*/
|
||||
public void setConvLatHeat(Double convLatHeat) {
|
||||
this.convLatHeat = convLatHeat;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the staLatHeat
|
||||
*/
|
||||
public Double getStaLatHeat() {
|
||||
return staLatHeat;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param staLatHeat
|
||||
* the staLatHeat to set
|
||||
*/
|
||||
public void setStaLatHeat(Double staLatHeat) {
|
||||
this.staLatHeat = staLatHeat;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the swHeatRate
|
||||
*/
|
||||
public Double getSwHeatRate() {
|
||||
return swHeatRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param swHeatRate
|
||||
* the swHeatRate to set
|
||||
*/
|
||||
public void setSwHeatRate(Double swHeatRate) {
|
||||
this.swHeatRate = swHeatRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lwHeatRate
|
||||
*/
|
||||
public Double getLwHeatRate() {
|
||||
return lwHeatRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lwHeatRate
|
||||
* the lwHeatRate to set
|
||||
*/
|
||||
public void setLwHeatRate(Double lwHeatRate) {
|
||||
this.lwHeatRate = lwHeatRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lyrTurbKE
|
||||
*/
|
||||
public Double getLyrTurbKE() {
|
||||
return lyrTurbKE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lyrTurbKE
|
||||
* the lyrTurbKE to set
|
||||
*/
|
||||
public void setLyrTurbKE(Double lyrTurbKE) {
|
||||
this.lyrTurbKE = lyrTurbKE;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,864 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.common;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Access;
|
||||
import javax.persistence.AccessType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.hibernate.annotations.Index;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
/**
|
||||
* The SoundingSite class encapsulates the location and time information for a
|
||||
* model sounding forecast as well as providing a container for the vertical
|
||||
* level data above the location.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Mar 03, 2008 1026 jkorman Initial implementation.
|
||||
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||
* forecastTime
|
||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||
* PluginDataObject.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Dec 02, 2013 2537 bsteffen Remove IDecoderGettable
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
* @version 1.0
|
||||
*/
|
||||
@Entity
|
||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "modelsoundingseq")
|
||||
@Table(name = "modelsounding", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
||||
/*
|
||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||
* forecastTime is unlikely to be used.
|
||||
*/
|
||||
@org.hibernate.annotations.Table(appliesTo = "modelsounding", indexes = { @Index(name = "modelsounding_refTimeIndex", columnNames = {
|
||||
"refTime", "forecastTime" }) })
|
||||
@DynamicSerialize
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlRootElement
|
||||
public class SoundingSite extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IPointData, IPersistable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// The profiler observation time.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Calendar timeObs;
|
||||
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Long fcstSeconds;
|
||||
|
||||
// These site ids are not strictly ICAO ids!
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String siteId;
|
||||
|
||||
@DataURI(position = 1)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String reportType;
|
||||
|
||||
@Embedded
|
||||
@DataURI(position = 2, embedded = true)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
||||
@Embedded
|
||||
@DynamicSerializeElement
|
||||
private PointDataView pointDataView;
|
||||
|
||||
// Text of the WMO header
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String wmoHeader;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer pressSLP;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer pressSfc;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double precipTot3Hr;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double precipConv3Hr;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer cldAmtLo;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer cldAmtMd;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer cldAmtHi;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer pressCldBase;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double uc10M;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double vc10M;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double temp2M;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double specHum2M;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer snowType;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer iceType;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer fzRainType;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Integer rainType;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double horzVis;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double stormUComp;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double stormVComp;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double stormRelHeli;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double totPrecip1Hr;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double precipConv1Hr;
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@Transient
|
||||
private Double snowWaterEquiv;
|
||||
|
||||
// the level data
|
||||
@Transient
|
||||
private Set<SoundingLevel> soundingLevels;
|
||||
|
||||
// the level data
|
||||
@Transient
|
||||
private Set<SoilLevel> soilLevels;
|
||||
|
||||
/**
|
||||
* Create an empty ProfilerObs object.
|
||||
*/
|
||||
public SoundingSite() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for DataURI construction through base class. This is used by
|
||||
* the notification service.
|
||||
*
|
||||
* @param uri
|
||||
* A data uri applicable to this class.
|
||||
* @param tableDef
|
||||
* The table definitions for this class.
|
||||
*/
|
||||
public SoundingSite(String uri) {
|
||||
super(uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the observation time for this data.
|
||||
*
|
||||
* @return The data observation time.
|
||||
*/
|
||||
public Calendar getTimeObs() {
|
||||
return timeObs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the observation time for this data.
|
||||
*
|
||||
* @param timeObs
|
||||
* The data observation time.
|
||||
*/
|
||||
public void setTimeObs(Calendar timeObs) {
|
||||
this.timeObs = timeObs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the fcstSeconds
|
||||
*/
|
||||
public Long getFcstSeconds() {
|
||||
return fcstSeconds;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fcstSeconds
|
||||
* the fcstSeconds to set
|
||||
*/
|
||||
public void setFcstSeconds(Long fcstSeconds) {
|
||||
this.fcstSeconds = fcstSeconds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this observation's geometry.
|
||||
*
|
||||
* @return The geometry for this observation.
|
||||
*/
|
||||
public Geometry getGeometry() {
|
||||
return location.getGeometry();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the geometry latitude.
|
||||
*
|
||||
* @return The geometry latitude.
|
||||
*/
|
||||
public double getLatitude() {
|
||||
return location.getLatitude();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the geometry longitude.
|
||||
*
|
||||
* @return The geometry longitude.
|
||||
*/
|
||||
public double getLongitude() {
|
||||
return location.getLongitude();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the station identifier for this observation.
|
||||
*
|
||||
* @return the stationId
|
||||
*/
|
||||
public String getStationId() {
|
||||
return location.getStationId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the elevation, in meters, of the observing platform or location.
|
||||
*
|
||||
* @return The observation elevation, in meters.
|
||||
*/
|
||||
public Integer getElevation() {
|
||||
return location.getElevation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Was this location defined from the station catalog? False if not.
|
||||
*
|
||||
* @return Was this location defined from the station catalog?
|
||||
*/
|
||||
public Boolean getLocationDefined() {
|
||||
return location.getLocationDefined();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the WMOHeader of the file that contained this data.
|
||||
*
|
||||
* @return The wmoHeader
|
||||
*/
|
||||
public String getWmoHeader() {
|
||||
return wmoHeader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the WMOHeader of the file that contained this data.
|
||||
*
|
||||
* @param wmoHeader
|
||||
* The WMOHeader to set
|
||||
*/
|
||||
public void setWmoHeader(String wmoHeader) {
|
||||
this.wmoHeader = wmoHeader;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param level
|
||||
* A sounding data level to add.
|
||||
*/
|
||||
public void addLevel(SoundingLevel level) {
|
||||
if (soundingLevels == null) {
|
||||
soundingLevels = new HashSet<SoundingLevel>();
|
||||
}
|
||||
soundingLevels.add(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all levels contained by this object.
|
||||
*
|
||||
* @return the levels
|
||||
*/
|
||||
public Set<SoundingLevel> getLevels() {
|
||||
return soundingLevels;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the level data into this object.
|
||||
*
|
||||
* @param levels
|
||||
* the levels to set
|
||||
*/
|
||||
public void setLevels(Set<SoundingLevel> levels) {
|
||||
soundingLevels = levels;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param level
|
||||
* A soil data level to add.
|
||||
*/
|
||||
public void addSoilLevel(SoilLevel level) {
|
||||
if (soilLevels == null) {
|
||||
soilLevels = new HashSet<SoilLevel>();
|
||||
}
|
||||
soilLevels.add(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the soilLevels
|
||||
*/
|
||||
public Set<SoilLevel> getSoilLevels() {
|
||||
return soilLevels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param soilLevels
|
||||
* the soilLevels to set
|
||||
*/
|
||||
public void setSoilLevels(Set<SoilLevel> levels) {
|
||||
soilLevels = levels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the siteId
|
||||
*/
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param siteId
|
||||
* the siteId to set
|
||||
*/
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the reportType
|
||||
*/
|
||||
public String getReportType() {
|
||||
return reportType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportType
|
||||
* the reportType to set
|
||||
*/
|
||||
public void setReportType(String reportType) {
|
||||
this.reportType = reportType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the soundingLevels
|
||||
*/
|
||||
public Set<SoundingLevel> getSoundingLevels() {
|
||||
return soundingLevels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param soundingLevels
|
||||
* the soundingLevels to set
|
||||
*/
|
||||
public void setSoundingLevels(Set<SoundingLevel> soundingLevels) {
|
||||
this.soundingLevels = soundingLevels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pressSLP
|
||||
*/
|
||||
public Integer getPressSLP() {
|
||||
return pressSLP;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pressSLP
|
||||
* the pressSLP to set
|
||||
*/
|
||||
public void setPressSLP(Integer pressSLP) {
|
||||
this.pressSLP = pressSLP;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pressSfc
|
||||
*/
|
||||
public Integer getPressSfc() {
|
||||
return pressSfc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pressSfc
|
||||
* the pressSfc to set
|
||||
*/
|
||||
public void setPressSfc(Integer pressSfc) {
|
||||
this.pressSfc = pressSfc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the precipTot3Hr
|
||||
*/
|
||||
public Double getPrecipTot3Hr() {
|
||||
return precipTot3Hr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param precipTot3Hr
|
||||
* the precipTot3Hr to set
|
||||
*/
|
||||
public void setPrecipTot3Hr(Double precipTot3Hr) {
|
||||
this.precipTot3Hr = precipTot3Hr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the precipConv3Hr
|
||||
*/
|
||||
public Double getPrecipConv3Hr() {
|
||||
return precipConv3Hr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param precipConv3Hr
|
||||
* the precipConv3Hr to set
|
||||
*/
|
||||
public void setPrecipConv3Hr(Double precipConv3Hr) {
|
||||
this.precipConv3Hr = precipConv3Hr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cldAmtLo
|
||||
*/
|
||||
public Integer getCldAmtLo() {
|
||||
return cldAmtLo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cldAmtLo
|
||||
* the cldAmtLo to set
|
||||
*/
|
||||
public void setCldAmtLo(Integer cldAmtLo) {
|
||||
this.cldAmtLo = cldAmtLo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cldAmtMd
|
||||
*/
|
||||
public Integer getCldAmtMd() {
|
||||
return cldAmtMd;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cldAmtMd
|
||||
* the cldAmtMd to set
|
||||
*/
|
||||
public void setCldAmtMd(Integer cldAmtMd) {
|
||||
this.cldAmtMd = cldAmtMd;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cldAmtHi
|
||||
*/
|
||||
public Integer getCldAmtHi() {
|
||||
return cldAmtHi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cldAmtHi
|
||||
* the cldAmtHi to set
|
||||
*/
|
||||
public void setCldAmtHi(Integer cldAmtHi) {
|
||||
this.cldAmtHi = cldAmtHi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pressCldBase
|
||||
*/
|
||||
public Integer getPressCldBase() {
|
||||
return pressCldBase;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pressCldBase
|
||||
* the pressCldBase to set
|
||||
*/
|
||||
public void setPressCldBase(Integer pressCldBase) {
|
||||
this.pressCldBase = pressCldBase;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the uc10Meter
|
||||
*/
|
||||
public Double getUc10M() {
|
||||
return uc10M;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param uc10Meter
|
||||
* the uc10Meter to set
|
||||
*/
|
||||
public void setUc10M(Double uc10Meter) {
|
||||
this.uc10M = uc10Meter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the vc10M
|
||||
*/
|
||||
public Double getVc10M() {
|
||||
return vc10M;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vc10M
|
||||
* the vc10M to set
|
||||
*/
|
||||
public void setVc10M(Double vc10M) {
|
||||
this.vc10M = vc10M;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the temp2M
|
||||
*/
|
||||
public Double getTemp2M() {
|
||||
return temp2M;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param temp2M
|
||||
* the temp2M to set
|
||||
*/
|
||||
public void setTemp2M(Double temp2M) {
|
||||
this.temp2M = temp2M;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the specHum2M
|
||||
*/
|
||||
public Double getSpecHum2M() {
|
||||
return specHum2M;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param specHum2M
|
||||
* the specHum2M to set
|
||||
*/
|
||||
public void setSpecHum2M(Double specHum2M) {
|
||||
this.specHum2M = specHum2M;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the snowType
|
||||
*/
|
||||
public Integer getSnowType() {
|
||||
return snowType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param snowType
|
||||
* the snowType to set
|
||||
*/
|
||||
public void setSnowType(Integer snowType) {
|
||||
this.snowType = snowType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the iceType
|
||||
*/
|
||||
public Integer getIceType() {
|
||||
return iceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param iceType
|
||||
* the iceType to set
|
||||
*/
|
||||
public void setIceType(Integer iceType) {
|
||||
this.iceType = iceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the fzRainType
|
||||
*/
|
||||
public Integer getFzRainType() {
|
||||
return fzRainType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fzRainType
|
||||
* the fzRainType to set
|
||||
*/
|
||||
public void setFzRainType(Integer fzRainType) {
|
||||
this.fzRainType = fzRainType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the rainType
|
||||
*/
|
||||
public Integer getRainType() {
|
||||
return rainType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rainType
|
||||
* the rainType to set
|
||||
*/
|
||||
public void setRainType(Integer rainType) {
|
||||
this.rainType = rainType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the horzVis
|
||||
*/
|
||||
public Double getHorzVis() {
|
||||
return horzVis;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param horzVis
|
||||
* the horzVis to set
|
||||
*/
|
||||
public void setHorzVis(Double horzVis) {
|
||||
this.horzVis = horzVis;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the stormUComp
|
||||
*/
|
||||
public Double getStormUComp() {
|
||||
return stormUComp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stormUComp
|
||||
* the stormUComp to set
|
||||
*/
|
||||
public void setStormUComp(Double stormUComp) {
|
||||
this.stormUComp = stormUComp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the stormVComp
|
||||
*/
|
||||
public Double getStormVComp() {
|
||||
return stormVComp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stormVComp
|
||||
* the stormVComp to set
|
||||
*/
|
||||
public void setStormVComp(Double stormVComp) {
|
||||
this.stormVComp = stormVComp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the stormRelHeli
|
||||
*/
|
||||
public Double getStormRelHeli() {
|
||||
return stormRelHeli;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stormRelHeli
|
||||
* the stormRelHeli to set
|
||||
*/
|
||||
public void setStormRelHeli(Double stormRelHeli) {
|
||||
this.stormRelHeli = stormRelHeli;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the totPrecip1Hr
|
||||
*/
|
||||
public Double getTotPrecip1Hr() {
|
||||
return totPrecip1Hr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param totPrecip1Hr
|
||||
* the totPrecip1Hr to set
|
||||
*/
|
||||
public void setTotPrecip1Hr(Double totPrecip1Hr) {
|
||||
this.totPrecip1Hr = totPrecip1Hr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the precipConv1Hr
|
||||
*/
|
||||
public Double getPrecipConv1Hr() {
|
||||
return precipConv1Hr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param precipConv1Hr
|
||||
* the precipConv1Hr to set
|
||||
*/
|
||||
public void setPrecipConv1Hr(Double precipConv1Hr) {
|
||||
this.precipConv1Hr = precipConv1Hr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the snowWaterEquiv
|
||||
*/
|
||||
public Double getSnowWaterEquiv() {
|
||||
return snowWaterEquiv;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param snowWaterEquiv
|
||||
* the snowWaterEquiv to set
|
||||
*/
|
||||
public void setSnowWaterEquiv(Double snowWaterEquiv) {
|
||||
this.snowWaterEquiv = snowWaterEquiv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurfaceObsLocation getSpatialObject() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public SurfaceObsLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(SurfaceObsLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PointDataView getPointDataView() {
|
||||
return this.pointDataView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointDataView(PointDataView pointDataView) {
|
||||
this.pointDataView = pointDataView;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Column
|
||||
@Access(AccessType.PROPERTY)
|
||||
public String getDataURI() {
|
||||
return super.getDataURI();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "modelsounding";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.common.dataplugin.modelsounding</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,7 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,18 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Model Sounding Data Plugin
|
||||
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.modelsounding
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
|
||||
Require-Bundle: com.raytheon.uf.common.dataplugin,
|
||||
com.raytheon.uf.common.pointdata,
|
||||
com.raytheon.uf.common.geospatial,
|
||||
com.raytheon.uf.common.time,
|
||||
com.raytheon.uf.common.dataaccess,
|
||||
com.raytheon.uf.common.dataquery,
|
||||
com.raytheon.uf.common.serialization,
|
||||
com.raytheon.uf.common.serialization.comm
|
||||
Export-Package: com.raytheon.uf.common.dataplugin.modelsounding
|
|
@ -0,0 +1,5 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
res/
|
|
@ -0,0 +1,159 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.common.dataplugin.modelsounding;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class holds constants for all the point data parameters for model
|
||||
* sounding.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Dec 18, 2013 2537 bsteffen Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ModelSoundingParameters {
|
||||
|
||||
/* Record parameters */
|
||||
@Deprecated
|
||||
public static final String DATAURI = "dataURI";
|
||||
|
||||
public static final String WMO_HEADER = "wmoHeader";
|
||||
|
||||
public static final String STATION_NUMBER = "wmoStaNum";
|
||||
|
||||
public static final String LATITUDE = "latitude";
|
||||
|
||||
public static final String LONGITUDE = "longitude";
|
||||
|
||||
public static final String ELEVATION = "elevation";
|
||||
|
||||
public static final String STATION_ID = "stationId";
|
||||
|
||||
public static final String REF_TIME = "refTime";
|
||||
|
||||
public static final String FORECAST_HOUR = "forecastHr";
|
||||
|
||||
/* Surface parameters */
|
||||
public static final String SEA_LEVEL_PRESS = "seaLvlPress";
|
||||
|
||||
public static final String SFC_PRESS = "sfcPress";
|
||||
|
||||
public static final String LOW_CLOUD = "lowCld";
|
||||
|
||||
public static final String MID_CLOUD = "midCld";
|
||||
|
||||
public static final String HIGH_CLOUD = "hiCld";
|
||||
|
||||
public static final String CLOUD_PRESS = "prCloud";
|
||||
|
||||
public static final String VISIBILITY = "vsby";
|
||||
|
||||
public static final String U_STORM = "uStorm";
|
||||
|
||||
public static final String V_STORM = "vStorm";
|
||||
|
||||
public static final String STORM_REL_HELI = "srHel";
|
||||
|
||||
public static final String TOTAL_PRECIP = "totPrecip";
|
||||
|
||||
public static final String CONV_PRECIP = "convPrecip";
|
||||
|
||||
public static final String SNOW_WATER = "snowWater";
|
||||
|
||||
public static final String SNOW_FALL = "snowFall";
|
||||
|
||||
public static final String SNOW_FLUX = "snowFlux";
|
||||
|
||||
public static final String SNOW_MELT = "snowMelt";
|
||||
|
||||
public static final String U_COMP_10M = "u10";
|
||||
|
||||
public static final String V_COMP_10M = "v10";
|
||||
|
||||
public static final String SENS_HEAT = "sensHeat";
|
||||
|
||||
public static final String SUB_SFC_HEAT = "subSfcHeat";
|
||||
|
||||
public static final String SKIN_TEMP = "skinTemp";
|
||||
|
||||
public static final String MIN_TEMP = "minTemp";
|
||||
|
||||
public static final String MAX_TEMP = "maxTemp";
|
||||
|
||||
public static final String TEMP_2M = "temp2";
|
||||
|
||||
public static final String SPEC_HUM_2M = "q2";
|
||||
|
||||
public static final String THETA_10M = "Theta10";
|
||||
|
||||
public static final String SPEC_HUM_10M = "q10";
|
||||
|
||||
public static final String SNOW_TYPE = "snowTyp";
|
||||
|
||||
public static final String ICE_TYPE = "iceTyp";
|
||||
|
||||
public static final String FREEZING_RAIN_TYPE = "frzgRainTyp";
|
||||
|
||||
public static final String RAIN_TYPE = "rainType";
|
||||
|
||||
/* Level parameters */
|
||||
public static final String NUM_LEVELS = "numProfLvls";
|
||||
|
||||
public static final String LVL_PRESS = "pressure";
|
||||
|
||||
public static final String LVL_TEMP = "temperature";
|
||||
|
||||
public static final String LVL_SPEC_HUM = "specHum";
|
||||
|
||||
public static final String LVL_OMEGA = "omega";
|
||||
|
||||
public static final String LVL_U_COMP = "uComp";
|
||||
|
||||
public static final String LVL_V_COMP = "vComp";
|
||||
|
||||
public static final String LVL_CLOUD_COVER = "cldCvr";
|
||||
|
||||
public static final List<String> ALL_DATA = Arrays.asList(WMO_HEADER,
|
||||
STATION_NUMBER, LATITUDE, LONGITUDE, ELEVATION, STATION_ID,
|
||||
REF_TIME, FORECAST_HOUR, SEA_LEVEL_PRESS, SFC_PRESS, LOW_CLOUD,
|
||||
MID_CLOUD, HIGH_CLOUD, CLOUD_PRESS, VISIBILITY, U_STORM, V_STORM,
|
||||
STORM_REL_HELI, TOTAL_PRECIP, CONV_PRECIP, SNOW_WATER, SNOW_FALL,
|
||||
SNOW_FLUX, SNOW_MELT, U_COMP_10M, V_COMP_10M, SENS_HEAT,
|
||||
SUB_SFC_HEAT, SKIN_TEMP, MIN_TEMP, MAX_TEMP, TEMP_2M, SPEC_HUM_2M,
|
||||
THETA_10M, SPEC_HUM_10M, SNOW_TYPE, ICE_TYPE, FREEZING_RAIN_TYPE,
|
||||
RAIN_TYPE, NUM_LEVELS, LVL_PRESS, LVL_TEMP, LVL_SPEC_HUM,
|
||||
LVL_OMEGA, LVL_U_COMP, LVL_V_COMP, LVL_CLOUD_COVER);
|
||||
|
||||
public static final List<String> LVL_PARAMETERS = Arrays.asList(LVL_PRESS,
|
||||
LVL_TEMP, LVL_SPEC_HUM, LVL_OMEGA, LVL_U_COMP, LVL_V_COMP,
|
||||
LVL_CLOUD_COVER);
|
||||
|
||||
}
|
|
@ -0,0 +1,200 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.common.dataplugin.modelsounding;
|
||||
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.ALL_DATA;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.DATAURI;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.ELEVATION;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.FORECAST_HOUR;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LATITUDE;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LONGITUDE;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LVL_PARAMETERS;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.NUM_LEVELS;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.REF_TIME;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.STATION_ID;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.STATION_NUMBER;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.WMO_HEADER;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.pointdata.PointDataServerRequest;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.serialization.comm.RequestRouter;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* A class for converting point data into sounding sites.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Apr 06, 2011 bsteffen Initial creation
|
||||
* Dec 02, 2013 2537 bsteffen Move to common
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ModelSoundingPointDataTransform {
|
||||
|
||||
/**
|
||||
* Use all point data parameters to build sounding sites for all sites which
|
||||
* match the query defined by fields, values, and operands.
|
||||
*
|
||||
*/
|
||||
public static List<SoundingSite> getSoundingSites(
|
||||
Map<String, RequestConstraint> constraints) throws Exception {
|
||||
return getSoundingSites(constraints, ALL_DATA);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the specified point data parameters to build sounding sites for all
|
||||
* sites which match the query defined by fields, values, and operands.
|
||||
*
|
||||
*/
|
||||
public static List<SoundingSite> getSoundingSites(
|
||||
Map<String, RequestConstraint> constraints, List<String> parameters)
|
||||
throws Exception {
|
||||
Set<String> parametersSet = new HashSet<String>(parameters);
|
||||
if (!parametersSet.contains(NUM_LEVELS)) {
|
||||
/*
|
||||
* if you have any level based parameters you must include num
|
||||
* levels
|
||||
*/
|
||||
for (String lvlParam : LVL_PARAMETERS) {
|
||||
if (parametersSet.contains(lvlParam)) {
|
||||
parametersSet.add(NUM_LEVELS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* copy to avoid modification */
|
||||
Map<String, RequestConstraint> fullConstraints = new HashMap<String, RequestConstraint>(
|
||||
constraints);
|
||||
fullConstraints.put(PluginDataObject.PLUGIN_NAME_ID,
|
||||
new RequestConstraint(SoundingSite.PLUGIN_ID));
|
||||
fullConstraints.put(PointDataServerRequest.REQUEST_MODE_KEY,
|
||||
new RequestConstraint(PointDataServerRequest.REQUEST_MODE_2D));
|
||||
fullConstraints.put(PointDataServerRequest.REQUEST_PARAMETERS_KEY,
|
||||
new RequestConstraint(parametersSet));
|
||||
PointDataServerRequest pdr = new PointDataServerRequest();
|
||||
pdr.setRcMap(fullConstraints);
|
||||
PointDataContainer pdc = (PointDataContainer) RequestRouter.route(pdr);
|
||||
if (pdc == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return getSoundingSites(pdc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build sounding sites from the data in the container.
|
||||
*
|
||||
* @param pdc
|
||||
* @return
|
||||
*/
|
||||
public static List<SoundingSite> getSoundingSites(PointDataContainer pdc) {
|
||||
List<SoundingSite> sites = new ArrayList<SoundingSite>(
|
||||
pdc.getCurrentSz());
|
||||
for (int i = 0; i < pdc.getCurrentSz(); i++) {
|
||||
sites.add(getSoundingSite(pdc.readRandom(i)));
|
||||
}
|
||||
return sites;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a single sounding site from the data in the view.
|
||||
*
|
||||
* @param pdv
|
||||
* @return
|
||||
*/
|
||||
public static SoundingSite getSoundingSite(PointDataView pdv) {
|
||||
// All the code from here on is boilerplate code for determining what
|
||||
// parameters are in the view and setting the appropriate field in the
|
||||
// Sounding Site.
|
||||
Set<String> parameters = pdv.getContainer().getParameters();
|
||||
SoundingSite site = null;
|
||||
if (parameters.contains(DATAURI)) {
|
||||
// Parsing from the dataURI gets several fields for us.
|
||||
site = new SoundingSite(pdv.getString(DATAURI));
|
||||
} else {
|
||||
site = new SoundingSite();
|
||||
site.setLocation(new SurfaceObsLocation());
|
||||
// All of these things would have been in dataURI
|
||||
if (parameters.contains(LATITUDE)) {
|
||||
site.getLocation().setLatitude(
|
||||
pdv.getNumber(LATITUDE).doubleValue());
|
||||
}
|
||||
if (parameters.contains(LONGITUDE)) {
|
||||
site.getLocation().setLongitude(
|
||||
pdv.getNumber(LONGITUDE).doubleValue());
|
||||
}
|
||||
if (parameters.contains(STATION_ID)) {
|
||||
site.getLocation().setStationId(pdv.getString(STATION_ID));
|
||||
}
|
||||
if (parameters.contains(FORECAST_HOUR)) {
|
||||
if (parameters.contains(REF_TIME)) {
|
||||
Date refTime = new Date(
|
||||
pdv.getNumber(REF_TIME).longValue() * 1000);
|
||||
int fcstTime = pdv.getNumber(FORECAST_HOUR).intValue() * 3600;
|
||||
site.setDataTime(new DataTime(refTime, fcstTime));
|
||||
}
|
||||
} else if (parameters.contains(REF_TIME)) {
|
||||
// This might not be the best idea most people will want
|
||||
// forecast time also
|
||||
site.setDataTime(new DataTime(new Date(pdv.getNumber(REF_TIME)
|
||||
.longValue() * 1000)));
|
||||
}
|
||||
}
|
||||
site.setPointDataView(pdv);
|
||||
|
||||
if (parameters.contains(ELEVATION)) {
|
||||
site.getLocation()
|
||||
.setElevation(pdv.getNumber(ELEVATION).intValue());
|
||||
}
|
||||
// Record parameters
|
||||
if (parameters.contains(WMO_HEADER)) {
|
||||
site.setWmoHeader(pdv.getString(WMO_HEADER));
|
||||
}
|
||||
if (parameters.contains(STATION_NUMBER)) {
|
||||
site.setSiteId(String.format("%06d", pdv.getNumber(STATION_NUMBER)
|
||||
.intValue()));
|
||||
}
|
||||
|
||||
return site;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.common.dataplugin.modelsounding;
|
||||
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LVL_CLOUD_COVER;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LVL_OMEGA;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LVL_PRESS;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LVL_SPEC_HUM;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LVL_TEMP;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LVL_U_COMP;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LVL_V_COMP;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
|
||||
/**
|
||||
* SoundingLevel contains the data for a single vertical level forecast.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- -----------------------------------------
|
||||
* Mar 03, 2008 1026 jkorman Initial implementation.
|
||||
* Dec 02, 2013 2537 bsteffen Move to common, remove unnecessary
|
||||
* fields, remove ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SoundingLevel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final PointDataView pointDataView;
|
||||
|
||||
private final int index;
|
||||
|
||||
SoundingLevel(PointDataView pointDataView, int index) {
|
||||
this.index = index;
|
||||
this.pointDataView = pointDataView;
|
||||
}
|
||||
|
||||
/** @return the pressure */
|
||||
public float getPressure() {
|
||||
return pointDataView.getFloat(LVL_PRESS, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pressure
|
||||
* the pressure to set
|
||||
*/
|
||||
public void setPressure(float pressure) {
|
||||
pointDataView.setFloat(LVL_PRESS, pressure, index);
|
||||
}
|
||||
|
||||
/** @return the temperature */
|
||||
public float getTemperature() {
|
||||
return pointDataView.getFloat(LVL_TEMP, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param temperature
|
||||
* the temperature to set
|
||||
*/
|
||||
public void setTemperature(float temperature) {
|
||||
pointDataView.setFloat(LVL_TEMP, temperature, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the u wind component of the horizontal wind.
|
||||
*
|
||||
* @return the uWind
|
||||
*/
|
||||
public float getUcWind() {
|
||||
return pointDataView.getFloat(LVL_U_COMP, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the u wind component of the horizontal wind.
|
||||
*
|
||||
* @param wind
|
||||
* the uWind to set
|
||||
*/
|
||||
public void setUcWind(float wind) {
|
||||
pointDataView.setFloat(LVL_U_COMP, wind, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the v wind component of the horizontal wind.
|
||||
*
|
||||
* @return the vWind
|
||||
*/
|
||||
public float getVcWind() {
|
||||
return pointDataView.getFloat(LVL_V_COMP, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the v wind component of the horizontal wind.
|
||||
*
|
||||
* @param wind
|
||||
* the vWind to set
|
||||
*/
|
||||
public void setVcWind(float wind) {
|
||||
pointDataView.setFloat(LVL_V_COMP, wind, index);
|
||||
}
|
||||
|
||||
/** @return the specificHumidity */
|
||||
public float getSpecificHumidity() {
|
||||
return pointDataView.getFloat(LVL_SPEC_HUM, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param specificHumidity
|
||||
* the specificHumidity to set
|
||||
*/
|
||||
public void setSpecificHumidity(float specificHumidity) {
|
||||
pointDataView.setFloat(LVL_SPEC_HUM, specificHumidity, index);
|
||||
}
|
||||
|
||||
/** @return the omega */
|
||||
public float getOmega() {
|
||||
return pointDataView.getFloat(LVL_OMEGA, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param omega
|
||||
* the omega to set
|
||||
*/
|
||||
public void setOmega(float omega) {
|
||||
pointDataView.setFloat(LVL_OMEGA, omega, index);
|
||||
}
|
||||
|
||||
/** @return the lyrCldCvr */
|
||||
public float getLyrCldCvr() {
|
||||
return pointDataView.getFloat(LVL_CLOUD_COVER, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lyrCldCvr
|
||||
* the lyrCldCvr to set
|
||||
*/
|
||||
public void setLyrCldCvr(float lyrCldCvr) {
|
||||
pointDataView.setFloat(LVL_CLOUD_COVER, lyrCldCvr, index);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,759 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.common.dataplugin.modelsounding;
|
||||
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.CLOUD_PRESS;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.CONV_PRECIP;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.FREEZING_RAIN_TYPE;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.HIGH_CLOUD;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.ICE_TYPE;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.LOW_CLOUD;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.MAX_TEMP;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.MID_CLOUD;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.MIN_TEMP;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.NUM_LEVELS;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.RAIN_TYPE;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SEA_LEVEL_PRESS;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SENS_HEAT;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SFC_PRESS;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SKIN_TEMP;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SNOW_FALL;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SNOW_FLUX;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SNOW_MELT;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SNOW_TYPE;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SNOW_WATER;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SPEC_HUM_10M;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SPEC_HUM_2M;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.STORM_REL_HELI;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.SUB_SFC_HEAT;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.TEMP_2M;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.THETA_10M;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.TOTAL_PRECIP;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.U_COMP_10M;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.U_STORM;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.VISIBILITY;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.V_COMP_10M;
|
||||
import static com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters.V_STORM;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Access;
|
||||
import javax.persistence.AccessType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
|
||||
import org.hibernate.annotations.Index;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
/**
|
||||
* The SoundingSite class encapsulates the location and time information for a
|
||||
* model sounding forecast as well as providing a container for the vertical
|
||||
* level data above the location.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- -----------------------------------------
|
||||
* Mar 03, 2008 1026 jkorman Initial implementation.
|
||||
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||
* forecastTime
|
||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||
* PluginDataObject.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Dec 02, 2013 2537 bsteffen Move to common, remove IDecoderGettable,
|
||||
* remove unnecessary fields.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
* @version 1.0
|
||||
*/
|
||||
@Entity
|
||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "modelsoundingseq")
|
||||
@Table(name = "modelsounding", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
||||
/*
|
||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||
* forecastTime is unlikely to be used.
|
||||
*/
|
||||
@org.hibernate.annotations.Table(appliesTo = "modelsounding", indexes = { @Index(name = "modelsounding_refTimeIndex", columnNames = {
|
||||
"refTime", "forecastTime" }) })
|
||||
@DynamicSerialize
|
||||
public class SoundingSite extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IPointData, IPersistable {
|
||||
|
||||
public static String PLUGIN_ID = "modelsounding";
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// These site ids are not strictly ICAO ids!
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
private String siteId;
|
||||
|
||||
@DataURI(position = 1)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
private String reportType;
|
||||
|
||||
@Embedded
|
||||
@DataURI(position = 2, embedded = true)
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
||||
@Embedded
|
||||
@DynamicSerializeElement
|
||||
private PointDataView pointDataView;
|
||||
|
||||
// Text of the WMO header
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
private String wmoHeader;
|
||||
|
||||
// the level data
|
||||
@Transient
|
||||
private Set<SoundingLevel> levels;
|
||||
|
||||
/**
|
||||
* Create an empty ProfilerObs object.
|
||||
*/
|
||||
public SoundingSite() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for DataURI construction through base class. This is used by
|
||||
* the notification service.
|
||||
*
|
||||
* @param uri
|
||||
* A data uri applicable to this class.
|
||||
* @param tableDef
|
||||
* The table definitions for this class.
|
||||
*/
|
||||
public SoundingSite(String uri) {
|
||||
super(uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the observation time for this data.
|
||||
*
|
||||
* @return The data observation time.
|
||||
*/
|
||||
public Calendar getTimeObs() {
|
||||
return dataTime.getRefTimeAsCalendar();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the fcstSeconds
|
||||
*/
|
||||
public Long getFcstSeconds() {
|
||||
return (long) dataTime.getFcstTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this observation's geometry.
|
||||
*
|
||||
* @return The geometry for this observation.
|
||||
*/
|
||||
public Geometry getGeometry() {
|
||||
return location.getGeometry();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the geometry latitude.
|
||||
*
|
||||
* @return The geometry latitude.
|
||||
*/
|
||||
public double getLatitude() {
|
||||
return location.getLatitude();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the geometry longitude.
|
||||
*
|
||||
* @return The geometry longitude.
|
||||
*/
|
||||
public double getLongitude() {
|
||||
return location.getLongitude();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the station identifier for this observation.
|
||||
*
|
||||
* @return the stationId
|
||||
*/
|
||||
public String getStationId() {
|
||||
return location.getStationId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the elevation, in meters, of the observing platform or location.
|
||||
*
|
||||
* @return The observation elevation, in meters.
|
||||
*/
|
||||
public Integer getElevation() {
|
||||
return location.getElevation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Was this location defined from the station catalog? False if not.
|
||||
*
|
||||
* @return Was this location defined from the station catalog?
|
||||
*/
|
||||
public Boolean getLocationDefined() {
|
||||
return location.getLocationDefined();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the WMOHeader of the file that contained this data.
|
||||
*
|
||||
* @return The wmoHeader
|
||||
*/
|
||||
public String getWmoHeader() {
|
||||
return wmoHeader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the WMOHeader of the file that contained this data.
|
||||
*
|
||||
* @param wmoHeader
|
||||
* The WMOHeader to set
|
||||
*/
|
||||
public void setWmoHeader(String wmoHeader) {
|
||||
this.wmoHeader = wmoHeader;
|
||||
}
|
||||
|
||||
private void populateLevels(){
|
||||
if (levels == null) {
|
||||
int count = pointDataView.getInt(NUM_LEVELS);
|
||||
if (count < 0) {
|
||||
count = 0;
|
||||
}
|
||||
levels = new HashSet<SoundingLevel>(count, 1.0f);
|
||||
for(int i = 0 ; i < count ; i += 1){
|
||||
levels.add(new SoundingLevel(pointDataView, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SoundingLevel addLevel() {
|
||||
populateLevels();
|
||||
SoundingLevel level = new SoundingLevel(pointDataView, levels.size());
|
||||
levels.add(level);
|
||||
pointDataView.setInt(NUM_LEVELS, levels.size());
|
||||
return level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all levels contained by this object.
|
||||
*
|
||||
* @return the levels
|
||||
*/
|
||||
public Set<SoundingLevel> getLevels() {
|
||||
populateLevels();
|
||||
return Collections.unmodifiableSet(levels);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the siteId
|
||||
*/
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param siteId
|
||||
* the siteId to set
|
||||
*/
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the reportType
|
||||
*/
|
||||
public String getReportType() {
|
||||
return reportType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportType
|
||||
* the reportType to set
|
||||
*/
|
||||
public void setReportType(String reportType) {
|
||||
this.reportType = reportType;
|
||||
}
|
||||
|
||||
/** @return the pressSLP */
|
||||
public float getPressSLP() {
|
||||
return pointDataView.getFloat(SEA_LEVEL_PRESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pressSLP
|
||||
* the pressSLP to set
|
||||
*/
|
||||
public void setPressSLP(float pressSLP) {
|
||||
pointDataView.setFloat(SEA_LEVEL_PRESS, pressSLP);
|
||||
}
|
||||
|
||||
/** @return the pressSfc */
|
||||
public float getPressSfc() {
|
||||
return pointDataView.getFloat(SFC_PRESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pressSfc
|
||||
* the pressSfc to set
|
||||
*/
|
||||
public void setPressSfc(float pressSfc) {
|
||||
pointDataView.setFloat(SFC_PRESS, pressSfc);
|
||||
}
|
||||
|
||||
/** @return the cldAmtLo */
|
||||
public float getCldAmtLo() {
|
||||
return pointDataView.getFloat(LOW_CLOUD);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cldAmtLo
|
||||
* the cldAmtLo to set
|
||||
*/
|
||||
public void setCldAmtLo(float cldAmtLo) {
|
||||
pointDataView.setFloat(LOW_CLOUD, cldAmtLo);
|
||||
}
|
||||
|
||||
/** @return the cldAmtMd */
|
||||
public float getCldAmtMd() {
|
||||
return pointDataView.getFloat(MID_CLOUD);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cldAmtMd
|
||||
* the cldAmtMd to set
|
||||
*/
|
||||
public void setCldAmtMd(float cldAmtMd) {
|
||||
pointDataView.setFloat(MID_CLOUD, cldAmtMd);
|
||||
}
|
||||
|
||||
/** @return the cldAmtHi */
|
||||
public float getCldAmtHi() {
|
||||
return pointDataView.getFloat(HIGH_CLOUD);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cldAmtHi
|
||||
* the cldAmtHi to set
|
||||
*/
|
||||
public void setCldAmtHi(float cldAmtHi) {
|
||||
pointDataView.setFloat(HIGH_CLOUD, cldAmtHi);
|
||||
}
|
||||
|
||||
/** @return the pressCldBase */
|
||||
public float getPressCldBase() {
|
||||
return pointDataView.getFloat(CLOUD_PRESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pressCldBase
|
||||
* the pressCldBase to set
|
||||
*/
|
||||
public void setPressCldBase(float pressCldBase) {
|
||||
pointDataView.setFloat(CLOUD_PRESS, pressCldBase);
|
||||
}
|
||||
|
||||
/** @return the uc10Meter */
|
||||
public float getUc10M() {
|
||||
return pointDataView.getFloat(U_COMP_10M);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param uc10Meter
|
||||
* the uc10Meter to set
|
||||
*/
|
||||
public void setUc10M(float uc10M) {
|
||||
pointDataView.setFloat(U_COMP_10M, uc10M);
|
||||
}
|
||||
|
||||
/** @return the vc10M */
|
||||
public float getVc10M() {
|
||||
return pointDataView.getFloat(V_COMP_10M);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vc10M
|
||||
* the vc10M to set
|
||||
*/
|
||||
public void setVc10M(float vc10M) {
|
||||
pointDataView.setFloat(V_COMP_10M, vc10M);
|
||||
}
|
||||
|
||||
/** @return the sensHeat */
|
||||
public float getSensHeat() {
|
||||
return pointDataView.getFloat(SENS_HEAT);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sensHeat
|
||||
* the sensHeat to set
|
||||
*/
|
||||
public void setSensHeat(float sensHeat) {
|
||||
pointDataView.setFloat(SENS_HEAT, sensHeat);
|
||||
}
|
||||
|
||||
/** @return the subSfcHeat */
|
||||
public float getSubSfcHeat() {
|
||||
return pointDataView.getFloat(SUB_SFC_HEAT);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param subSfcHeat
|
||||
* the subSfcHeat to set
|
||||
*/
|
||||
public void setSubSfcHeat(float subSfcHeat) {
|
||||
pointDataView.setFloat(SUB_SFC_HEAT, subSfcHeat);
|
||||
}
|
||||
|
||||
/** @return the minTemp */
|
||||
public float getMinTemp() {
|
||||
return pointDataView.getFloat(MIN_TEMP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param minTemp
|
||||
* the minTemp to set
|
||||
*/
|
||||
public void setMinTemp(float minTemp) {
|
||||
pointDataView.setFloat(MIN_TEMP, minTemp);
|
||||
}
|
||||
|
||||
/** @return the maxTemp */
|
||||
public float getMaxTemp() {
|
||||
return pointDataView.getFloat(MAX_TEMP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxTemp
|
||||
* the maxTemp to set
|
||||
*/
|
||||
public void setMaxTemp(float maxTemp) {
|
||||
pointDataView.setFloat(MAX_TEMP, maxTemp);
|
||||
}
|
||||
|
||||
/** @return the skinTemp */
|
||||
public float getSkinTemp() {
|
||||
return pointDataView.getFloat(SKIN_TEMP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param skinTemp
|
||||
* the skinTemp to set
|
||||
*/
|
||||
public void setSkinTemp(float skinTemp) {
|
||||
pointDataView.setFloat(SKIN_TEMP, skinTemp);
|
||||
}
|
||||
|
||||
/** @return the temp2M */
|
||||
public float getTemp2M() {
|
||||
return pointDataView.getFloat(TEMP_2M);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param temp2M
|
||||
* the temp2M to set
|
||||
*/
|
||||
public void setTemp2M(float temp2M) {
|
||||
pointDataView.setFloat(TEMP_2M, temp2M);
|
||||
}
|
||||
|
||||
/** @return the specHum2M */
|
||||
public float getSpecHum2M() {
|
||||
return pointDataView.getFloat(SPEC_HUM_2M);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param specHum2M
|
||||
* the specHum2M to set
|
||||
*/
|
||||
public void setSpecHum2M(float specHum2M) {
|
||||
pointDataView.setFloat(SPEC_HUM_2M, specHum2M);
|
||||
}
|
||||
|
||||
/** @return the specHum10M */
|
||||
public float getSpecHum10M() {
|
||||
return pointDataView.getFloat(SPEC_HUM_10M);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param specHum10M
|
||||
* the specHum10M to set
|
||||
*/
|
||||
public void setSpecHum10M(float specHum10M) {
|
||||
pointDataView.setFloat(SPEC_HUM_10M, specHum10M);
|
||||
}
|
||||
|
||||
/** @return the theta10M */
|
||||
public float getTheta10M() {
|
||||
return pointDataView.getFloat(THETA_10M);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param theta10M
|
||||
* the theta10M to set
|
||||
*/
|
||||
public void setTheta10M(float theta10M) {
|
||||
pointDataView.setFloat(THETA_10M, theta10M);
|
||||
}
|
||||
|
||||
/** @return the snowType */
|
||||
public int getSnowType() {
|
||||
return pointDataView.getInt(SNOW_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param snowType
|
||||
* the snowType to set
|
||||
*/
|
||||
public void setSnowType(int snowType) {
|
||||
pointDataView.setInt(SNOW_TYPE, snowType);
|
||||
}
|
||||
|
||||
/** @return the iceType */
|
||||
public int getIceType() {
|
||||
return pointDataView.getInt(ICE_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param iceType
|
||||
* the iceType to set
|
||||
*/
|
||||
public void setIceType(int iceType) {
|
||||
pointDataView.setInt(ICE_TYPE, iceType);
|
||||
}
|
||||
|
||||
/** @return the fzRainType */
|
||||
public int getFzRainType() {
|
||||
return pointDataView.getInt(FREEZING_RAIN_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fzRainType
|
||||
* the fzRainType to set
|
||||
*/
|
||||
public void setFzRainType(int fzRainType) {
|
||||
pointDataView.setInt(FREEZING_RAIN_TYPE, fzRainType);
|
||||
}
|
||||
|
||||
/** @return the rainType */
|
||||
public int getRainType() {
|
||||
return pointDataView.getInt(RAIN_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rainType
|
||||
* the rainType to set
|
||||
*/
|
||||
public void setRainType(int rainType) {
|
||||
pointDataView.setInt(RAIN_TYPE, rainType);
|
||||
}
|
||||
|
||||
/** @return the horzVis */
|
||||
public float getHorzVis() {
|
||||
return pointDataView.getFloat(VISIBILITY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param horzVis
|
||||
* the horzVis to set
|
||||
*/
|
||||
public void setHorzVis(float horzVis) {
|
||||
pointDataView.setFloat(VISIBILITY, horzVis);
|
||||
}
|
||||
|
||||
/** @return the stormUComp */
|
||||
public float getStormUComp() {
|
||||
return pointDataView.getFloat(U_STORM);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stormUComp
|
||||
* the stormUComp to set
|
||||
*/
|
||||
public void setStormUComp(float stormUComp) {
|
||||
pointDataView.setFloat(U_STORM, stormUComp);
|
||||
}
|
||||
|
||||
/** @return the stormVComp */
|
||||
public float getStormVComp() {
|
||||
return pointDataView.getFloat(V_STORM);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stormVComp
|
||||
* the stormVComp to set
|
||||
*/
|
||||
public void setStormVComp(float stormVComp) {
|
||||
pointDataView.setFloat(V_STORM, stormVComp);
|
||||
}
|
||||
|
||||
/** @return the stormRelHeli */
|
||||
public float getStormRelHeli() {
|
||||
return pointDataView.getFloat(STORM_REL_HELI);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stormRelHeli
|
||||
* the stormRelHeli to set
|
||||
*/
|
||||
public void setStormRelHeli(float stormRelHeli) {
|
||||
pointDataView.setFloat(STORM_REL_HELI, stormRelHeli);
|
||||
}
|
||||
|
||||
/** @return the totPrecip */
|
||||
public float getTotPrecip() {
|
||||
return pointDataView.getFloat(TOTAL_PRECIP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param totPrecip
|
||||
* the totPrecip to set
|
||||
*/
|
||||
public void setTotPrecip(float totPrecip) {
|
||||
pointDataView.setFloat(TOTAL_PRECIP, totPrecip);
|
||||
}
|
||||
|
||||
/** @return the precipConv */
|
||||
public float getPrecipConv() {
|
||||
return pointDataView.getFloat(CONV_PRECIP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param precipConv
|
||||
* the precipConv to set
|
||||
*/
|
||||
public void setPrecipConv(float precipConv) {
|
||||
pointDataView.setFloat(CONV_PRECIP, precipConv);
|
||||
}
|
||||
|
||||
/** @return the snowWaterEquiv */
|
||||
public float getSnowWaterEquiv() {
|
||||
return pointDataView.getFloat(SNOW_WATER);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param snowWaterEquiv
|
||||
* the snowWaterEquiv to set
|
||||
*/
|
||||
public void setSnowWaterEquiv(float snowWaterEquiv) {
|
||||
pointDataView.setFloat(SNOW_WATER, snowWaterEquiv);
|
||||
}
|
||||
|
||||
/** @return the snowFall */
|
||||
public float getSnowFall() {
|
||||
return pointDataView.getFloat(SNOW_FALL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param snowFall
|
||||
* the snowFall to set
|
||||
*/
|
||||
public void setSnowFall(float snowFall) {
|
||||
pointDataView.setFloat(SNOW_FALL, snowFall);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param snowMelt
|
||||
* the snowMelt to set
|
||||
*/
|
||||
public void setSnowMelt(float snowMelt) {
|
||||
pointDataView.setFloat(SNOW_MELT, snowMelt);
|
||||
}
|
||||
|
||||
/** @return the snowFlux */
|
||||
public float getSnowMFlux() {
|
||||
return pointDataView.getFloat(SNOW_FLUX);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param snowFlux
|
||||
* the snowFlux to set
|
||||
*/
|
||||
public void setSnowFlux(float snowFlux) {
|
||||
pointDataView.setFloat(SNOW_FLUX, snowFlux);
|
||||
}
|
||||
|
||||
/** @return the snowMelt */
|
||||
public float getSnowMelt() {
|
||||
return pointDataView.getFloat(SNOW_MELT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurfaceObsLocation getSpatialObject() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public SurfaceObsLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(SurfaceObsLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PointDataView getPointDataView() {
|
||||
return this.pointDataView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointDataView(PointDataView pointDataView) {
|
||||
this.pointDataView = pointDataView;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Column
|
||||
@Access(AccessType.PROPERTY)
|
||||
public String getDataURI() {
|
||||
return super.getDataURI();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
}
|
|
@ -39,9 +39,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 8, 2009 chammack Initial creation
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Apr 08, 2009 chammack Initial creation
|
||||
* Dec 20, 2013 2537 bsteffen add getFloat on a specified level.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -224,6 +225,24 @@ public class PointDataView {
|
|||
}
|
||||
}
|
||||
|
||||
public float getFloat(String parameter, int level) {
|
||||
AbstractPointDataObject<?> p = getParamSafe(parameter);
|
||||
|
||||
if (!(p instanceof FloatPointDataObject)) {
|
||||
return p.getNumber(getIndex(p) + level).floatValue();
|
||||
} else if (level == 0) {
|
||||
return ((FloatPointDataObject) p).getFloat(getIndex(p));
|
||||
} else if (level >= p.getDescription().getDimensionAsInt()) {
|
||||
throw new IllegalArgumentException("Level " + level
|
||||
+ " exceeds maxLevel size "
|
||||
+ p.getDescription().getDimensionAsInt());
|
||||
} else if (p.getDimensions() != 2) {
|
||||
throw new IllegalArgumentException("Data is not two dimensional");
|
||||
} else {
|
||||
return ((FloatPointDataObject) p).getFloat(getIndex(p) + level);
|
||||
}
|
||||
}
|
||||
|
||||
public long getLong(String parameter) {
|
||||
AbstractPointDataObject<?> p = getParamSafe(parameter);
|
||||
|
||||
|
|
|
@ -172,7 +172,14 @@
|
|||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.edex.plugin.modelsounding"
|
||||
id="com.raytheon.uf.common.dataplugin.modelsounding"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.plugin.modelsounding"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<bean id="afosToAwipsListener" class="com.raytheon.edex.plugin.text.ingest.AfosToAwipsListener" />
|
||||
<bean id="disseminationListener" class="com.raytheon.uf.edex.dissemination.ingest.DisseminationNationalDatasetSubscriber" />
|
||||
<bean id="textDBStaticDataListener" class="com.raytheon.edex.textdb.ingest.TextDBStaticDataSubscriber" />
|
||||
<bean id="modelBufrListener" class="com.raytheon.edex.plugin.modelsounding.ingest.ModelBufrSubscriber" />
|
||||
<bean id="modelBufrListener" class="com.raytheon.uf.edex.plugin.modelsounding.ingest.ModelBufrSubscriber" />
|
||||
|
||||
<bean id="radarMenuCreator" class="com.raytheon.edex.plugin.radar.util.RadarMenuUtil"/>
|
||||
<bean id="import88dLocations" class="com.raytheon.edex.plugin.radar.util.Import88DLocationsUtil"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.edex.plugin.modelsounding</name>
|
||||
<name>com.raytheon.uf.edex.plugin.modelsounding</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
|
@ -1,8 +1,8 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Modelsounding Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.edex.plugin.modelsounding
|
||||
Bundle-Version: 1.13.1.qualifier
|
||||
Bundle-SymbolicName: com.raytheon.uf.edex.plugin.modelsounding
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
|
@ -11,6 +11,7 @@ Require-Bundle: com.raytheon.uf.edex.core,
|
|||
com.raytheon.uf.edex.database,
|
||||
com.raytheon.uf.edex.pointdata,
|
||||
com.raytheon.uf.edex.decodertools,
|
||||
com.raytheon.uf.common.dataplugin.modelsounding,
|
||||
com.raytheon.uf.common.dataplugin,
|
||||
com.raytheon.uf.common.datastorage,
|
||||
com.raytheon.uf.common.geospatial,
|
||||
|
@ -20,8 +21,8 @@ Require-Bundle: com.raytheon.uf.edex.core,
|
|||
com.raytheon.uf.common.site
|
||||
Import-Package: com.raytheon.edex.esb,
|
||||
com.raytheon.edex.plugin
|
||||
Export-Package: com.raytheon.edex.plugin.modelsounding,
|
||||
com.raytheon.edex.plugin.modelsounding.common,
|
||||
com.raytheon.edex.plugin.modelsounding.dao,
|
||||
com.raytheon.edex.plugin.modelsounding.decoder
|
||||
Export-Package: com.raytheon.uf.edex.plugin.modelsounding,
|
||||
com.raytheon.uf.edex.plugin.modelsounding.common,
|
||||
com.raytheon.uf.edex.plugin.modelsounding.dao,
|
||||
com.raytheon.uf.edex.plugin.modelsounding.decoder
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
<bean id="modelsoundingProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
|
||||
<property name="pluginName" ref="modelsoundingPluginName" />
|
||||
<property name="pluginFQN" value="com.raytheon.edex.plugin.modelsounding" />
|
||||
<property name="dao" value="com.raytheon.edex.plugin.modelsounding.dao.ModelSoundingDAO" />
|
||||
<property name="record" value="com.raytheon.edex.plugin.modelsounding.common.SoundingSite" />
|
||||
<property name="pluginFQN" value="com.raytheon.uf.edex.plugin.modelsounding" />
|
||||
<property name="dao" value="com.raytheon.uf.edex.plugin.modelsounding.dao.ModelSoundingDAO" />
|
||||
<property name="record" value="com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite" />
|
||||
</bean>
|
||||
|
||||
<bean factory-bean="pluginRegistry" factory-method="register">
|
|
@ -4,11 +4,11 @@
|
|||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||
|
||||
<bean id="modelsoundingPersistenceManager"
|
||||
class="com.raytheon.edex.plugin.modelsounding.ModelSoundingPersistenceManager">
|
||||
class="com.raytheon.uf.edex.plugin.modelsounding.ModelSoundingPersistenceManager">
|
||||
</bean>
|
||||
|
||||
<bean id="modelsoundingDecoder"
|
||||
class="com.raytheon.edex.plugin.modelsounding.ModelSoundingDecoder"
|
||||
class="com.raytheon.uf.edex.plugin.modelsounding.ModelSoundingDecoder"
|
||||
init-method="start"
|
||||
destroy-method="shutdown">
|
||||
<property name="modelSoundingPersistenceManager" ref="modelsoundingPersistenceManager" />
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -29,9 +29,8 @@ import java.util.Set;
|
|||
|
||||
import com.raytheon.edex.esb.Headers;
|
||||
import com.raytheon.edex.plugin.AbstractDecoder;
|
||||
import com.raytheon.edex.plugin.modelsounding.common.SoundingSite;
|
||||
import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite;
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.pointdata.PointDataDescription;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -45,6 +44,7 @@ import com.raytheon.uf.edex.decodertools.bufr.descriptors.IDescriptorFactoryDele
|
|||
import com.raytheon.uf.edex.decodertools.bufr.descriptors.IDescriptorFactorySelector;
|
||||
import com.raytheon.uf.edex.decodertools.bufr.packets.BUFRSublistPacket;
|
||||
import com.raytheon.uf.edex.decodertools.bufr.packets.IBUFRDataPacket;
|
||||
import com.raytheon.uf.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
|
||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||
|
||||
/**
|
||||
|
@ -158,7 +158,7 @@ public class ModelSoundingDecoder extends AbstractDecoder implements
|
|||
|
||||
WMOHeader wmoHeader = new WMOHeader(data, headers);
|
||||
|
||||
if ((wmoHeader != null) && (wmoHeader.isValid())) {
|
||||
if (wmoHeader.isValid()) {
|
||||
try {
|
||||
|
||||
Set<String> dataSet = new HashSet<String>();
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
|
@ -17,12 +17,10 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
import com.raytheon.edex.plugin.modelsounding.common.SoundingModels;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.edex.plugin.modelsounding.common.SoundingModels;
|
||||
|
||||
/**
|
||||
* Stores temporal information associated with sounding data.
|
||||
|
@ -31,9 +29,11 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 3, 2013 2161 bkowal Initial creation
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Jul 03, 2013 2161 bkowal Initial creation
|
||||
* Dec 02, 2013 2537 bsteffen Remove obsTime and fcstseconds from
|
||||
* SoundingSite.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -42,7 +42,6 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
*/
|
||||
|
||||
public class SoundingModelTemporalData {
|
||||
private Calendar obsTime;
|
||||
|
||||
private DataTime dt;
|
||||
|
||||
|
@ -58,21 +57,12 @@ public class SoundingModelTemporalData {
|
|||
*
|
||||
*/
|
||||
public SoundingModelTemporalData() {
|
||||
this.obsTime = null;
|
||||
this.dt = null;
|
||||
this.refTime = -1L;
|
||||
this.validTime = -1L;
|
||||
this.forecastHr = -1;
|
||||
}
|
||||
|
||||
public Calendar getObsTime() {
|
||||
return obsTime;
|
||||
}
|
||||
|
||||
public void setObsTime(Calendar obsTime) {
|
||||
this.obsTime = obsTime;
|
||||
}
|
||||
|
||||
public DataTime getDt() {
|
||||
return dt;
|
||||
}
|
|
@ -17,10 +17,12 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.common;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding.common;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite;
|
||||
import com.raytheon.uf.common.dataplugin.persist.DefaultPathProvider;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
||||
/**
|
||||
* Path Provider for Model Sounding Data.
|
||||
|
@ -29,9 +31,10 @@ import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
|||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 26, 2013 bkowal Initial creation
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Apr 26, 2013 bkowal Initial creation
|
||||
* Dec 02, 2013 2537 bsteffen Remove fcstseconds from SoundingSite.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,7 +57,8 @@ public class ModelSoundingPathProvider extends DefaultPathProvider {
|
|||
public String getHDFFileName(String pluginName, IPersistable persistable) {
|
||||
SoundingSite soundingSite = (SoundingSite) persistable;
|
||||
|
||||
long forecastHour = soundingSite.getFcstSeconds() / 3600;
|
||||
long forecastHour = soundingSite.getDataTime().getFcstTime()
|
||||
/ TimeUtil.SECONDS_PER_HOUR;
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder(pluginName);
|
||||
stringBuilder.append(FILENAME_SEPARATOR);
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.common;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding.common;
|
||||
|
||||
/**
|
||||
*
|
|
@ -17,15 +17,18 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.dao;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding.dao;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.edex.plugin.modelsounding.common.ModelSoundingPathProvider;
|
||||
import com.raytheon.edex.plugin.modelsounding.common.SoundingSite;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.database.DataAccessLayerException;
|
||||
import com.raytheon.uf.edex.plugin.modelsounding.common.ModelSoundingPathProvider;
|
||||
import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
|
||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||
|
||||
|
@ -34,13 +37,14 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
|||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 20080303 1026 jkorman Initial implementation.
|
||||
* 20130426 1861 bkowal Added report type and forecast seconds as
|
||||
* required keys for the hdf5 file name. Create
|
||||
* a new method to generate hdf5 file names that
|
||||
* will use the path provider.
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- -----------------------------------------
|
||||
* Mar 03, 2008 1026 jkorman Initial implementation.
|
||||
* Apr 26, 2013 1861 bkowal Added report type and forecast seconds as
|
||||
* required keys for the hdf5 file name.
|
||||
* Create a new method to generate hdf5 file
|
||||
* names that will use the path provider.
|
||||
* Dec 02, 2013 2537 bsteffen Remove fcstseconds from SoundingSite.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -49,6 +53,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
|||
*/
|
||||
public class ModelSoundingDAO extends PointDataPluginDao<SoundingSite> {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ModelSoundingDAO.class);
|
||||
|
||||
/**
|
||||
* Creates a new BufrMOSDao object.
|
||||
*
|
||||
|
@ -72,7 +79,7 @@ public class ModelSoundingDAO extends PointDataPluginDao<SoundingSite> {
|
|||
try {
|
||||
obs = queryBySingleCriteria("dataURI", dataURI);
|
||||
} catch (DataAccessLayerException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
}
|
||||
if ((obs != null) && (obs.size() > 0)) {
|
||||
report = (SoundingSite) obs.get(0);
|
||||
|
@ -125,7 +132,8 @@ public class ModelSoundingDAO extends PointDataPluginDao<SoundingSite> {
|
|||
|
||||
@Override
|
||||
public String[] getKeysRequiredForFileName() {
|
||||
return new String[] { "reportType", "dataTime.refTime", "fcstSeconds" };
|
||||
return new String[] { "reportType", "dataTime.refTime",
|
||||
"dataTime.fcstTime" };
|
||||
}
|
||||
|
||||
@Override
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.decoder;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding.decoder;
|
||||
|
||||
import static com.raytheon.uf.edex.decodertools.bufr.packets.DataPacketTypes.RepSubList;
|
||||
|
||||
|
@ -25,9 +25,8 @@ import java.io.File;
|
|||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.edex.plugin.modelsounding.SoundingModelTemporalData;
|
||||
import com.raytheon.edex.plugin.modelsounding.common.SoundingModels;
|
||||
import com.raytheon.edex.plugin.modelsounding.common.SoundingSite;
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.SoundingLevel;
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite;
|
||||
import com.raytheon.uf.common.geospatial.spi.SPIContainer;
|
||||
import com.raytheon.uf.common.geospatial.spi.SPIEntry;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
|
@ -36,7 +35,7 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
|||
import com.raytheon.uf.common.localization.PathManager;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.pointdata.PointDataDescription.Type;
|
||||
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.status.IUFStatusHandler;
|
||||
|
@ -47,6 +46,8 @@ import com.raytheon.uf.edex.decodertools.bufr.descriptors.BUFRDescriptor;
|
|||
import com.raytheon.uf.edex.decodertools.bufr.packets.BUFRSublistPacket;
|
||||
import com.raytheon.uf.edex.decodertools.bufr.packets.IBUFRDataPacket;
|
||||
import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
||||
import com.raytheon.uf.edex.plugin.modelsounding.SoundingModelTemporalData;
|
||||
import com.raytheon.uf.edex.plugin.modelsounding.common.SoundingModels;
|
||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||
|
||||
/**
|
||||
|
@ -62,7 +63,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
|||
* work without dataURI.
|
||||
* Jul 03, 2013 2161 bkowal Relocated the logic used to retrieve
|
||||
* temporal information into its own function.
|
||||
* Dec 02, 2013 2537 bsteffen Switch logger to ufstatus.
|
||||
* Dec 02, 2013 2537 bsteffen Use SoundingSite setters instead of view.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -100,9 +101,7 @@ public class ModelSoundingDataAdapter {
|
|||
public static void updateStationList() {
|
||||
SoundingStations ss = new SoundingStations(MODEL_STATION_LIST);
|
||||
synchronized (LOCK) {
|
||||
if (ss != null) {
|
||||
stationsList = ss;
|
||||
}
|
||||
stationsList = ss;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,9 +109,7 @@ public class ModelSoundingDataAdapter {
|
|||
SoundingStations ss = new SoundingStations(MODEL_STATION_LIST);
|
||||
SPIContainer spi = populateSPIData();
|
||||
synchronized (LOCK) {
|
||||
if (ss != null) {
|
||||
stationsList = ss;
|
||||
}
|
||||
stationsList = ss;
|
||||
if ((spi != null) && (spi.isLoaded())) {
|
||||
SPI_DATA = spi;
|
||||
}
|
||||
|
@ -146,7 +143,6 @@ public class ModelSoundingDataAdapter {
|
|||
}
|
||||
|
||||
SoundingModelTemporalData soundingTemporalData = new SoundingModelTemporalData();
|
||||
soundingTemporalData.setObsTime(obsTime);
|
||||
|
||||
DataTime dt = new DataTime(obsTime, forecastSeconds.intValue());
|
||||
soundingTemporalData.setDt(dt);
|
||||
|
@ -194,30 +190,23 @@ public class ModelSoundingDataAdapter {
|
|||
switch (model) {
|
||||
case MODEL_GFS: {
|
||||
obsData.setReportType(model.getReportType());
|
||||
obsData = getGFSSiteData(dataList, obsData, view);
|
||||
obsData = getGFSSiteData(dataList, obsData);
|
||||
break;
|
||||
}
|
||||
case MODEL_ETA: {
|
||||
obsData.setReportType(model.getReportType());
|
||||
obsData = getETASiteData(dataList, obsData, view);
|
||||
obsData = getETASiteData(dataList, obsData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
obsData.setWmoHeader(wmoHeader.getWmoHeader());
|
||||
|
||||
if (soundingTemporalData != null) {
|
||||
obsData.setDataTime(soundingTemporalData.getDt());
|
||||
|
||||
obsData.setTimeObs(soundingTemporalData.getObsTime());
|
||||
view.setLong("validTime",
|
||||
soundingTemporalData.getValidTime());
|
||||
|
||||
obsData.setDataTime(soundingTemporalData.getDt());
|
||||
|
||||
view.setLong("validTime",
|
||||
soundingTemporalData.getValidTime());
|
||||
|
||||
}
|
||||
|
||||
obsData.setPointDataView(view);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logger.error("Error decoding BUFR data", t);
|
||||
|
@ -248,11 +237,10 @@ public class ModelSoundingDataAdapter {
|
|||
SurfaceObsLocation location = new SurfaceObsLocation();
|
||||
|
||||
IBUFRDataPacket dp = dataList.get(index++);
|
||||
int d = dp.getReferencingDescriptor().getDescriptor();
|
||||
if (d == BUFRDescriptor.createDescriptor(0, 4, 194)) {
|
||||
obsData.setFcstSeconds((dp.getValue() != null) ? ((Double) dp
|
||||
.getValue()).longValue() : null);
|
||||
}
|
||||
/*
|
||||
* dp is forecastHr packet, already handled in
|
||||
* SoundingModelTemporalData
|
||||
*/
|
||||
|
||||
int wmoStaNum = getInt(dataList.get(index++), -9999);
|
||||
view.setInt("wmoStaNum", wmoStaNum);
|
||||
|
@ -271,7 +259,7 @@ public class ModelSoundingDataAdapter {
|
|||
}
|
||||
Double lat = null;
|
||||
dp = dataList.get(index++);
|
||||
d = dp.getReferencingDescriptor().getDescriptor();
|
||||
int d = dp.getReferencingDescriptor().getDescriptor();
|
||||
if (d == BUFRDescriptor.createDescriptor(0, 5, 2)) {
|
||||
lat = (Double) dp.getValue();
|
||||
}
|
||||
|
@ -290,6 +278,8 @@ public class ModelSoundingDataAdapter {
|
|||
location.setElevation(stationHeight);
|
||||
}
|
||||
obsData.setLocation(location);
|
||||
|
||||
obsData.setPointDataView(view);
|
||||
} else {
|
||||
obsData = null;
|
||||
}
|
||||
|
@ -307,7 +297,7 @@ public class ModelSoundingDataAdapter {
|
|||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private static SoundingSite getGFSSiteData(List<IBUFRDataPacket> dataList,
|
||||
SoundingSite siteData, PointDataView view) {
|
||||
SoundingSite siteData) {
|
||||
if ((dataList != null) && (siteData != null)) {
|
||||
|
||||
// get the replication sublist for the sounding data
|
||||
|
@ -318,43 +308,41 @@ public class ModelSoundingDataAdapter {
|
|||
List<IBUFRDataPacket> subList = (List<IBUFRDataPacket>) p
|
||||
.getValue();
|
||||
|
||||
int index = 0;
|
||||
for (IBUFRDataPacket pList : subList) {
|
||||
List<IBUFRDataPacket> sList = (List<IBUFRDataPacket>) pList
|
||||
.getValue();
|
||||
|
||||
createGFSLevel(sList, view, index++);
|
||||
createGFSLevel(sList, siteData.addLevel());
|
||||
} // for
|
||||
view.setInt("numProfLvls", index);
|
||||
}
|
||||
|
||||
setViewData("seaLvlPress", view, dataList.get(6));
|
||||
setViewData("sfcPress", view, dataList.get(7));
|
||||
siteData.setPressSLP(extractFloat(dataList.get(6)));
|
||||
siteData.setPressSfc(extractFloat(dataList.get(7)));
|
||||
|
||||
// [0 12 061] Skin temperature
|
||||
setViewData("skinTemp", view, dataList.get(8));
|
||||
siteData.setSkinTemp(extractFloat(dataList.get(8)));
|
||||
// *************************************************************
|
||||
setViewData("totPrecip", view, dataList.get(11));
|
||||
setViewData("convPrecip", view, dataList.get(12));
|
||||
setViewData("snowFall", view, dataList.get(13));
|
||||
siteData.setTotPrecip(extractFloat(dataList.get(11)));
|
||||
siteData.setPrecipConv(extractFloat(dataList.get(12)));
|
||||
siteData.setSnowFall(extractFloat(dataList.get(13)));
|
||||
// *************************************************************
|
||||
setViewData("lowCld", view, dataList.get(14));
|
||||
setViewData("midCld", view, dataList.get(15));
|
||||
setViewData("hiCld", view, dataList.get(16));
|
||||
siteData.setCldAmtLo(extractFloat(dataList.get(14)));
|
||||
siteData.setCldAmtLo(extractFloat(dataList.get(15)));
|
||||
siteData.setCldAmtLo(extractFloat(dataList.get(16)));
|
||||
// *************************************************************
|
||||
setViewData("u10", view, dataList.get(17));
|
||||
setViewData("v10", view, dataList.get(18));
|
||||
setViewData("temp2", view, dataList.get(19));
|
||||
setViewData("q2", view, dataList.get(20));
|
||||
siteData.setUc10M(extractFloat(dataList.get(17)));
|
||||
siteData.setVc10M(extractFloat(dataList.get(18)));
|
||||
siteData.setTemp2M(extractFloat(dataList.get(19)));
|
||||
siteData.setSpecHum2M(extractFloat(dataList.get(20)));
|
||||
// *************************************************************
|
||||
// Snow precipitation type
|
||||
setViewData("snowTyp", view, dataList.get(21));
|
||||
siteData.setSnowType(extractInteger(dataList.get(21)));
|
||||
// Ice pellet precipitation type
|
||||
setViewData("iceTyp", view, dataList.get(21));
|
||||
siteData.setIceType(extractInteger(dataList.get(21)));
|
||||
// Freezing rain precipitation type
|
||||
setViewData("frzgRainTyp", view, dataList.get(23));
|
||||
siteData.setFzRainType(extractInteger(dataList.get(23)));
|
||||
// Rain precipitation type
|
||||
setViewData("rainType", view, dataList.get(24));
|
||||
siteData.setRainType(extractInteger(dataList.get(24)));
|
||||
}
|
||||
return siteData;
|
||||
}
|
||||
|
@ -364,33 +352,27 @@ public class ModelSoundingDataAdapter {
|
|||
*
|
||||
* @param levelList
|
||||
* A sublist containing level data.
|
||||
* @param elev
|
||||
* The current elevation to use.
|
||||
* @return The populated level data.
|
||||
* @param level
|
||||
* The current level to populate.
|
||||
*/
|
||||
private static void createGFSLevel(List<IBUFRDataPacket> levelList,
|
||||
PointDataView view, int index) {
|
||||
SoundingLevel level) {
|
||||
if (levelList != null) {
|
||||
|
||||
setViewData("pressure", view, levelList.get(0), index);
|
||||
setViewData("temperature", view, levelList.get(1), index);
|
||||
setViewData("uComp", view, levelList.get(2), index);
|
||||
setViewData("vComp", view, levelList.get(3), index);
|
||||
setViewData("specHum", view, levelList.get(4), index);
|
||||
setViewData("omega", view, levelList.get(5), index);
|
||||
level.setPressure(extractFloat(levelList.get(0)));
|
||||
level.setTemperature(extractFloat(levelList.get(1)));
|
||||
level.setUcWind(extractFloat(levelList.get(2)));
|
||||
level.setVcWind(extractFloat(levelList.get(3)));
|
||||
level.setSpecificHumidity(extractFloat(levelList.get(4)));
|
||||
level.setOmega(extractFloat(levelList.get(5)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param levelList
|
||||
* @return
|
||||
*/
|
||||
private static void createETALevel(List<IBUFRDataPacket> levelList,
|
||||
PointDataView view, int index) {
|
||||
SoundingLevel level) {
|
||||
// go get the common data.
|
||||
createGFSLevel(levelList, view, index);
|
||||
setViewData("cldCvr", view, levelList.get(11), index);
|
||||
createGFSLevel(levelList, level);
|
||||
level.setLyrCldCvr(extractFloat(levelList.get(11)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -402,7 +384,7 @@ public class ModelSoundingDataAdapter {
|
|||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private static SoundingSite getETASiteData(List<IBUFRDataPacket> dataList,
|
||||
SoundingSite siteData, PointDataView view) {
|
||||
SoundingSite siteData) {
|
||||
if ((dataList != null) && (siteData != null)) {
|
||||
|
||||
// get the replication sublist for the sounding data
|
||||
|
@ -413,141 +395,109 @@ public class ModelSoundingDataAdapter {
|
|||
List<IBUFRDataPacket> subList = (List<IBUFRDataPacket>) p
|
||||
.getValue();
|
||||
|
||||
int index = 0;
|
||||
for (IBUFRDataPacket pList : subList) {
|
||||
List<IBUFRDataPacket> sList = (List<IBUFRDataPacket>) pList
|
||||
.getValue();
|
||||
|
||||
createETALevel(sList, view, index++);
|
||||
createETALevel(sList, siteData.addLevel());
|
||||
} // for
|
||||
view.setInt("numProfLvls", index);
|
||||
}
|
||||
|
||||
// *************************************************************
|
||||
// [0 10 051] Pressure reduced to mean sea level
|
||||
setViewData("seaLvlPress", view, dataList.get(8));
|
||||
siteData.setPressSLP(extractFloat(dataList.get(8)));
|
||||
// [0 10 195] Surface pressure
|
||||
setViewData("sfcPress", view, dataList.get(9));
|
||||
siteData.setPressSfc(extractFloat(dataList.get(9)));
|
||||
|
||||
// [0 12 061] Skin temperature
|
||||
setViewData("skinTemp", view, dataList.get(10));
|
||||
siteData.setSkinTemp(extractFloat(dataList.get(10)));
|
||||
// [0 12 196] 1-hour minimum temperature at lowest model level
|
||||
setViewData("minTemp", view, dataList.get(11));
|
||||
siteData.setMinTemp(extractFloat(dataList.get(11)));
|
||||
// [0 12 197] 1-hour maximum temperature at lowest model level
|
||||
setViewData("maxTemp", view, dataList.get(12));
|
||||
siteData.setMaxTemp(extractFloat(dataList.get(12)));
|
||||
// *************************************************************
|
||||
// [0 13 019] Total precipitation past 1 hour
|
||||
setViewData("totPrecip", view, dataList.get(14));
|
||||
siteData.setTotPrecip(extractFloat(dataList.get(14)));
|
||||
// [0 13 208] Convective precipitation in past 1 hour
|
||||
setViewData("convPrecip", view, dataList.get(15));
|
||||
siteData.setPrecipConv(extractFloat(dataList.get(15)));
|
||||
// *************************************************************
|
||||
// [0 12 201] 1-hour average sensible heat flux
|
||||
setViewData("sensHeat", view, dataList.get(18));
|
||||
siteData.setSensHeat(extractFloat(dataList.get(18)));
|
||||
// [0 12 202] 1-hour average sub-surface heat flux
|
||||
setViewData("subSfcHeat", view, dataList.get(19));
|
||||
siteData.setSubSfcHeat(extractFloat(dataList.get(19)));
|
||||
// [0 12 203] 1-hour average snow phase change heat flux
|
||||
setViewData("snowFlux", view, dataList.get(20));
|
||||
siteData.setSnowFlux(extractFloat(dataList.get(20)));
|
||||
// *************************************************************
|
||||
// [0 13 216] 1-hour accumulated snowfall
|
||||
setViewData("snowWater", view, dataList.get(29));
|
||||
siteData.setSnowWaterEquiv(extractFloat(dataList.get(29)));
|
||||
// [0 13 210] Snow water equivalent
|
||||
setViewData("snowFall", view, dataList.get(27));
|
||||
siteData.setSnowFall(extractFloat(dataList.get(27)));
|
||||
// [0 13 218] 1-hour accumulated snow melt
|
||||
setViewData("snowMelt", view, dataList.get(30));
|
||||
siteData.setSnowMelt(extractFloat(dataList.get(30)));
|
||||
// *************************************************************
|
||||
// % Amount of low clouds
|
||||
setViewData("lowCld", view, dataList.get(46));
|
||||
siteData.setCldAmtLo(extractFloat(dataList.get(46)));
|
||||
// % Amount of mid clouds
|
||||
setViewData("midCld", view, dataList.get(47));
|
||||
siteData.setCldAmtMd(extractFloat(dataList.get(47)));
|
||||
// % Amount of high clouds
|
||||
setViewData("hiCld", view, dataList.get(48));
|
||||
siteData.setCldAmtHi(extractFloat(dataList.get(48)));
|
||||
// *************************************************************
|
||||
// u component at 10 meters
|
||||
setViewData("u10", view, dataList.get(35));
|
||||
siteData.setUc10M(extractFloat(dataList.get(35)));
|
||||
// v component at 10 meters
|
||||
setViewData("v10", view, dataList.get(36));
|
||||
siteData.setVc10M(extractFloat(dataList.get(36)));
|
||||
// Potential temperature at 10 m
|
||||
setViewData("Theta10", view, dataList.get(37));
|
||||
siteData.setTheta10M(extractFloat(dataList.get(37)));
|
||||
// Specific humidity at 10 m
|
||||
setViewData("q10", view, dataList.get(38));
|
||||
siteData.setSpecHum10M(extractFloat(dataList.get(38)));
|
||||
// *************************************************************
|
||||
// Dry-bulb temperature at 2 m
|
||||
setViewData("temp2", view, dataList.get(39));
|
||||
siteData.setTemp2M(extractFloat(dataList.get(39)));
|
||||
// Specific humidity at 2 m
|
||||
setViewData("q2", view, dataList.get(40));
|
||||
siteData.setSpecHum2M(extractFloat(dataList.get(40)));
|
||||
// *************************************************************
|
||||
// Snow precipitation type
|
||||
setViewData("snowTyp", view, dataList.get(50));
|
||||
siteData.setSnowType(extractInteger(dataList.get(50)));
|
||||
// Ice pellet precipitation type
|
||||
setViewData("iceTyp", view, dataList.get(51));
|
||||
siteData.setIceType(extractInteger(dataList.get(51)));
|
||||
// Freezing rain precipitation type
|
||||
setViewData("frzgRainTyp", view, dataList.get(52));
|
||||
siteData.setFzRainType(extractInteger(dataList.get(52)));
|
||||
// Rain precipitation type
|
||||
setViewData("rainType", view, dataList.get(53));
|
||||
siteData.setRainType(extractInteger(dataList.get(53)));
|
||||
|
||||
setViewData("uStorm", view, dataList.get(54));
|
||||
setViewData("vStorm", view, dataList.get(55));
|
||||
siteData.setStormUComp(extractFloat(dataList.get(54)));
|
||||
siteData.setStormVComp(extractFloat(dataList.get(55)));
|
||||
// Storm relative helicity
|
||||
setViewData("srHel", view, dataList.get(56));
|
||||
setViewData("prCloud", view, dataList.get(57));
|
||||
setViewData("vsby", view, dataList.get(58));
|
||||
siteData.setStormRelHeli(extractFloat(dataList.get(56)));
|
||||
siteData.setPressCldBase(extractFloat(dataList.get(57)));
|
||||
siteData.setHorzVis(extractFloat(dataList.get(58)));
|
||||
|
||||
}
|
||||
return siteData;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parmName
|
||||
* @param view
|
||||
* @param packet
|
||||
*/
|
||||
private static void setViewData(String parmName, PointDataView view,
|
||||
IBUFRDataPacket packet) {
|
||||
setViewData(parmName, view, packet, 0);
|
||||
private static int extractInteger(IBUFRDataPacket packet) {
|
||||
if (packet == null) {
|
||||
return PointDataDescription.FILL_VALUE_INT;
|
||||
} else {
|
||||
Object val = packet.getValue();
|
||||
if (val instanceof Number) {
|
||||
return ((Number) val).intValue();
|
||||
} else {
|
||||
return PointDataDescription.FILL_VALUE_INT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parmName
|
||||
* @param view
|
||||
* @param packet
|
||||
*/
|
||||
private static void setViewData(String parmName, PointDataView view,
|
||||
IBUFRDataPacket packet, int index) {
|
||||
if (packet != null) {
|
||||
Type t = view.getType(parmName);
|
||||
Object o = packet.getValue();
|
||||
if (o != null) {
|
||||
switch (t) {
|
||||
case STRING: {
|
||||
if (o instanceof String) {
|
||||
view.setString(parmName, (String) o, index);
|
||||
}
|
||||
}
|
||||
case INT: {
|
||||
if (o instanceof Double) {
|
||||
view.setInt(parmName, ((Double) o).intValue(), index);
|
||||
} else if (o instanceof Long) {
|
||||
view.setInt(parmName, ((Long) o).intValue(), index);
|
||||
}
|
||||
}
|
||||
case LONG: {
|
||||
if (o instanceof Double) {
|
||||
view.setLong(parmName, ((Double) o).longValue(), index);
|
||||
} else if (o instanceof Long) {
|
||||
view.setLong(parmName, ((Long) o).longValue(), index);
|
||||
}
|
||||
}
|
||||
case FLOAT: {
|
||||
if (o instanceof Double) {
|
||||
view.setFloat(parmName, ((Double) o).floatValue(),
|
||||
index);
|
||||
} else if (o instanceof Long) {
|
||||
view.setFloat(parmName, ((Long) o).floatValue(), index);
|
||||
}
|
||||
}
|
||||
}
|
||||
private static float extractFloat(IBUFRDataPacket packet) {
|
||||
if (packet == null) {
|
||||
return PointDataDescription.FILL_VALUE_INT;
|
||||
} else {
|
||||
Object val = packet.getValue();
|
||||
if (val instanceof Number) {
|
||||
return ((Number) val).floatValue();
|
||||
} else {
|
||||
return PointDataDescription.FILL_VALUE_INT;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.decoder;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding.decoder;
|
||||
|
||||
import static com.raytheon.uf.common.localization.LocalizationContext.LocalizationType.EDEX_STATIC;
|
||||
|
||||
|
@ -37,6 +37,7 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
/**
|
||||
* Loads a map from a file for mapping wmo numbers to icaos.
|
||||
|
@ -91,28 +92,26 @@ public class SoundingStations {
|
|||
|
||||
String line = null;
|
||||
while ((line = bf.readLine()) != null) {
|
||||
if (line != null) {
|
||||
// filter out comments
|
||||
if ((!line.startsWith("#"))
|
||||
&& (line.length() > 22)) {
|
||||
String wmo = line.substring(0, 13).trim();
|
||||
String pICAO = line.substring(15, 19)
|
||||
.trim();
|
||||
stationMap.put(wmo, pICAO);
|
||||
}
|
||||
// filter out comments
|
||||
if ((!line.startsWith("#")) && (line.length() > 22)) {
|
||||
String wmo = line.substring(0, 13).trim();
|
||||
String pICAO = line.substring(15, 19).trim();
|
||||
stationMap.put(wmo, pICAO);
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.debug(String.format("Read %d stationIds from %s.",
|
||||
count, path));
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
logger.handle(Priority.PROBLEM, ioe.getLocalizedMessage(),
|
||||
ioe);
|
||||
} finally {
|
||||
if (bf != null) {
|
||||
try {
|
||||
bf.close();
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
logger.handle(Priority.PROBLEM,
|
||||
ioe.getLocalizedMessage(), ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +154,7 @@ public class SoundingStations {
|
|||
try {
|
||||
fis = new FileInputStream(file);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
logger.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
}
|
||||
return fis;
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.modelsounding.ingest;
|
||||
package com.raytheon.uf.edex.plugin.modelsounding.ingest;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
|
@ -27,7 +27,6 @@ import java.io.FileReader;
|
|||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
|
@ -38,6 +37,7 @@ import com.raytheon.uf.common.site.ingest.INationalDatasetSubscriber;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
|
||||
|
||||
/**
|
||||
* Subscriber to update the local model sounding sites whenever the national spi
|
||||
|
@ -207,10 +207,8 @@ public class ModelBufrSubscriber implements INationalDatasetSubscriber {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
statusHandler.handle(Priority.SIGNIFICANT, "modelBufr:Could not read File ", e);
|
||||
} catch (IOException e) {
|
||||
statusHandler.handle(Priority.SIGNIFICANT, "modelBufr:Could not read File ", e);
|
||||
}
|
||||
}
|
||||
|
|
@ -66,15 +66,16 @@ import com.raytheon.uf.edex.database.plugin.PluginDao;
|
|||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 13, 2009 chammack Initial creation
|
||||
* Jan 14, 2013 1469 bkowal Removed the hdf5 data directory.
|
||||
* Feb 27, 2013 1638 mschenke Switched logger to use statusHandler
|
||||
* Apr 15, 2013 1868 bsteffen Rewrite mergeAll in PluginDao.
|
||||
* Apr 29, 2013 1861 bkowal Refactor hdf5 filename generation during reads
|
||||
* into its own method so modelsounding dao can
|
||||
* override it.
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- -----------------------------------------
|
||||
* Apr 13, 2009 chammack Initial creation
|
||||
* Jan 14, 2013 1469 bkowal Removed the hdf5 data directory.
|
||||
* Feb 27, 2013 1638 mschenke Switched logger to use statusHandler
|
||||
* Apr 15, 2013 1868 bsteffen Rewrite mergeAll in PluginDao.
|
||||
* Apr 29, 2013 1861 bkowal Refactor hdf5 filename generation during
|
||||
* reads into its own method so modelsounding
|
||||
* dao can override it.
|
||||
* Jan 03, 2014 2309 bsteffen Allow fcstTime in hdf5 path.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -487,7 +488,13 @@ public abstract class PointDataPluginDao<T extends PluginDataObject> extends
|
|||
try {
|
||||
if (obj.containsKey("dataTime.refTime")) {
|
||||
Date d = (Date) obj.remove("dataTime.refTime");
|
||||
DataTime dt = new DataTime(d);
|
||||
DataTime dt = null;
|
||||
if (obj.containsKey("dataTime.fcstTime")) {
|
||||
int fcstTime = (Integer) obj.remove("dataTime.fcstTime");
|
||||
dt = new DataTime(d, fcstTime);
|
||||
}else{
|
||||
dt = new DataTime(d);
|
||||
}
|
||||
obj.put("dataTime", dt);
|
||||
}
|
||||
bm.putAll(obj);
|
||||
|
|
|
@ -18,7 +18,7 @@ Require-Bundle: com.raytheon.edex.uengine,
|
|||
gov.noaa.nws.ncep.common.dataplugin.mcidas;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataplugin.radar;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.0.0",
|
||||
com.raytheon.edex.plugin.modelsounding;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.dataplugin.modelsounding,
|
||||
com.raytheon.edex.plugin.bufrua;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.edex.pointdata;bundle-version="1.12.1174",
|
||||
|
@ -28,8 +28,7 @@ Export-Package: gov.noaa.nws.ncep.edex.uengine.output,
|
|||
gov.noaa.nws.ncep.edex.uengine.tasks.radar,
|
||||
gov.noaa.nws.ncep.edex.uengine.tasks.response,
|
||||
gov.noaa.nws.ncep.edex.uengine.utility
|
||||
Import-Package: com.raytheon.edex.plugin.modelsounding.common,
|
||||
com.raytheon.uf.common.dataplugin.bufrua,
|
||||
Import-Package: com.raytheon.uf.common.dataplugin.bufrua,
|
||||
com.raytheon.uf.common.dataplugin.bufrua.dao,
|
||||
com.raytheon.uf.common.dataplugin.level,
|
||||
com.raytheon.uf.common.pointdata,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package gov.noaa.nws.ncep.edex.uengine.tasks.profile;
|
||||
|
||||
/**
|
||||
*
|
||||
* gov.noaa.nws.ncep.edex.uengine.tasks.profile.PfcSoundingQuery
|
||||
|
@ -14,6 +15,7 @@ package gov.noaa.nws.ncep.edex.uengine.tasks.profile;
|
|||
* 09/13/2010 301 Chin Chen Initial coding
|
||||
* 12/16/2010 301 Chin Chen add support of PFC (NAM and GFS) model sounding data
|
||||
* 02/28/2012 Chin Chen modify several sounding query algorithms for better performance
|
||||
* 12/20/2013 2537 bsteffen Update ModelSoundingPointDataTransform
|
||||
* *
|
||||
* </pre>
|
||||
*
|
||||
|
@ -23,26 +25,33 @@ package gov.noaa.nws.ncep.edex.uengine.tasks.profile;
|
|||
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.PfcSndType;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.SndQueryKeyType;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingStnInfo;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingStnInfoCollection;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingTimeLines;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.PfcSndType;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.SndQueryKeyType;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
|
||||
import com.raytheon.edex.plugin.modelsounding.common.ModelSoundingPointDataTransform;
|
||||
import com.raytheon.edex.plugin.modelsounding.common.SoundingLevel;
|
||||
import com.raytheon.edex.plugin.modelsounding.common.SoundingSite;
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingParameters;
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.ModelSoundingPointDataTransform;
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.SoundingLevel;
|
||||
import com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.edex.database.dao.CoreDao;
|
||||
import com.raytheon.uf.edex.database.dao.DaoConfig;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
@ -376,46 +385,35 @@ public class PfcSoundingQuery {
|
|||
List<NcSoundingLayer> soundLyList = new ArrayList<NcSoundingLayer>();
|
||||
|
||||
if(sndTypeStr.equals(PfcSndType.GFSSND.toString()) || sndTypeStr.equals(PfcSndType.NAMSND.toString())){
|
||||
List<String> fields = new ArrayList<String>();
|
||||
List<Object> values = new ArrayList<Object>();
|
||||
List<SoundingSite> lSndSiteRecords = null;
|
||||
List<String> operands = new ArrayList<String>();
|
||||
Map<String, RequestConstraint> constraints = new HashMap<String, RequestConstraint>();
|
||||
List<SoundingSite> lSndSiteRecords = null;
|
||||
if(queryType==SndQueryKeyType.STNID){
|
||||
fields.add("location.stationId");// the location.stationId String field name defined in SoundingSite class and decoded modelsounding table.
|
||||
values.add(stn);
|
||||
operands.add("=");
|
||||
// the location.stationId String field name defined in SoundingSite class and decoded modelsounding table.
|
||||
constraints.put("location.stationId", new RequestConstraint(stn));
|
||||
}
|
||||
else if(queryType==SndQueryKeyType.STNNUM){
|
||||
fields.add("siteid");// the siteid String field name defined in SoundingSite class and decoded in modelsounding table.
|
||||
values.add(stn);
|
||||
operands.add("=");
|
||||
// the siteid String field name defined in SoundingSite class and decoded in modelsounding table.
|
||||
constraints.put("siteid", new RequestConstraint(stn));
|
||||
|
||||
}
|
||||
else if(queryType==SndQueryKeyType.LATLON){
|
||||
fields.add("location.latitude");// the location.latitude field name defined in SoundingSite class and decoded modelsounding table
|
||||
values.add(lat-0.1);
|
||||
operands.add(">=");
|
||||
fields.add("location.latitude");// the location.latitude field name defined in SoundingSite class and decoded modelsounding table
|
||||
values.add(lat+0.1);
|
||||
operands.add("<=");
|
||||
fields.add("location.longitude");// the location.longitude field name defined in SoundingSite class and decoded modelsounding table
|
||||
values.add(lon-0.1);
|
||||
operands.add(">=");
|
||||
fields.add("location.longitude");// the location.longitude field name defined in SoundingSite class and decoded modelsounding table
|
||||
values.add(lon+0.1);
|
||||
operands.add("<=");
|
||||
|
||||
// the location.latitude field name defined in SoundingSite class and decoded modelsounding table
|
||||
constraints.put("location.latitude", new RequestConstraint(Double.toString(lat-0.1), Double.toString(lat+0.1)));
|
||||
// the location.longitude field name defined in SoundingSite class and decoded modelsounding table
|
||||
constraints.put("location.longitude", new RequestConstraint(Double.toString(lon-0.1), Double.toString(lon+0.1)));
|
||||
}
|
||||
else {
|
||||
System.out.println("request query type "+ queryType+ " is not supported in this API" );
|
||||
return pf;
|
||||
}
|
||||
|
||||
fields.add("dataTime.refTime");// the refTime time field name defined in SoundingSite and decoded modelsounding table
|
||||
values.add(refTimeCal.getTime()); //refTime data type defined in SoundingSite is "Date"
|
||||
operands.add("=");
|
||||
fields.add("dataTime.validPeriod.start");// the rangeStart field name defined in SoundingSite and decoded modelsounding table
|
||||
values.add(validTimeCal.getTime()); //rangestart data type defined in SoundingSite is "Date"
|
||||
operands.add("=");
|
||||
// the refTime time field name defined in SoundingSite and decoded modelsounding table
|
||||
// refTime data type defined in SoundingSite is "Date"
|
||||
constraints.put("dataTime.refTime", new RequestConstraint(TimeUtil.formatCalendar(refTimeCal)));
|
||||
// the rangeStart field name defined in SoundingSite and decoded modelsounding table
|
||||
//rangestart data type defined in SoundingSite is "Date"
|
||||
constraints.put("dataTime.validPeriod.start", new RequestConstraint(TimeUtil.formatCalendar(validTimeCal)));
|
||||
|
||||
|
||||
//String d="";
|
||||
//String d1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(validTimeCal.getTime());
|
||||
|
@ -426,22 +424,22 @@ public class PfcSoundingQuery {
|
|||
// d = d+","+d2;
|
||||
//}
|
||||
|
||||
//values.add(d); //rangestart data type defined in SoundingSite is "Date"
|
||||
//operands.add("in");
|
||||
for (int i=0; i < fields.size(); i++) {
|
||||
System.out.println("field "+ fields.get(i) + " value "+ values.get(i));
|
||||
// //rangestart data type defined in SoundingSite is "Date"
|
||||
// constraints.put("dataTime.validPeriod.start", new RequestConstraint(d, ConstraintType.IN));
|
||||
for (Entry<String,RequestConstraint> entry : constraints.entrySet()) {
|
||||
System.out.println("field "+ entry.getKey() + " value "+ entry.getValue().getConstraintValue());
|
||||
}
|
||||
List<String> parameters = new ArrayList<String>(12);
|
||||
parameters.addAll(ModelSoundingPointDataTransform.LVL_PARAMETERS);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_LATITUDE);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_LONGITUDE);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_ELEVATION);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_STATION_ID);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_STATION_NUMBER);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_DATAURI);
|
||||
parameters.addAll(ModelSoundingParameters.LVL_PARAMETERS);
|
||||
parameters.add(ModelSoundingParameters.LATITUDE);
|
||||
parameters.add(ModelSoundingParameters.LONGITUDE);
|
||||
parameters.add(ModelSoundingParameters.ELEVATION);
|
||||
parameters.add(ModelSoundingParameters.STATION_ID);
|
||||
parameters.add(ModelSoundingParameters.STATION_NUMBER);
|
||||
parameters.add(ModelSoundingParameters.DATAURI);
|
||||
|
||||
try {
|
||||
lSndSiteRecords = ModelSoundingPointDataTransform.getSoundingSites(fields, values, operands, parameters);
|
||||
lSndSiteRecords = ModelSoundingPointDataTransform.getSoundingSites(constraints, parameters);
|
||||
System.out.println("sounding site record size = "+ lSndSiteRecords.size());
|
||||
if(lSndSiteRecords.size() > 0){
|
||||
//set pf data
|
||||
|
@ -460,12 +458,12 @@ public class PfcSoundingQuery {
|
|||
for (SoundingLevel level : lSndSiteRecords.get(0).getLevels())
|
||||
{
|
||||
NcSoundingLayer soundingLy = new NcSoundingLayer();
|
||||
soundingLy.setOmega(level.getOmega().floatValue());
|
||||
soundingLy.setOmega(level.getOmega());
|
||||
soundingLy.setTemperature((float)kelvinToCelsius.convert(level.getTemperature()));
|
||||
soundingLy.setPressure(level.getPressure().floatValue()/100);
|
||||
soundingLy.setWindU((float)metersPerSecondToKnots.convert(level.getUcWind().floatValue())); // HDF5 data in unit of m/s, convert to Knots 4/12/2012
|
||||
soundingLy.setWindV((float)metersPerSecondToKnots.convert(level.getVcWind().floatValue()));
|
||||
soundingLy.setSpecHumidity(level.getSpecificHumidity().floatValue());
|
||||
soundingLy.setPressure(level.getPressure()/100);
|
||||
soundingLy.setWindU((float)metersPerSecondToKnots.convert(level.getUcWind())); // HDF5 data in unit of m/s, convert to Knots 4/12/2012
|
||||
soundingLy.setWindV((float)metersPerSecondToKnots.convert(level.getVcWind()));
|
||||
soundingLy.setSpecHumidity(level.getSpecificHumidity());
|
||||
soundLyList.add(soundingLy);
|
||||
}
|
||||
|
||||
|
@ -515,10 +513,8 @@ public class PfcSoundingQuery {
|
|||
List<NcSoundingProfile> pfs = new ArrayList<NcSoundingProfile>();
|
||||
|
||||
if(sndTypeStr.equals(PfcSndType.GFSSND.toString()) || sndTypeStr.equals(PfcSndType.NAMSND.toString())){
|
||||
List<String> fields = new ArrayList<String>();
|
||||
List<Object> values = new ArrayList<Object>();
|
||||
List<SoundingSite> lSndSiteRecords = null;
|
||||
List<String> operands = new ArrayList<String>();
|
||||
Map<String,RequestConstraint> constraints = new HashMap<String, RequestConstraint>();
|
||||
List<SoundingSite> lSndSiteRecords = null;
|
||||
MergeSounding ms = new MergeSounding();
|
||||
|
||||
|
||||
|
@ -531,61 +527,57 @@ public class PfcSoundingQuery {
|
|||
}
|
||||
latStr=latStr.substring(0, latStr.length()-1);//get rid of last ","
|
||||
lonStr=lonStr.substring(0, lonStr.length()-1);//get rid of last ","
|
||||
fields.add("location.latitude");
|
||||
values.add(latStr);
|
||||
operands.add("in");
|
||||
fields.add("location.longitude");
|
||||
values.add(lonStr);
|
||||
operands.add("in");
|
||||
constraints.put("location.latitude", new RequestConstraint(latStr, ConstraintType.IN));
|
||||
constraints.put("location.longitude", new RequestConstraint(lonStr, ConstraintType.IN));
|
||||
}
|
||||
else if(stnIdArr != null){
|
||||
fields.add("location.stationId");// the rangeStart field name defined in SoundingSite and decoded modelsounding table
|
||||
String stnIdStr="";
|
||||
for (String stnStr: stnIdArr){
|
||||
stnIdStr = stnIdStr+stnStr;
|
||||
stnIdStr= stnIdStr+",";
|
||||
}
|
||||
stnIdStr=stnIdStr.substring(0, stnIdStr.length()-1);//get rid of last ","
|
||||
values.add(stnIdStr); //rangestart data type defined in SoundingSite is "Date"
|
||||
operands.add("in");
|
||||
// the rangeStart field name defined in SoundingSite and decoded modelsounding table
|
||||
//rangestart data type defined in SoundingSite is "Date"
|
||||
constraints.put("location.stationId", new RequestConstraint(stnIdStr, ConstraintType.IN));
|
||||
}
|
||||
else {
|
||||
return pfs;
|
||||
}
|
||||
|
||||
fields.add("dataTime.refTime");// the refTime time field name defined in SoundingSite and decoded modelsounding table
|
||||
values.add(refTimeStr); //refTime data type defined in SoundingSite is "Date"
|
||||
operands.add("=");
|
||||
// the rangeStart field name defined in SoundingSite and decoded modelsounding table. It is forcast time.
|
||||
fields.add("dataTime.validPeriod.start");
|
||||
// the refTime time field name defined in SoundingSite and decoded modelsounding table
|
||||
//refTime data type defined in SoundingSite is "Date"
|
||||
constraints.put("dataTime.refTime", new RequestConstraint(refTimeStr));
|
||||
|
||||
String d="";
|
||||
for (String timeStr: soundingTimeAry){
|
||||
d = d+timeStr;
|
||||
d= d+",";
|
||||
}
|
||||
d=d.substring(0, d.length()-1);//get rid of last ","
|
||||
values.add(d); //rangestart data type defined in SoundingSite is "Date"
|
||||
operands.add("in");
|
||||
//for (int i=0; i < fields.size(); i++) {
|
||||
// System.out.println("getPfcSndDataGeneric: field ="+ fields.get(i) + " value= "+ values.get(i) + " operand= "+operands.get(i));
|
||||
//}
|
||||
// the rangeStart field name defined in SoundingSite and decoded modelsounding table. It is forcast time.
|
||||
//rangestart data type defined in SoundingSite is "Date"
|
||||
constraints.put("dataTime.validPeriod.start", new RequestConstraint(d, ConstraintType.IN));
|
||||
//for (Entry<String,RequestConstraint> entry : constraints.entrySet()) {
|
||||
// System.out.println("getPfcSndDataGeneric: field "+ entry.getKey() + " value "+ entry.getValue().getConstraintValue() + " operand= "+ entry.getValue().getConstraintType());
|
||||
//}
|
||||
List<String> parameters = new ArrayList<String>(12);
|
||||
parameters.addAll(ModelSoundingPointDataTransform.LVL_PARAMETERS);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_LATITUDE);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_LONGITUDE);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_ELEVATION);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_STATION_ID);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_STATION_NUMBER);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_REF_TIME);
|
||||
parameters.add(ModelSoundingPointDataTransform.P_FORECAST_HOUR);
|
||||
parameters.addAll(ModelSoundingParameters.LVL_PARAMETERS);
|
||||
parameters.add(ModelSoundingParameters.LATITUDE);
|
||||
parameters.add(ModelSoundingParameters.LONGITUDE);
|
||||
parameters.add(ModelSoundingParameters.ELEVATION);
|
||||
parameters.add(ModelSoundingParameters.STATION_ID);
|
||||
parameters.add(ModelSoundingParameters.STATION_NUMBER);
|
||||
parameters.add(ModelSoundingParameters.REF_TIME);
|
||||
parameters.add(ModelSoundingParameters.FORECAST_HOUR);
|
||||
|
||||
try {
|
||||
long t01 = System.currentTimeMillis();
|
||||
lSndSiteRecords = ModelSoundingPointDataTransform.getSoundingSites(fields, values, operands, parameters);
|
||||
lSndSiteRecords = ModelSoundingPointDataTransform.getSoundingSites(constraints, parameters);
|
||||
long t02 = System.currentTimeMillis();
|
||||
//System.out.println("getPfcSndDataGeneric sounding site record size = "+ lSndSiteRecords.size()+
|
||||
// " took "+(t02-t01)+ " ms");
|
||||
for(SoundingSite sndSite:lSndSiteRecords){
|
||||
for (SoundingSite sndSite : lSndSiteRecords) {
|
||||
//set pf data
|
||||
NcSoundingProfile pf = new NcSoundingProfile();
|
||||
pf.setStationLatitude(sndSite.getLatitude());
|
||||
|
@ -603,12 +595,12 @@ public class PfcSoundingQuery {
|
|||
for (SoundingLevel sndLevel : sndSite.getLevels())
|
||||
{
|
||||
NcSoundingLayer soundingLy = new NcSoundingLayer();
|
||||
soundingLy.setOmega(sndLevel.getOmega().floatValue());
|
||||
soundingLy.setOmega(sndLevel.getOmega());
|
||||
soundingLy.setTemperature((float)kelvinToCelsius.convert(sndLevel.getTemperature()));
|
||||
soundingLy.setPressure(sndLevel.getPressure().floatValue()/100);
|
||||
soundingLy.setWindU((float)metersPerSecondToKnots.convert(sndLevel.getUcWind().floatValue())); // HDF5 data in unit of m/s, convert to Knots 4/12/2012
|
||||
soundingLy.setWindV((float)metersPerSecondToKnots.convert(sndLevel.getVcWind().floatValue()));
|
||||
soundingLy.setSpecHumidity(sndLevel.getSpecificHumidity().floatValue());
|
||||
soundingLy.setPressure(sndLevel.getPressure()/100);
|
||||
soundingLy.setWindU((float)metersPerSecondToKnots.convert(sndLevel.getUcWind())); // HDF5 data in unit of m/s, convert to Knots 4/12/2012
|
||||
soundingLy.setWindV((float)metersPerSecondToKnots.convert(sndLevel.getVcWind()));
|
||||
soundingLy.setSpecHumidity(sndLevel.getSpecificHumidity());
|
||||
soundLyList.add(soundingLy);
|
||||
}
|
||||
Collections.sort(soundLyList,reversePressureComparator());
|
||||
|
|
|
@ -22,9 +22,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.4.1",
|
|||
com.raytheon.viz.core.graphing
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Import-Package: com.raytheon.edex.plugin.modelsounding.common,
|
||||
com.raytheon.edex.plugin.modelsounding.dao,
|
||||
com.raytheon.uf.common.serialization.comm,
|
||||
Import-Package: com.raytheon.uf.common.serialization.comm,
|
||||
com.raytheon.uf.common.sounding,
|
||||
com.raytheon.uf.edex.pointdata,
|
||||
com.raytheon.uf.viz.core,
|
||||
|
|
Loading…
Add table
Reference in a new issue