Merge branch 'omaha_16.2.1' into omaha_16.2.2

Former-commit-id: 27f7e431d04f99ec48723c71413e9633c0d1996e
This commit is contained in:
Steve Harris 2016-02-15 10:15:20 -06:00
commit 4ba488bd0a
20 changed files with 345 additions and 204 deletions

View file

@ -45,6 +45,8 @@ import com.raytheon.uf.viz.core.exception.VizException;
* May 10, 2011 9059 rferrel Extended times outs on executes * May 10, 2011 9059 rferrel Extended times outs on executes
* Jun 01, 2011 7878 rferrel Adjusted time out when creating nc files * Jun 01, 2011 7878 rferrel Adjusted time out when creating nc files
* Jul 10, 2015 16907 zhao Changed time limit from 600 to 6000 for processData() & assessData() * Jul 10, 2015 16907 zhao Changed time limit from 600 to 6000 for processData() & assessData()
* Jan 21, 2016 18395 zhao Modified processData()
* Jan 29, 2016 18396 zhao Modified objReceived()
* *
* </pre> * </pre>
* *
@ -197,7 +199,7 @@ public class ClimateDataManager implements PyProcessListener {
t.start(); t.start();
} }
public void processData(final boolean append, final ClimateDataMenuDlg win) { public void processData(final boolean append, final List<String> items, final ClimateDataMenuDlg win) {
this.win = win; this.win = win;
Runnable run = new Runnable() { Runnable run = new Runnable() {
@ -207,9 +209,14 @@ public class ClimateDataManager implements PyProcessListener {
PythonClimateDataProcess pythonScript = null; PythonClimateDataProcess pythonScript = null;
try { try {
long t0 = System.currentTimeMillis(); long t0 = System.currentTimeMillis();
String ishDir = ClimateDataPython.getIshFilePath();
pythonScript = ClimateDataPython.getClimateInterpreter(); pythonScript = ClimateDataPython.getClimateInterpreter();
Map<String, Object> args = new HashMap<String, Object>(); Map<String, Object> args = new HashMap<String, Object>();
args.put("stnPickle", stnPickle); args.put("stnPickle", stnPickle);
args.put("append", append);
args.put("sites", items);
args.put("climateDir", ishDir);
numSites = items.size();
pythonScript.execute("process", args, pythonScript.execute("process", args,
ClimateDataManager.this, 6000 * numSites); ClimateDataManager.this, 6000 * numSites);
long t1 = System.currentTimeMillis(); long t1 = System.currentTimeMillis();
@ -218,6 +225,9 @@ public class ClimateDataManager implements PyProcessListener {
} catch (JepException e) { } catch (JepException e) {
statusHandler.handle(Priority.PROBLEM, statusHandler.handle(Priority.PROBLEM,
"Error retrieving climate data", e); "Error retrieving climate data", e);
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM,
"Error retrieving climate data", e);
} finally { } finally {
if (pythonScript != null) { if (pythonScript != null) {
pythonScript.dispose(); pythonScript.dispose();
@ -437,6 +447,9 @@ public class ClimateDataManager implements PyProcessListener {
.get("results"); .get("results");
win.populateSiteInfoList(ident, list); win.populateSiteInfoList(ident, list);
win.assessBtn(true); win.assessBtn(true);
win.scriptsBtn(false);
win.processBtn(false);
win.validateBtn(false);
} else if (method.equals("updateMonitor")) { } else if (method.equals("updateMonitor")) {
String msg = (String) returnMap.get("msg"); String msg = (String) returnMap.get("msg");
win.updateMonitor(msg); win.updateMonitor(msg);

View file

@ -105,6 +105,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* Jul 07, 2015 16907 zhao Changed 'ish-' to 'isd-' * Jul 07, 2015 16907 zhao Changed 'ish-' to 'isd-'
* Nov 30, 2015 4834 njensen Remove LocalizationOpFailedException * Nov 30, 2015 4834 njensen Remove LocalizationOpFailedException
* Jan 15, 2016 18482 zhao Add a "Usage" to "Help..." * Jan 15, 2016 18482 zhao Add a "Usage" to "Help..."
* Jan 21, 2016 18395 zhao Modified processData()
* *
* </pre> * </pre>
* *
@ -1111,7 +1112,7 @@ public class ClimateDataMenuDlg extends CaveSWTDialog {
private void processData() { private void processData() {
ClimateDataManager dataMgr = ClimateDataManager.getInstance(); ClimateDataManager dataMgr = ClimateDataManager.getInstance();
setWait(true); setWait(true);
dataMgr.processData(appendRdo.getSelection(), this); dataMgr.processData(appendRdo.getSelection(), itemList, this);
scriptsBtn(false); scriptsBtn(false);
processBtn(false); processBtn(false);
} }

View file

@ -37,6 +37,7 @@ import org.eclipse.swt.widgets.Composite;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 28 FEB 2008 938 lvenable Initial creation * 28 FEB 2008 938 lvenable Initial creation
* 12 Aug 2013 #2256 lvenable Moved getCigVisDistImage() to parent class. * 12 Aug 2013 #2256 lvenable Moved getCigVisDistImage() to parent class.
* 29 JAN 2016 18439 zhao Modified hourStr() to return a two-digit hour string
* *
* </pre> * </pre>
* *
@ -270,9 +271,9 @@ public class CigVisByMonthCanvasComp extends CigVisCanvasComp {
} }
if (numHours == 1) { if (numHours == 1) {
return Integer.toString(startHour); return String.format("%02d", startHour);
} else { } else {
return String.format("%d-%d", startHour, endHour); return String.format("%02d-%02d", startHour, endHour);
} }
} }

View file

@ -37,6 +37,7 @@ import org.eclipse.swt.widgets.Composite;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 28 FEB 2008 938 lvenable Initial creation * 28 FEB 2008 938 lvenable Initial creation
* 12 Aug 2013 #2256 lvenable Moved getCigVisDistImage() to parent class. * 12 Aug 2013 #2256 lvenable Moved getCigVisDistImage() to parent class.
* 29 JAN 2016 18439 zhao Modified hourStr() to return a two-digit hour string
* *
* </pre> * </pre>
* *
@ -229,9 +230,9 @@ public class CigVisByWindDirCanvasComp extends CigVisCanvasComp {
} }
if (numHours == 1) { if (numHours == 1) {
return Integer.toString(startHour); return String.format("%02d", startHour);
} else { } else {
return String.format("%d-%d", startHour, endHour); return String.format("%02d-%02d", startHour, endHour);
} }
} }

View file

@ -43,6 +43,7 @@ import org.eclipse.swt.widgets.Composite;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 28 FEB 2008 938 lvenable Initial creation * 28 FEB 2008 938 lvenable Initial creation
* 12 Aug 2013 #2256 lvenable Disposed of image when composite is disposed. * 12 Aug 2013 #2256 lvenable Disposed of image when composite is disposed.
* 29 JAN 2016 18439 zhao Modified 'months' (changed "null" to "Dec")
* *
* </pre> * </pre>
* *
@ -51,7 +52,7 @@ import org.eclipse.swt.widgets.Composite;
* *
*/ */
abstract public class CigVisCanvasComp extends Composite { abstract public class CigVisCanvasComp extends Composite {
protected final String[] months = { "null", "Jan", "Feb", "Mar", "Apr", protected final String[] months = { "Dec", "Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
protected final String[] elements = { "Visibility", "Ceiling", protected final String[] elements = { "Visibility", "Ceiling",

View file

@ -28,6 +28,7 @@
# Date Ticket# Engineer Description # Date Ticket# Engineer Description
# ------------ ---------- ----------- -------------------------- # ------------ ---------- ----------- --------------------------
# 11/17/09 avarani Initial Creation. # 11/17/09 avarani Initial Creation.
# 01/26/2016 18395 zhao Modified process()
# #
# #
# #
@ -55,8 +56,14 @@ def start(queue, append, sites, climateDir):
# Process Data button # Process Data button
def process(queue, stnPickle): def process(queue, stnPickle):
import ClimateDataUpdate import ClimateDataUpdate
cdupdate = ClimateDataUpdate.ClimateDataUpdate(queue, stnPickle) import cPickle as pickle
cdupdate.assessData(bypass = True) o = pickle.loads(stnPickle)
if set(sites) == set(o['sites']):
cdupdate = ClimateDataUpdate.ClimateDataUpdate(queue, stnPickle)
cdupdate.assessData(bypass = True)
else:
cdupdate = ClimateDataUpdate.ClimateDataUpdate(queue, climateDir = climateDir)
cdupdate.assessData(append = append, sites = sites)
# def __continue(): # def __continue():
# if mythread: # if mythread:
# mythread.bypass = True # mythread.bypass = True
@ -91,4 +98,4 @@ def reject(queue, stnPickle):
def kill(queue, stnPickle) : def kill(queue, stnPickle) :
import ClimateDataUpdate import ClimateDataUpdate
cdupdate = ClimateDataUpdate.ClimateDataUpdate(queue, stnPickle) cdupdate = ClimateDataUpdate.ClimateDataUpdate(queue, stnPickle)
cdupdate.kill() cdupdate.kill()

View file

@ -115,7 +115,7 @@ class Procedure (SmartScript.SmartScript):
] ]
varDict = {} varDict = {}
processVarList = ProcessVariableList.ProcessVariableList("Run_NWPS_Tom", variableList, varDict, None) processVarList = ProcessVariableList.ProcessVariableList("Run_NWPS", variableList, varDict, None)
status = processVarList.status() status = processVarList.status()
if status != "OK": if status != "OK":
return return
@ -144,7 +144,7 @@ class Procedure (SmartScript.SmartScript):
#line with variable list passed on using the -V option to runProcedure. This #line with variable list passed on using the -V option to runProcedure. This
#allows to run procedure from a cron. Example default for runProcedure would be: #allows to run procedure from a cron. Example default for runProcedure would be:
# All variables shown below passed with -V option are required for procedure to run properly. # All variables shown below passed with -V option are required for procedure to run properly.
# /awips2/GFESuite/bin/runProcedure -n Run_NWPS_Tom -c gfeConfig # /awips2/GFESuite/bin/runProcedure -n Run_NWPS -c gfeConfig
# -V '{"fcstlength":"102","wind":"ForecastWindGrids","wheretorun":"NCEP","model":"SWAN","web":"Yes","plot":"Yes","wna":"WNAWave","nest":"Yes","gstream":"Yes","tstep":"600","hotstart":"True","waterlevels":"ESTOFS","excd":"10"}' # -V '{"fcstlength":"102","wind":"ForecastWindGrids","wheretorun":"NCEP","model":"SWAN","web":"Yes","plot":"Yes","wna":"WNAWave","nest":"Yes","gstream":"Yes","tstep":"600","hotstart":"True","waterlevels":"ESTOFS","excd":"10"}'
# If running from a cron, you do not need to create a SITE level override of this baseline procedure if your input variables # If running from a cron, you do not need to create a SITE level override of this baseline procedure if your input variables
# are different because you pass that on from the command line. # are different because you pass that on from the command line.

View file

@ -1043,9 +1043,9 @@ class ISC_Utility(SmartScript.SmartScript):
# #
def _convertTimeRange(self, trName): def _convertTimeRange(self, trName):
if trName == "All Grids": if trName == "All Grids":
curTime = time.gmtime() curTime = self.gmtime()
startHour = curTime[3] startHour = curTime[3]
timeRange = self.createTimeRange(startHour, 204) timeRange = self.createTimeRange(startHour, 204, mode="Zulu")
#timeRange = TimeRange.allTimes() #timeRange = TimeRange.allTimes()
# timeRange = AFPS.TimeRange(AFPS.AbsTime(0), # timeRange = AFPS.TimeRange(AFPS.AbsTime(0),
# AFPS.AbsTime_maxFutureTime()) # AFPS.AbsTime_maxFutureTime())

View file

@ -2126,6 +2126,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements
} }
dialog.addDeletePoint(data); dialog.addDeletePoint(data);
deleteList.add( getZoomOffset(selectedTraceId) + i );
} }
} }

View file

@ -22,7 +22,9 @@ Require-Bundle: com.raytheon.uf.common.activetable,
org.eclipse.jface.text, org.eclipse.jface.text,
org.eclipse.ui, org.eclipse.ui,
org.eclipse.ui.workbench.texteditor, org.eclipse.ui.workbench.texteditor,
org.jep;bundle-version="1.0.0" org.jep;bundle-version="1.0.0",
com.raytheon.viz.avnconfig,
org.apache.commons.lang;bundle-version="2.3.0"
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.viz.texteditor, Export-Package: com.raytheon.viz.texteditor,
com.raytheon.viz.texteditor.alarmalert.dialogs, com.raytheon.viz.texteditor.alarmalert.dialogs,

View file

@ -19,19 +19,26 @@
**/ **/
package com.raytheon.viz.texteditor.util; package com.raytheon.viz.texteditor.util;
import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.TimeZone; import java.util.TimeZone;
import org.apache.commons.configuration.ConfigurationException;
import com.raytheon.uf.common.dataplugin.text.request.StdTextProductServerRequest; import com.raytheon.uf.common.dataplugin.text.request.StdTextProductServerRequest;
import com.raytheon.uf.common.site.SiteMap; import com.raytheon.uf.common.site.SiteMap;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.SimulatedTime; import com.raytheon.uf.common.time.SimulatedTime;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.localization.LocalizationManager; import com.raytheon.uf.viz.core.localization.LocalizationManager;
import com.raytheon.uf.viz.core.requests.ThriftClient; import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.viz.avnconfig.ITafSiteConfig;
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
import com.raytheon.viz.avnconfig.TafSiteData;
import com.raytheon.viz.core.mode.CAVEMode; import com.raytheon.viz.core.mode.CAVEMode;
import com.raytheon.viz.texteditor.msgs.IAviationObserver; import com.raytheon.viz.texteditor.msgs.IAviationObserver;
@ -47,7 +54,7 @@ import com.raytheon.viz.texteditor.msgs.IAviationObserver;
* 04/14/2010 4734 mhuang Corrected StdTextProduct import dependency * 04/14/2010 4734 mhuang Corrected StdTextProduct import dependency
* 05/10/2010 2187 cjeanbap Added StdTextProductFactory functionality. * 05/10/2010 2187 cjeanbap Added StdTextProductFactory functionality.
* 09/11/2013 2277 mschenke Removed unused function * 09/11/2013 2277 mschenke Removed unused function
* Sep 28, 2015 4860 skorolev Added CAVE mode. * Feb 12, 2016 4860 skorolev Added CAVE mode. Corrected setting of siteWmoId.
* *
* </pre> * </pre>
* *
@ -59,6 +66,8 @@ public class AviationTextUtility implements IAviationObserver {
private static final transient IUFStatusHandler statusHandler = UFStatus private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(AviationTextUtility.class); .getHandler(AviationTextUtility.class);
private static final String LINE_BREAK = "\n";
/** /**
* Method to save a temporary working version of a TAF bulletin to the text * Method to save a temporary working version of a TAF bulletin to the text
* database. * database.
@ -68,10 +77,13 @@ public class AviationTextUtility implements IAviationObserver {
*/ */
@Override @Override
public void saveTafBulletin(String tmpStr) { public void saveTafBulletin(String tmpStr) {
// Convert the text to uppercase // Convert the text to upper case
tmpStr = tmpStr.toUpperCase(); tmpStr = tmpStr.toUpperCase();
String currentDate = getCurrentDate(); String currentDate = getCurrentDate();
// Get siteId from TAF text
String siteID = tmpStr.split(LINE_BREAK)[1].trim().substring(0, 4);
// Set the node based on localization. // Set the node based on localization.
String siteNode = LocalizationManager.getInstance().getCurrentSite(); String siteNode = LocalizationManager.getInstance().getCurrentSite();
@ -80,30 +92,48 @@ public class AviationTextUtility implements IAviationObserver {
if ((siteName == null) || (siteName.equals(""))) { if ((siteName == null) || (siteName.equals(""))) {
siteName = "CCCC"; siteName = "CCCC";
} }
// Set the WMOID based on configuration file for current localization.
String siteWmoId = "FTUS43"; String siteWmoId = "";
String currentHeader = getHeaderTextField(siteWmoId, siteName,
currentDate, "\n", "WRK" + "TAF");
StdTextProductServerRequest request = new StdTextProductServerRequest();
request.setWmoid(siteWmoId);
request.setSite(siteName);
request.setCccid(siteNode);
request.setNnnid("WRK");
request.setXxxid("TAF");
request.setHdrtime(currentDate);
request.setBbbid("NOR");
request.setCreatetime(System.currentTimeMillis());
request.setProduct(currentHeader + "\n" + tmpStr);
request.setOperationalFlag(CAVEMode.getMode() != CAVEMode.PRACTICE);
try { try {
ThriftClient.sendRequest(request); ITafSiteConfig config = TafSiteConfigFactory.getInstance();
} catch (VizException e1) { TafSiteData siteData = config.getSite(siteID);
statusHandler.handle(Priority.PROBLEM, "Error retrieving metadata", siteWmoId = siteData.wmo.split(" ")[0];
e1); } catch (ConfigurationException | IOException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
}
if (!siteWmoId.isEmpty()) {
String currentHeader = getHeaderTextField(siteWmoId, siteName,
currentDate, "\n", "WRKTAF");
StdTextProductServerRequest request = new StdTextProductServerRequest();
request.setWmoid(siteWmoId);
request.setSite(siteName);
request.setCccid(siteNode);
request.setNnnid("WRK");
request.setXxxid("TAF");
request.setHdrtime(currentDate);
request.setBbbid("NOR");
request.setCreatetime(TimeUtil.currentTimeMillis());
request.setProduct(currentHeader + "\n" + tmpStr);
request.setOperationalFlag(CAVEMode.getMode() != CAVEMode.PRACTICE);
try {
ThriftClient.sendRequest(request);
} catch (VizException e1) {
statusHandler.handle(UFStatus.Priority.ERROR,
"Error retrieving metadata", e1);
}
} else {
statusHandler.handle(Priority.ERROR,
"TAF not saved to database. Unable to determine WmoId for site: "
+ siteID);
} }
} }
/**
* Gets Current Date
*
* @return
*/
private String getCurrentDate() { private String getCurrentDate() {
Date now = SimulatedTime.getSystemTime().getTime(); Date now = SimulatedTime.getSystemTime().getTime();
SimpleDateFormat formatter = new SimpleDateFormat("ddHHmm"); SimpleDateFormat formatter = new SimpleDateFormat("ddHHmm");
@ -111,6 +141,16 @@ public class AviationTextUtility implements IAviationObserver {
return (formatter.format(now)); return (formatter.format(now));
} }
/**
* Gets Header Text Field
*
* @param wmoId
* @param siteId
* @param dateId
* @param separator
* @param nnnxxx
* @return
*/
private String getHeaderTextField(String wmoId, String siteId, private String getHeaderTextField(String wmoId, String siteId,
String dateId, String separator, String nnnxxx) { String dateId, String separator, String nnnxxx) {
return wmoId + " " + siteId + " " + dateId + separator + nnnxxx; return wmoId + " " + siteId + " " + dateId + separator + nnnxxx;

View file

@ -0,0 +1,39 @@
#!/bin/bash
# DR18496 Updates for scales and warning index file
files=`find /awips2/edex/data/utility/cave_static/site/*/bundles/scales -name 'scalesInfo.xml'`
for f in $files; do
echo "Moving aside $f - base will be used until site level file is merged"
mv $f ${f}.orig
done
files=`find /awips2/edex/data/utility/cave_static/site/*/menus/warnings -name 'index.xml'`
for f in $files; do
grep -q CRsites $f
if [ $? = 0 ]; then
$f already has replacement variables
continue
fi
echo Updating $f with new replacement variables
scp $f ${f}.orig
grep -v "</menuContributionFile>" $f | grep -v "</include>" > ${f}.tmp
echo -e ' <substitute key="ARsites" value="PAFC, PAFG, PAJK" />
<substitute key="CRsites"
value="KABR, KBIS, KCYS, KLOT, KDVN, KBOU, KDMX, KDTX, KDDC, KFGF, KGLD, KGJT, KGRR, KGRB, KGID, KIND, KJKL, KEAX, KARX, KILX, KLMK, KMQT, KMKX, KMPX, KLBF, KAPX, KIWX, KOAX, KPAH, KPUB, KUNR, KRIW, KFSD, KSGF, KLSX, KTOP, KICT" />
<substitute key="ERsites"
value="KALY, KLWX, KBGM, KBOX, KBUF, KBTV, KCAR, KCTP, KCHS, KRLX, KILN, KCLE, KCAE, KGSP, KMHX, KOKX, KPHI, KPBZ, KGYX, KRAH, KRNK, KAKQ, KILM" />
<substitute key="PRsites" value="PHFO, PGUM, NSTU" />
<substitute key="SRsites"
value="KABQ, KAMA, KFFC, KEWX, KBMX, KBRO, KCRP, KEPZ, KFWD, KHGX, KHUN, KJAN, KJAX, KKEY, KMRX, KLCH, KLZK, KLUB, KMLB, KMEG, KMFL, KMAF, KMOB, KOHX, KLIX, KOUN, KSJT, KSHV, KTAE, KTBW, KTSA" />
<substitute key="WRsites"
value="KBYZ, KBOI, KLKN, KEKA, KFGZ, KGGW, KTFX, KVEF, KLOX, KMFR, KMSO, KPDT, KPSR, KPIH, KPQR, KREV, KSTO, KSLC, KSGX, KMTR, KHNX, KSEW, KOTX, KTWC" />
<substitute key="ALLsites"
value="KABQ, KABR, KAKQ, KALY, KAMA, KAPX, KARX, KBGM, KBIS, KBMX, KBOI, KBOU, KBOX, KBRO, KBTV, KBUF, KBYZ, KCAE, KCAR, KCHS, KCLE, KCRP, KCTP, KCYS, KDDC, KDLH, KDMX, KDTX, KDVN, KEAX, KEKA, KEPZ, KEWX, KFFC, KFGF, KFGZ, KFSD, KFWD, KGGW, KGID, KGJT, KGLD, KGRB, KGRR, KGSP, KGYX, KHGX, KHNX, KHUN, KICT, KILM, KILN, KILX, KIND, KIWX, KJAN, KJAX, KJKL, KKEY, KLBF, KLCH, KLIX, KLKN, KLMK, KLOT, KLOX, KLSX, KLUB, KLWX, KLZK, KMAF, KMEG, KMFL, KMFR, KMHX, KMKX, KMLB, KMOB, KMPX, KMQT, KMRX, KMSO, KMTR, KOAX, KOHX, KOKX, KOTX, KOUN, KPAH, KPBZ, KPDT, KPHI, KPIH, KPQR, KPSR, KPUB, KRAH, KREV, KRIW, KRLX, KRNK, KSEW, KSGF, KSGX, KSHV, KSJT, KSLC, KSTO, KTAE, KTBW, KTFX, KTOP, KTSA, KTWC, KUNR, KVEF, PAFC, PAFG, PAJK, PGUM, PHFO, TJSJ, NSTU" />
</include>
</menuContributionFile>
' >> $f.tmp
mv -f ${f}.tmp $f
chown awips:fxalpha $f; chmod 664 $f
done

View file

@ -3229,6 +3229,7 @@ D2DDBVERSIONS = db.D2DDBVERSIONS
D2DAccumulativeElements = db.D2DAccumulativeElements D2DAccumulativeElements = db.D2DAccumulativeElements
INITMODULES = db.INITMODULES INITMODULES = db.INITMODULES
INITSKIPS = db.INITSKIPS INITSKIPS = db.INITSKIPS
OFFICIALDBS=list(modelDict['Fcst']['Parms'])
# Create Practice and test databases from Fcst # Create Practice and test databases from Fcst
DATABASES.append((Official, modelDict['Fcst']['Parms'])), DATABASES.append((Official, modelDict['Fcst']['Parms'])),

View file

@ -29,7 +29,7 @@ class GFSLAMPGridForecaster(Forecaster):
def calcSky(self, tcc_SFC): def calcSky(self, tcc_SFC):
return clip(tcc_SFC, 0, 100) return clip(tcc_SFC, 0, 100)
del calcWind(self, wd_FHAG10, ws_FHAG10): def calcWind(self, wd_FHAG10, ws_FHAG10):
spd = self.convertMsecToKts(ws_FHAG10) spd = self.convertMsecToKts(ws_FHAG10)
dir = wd_FHAG10 dir = wd_FHAG10
return (spd, dir) return (spd, dir)

View file

@ -108,7 +108,9 @@ import com.vividsolutions.jts.geom.Polygon;
* Aug 08, 2015 4722 dhladky Simplified processing by data type. * Aug 08, 2015 4722 dhladky Simplified processing by data type.
* Aug 26, 2015 4777 dhladky Fixed bug in DPR accumulations. * Aug 26, 2015 4777 dhladky Fixed bug in DPR accumulations.
* Sep 28, 2015 4756 dhladky Multiple Guidance upgrades. * Sep 28, 2015 4756 dhladky Multiple Guidance upgrades.
* Feb 04, 2016 5311 dhladky Bug in creation of source bins fixed.
* </pre> * </pre>
*
* @author dhladky * @author dhladky
* @version 1 * @version 1
*/ */
@ -177,7 +179,7 @@ public class FFMPProcessor {
private static final String sourceBinTaskName = "FFMP Source bin"; private static final String sourceBinTaskName = "FFMP Source bin";
private boolean isFFTI = false; private boolean isFFTI = false;
private List<String> fftiAttribute = new ArrayList<String>(); private List<String> fftiAttribute = new ArrayList<String>();
private FFTISourceXML fftiSource = null; private FFTISourceXML fftiSource = null;
@ -212,7 +214,7 @@ public class FFMPProcessor {
setFFTI(); setFFTI();
// setup data files, source access, times // setup data files, source access, times
FFMPSourceConfigurationManager.DATA_TYPE type = configureSource(); FFMPSourceConfigurationManager.DATA_TYPE type = configureSource();
if (source.getSourceType().equals( if (source.getSourceType().equals(
FFMPSourceConfigurationManager.SOURCE_TYPE.GUIDANCE FFMPSourceConfigurationManager.SOURCE_TYPE.GUIDANCE
.getSourceType())) { .getSourceType())) {
@ -232,14 +234,16 @@ public class FFMPProcessor {
return ffmpRec; return ffmpRec;
} }
/** /**
* Configures the data sent to FFMP for processing into the correct type. * Configures the data sent to FFMP for processing into the correct type.
*
* @return * @return
* @throws Exception * @throws Exception
*/ */
private FFMPSourceConfigurationManager.DATA_TYPE configureSource() throws Exception { private FFMPSourceConfigurationManager.DATA_TYPE configureSource()
throws Exception {
FFMPSourceConfigurationManager.DATA_TYPE type = FFMPSourceConfigurationManager FFMPSourceConfigurationManager.DATA_TYPE type = FFMPSourceConfigurationManager
.getInstance().getDataType(source.getDataType()); .getInstance().getDataType(source.getDataType());
@ -252,8 +256,8 @@ public class FFMPProcessor {
if (radarRec.getMnemonic().equals("DHR")) { if (radarRec.getMnemonic().equals("DHR")) {
dhrMap = RadarRecordUtil.getDHRValues(radarRec); dhrMap = RadarRecordUtil.getDHRValues(radarRec);
statusHandler.handle(Priority.INFO, "DHR Bias: " statusHandler.handle(Priority.INFO,
+ dhrMap.get(DHRValues.BIAS_TO_USE)); "DHR Bias: " + dhrMap.get(DHRValues.BIAS_TO_USE));
statusHandler.handle(Priority.INFO, "DHR HailCap: " statusHandler.handle(Priority.INFO, "DHR HailCap: "
+ dhrMap.get(DHRValues.MAXPRECIPRATEALLOW)); + dhrMap.get(DHRValues.MAXPRECIPRATEALLOW));
} }
@ -265,8 +269,8 @@ public class FFMPProcessor {
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) { } else if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) {
try { try {
xmrg = (XmrgFile) config.getSourceData( xmrg = (XmrgFile) config.getSourceData(source.getSourceName())
source.getSourceName()).get(dataKey); .get(dataKey);
xmrgData = getXMRGData(); xmrgData = getXMRGData();
ffmpRec.setMetaData(xmrg.getFile().getName()); ffmpRec.setMetaData(xmrg.getFile().getName());
} catch (Exception e) { } catch (Exception e) {
@ -291,11 +295,11 @@ public class FFMPProcessor {
recdate = formatter.parse(dateString); recdate = formatter.parse(dateString);
} else { } else {
statusHandler.handle(Priority.ERROR, "Source: " statusHandler.handle(Priority.ERROR,
+ ffmpRec.getSourceName() + " sitekey: " "Source: " + ffmpRec.getSourceName() + " sitekey: "
+ siteKey + " File: " + siteKey + " File: "
+ xmrg.getFile().getName() + xmrg.getFile().getName()
+ " : Invalid date header"); + " : Invalid date header");
} }
} }
@ -336,7 +340,8 @@ public class FFMPProcessor {
* *
* @throws Exception * @throws Exception
*/ */
private void processSource(FFMPSourceConfigurationManager.DATA_TYPE type) throws Exception { private void processSource(FFMPSourceConfigurationManager.DATA_TYPE type)
throws Exception {
// process source // process source
try { try {
// process each domain separately, but within the same URI/HDF5 // process each domain separately, but within the same URI/HDF5
@ -358,10 +363,10 @@ public class FFMPProcessor {
sbl = null; sbl = null;
if (type == FFMPSourceConfigurationManager.DATA_TYPE.RADAR) { if (type == FFMPSourceConfigurationManager.DATA_TYPE.RADAR) {
// if bin list dosen't exist create it for future /**
// use * if bin list dosen't exist create it for future
// when * use when running
// running */
this.sourceId = getSourceBinNaming(source) + "-" this.sourceId = getSourceBinNaming(source) + "-"
+ domain.getCwa() + "-" + dataKey; + domain.getCwa() + "-" + dataKey;
@ -377,16 +382,21 @@ public class FFMPProcessor {
.getRawGeometries(dataKey, .getRawGeometries(dataKey,
domain.getCwa()); domain.getCwa());
} }
//DR15684 // DR15684
try { try {
sbl = (new RadarSBLGenerator(config) sbl = (new RadarSBLGenerator(config)
.generate(sourceId, .generate(sourceId,
map.keySet(), map.keySet(),
cwaGeometries, radarRec)); cwaGeometries,
radarRec));
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.WARN, "Caught an Exception while generating Source Bin List"); statusHandler
.handle(Priority.WARN,
"Caught an Exception while generating Source Bin List");
if (!checkLockStatus()) { if (!checkLockStatus()) {
ClusterLockUtils.unlock(sourceBinTaskName, sourceId); ClusterLockUtils.unlock(
sourceBinTaskName,
sourceId);
} }
} }
if (sbl != null) { if (sbl != null) {
@ -403,12 +413,12 @@ public class FFMPProcessor {
return; return;
} }
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) { } else if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) {
// all the HPE sources use an HRAP grid so, create /**
// it only once * all the HPE sources use an HRAP grid so, create
this.sourceId = getSourceBinNaming(source) * it only once.
+ "-" */
+ domain.getCwa() this.sourceId = getSourceBinNaming(source) + "-"
+ "-" + dataKey; + domain.getCwa() + "-" + dataKey;
if (sourceId != null) { if (sourceId != null) {
if (generator.isExistingSourceBin(sourceId)) { if (generator.isExistingSourceBin(sourceId)) {
@ -428,10 +438,10 @@ public class FFMPProcessor {
return; return;
} }
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.PDO) { } else if (type == FFMPSourceConfigurationManager.DATA_TYPE.PDO) {
// if bin list dosen't exist create it for future /**
// use * if bin list dosen't exist create it for future
// when * use when running
// running */
this.sourceId = getSourceBinNaming(source) + "-" this.sourceId = getSourceBinNaming(source) + "-"
+ domain.getCwa() + "-" + dataKey; + domain.getCwa() + "-" + dataKey;
@ -453,10 +463,10 @@ public class FFMPProcessor {
return; return;
} }
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.GRID) { } else if (type == FFMPSourceConfigurationManager.DATA_TYPE.GRID) {
// if bin list dosen't exist create it for future /**
// use * if bin list dosen't exist create it for future
// when * use when running
// running */
this.sourceId = getSourceBinNaming(source) + "-" this.sourceId = getSourceBinNaming(source) + "-"
+ domain.getCwa() + "-" + dataKey; + domain.getCwa() + "-" + dataKey;
@ -478,51 +488,43 @@ public class FFMPProcessor {
return; return;
} }
} }
if (!isSBL && (sbl != null)) { for (Long key : map.keySet()) {
generator.setSourceBinList(sbl);
FFMPBasin basin = getBasin(key);
Date date = null;
Float val = null;
if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) {
date = xmrg.getHeader().getValidDate();
val = processXMRG(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.RADAR) {
date = radarRec.getDataTime().getRefTime();
val = processRADAR(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.PDO) {
date = imp.getDataTime().getRefTime();
val = processPDO(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.GRID) {
date = gribRec.getDataTime().getRefTime();
val = processGrib(key, domain.getCwa());
}
if (val != null && date != null) {
basin.setValue(date, val);
}
} }
if (sourceId != null && !sbl.getSourceMap().isEmpty()) { // write new source bins if necessary
for (Long key : map.keySet()) { if (!isSBL && sbl != null
&& !sbl.getSourceMap().isEmpty()) {
FFMPBasin basin = getBasin(key); generator.setSourceBinList(sbl);
Date date = null;
Float val = null;
if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) {
date = xmrg.getHeader().getValidDate();
val = processXMRG(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.RADAR) {
date = radarRec.getDataTime().getRefTime();
val = processRADAR(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.PDO) {
date = imp.getDataTime().getRefTime();
val = processPDO(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.GRID) {
date = gribRec.getDataTime().getRefTime();
val = processGrib(key, domain.getCwa());
}
if (val != null && date != null) {
basin.setValue(date, val);
}
}
} else {
statusHandler
.warn("No data overlap with this source! "
+ source.getSourceName()
+ " site: " + siteKey
+ " dataKey: " + dataKey);
ffmpRec = null;
return;
} }
} else { } else {
if (ffmpRec != null) { if (ffmpRec != null) {
statusHandler.handle(Priority.DEBUG, "Source: " statusHandler.handle(Priority.DEBUG, "Source: "
+ ffmpRec.getSourceName() + " sitekey: " + ffmpRec.getSourceName() + " sitekey: "
+ siteKey + " domain: " + domain.getCwa() + siteKey + " domain: " + domain.getCwa()
+ " : Data outside of domain"); + " : Data outside of domain");
} }
} }
@ -552,11 +554,12 @@ public class FFMPProcessor {
* *
* @throws Exception * @throws Exception
*/ */
private void processGuidances(FFMPSourceConfigurationManager.DATA_TYPE type) throws Exception { private void processGuidances(FFMPSourceConfigurationManager.DATA_TYPE type)
throws Exception {
// process Guidance sources // process Guidance sources
try { try {
// over rides the date setting. // over rides the date setting.
Date recdate = ffmpRec.getDataTime().getRefTime(); Date recdate = ffmpRec.getDataTime().getRefTime();
// process each domain separately, but within the same URI/HDF5 // process each domain separately, but within the same URI/HDF5
// named by primary domain // named by primary domain
@ -584,9 +587,10 @@ public class FFMPProcessor {
if (sourceId != null) { if (sourceId != null) {
isSBL = false; isSBL = false;
sbl = null; sbl = null;
// if bin list dosen't exist /**
// create it for future use * if bin list dosen't exist create it for
// when running * future use when running
*/
if (generator.isExistingSourceBin(sourceId)) { if (generator.isExistingSourceBin(sourceId)) {
sbl = generator.getSourceBinList(sourceId); sbl = generator.getSourceBinList(sourceId);
isSBL = true; isSBL = true;
@ -604,42 +608,36 @@ public class FFMPProcessor {
return; return;
} }
if (!isSBL && (sbl != null)) { for (Long key : map.keySet()) {
FFMPBasin basin = getBasin(key);
float val = 0.0f;
/**
* Cover other types just in case the 0.1% of
* non RFCFFG Gridded data shows up.
*/
if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) {
val = processXMRG(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.RADAR) {
val = processRADAR(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.PDO) {
val = processPDO(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.GRID) {
val = processGrib(key, domain.getCwa());
}
if (basin != null) {
setBasin(basin, val);
}
}
// write new source bins if necessary
if (!isSBL && sbl != null
&& !sbl.getSourceMap().isEmpty()) {
generator.setSourceBinList(sbl); generator.setSourceBinList(sbl);
} }
if (!sbl.getSourceMap().isEmpty()) {
for (Long key : map.keySet()) {
FFMPBasin basin = getBasin(key);
float val = 0.0f;
// Cover other types just in case the 0.1%
// of non RFCFFG shows up.
if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) {
val = processXMRG(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.RADAR) {
val = processRADAR(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.PDO) {
val = processPDO(key, domain.getCwa());
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.GRID) {
val = processGrib(key, domain.getCwa());
}
if (basin != null) {
setBasin(basin, val);
}
}
} else {
ffmpRec = null;
statusHandler
.warn("No data overlap with this source! "
+ source.getSourceName()
+ " site: "
+ siteKey
+ " dataKey: " + dataKey);
return;
}
} else { } else {
statusHandler.handle(Priority.INFO, "Source: " statusHandler.handle(Priority.INFO, "Source: "
+ ffmpRec.getSourceName() + " sitekey: " + ffmpRec.getSourceName() + " sitekey: "
@ -677,12 +675,12 @@ public class FFMPProcessor {
+ source.getDisplayName(); + source.getDisplayName();
} }
Date backDate = new Date(ffmpRec.getDataTime().getRefTime() Date backDate = new Date(
.getTime()-(FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR)); ffmpRec.getDataTime().getRefTime().getTime()
- (FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR));
FFMPDataContainer ffgContainer = generator FFMPDataContainer ffgContainer = generator
.getFFMPDataContainer(sourceNameString, .getFFMPDataContainer(sourceNameString, backDate);
backDate);
if (ffgContainer != null if (ffgContainer != null
&& ffgContainer.containsKey(source.getSourceName())) { && ffgContainer.containsKey(source.getSourceName())) {
@ -695,12 +693,11 @@ public class FFMPProcessor {
.getRefTime().getTime() .getRefTime().getTime()
- previousDate.getTime(); - previousDate.getTime();
// used reverse logic from AWIPS I code here, /**
// instead of * used reverse logic from AWIPS I code here,
// returning * instead of returning I switched the greater than
// I switched the greater than and less than so it * and less than so it will process
// will */
// process
if (guidFrequency < (FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR) if (guidFrequency < (FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR)
&& guidFrequency >= (TimeUtil.MILLIS_PER_HOUR)) { && guidFrequency >= (TimeUtil.MILLIS_PER_HOUR)) {
@ -720,10 +717,9 @@ public class FFMPProcessor {
FFMPInterpolatedGuidanceDelay figd = new FFMPInterpolatedGuidanceDelay( FFMPInterpolatedGuidanceDelay figd = new FFMPInterpolatedGuidanceDelay(
siteKey, guidFrequency, source, siteKey, guidFrequency, source,
qpeSource, previousDate, recdate, qpeSource, previousDate, recdate,
generator, generator, ffgContainer.getBasinData(),
ffgContainer.getBasinData(),
ffmpRec); ffmpRec);
boolean delayGuidance = figd boolean delayGuidance = figd
.calculateDelayedGuidance(); .calculateDelayedGuidance();
// sets the new data time for the record // sets the new data time for the record
@ -752,8 +748,9 @@ public class FFMPProcessor {
/** /**
* Process the Virtual Gage Basins * Process the Virtual Gage Basins
*/ */
private void processVirtualGageBasins(FFMPSourceConfigurationManager.DATA_TYPE type) { private void processVirtualGageBasins(
FFMPSourceConfigurationManager.DATA_TYPE type) {
// process each domain separately, but within the same URI/HDF5 // process each domain separately, but within the same URI/HDF5
// named by primary domain // named by primary domain
for (DomainXML domain : template.getDomains()) { for (DomainXML domain : template.getDomains()) {
@ -794,10 +791,12 @@ public class FFMPProcessor {
coor = rc.asGridCell(imp.getGridGeometry(), coor = rc.asGridCell(imp.getGridGeometry(),
PixelInCell.CELL_CENTER); PixelInCell.CELL_CENTER);
} catch (TransformException e) { } catch (TransformException e) {
statusHandler.error("VGB PDO transform error!", e); statusHandler.error("VGB PDO transform error!",
e);
continue; continue;
} catch (FactoryException e) { } catch (FactoryException e) {
statusHandler.error("VGB PDO factory error!", e); statusHandler
.error("VGB PDO factory error!", e);
continue; continue;
} }
val = processPDO(coor, 1.0); val = processPDO(coor, 1.0);
@ -809,16 +808,18 @@ public class FFMPProcessor {
coor = rc.asGridCell(getGridGeometry(), coor = rc.asGridCell(getGridGeometry(),
PixelInCell.CELL_CENTER); PixelInCell.CELL_CENTER);
} catch (TransformException e) { } catch (TransformException e) {
statusHandler.error("VGB Gridded transform error!", e); statusHandler.error(
"VGB Gridded transform error!", e);
continue; continue;
} catch (FactoryException e) { } catch (FactoryException e) {
statusHandler.error("VGB Gridded factory error!", e); statusHandler.error(
"VGB Gridded factory error!", e);
continue; continue;
} }
date = gribRec.getDataTime().getRefTime(); date = gribRec.getDataTime().getRefTime();
val = processGrib(coor, 1.0); val = processGrib(coor, 1.0);
} }
// Missing doesn't work well with Virtual Gage's // Missing doesn't work well with Virtual Gage's
if (val == FFMPUtils.MISSING) { if (val == FFMPUtils.MISSING) {
val = 0.0f; val = 0.0f;
@ -831,7 +832,7 @@ public class FFMPProcessor {
} catch (Exception e) { } catch (Exception e) {
ffmpRec = null; ffmpRec = null;
statusHandler.error("Unable to process VGB: "+type, e); statusHandler.error("Unable to process VGB: " + type, e);
} }
} }
} }
@ -872,8 +873,8 @@ public class FFMPProcessor {
*/ */
private FFMPVirtualGageBasin getVirtualBasin(String lid, Long pfaf, private FFMPVirtualGageBasin getVirtualBasin(String lid, Long pfaf,
String huc) { String huc) {
FFMPVirtualGageBasin basin = (FFMPVirtualGageBasin) getBasinData() FFMPVirtualGageBasin basin = (FFMPVirtualGageBasin) getBasinData().get(
.get(pfaf); pfaf);
if (basin == null) { if (basin == null) {
basin = new FFMPVirtualGageBasin(lid, pfaf, false); basin = new FFMPVirtualGageBasin(lid, pfaf, false);
getBasinData().put(pfaf, basin); getBasinData().put(pfaf, basin);
@ -1167,7 +1168,8 @@ public class FFMPProcessor {
for (int j = 0; j < dataVals.length; j++) { for (int j = 0; j < dataVals.length; j++) {
try { try {
val += ScanUtils.getZRvalue2(dataVals[j],//fval,// DR 13083 val += ScanUtils.getZRvalue2(
dataVals[j],// fval,// DR 13083
dhrMap.get(DHRValues.ZRMULTCOEFF), dhrMap.get(DHRValues.ZRMULTCOEFF),
dhrMap.get(DHRValues.MAXPRECIPRATEALLOW), dhrMap.get(DHRValues.MAXPRECIPRATEALLOW),
dhrMap.get(DHRValues.ZRPOWERCOEFF), dhrMap.get(DHRValues.ZRPOWERCOEFF),
@ -1235,10 +1237,12 @@ public class FFMPProcessor {
center = rc.asGridCell(getGridGeometry(), center = rc.asGridCell(getGridGeometry(),
PixelInCell.CELL_CENTER); PixelInCell.CELL_CENTER);
} catch (TransformException e) { } catch (TransformException e) {
statusHandler.handle(Priority.ERROR, "Error transforming pfaf! " +pfaf); statusHandler.handle(Priority.ERROR,
"Error transforming pfaf! " + pfaf);
throw new Exception(e); throw new Exception(e);
} catch (FactoryException e) { } catch (FactoryException e) {
statusHandler.handle(Priority.ERROR, "Error in geometry! " +pfaf); statusHandler.handle(Priority.ERROR, "Error in geometry! "
+ pfaf);
throw new Exception(e); throw new Exception(e);
} }
@ -1284,7 +1288,8 @@ public class FFMPProcessor {
} }
} }
// Sparse data conditions differ when acting as a GUIDANCE source or QPE/QPF // Sparse data conditions differ when acting as a GUIDANCE source or
// QPE/QPF
if (val == FFMPUtils.MISSING) { if (val == FFMPUtils.MISSING) {
if (source.getSourceType().equals( if (source.getSourceType().equals(
FFMPSourceConfigurationManager.SOURCE_TYPE.GUIDANCE FFMPSourceConfigurationManager.SOURCE_TYPE.GUIDANCE
@ -1293,12 +1298,12 @@ public class FFMPProcessor {
} else { } else {
return 0.0f; return 0.0f;
} }
} }
// don't waste time calculating, it's zero regardless. // don't waste time calculating, it's zero regardless.
if (val == 0.0f) { if (val == 0.0f) {
return val; return val;
} }
return (val / arealWeight); return (val / arealWeight);
} }
@ -1437,7 +1442,8 @@ public class FFMPProcessor {
gridCell = new Coordinate(x, y, 0.0); gridCell = new Coordinate(x, y, 0.0);
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.ERROR, "Unable translate lat lon coordinate! " +latLon); statusHandler.handle(Priority.ERROR,
"Unable translate lat lon coordinate! " + latLon);
} }
return gridCell; return gridCell;
} }
@ -1455,7 +1461,8 @@ public class FFMPProcessor {
Type.GRID_CORNER); Type.GRID_CORNER);
gridPoint = rc.asLatLon(); gridPoint = rc.asLatLon();
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.ERROR, "Unable translate grid coordinate! " +gridPoint); statusHandler.handle(Priority.ERROR,
"Unable translate grid coordinate! " + gridPoint);
} }
return gridPoint; return gridPoint;
} }
@ -1746,16 +1753,19 @@ public class FFMPProcessor {
SOURCE_TYPE.QPE.getSourceType())) { SOURCE_TYPE.QPE.getSourceType())) {
fftiSource = setting.getQpeSource(); fftiSource = setting.getQpeSource();
isFFTI = true; isFFTI = true;
fftiAttribute.add(setting.getAttribute().getAttributeName()); fftiAttribute.add(setting.getAttribute()
.getAttributeName());
} else if (source.getSourceType().equals( } else if (source.getSourceType().equals(
SOURCE_TYPE.QPF.getSourceType())) { SOURCE_TYPE.QPF.getSourceType())) {
fftiSource = setting.getQpfSource(); fftiSource = setting.getQpfSource();
isFFTI = true; isFFTI = true;
fftiAttribute.add(setting.getAttribute().getAttributeName()); fftiAttribute.add(setting.getAttribute()
.getAttributeName());
} else { } else {
fftiSource = setting.getGuidSource(); fftiSource = setting.getGuidSource();
isFFTI = true; isFFTI = true;
fftiAttribute.add(setting.getAttribute().getAttributeName()); fftiAttribute.add(setting.getAttribute()
.getAttributeName());
} }
} }
@ -1768,7 +1778,8 @@ public class FFMPProcessor {
.getDisplayName())) { .getDisplayName())) {
fftiSource = setting.getQpeSource(); fftiSource = setting.getQpeSource();
isFFTI = true; isFFTI = true;
fftiAttribute.add(setting.getAttribute().getAttributeName()); fftiAttribute.add(setting.getAttribute()
.getAttributeName());
} }
} }
} }
@ -1783,7 +1794,8 @@ public class FFMPProcessor {
fftiSource = setting.getQpfSource(); fftiSource = setting.getQpfSource();
isFFTI = true; isFFTI = true;
fftiAttribute.add(setting.getAttribute().getAttributeName()); fftiAttribute.add(setting.getAttribute()
.getAttributeName());
} }
} }
} }
@ -1809,9 +1821,10 @@ public class FFMPProcessor {
public FFTISourceXML getFFTISource() { public FFTISourceXML getFFTISource() {
return fftiSource; return fftiSource;
} }
/** /**
* Returns the FFTI attributes for this source * Returns the FFTI attributes for this source
*
* @return * @return
*/ */
public List<String> getAttributes() { public List<String> getAttributes() {
@ -1826,7 +1839,7 @@ public class FFMPProcessor {
public String getSourceID() { public String getSourceID() {
return sourceId; return sourceId;
} }
/** /**
* Log bad configuration message and throw Configuration Exception * Log bad configuration message and throw Configuration Exception
* *
@ -1876,23 +1889,25 @@ public class FFMPProcessor {
private short[][] getXMRGData() throws Exception { private short[][] getXMRGData() throws Exception {
String fileName = "MISSING"; String fileName = "MISSING";
if (xmrg.getFile() != null) { if (xmrg.getFile() != null) {
fileName = xmrg.getFile().getAbsolutePath(); fileName = xmrg.getFile().getAbsolutePath();
} }
this.extent = getExtents(source.getHrapGridFactor()); this.extent = getExtents(source.getHrapGridFactor());
setHRAPSubGrid(extent, source.getHrapGridFactor()); setHRAPSubGrid(extent, source.getHrapGridFactor());
if (xmrg.getHrapExtent() != null) { if (xmrg.getHrapExtent() != null) {
xmrgData = xmrg.getData(extent); xmrgData = xmrg.getData(extent);
} else { } else {
throw new MalformedDataException("The XMRG data is malformed or the file is non-readable. "+fileName); throw new MalformedDataException(
"The XMRG data is malformed or the file is non-readable. "
+ fileName);
} }
return xmrgData; return xmrgData;
} }
/** /**
* Gets the name used for the source bins produced by all sources. Some * Gets the name used for the source bins produced by all sources. Some
* sources have identical Grid/RADAR bins/etc So, It's more efficient to * sources have identical Grid/RADAR bins/etc So, It's more efficient to

View file

@ -54,6 +54,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* Jun 07, 2013 1981 mpduff Add user to OUPRequest. * Jun 07, 2013 1981 mpduff Add user to OUPRequest.
* Jun 18, 2013 2110 rferrel Modified to handle the new class RequestRouter.route * Jun 18, 2013 2110 rferrel Modified to handle the new class RequestRouter.route
* returns (SuccessfulExecution). * returns (SuccessfulExecution).
* Feb 11, 2016 16939 zhao Modified sendTaf() to ensure bbb is null for routine TAF
* *
* </pre> * </pre>
* *
@ -184,7 +185,9 @@ public class TafQueueManager implements Runnable {
oup.setUserDateTimeStamp(tstamp); oup.setUserDateTimeStamp(tstamp);
oup.setSource("AvnFPS"); oup.setSource("AvnFPS");
if (!bbb.equals("___")) { if (!bbb.equals("___")) {
oup.setWmoType(bbb); if (bbb.trim().length() == 3) {
oup.setWmoType(bbb);
}
} }
OUPRequest req = new OUPRequest(); OUPRequest req = new OUPRequest();

View file

@ -48,6 +48,10 @@
<isfalse value="${client.build}"/> <isfalse value="${client.build}"/>
</condition> </condition>
<condition property="deploy.nwps" value="yes">
<isfalse value="${client.build}"/>
</condition>
<condition property="deploy.svcBackup" value="yes"> <condition property="deploy.svcBackup" value="yes">
<and> <and>
<isfalse value="${client.build}"/> <isfalse value="${client.build}"/>
@ -72,8 +76,6 @@
<echo message="Updating ${gfe.suite.bin} with latest GFESuite tools" /> <echo message="Updating ${gfe.suite.bin} with latest GFESuite tools" />
<echo message="deploy.client=${deploy.client}" /> <echo message="deploy.client=${deploy.client}" />
<mkdir dir="${gfe.suite.bin}"/> <mkdir dir="${gfe.suite.bin}"/>
<mkdir dir="${gfe.suite.hti}"/>
<mkdir dir="${gfe.suite.nwps}"/>
<antcall target="-deploy.cli.common"/> <antcall target="-deploy.cli.common"/>
<antcall target="-deploy.hti"/> <antcall target="-deploy.hti"/>
<antcall target="-deploy.nwps"/> <antcall target="-deploy.nwps"/>
@ -101,15 +103,17 @@
<target name="-deploy.hti" if="deploy.hti" <target name="-deploy.hti" if="deploy.hti"
description="Deploys HTI software to a specific directory"> description="Deploys HTI software to a specific directory">
<!-- copy the CLI tools to the deploy directory --> <!-- copy the CLI tools to the deploy directory -->
<mkdir dir="${gfe.suite.hti}"/>
<echo message="Copying in HTI files" /> <echo message="Copying in HTI files" />
<copy todir="${gfe.suite.hti}" overwrite="true"> <copy todir="${gfe.suite.hti}" overwrite="true">
<fileset dir="${basedir}/hti"/> <fileset dir="${basedir}/hti"/>
</copy> </copy>
</target> </target>
<target name="-deploy.nwps" <target name="-deploy.nwps" if="deploy.nwps"
description="Deploys NWPS software to a specific directory"> description="Deploys NWPS software to a specific directory">
<!-- copy the CLI tools to the deploy directory --> <!-- copy the CLI tools to the deploy directory -->
<mkdir dir="${gfe.suite.nwps}"/>
<echo message="Copying in NWPS files" /> <echo message="Copying in NWPS files" />
<copy todir="${gfe.suite.nwps}" overwrite="true"> <copy todir="${gfe.suite.nwps}" overwrite="true">
<fileset dir="${basedir}/nwps"/> <fileset dir="${basedir}/nwps"/>

View file

@ -34,6 +34,7 @@ import com.vividsolutions.jts.geom.Geometry;
* -------------- ---------- ----------- -------------------------- * -------------- ---------- ----------- --------------------------
* July 17, 2015 Pwang Initial creation for STQ: Spot Request * July 17, 2015 Pwang Initial creation for STQ: Spot Request
* Data plugin * Data plugin
* Jan 21, 2016 18524 pwang Added the setter to avoid Archiver error
* *
* </pre> * </pre>
* *
@ -487,7 +488,15 @@ public class SpotRequestRecord extends PersistablePluginDataObject implements
public String getStqSymbol() { public String getStqSymbol() {
return stqSymbol; return stqSymbol;
} }
/**
* setStqSymbol (only for serialization / archive)
*
* @param stqSymbol
*/
public void setStqSymbol(String stqSymbol) {
this.stqSymbol = stqDispSymbol;
}
/** /**
* toString * toString

View file

@ -101,18 +101,20 @@ rm -rf ${RPM_BUILD_ROOT}
%defattr(775,awips,fxalpha,775) %defattr(775,awips,fxalpha,775)
%dir /awips2/GFESuite/hti %dir /awips2/GFESuite/hti
/awips2/GFESuite/hti/* /awips2/GFESuite/hti/*
%dir /awips2/GFESuite/nwps/bin
/awips2/GFESuite/nwps/bin/*
%dir /awips2/GFESuite/nwps/etc
/awips2/GFESuite/nwps/etc/*
%dir /awips2/GFESuite/nwps/domains
/awips2/GFESuite/nwps/domains/*
%defattr(755,awips,fxalpha,755) %defattr(755,awips,fxalpha,755)
%dir /awips2/GFESuite/bin %dir /awips2/GFESuite/bin
/awips2/GFESuite/bin/* /awips2/GFESuite/bin/*
%dir /awips2/GFESuite/hti/bin %dir /awips2/GFESuite/hti/bin
/awips2/GFESuite/hti/bin/* /awips2/GFESuite/hti/bin/*
%dir /awips2/GFESuite/nwps/bin
/awips2/GFESuite/nwps/bin/*
%defattr(755,awips,fxalpha,777) %defattr(755,awips,fxalpha,777)
%dir /awips2/GFESuite/hti/etc %dir /awips2/GFESuite/hti/etc
/awips2/GFESuite/hti/etc/* /awips2/GFESuite/hti/etc/*
%dir /awips2/GFESuite/nwps/domains
/awips2/GFESuite/nwps/domains/*
%defattr(644,awips,fxalpha,755) %defattr(644,awips,fxalpha,755)
%dir /awips2/GFESuite/bin/src %dir /awips2/GFESuite/bin/src
/awips2/GFESuite/bin/src/* /awips2/GFESuite/bin/src/*

View file

@ -169,6 +169,7 @@ cp ${_ldm_dir}/SOURCES/%{_ldm_src_tar} ${_ldm_dir}
#/bin/tar -xf %{_ldm_src_tar} \ #/bin/tar -xf %{_ldm_src_tar} \
# -C ${_ldm_dir} # -C ${_ldm_dir}
cd ${_ldm_dir} cd ${_ldm_dir}
mkdir -p ${_ldm_root_dir}/src
gunzip -c %{_ldm_src_tar} | pax -r '-s:/:/src/:' gunzip -c %{_ldm_src_tar} | pax -r '-s:/:/src/:'
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1