Merge branch 'omaha_16.2.1' into omaha_16.2.2
Former-commit-id: 27f7e431d04f99ec48723c71413e9633c0d1996e
This commit is contained in:
commit
4ba488bd0a
20 changed files with 345 additions and 204 deletions
|
@ -45,6 +45,8 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
* May 10, 2011 9059 rferrel Extended times outs on executes
|
||||
* 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()
|
||||
* Jan 21, 2016 18395 zhao Modified processData()
|
||||
* Jan 29, 2016 18396 zhao Modified objReceived()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -197,7 +199,7 @@ public class ClimateDataManager implements PyProcessListener {
|
|||
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;
|
||||
|
||||
Runnable run = new Runnable() {
|
||||
|
@ -207,9 +209,14 @@ public class ClimateDataManager implements PyProcessListener {
|
|||
PythonClimateDataProcess pythonScript = null;
|
||||
try {
|
||||
long t0 = System.currentTimeMillis();
|
||||
String ishDir = ClimateDataPython.getIshFilePath();
|
||||
pythonScript = ClimateDataPython.getClimateInterpreter();
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("stnPickle", stnPickle);
|
||||
args.put("append", append);
|
||||
args.put("sites", items);
|
||||
args.put("climateDir", ishDir);
|
||||
numSites = items.size();
|
||||
pythonScript.execute("process", args,
|
||||
ClimateDataManager.this, 6000 * numSites);
|
||||
long t1 = System.currentTimeMillis();
|
||||
|
@ -218,6 +225,9 @@ public class ClimateDataManager implements PyProcessListener {
|
|||
} catch (JepException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error retrieving climate data", e);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error retrieving climate data", e);
|
||||
} finally {
|
||||
if (pythonScript != null) {
|
||||
pythonScript.dispose();
|
||||
|
@ -437,6 +447,9 @@ public class ClimateDataManager implements PyProcessListener {
|
|||
.get("results");
|
||||
win.populateSiteInfoList(ident, list);
|
||||
win.assessBtn(true);
|
||||
win.scriptsBtn(false);
|
||||
win.processBtn(false);
|
||||
win.validateBtn(false);
|
||||
} else if (method.equals("updateMonitor")) {
|
||||
String msg = (String) returnMap.get("msg");
|
||||
win.updateMonitor(msg);
|
||||
|
|
|
@ -105,6 +105,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Jul 07, 2015 16907 zhao Changed 'ish-' to 'isd-'
|
||||
* Nov 30, 2015 4834 njensen Remove LocalizationOpFailedException
|
||||
* Jan 15, 2016 18482 zhao Add a "Usage" to "Help..."
|
||||
* Jan 21, 2016 18395 zhao Modified processData()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1111,7 +1112,7 @@ public class ClimateDataMenuDlg extends CaveSWTDialog {
|
|||
private void processData() {
|
||||
ClimateDataManager dataMgr = ClimateDataManager.getInstance();
|
||||
setWait(true);
|
||||
dataMgr.processData(appendRdo.getSelection(), this);
|
||||
dataMgr.processData(appendRdo.getSelection(), itemList, this);
|
||||
scriptsBtn(false);
|
||||
processBtn(false);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.eclipse.swt.widgets.Composite;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 28 FEB 2008 938 lvenable Initial creation
|
||||
* 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>
|
||||
*
|
||||
|
@ -270,9 +271,9 @@ public class CigVisByMonthCanvasComp extends CigVisCanvasComp {
|
|||
}
|
||||
|
||||
if (numHours == 1) {
|
||||
return Integer.toString(startHour);
|
||||
return String.format("%02d", startHour);
|
||||
} else {
|
||||
return String.format("%d-%d", startHour, endHour);
|
||||
return String.format("%02d-%02d", startHour, endHour);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.eclipse.swt.widgets.Composite;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 28 FEB 2008 938 lvenable Initial creation
|
||||
* 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>
|
||||
*
|
||||
|
@ -229,9 +230,9 @@ public class CigVisByWindDirCanvasComp extends CigVisCanvasComp {
|
|||
}
|
||||
|
||||
if (numHours == 1) {
|
||||
return Integer.toString(startHour);
|
||||
return String.format("%02d", startHour);
|
||||
} else {
|
||||
return String.format("%d-%d", startHour, endHour);
|
||||
return String.format("%02d-%02d", startHour, endHour);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import org.eclipse.swt.widgets.Composite;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 28 FEB 2008 938 lvenable Initial creation
|
||||
* 12 Aug 2013 #2256 lvenable Disposed of image when composite is disposed.
|
||||
* 29 JAN 2016 18439 zhao Modified 'months' (changed "null" to "Dec")
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -51,7 +52,7 @@ import org.eclipse.swt.widgets.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" };
|
||||
|
||||
protected final String[] elements = { "Visibility", "Ceiling",
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 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
|
||||
def process(queue, stnPickle):
|
||||
import ClimateDataUpdate
|
||||
cdupdate = ClimateDataUpdate.ClimateDataUpdate(queue, stnPickle)
|
||||
cdupdate.assessData(bypass = True)
|
||||
import cPickle as pickle
|
||||
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():
|
||||
# if mythread:
|
||||
# mythread.bypass = True
|
||||
|
@ -91,4 +98,4 @@ def reject(queue, stnPickle):
|
|||
def kill(queue, stnPickle) :
|
||||
import ClimateDataUpdate
|
||||
cdupdate = ClimateDataUpdate.ClimateDataUpdate(queue, stnPickle)
|
||||
cdupdate.kill()
|
||||
cdupdate.kill()
|
||||
|
|
|
@ -115,7 +115,7 @@ class Procedure (SmartScript.SmartScript):
|
|||
]
|
||||
|
||||
varDict = {}
|
||||
processVarList = ProcessVariableList.ProcessVariableList("Run_NWPS_Tom", variableList, varDict, None)
|
||||
processVarList = ProcessVariableList.ProcessVariableList("Run_NWPS", variableList, varDict, None)
|
||||
status = processVarList.status()
|
||||
if status != "OK":
|
||||
return
|
||||
|
@ -144,7 +144,7 @@ class Procedure (SmartScript.SmartScript):
|
|||
#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:
|
||||
# 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"}'
|
||||
# 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.
|
||||
|
|
|
@ -1043,9 +1043,9 @@ class ISC_Utility(SmartScript.SmartScript):
|
|||
#
|
||||
def _convertTimeRange(self, trName):
|
||||
if trName == "All Grids":
|
||||
curTime = time.gmtime()
|
||||
curTime = self.gmtime()
|
||||
startHour = curTime[3]
|
||||
timeRange = self.createTimeRange(startHour, 204)
|
||||
timeRange = self.createTimeRange(startHour, 204, mode="Zulu")
|
||||
#timeRange = TimeRange.allTimes()
|
||||
# timeRange = AFPS.TimeRange(AFPS.AbsTime(0),
|
||||
# AFPS.AbsTime_maxFutureTime())
|
||||
|
|
|
@ -2126,6 +2126,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements
|
|||
}
|
||||
|
||||
dialog.addDeletePoint(data);
|
||||
deleteList.add( getZoomOffset(selectedTraceId) + i );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ Require-Bundle: com.raytheon.uf.common.activetable,
|
|||
org.eclipse.jface.text,
|
||||
org.eclipse.ui,
|
||||
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
|
||||
Export-Package: com.raytheon.viz.texteditor,
|
||||
com.raytheon.viz.texteditor.alarmalert.dialogs,
|
||||
|
|
|
@ -19,19 +19,26 @@
|
|||
**/
|
||||
package com.raytheon.viz.texteditor.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.apache.commons.configuration.ConfigurationException;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.text.request.StdTextProductServerRequest;
|
||||
import com.raytheon.uf.common.site.SiteMap;
|
||||
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.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.localization.LocalizationManager;
|
||||
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.texteditor.msgs.IAviationObserver;
|
||||
|
||||
|
@ -47,7 +54,7 @@ import com.raytheon.viz.texteditor.msgs.IAviationObserver;
|
|||
* 04/14/2010 4734 mhuang Corrected StdTextProduct import dependency
|
||||
* 05/10/2010 2187 cjeanbap Added StdTextProductFactory functionality.
|
||||
* 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>
|
||||
*
|
||||
|
@ -59,6 +66,8 @@ public class AviationTextUtility implements IAviationObserver {
|
|||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(AviationTextUtility.class);
|
||||
|
||||
private static final String LINE_BREAK = "\n";
|
||||
|
||||
/**
|
||||
* Method to save a temporary working version of a TAF bulletin to the text
|
||||
* database.
|
||||
|
@ -68,10 +77,13 @@ public class AviationTextUtility implements IAviationObserver {
|
|||
*/
|
||||
@Override
|
||||
public void saveTafBulletin(String tmpStr) {
|
||||
// Convert the text to uppercase
|
||||
// Convert the text to upper case
|
||||
tmpStr = tmpStr.toUpperCase();
|
||||
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.
|
||||
String siteNode = LocalizationManager.getInstance().getCurrentSite();
|
||||
|
||||
|
@ -80,30 +92,48 @@ public class AviationTextUtility implements IAviationObserver {
|
|||
if ((siteName == null) || (siteName.equals(""))) {
|
||||
siteName = "CCCC";
|
||||
}
|
||||
|
||||
String siteWmoId = "FTUS43";
|
||||
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);
|
||||
// Set the WMOID based on configuration file for current localization.
|
||||
String siteWmoId = "";
|
||||
try {
|
||||
ThriftClient.sendRequest(request);
|
||||
} catch (VizException e1) {
|
||||
statusHandler.handle(Priority.PROBLEM, "Error retrieving metadata",
|
||||
e1);
|
||||
ITafSiteConfig config = TafSiteConfigFactory.getInstance();
|
||||
TafSiteData siteData = config.getSite(siteID);
|
||||
siteWmoId = siteData.wmo.split(" ")[0];
|
||||
} 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() {
|
||||
Date now = SimulatedTime.getSystemTime().getTime();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("ddHHmm");
|
||||
|
@ -111,6 +141,16 @@ public class AviationTextUtility implements IAviationObserver {
|
|||
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,
|
||||
String dateId, String separator, String nnnxxx) {
|
||||
return wmoId + " " + siteId + " " + dateId + separator + nnnxxx;
|
||||
|
|
39
deltaScripts/16.2.1/DR18496/updateScalesAndWarnings.sh
Executable file
39
deltaScripts/16.2.1/DR18496/updateScalesAndWarnings.sh
Executable 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
|
|
@ -3229,6 +3229,7 @@ D2DDBVERSIONS = db.D2DDBVERSIONS
|
|||
D2DAccumulativeElements = db.D2DAccumulativeElements
|
||||
INITMODULES = db.INITMODULES
|
||||
INITSKIPS = db.INITSKIPS
|
||||
OFFICIALDBS=list(modelDict['Fcst']['Parms'])
|
||||
|
||||
# Create Practice and test databases from Fcst
|
||||
DATABASES.append((Official, modelDict['Fcst']['Parms'])),
|
||||
|
|
|
@ -29,7 +29,7 @@ class GFSLAMPGridForecaster(Forecaster):
|
|||
def calcSky(self, tcc_SFC):
|
||||
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)
|
||||
dir = wd_FHAG10
|
||||
return (spd, dir)
|
||||
|
|
|
@ -108,7 +108,9 @@ import com.vividsolutions.jts.geom.Polygon;
|
|||
* Aug 08, 2015 4722 dhladky Simplified processing by data type.
|
||||
* Aug 26, 2015 4777 dhladky Fixed bug in DPR accumulations.
|
||||
* Sep 28, 2015 4756 dhladky Multiple Guidance upgrades.
|
||||
* Feb 04, 2016 5311 dhladky Bug in creation of source bins fixed.
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1
|
||||
*/
|
||||
|
@ -177,7 +179,7 @@ public class FFMPProcessor {
|
|||
private static final String sourceBinTaskName = "FFMP Source bin";
|
||||
|
||||
private boolean isFFTI = false;
|
||||
|
||||
|
||||
private List<String> fftiAttribute = new ArrayList<String>();
|
||||
|
||||
private FFTISourceXML fftiSource = null;
|
||||
|
@ -212,7 +214,7 @@ public class FFMPProcessor {
|
|||
setFFTI();
|
||||
// setup data files, source access, times
|
||||
FFMPSourceConfigurationManager.DATA_TYPE type = configureSource();
|
||||
|
||||
|
||||
if (source.getSourceType().equals(
|
||||
FFMPSourceConfigurationManager.SOURCE_TYPE.GUIDANCE
|
||||
.getSourceType())) {
|
||||
|
@ -232,14 +234,16 @@ public class FFMPProcessor {
|
|||
|
||||
return ffmpRec;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Configures the data sent to FFMP for processing into the correct type.
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
private FFMPSourceConfigurationManager.DATA_TYPE configureSource() throws Exception {
|
||||
|
||||
private FFMPSourceConfigurationManager.DATA_TYPE configureSource()
|
||||
throws Exception {
|
||||
|
||||
FFMPSourceConfigurationManager.DATA_TYPE type = FFMPSourceConfigurationManager
|
||||
.getInstance().getDataType(source.getDataType());
|
||||
|
||||
|
@ -252,8 +256,8 @@ public class FFMPProcessor {
|
|||
|
||||
if (radarRec.getMnemonic().equals("DHR")) {
|
||||
dhrMap = RadarRecordUtil.getDHRValues(radarRec);
|
||||
statusHandler.handle(Priority.INFO, "DHR Bias: "
|
||||
+ dhrMap.get(DHRValues.BIAS_TO_USE));
|
||||
statusHandler.handle(Priority.INFO,
|
||||
"DHR Bias: " + dhrMap.get(DHRValues.BIAS_TO_USE));
|
||||
statusHandler.handle(Priority.INFO, "DHR HailCap: "
|
||||
+ dhrMap.get(DHRValues.MAXPRECIPRATEALLOW));
|
||||
}
|
||||
|
@ -265,8 +269,8 @@ public class FFMPProcessor {
|
|||
|
||||
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) {
|
||||
try {
|
||||
xmrg = (XmrgFile) config.getSourceData(
|
||||
source.getSourceName()).get(dataKey);
|
||||
xmrg = (XmrgFile) config.getSourceData(source.getSourceName())
|
||||
.get(dataKey);
|
||||
xmrgData = getXMRGData();
|
||||
ffmpRec.setMetaData(xmrg.getFile().getName());
|
||||
} catch (Exception e) {
|
||||
|
@ -291,11 +295,11 @@ public class FFMPProcessor {
|
|||
|
||||
recdate = formatter.parse(dateString);
|
||||
} else {
|
||||
statusHandler.handle(Priority.ERROR, "Source: "
|
||||
+ ffmpRec.getSourceName() + " sitekey: "
|
||||
+ siteKey + " File: "
|
||||
+ xmrg.getFile().getName()
|
||||
+ " : Invalid date header");
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Source: " + ffmpRec.getSourceName() + " sitekey: "
|
||||
+ siteKey + " File: "
|
||||
+ xmrg.getFile().getName()
|
||||
+ " : Invalid date header");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,7 +340,8 @@ public class FFMPProcessor {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
private void processSource(FFMPSourceConfigurationManager.DATA_TYPE type) throws Exception {
|
||||
private void processSource(FFMPSourceConfigurationManager.DATA_TYPE type)
|
||||
throws Exception {
|
||||
// process source
|
||||
try {
|
||||
// process each domain separately, but within the same URI/HDF5
|
||||
|
@ -358,10 +363,10 @@ public class FFMPProcessor {
|
|||
sbl = null;
|
||||
|
||||
if (type == FFMPSourceConfigurationManager.DATA_TYPE.RADAR) {
|
||||
// if bin list dosen't exist create it for future
|
||||
// use
|
||||
// when
|
||||
// running
|
||||
/**
|
||||
* if bin list dosen't exist create it for future
|
||||
* use when running
|
||||
*/
|
||||
this.sourceId = getSourceBinNaming(source) + "-"
|
||||
+ domain.getCwa() + "-" + dataKey;
|
||||
|
||||
|
@ -377,16 +382,21 @@ public class FFMPProcessor {
|
|||
.getRawGeometries(dataKey,
|
||||
domain.getCwa());
|
||||
}
|
||||
//DR15684
|
||||
// DR15684
|
||||
try {
|
||||
sbl = (new RadarSBLGenerator(config)
|
||||
.generate(sourceId,
|
||||
map.keySet(),
|
||||
cwaGeometries, radarRec));
|
||||
cwaGeometries,
|
||||
radarRec));
|
||||
} 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()) {
|
||||
ClusterLockUtils.unlock(sourceBinTaskName, sourceId);
|
||||
ClusterLockUtils.unlock(
|
||||
sourceBinTaskName,
|
||||
sourceId);
|
||||
}
|
||||
}
|
||||
if (sbl != null) {
|
||||
|
@ -403,12 +413,12 @@ public class FFMPProcessor {
|
|||
return;
|
||||
}
|
||||
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.XMRG) {
|
||||
// all the HPE sources use an HRAP grid so, create
|
||||
// it only once
|
||||
this.sourceId = getSourceBinNaming(source)
|
||||
+ "-"
|
||||
+ domain.getCwa()
|
||||
+ "-" + dataKey;
|
||||
/**
|
||||
* all the HPE sources use an HRAP grid so, create
|
||||
* it only once.
|
||||
*/
|
||||
this.sourceId = getSourceBinNaming(source) + "-"
|
||||
+ domain.getCwa() + "-" + dataKey;
|
||||
|
||||
if (sourceId != null) {
|
||||
if (generator.isExistingSourceBin(sourceId)) {
|
||||
|
@ -428,10 +438,10 @@ public class FFMPProcessor {
|
|||
return;
|
||||
}
|
||||
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.PDO) {
|
||||
// if bin list dosen't exist create it for future
|
||||
// use
|
||||
// when
|
||||
// running
|
||||
/**
|
||||
* if bin list dosen't exist create it for future
|
||||
* use when running
|
||||
*/
|
||||
this.sourceId = getSourceBinNaming(source) + "-"
|
||||
+ domain.getCwa() + "-" + dataKey;
|
||||
|
||||
|
@ -453,10 +463,10 @@ public class FFMPProcessor {
|
|||
return;
|
||||
}
|
||||
} else if (type == FFMPSourceConfigurationManager.DATA_TYPE.GRID) {
|
||||
// if bin list dosen't exist create it for future
|
||||
// use
|
||||
// when
|
||||
// running
|
||||
/**
|
||||
* if bin list dosen't exist create it for future
|
||||
* use when running
|
||||
*/
|
||||
this.sourceId = getSourceBinNaming(source) + "-"
|
||||
+ domain.getCwa() + "-" + dataKey;
|
||||
|
||||
|
@ -478,51 +488,43 @@ public class FFMPProcessor {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isSBL && (sbl != null)) {
|
||||
generator.setSourceBinList(sbl);
|
||||
|
||||
for (Long key : map.keySet()) {
|
||||
|
||||
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()) {
|
||||
for (Long key : map.keySet()) {
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
statusHandler
|
||||
.warn("No data overlap with this source! "
|
||||
+ source.getSourceName()
|
||||
+ " site: " + siteKey
|
||||
+ " dataKey: " + dataKey);
|
||||
ffmpRec = null;
|
||||
return;
|
||||
// write new source bins if necessary
|
||||
if (!isSBL && sbl != null
|
||||
&& !sbl.getSourceMap().isEmpty()) {
|
||||
generator.setSourceBinList(sbl);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (ffmpRec != null) {
|
||||
statusHandler.handle(Priority.DEBUG, "Source: "
|
||||
+ ffmpRec.getSourceName() + " sitekey: "
|
||||
+ siteKey + " domain: " + domain.getCwa()
|
||||
+ siteKey + " domain: " + domain.getCwa()
|
||||
+ " : Data outside of domain");
|
||||
}
|
||||
}
|
||||
|
@ -552,11 +554,12 @@ public class FFMPProcessor {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
private void processGuidances(FFMPSourceConfigurationManager.DATA_TYPE type) throws Exception {
|
||||
private void processGuidances(FFMPSourceConfigurationManager.DATA_TYPE type)
|
||||
throws Exception {
|
||||
// process Guidance sources
|
||||
|
||||
try {
|
||||
// over rides the date setting.
|
||||
// over rides the date setting.
|
||||
Date recdate = ffmpRec.getDataTime().getRefTime();
|
||||
// process each domain separately, but within the same URI/HDF5
|
||||
// named by primary domain
|
||||
|
@ -584,9 +587,10 @@ public class FFMPProcessor {
|
|||
if (sourceId != null) {
|
||||
isSBL = false;
|
||||
sbl = null;
|
||||
// if bin list dosen't exist
|
||||
// create it for future use
|
||||
// when running
|
||||
/**
|
||||
* if bin list dosen't exist create it for
|
||||
* future use when running
|
||||
*/
|
||||
if (generator.isExistingSourceBin(sourceId)) {
|
||||
sbl = generator.getSourceBinList(sourceId);
|
||||
isSBL = true;
|
||||
|
@ -604,42 +608,36 @@ public class FFMPProcessor {
|
|||
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);
|
||||
}
|
||||
|
||||
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 {
|
||||
statusHandler.handle(Priority.INFO, "Source: "
|
||||
+ ffmpRec.getSourceName() + " sitekey: "
|
||||
|
@ -677,12 +675,12 @@ public class FFMPProcessor {
|
|||
+ source.getDisplayName();
|
||||
}
|
||||
|
||||
Date backDate = new Date(ffmpRec.getDataTime().getRefTime()
|
||||
.getTime()-(FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR));
|
||||
|
||||
Date backDate = new Date(
|
||||
ffmpRec.getDataTime().getRefTime().getTime()
|
||||
- (FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR));
|
||||
|
||||
FFMPDataContainer ffgContainer = generator
|
||||
.getFFMPDataContainer(sourceNameString,
|
||||
backDate);
|
||||
.getFFMPDataContainer(sourceNameString, backDate);
|
||||
|
||||
if (ffgContainer != null
|
||||
&& ffgContainer.containsKey(source.getSourceName())) {
|
||||
|
@ -695,12 +693,11 @@ public class FFMPProcessor {
|
|||
.getRefTime().getTime()
|
||||
- previousDate.getTime();
|
||||
|
||||
// used reverse logic from AWIPS I code here,
|
||||
// instead of
|
||||
// returning
|
||||
// I switched the greater than and less than so it
|
||||
// will
|
||||
// process
|
||||
/**
|
||||
* used reverse logic from AWIPS I code here,
|
||||
* instead of returning I switched the greater than
|
||||
* and less than so it will process
|
||||
*/
|
||||
if (guidFrequency < (FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR)
|
||||
&& guidFrequency >= (TimeUtil.MILLIS_PER_HOUR)) {
|
||||
|
||||
|
@ -720,10 +717,9 @@ public class FFMPProcessor {
|
|||
FFMPInterpolatedGuidanceDelay figd = new FFMPInterpolatedGuidanceDelay(
|
||||
siteKey, guidFrequency, source,
|
||||
qpeSource, previousDate, recdate,
|
||||
generator,
|
||||
ffgContainer.getBasinData(),
|
||||
generator, ffgContainer.getBasinData(),
|
||||
ffmpRec);
|
||||
|
||||
|
||||
boolean delayGuidance = figd
|
||||
.calculateDelayedGuidance();
|
||||
// sets the new data time for the record
|
||||
|
@ -752,8 +748,9 @@ public class FFMPProcessor {
|
|||
/**
|
||||
* 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
|
||||
// named by primary domain
|
||||
for (DomainXML domain : template.getDomains()) {
|
||||
|
@ -794,10 +791,12 @@ public class FFMPProcessor {
|
|||
coor = rc.asGridCell(imp.getGridGeometry(),
|
||||
PixelInCell.CELL_CENTER);
|
||||
} catch (TransformException e) {
|
||||
statusHandler.error("VGB PDO transform error!", e);
|
||||
statusHandler.error("VGB PDO transform error!",
|
||||
e);
|
||||
continue;
|
||||
} catch (FactoryException e) {
|
||||
statusHandler.error("VGB PDO factory error!", e);
|
||||
statusHandler
|
||||
.error("VGB PDO factory error!", e);
|
||||
continue;
|
||||
}
|
||||
val = processPDO(coor, 1.0);
|
||||
|
@ -809,16 +808,18 @@ public class FFMPProcessor {
|
|||
coor = rc.asGridCell(getGridGeometry(),
|
||||
PixelInCell.CELL_CENTER);
|
||||
} catch (TransformException e) {
|
||||
statusHandler.error("VGB Gridded transform error!", e);
|
||||
statusHandler.error(
|
||||
"VGB Gridded transform error!", e);
|
||||
continue;
|
||||
} catch (FactoryException e) {
|
||||
statusHandler.error("VGB Gridded factory error!", e);
|
||||
statusHandler.error(
|
||||
"VGB Gridded factory error!", e);
|
||||
continue;
|
||||
}
|
||||
date = gribRec.getDataTime().getRefTime();
|
||||
val = processGrib(coor, 1.0);
|
||||
}
|
||||
|
||||
|
||||
// Missing doesn't work well with Virtual Gage's
|
||||
if (val == FFMPUtils.MISSING) {
|
||||
val = 0.0f;
|
||||
|
@ -831,7 +832,7 @@ public class FFMPProcessor {
|
|||
|
||||
} catch (Exception e) {
|
||||
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,
|
||||
String huc) {
|
||||
FFMPVirtualGageBasin basin = (FFMPVirtualGageBasin) getBasinData()
|
||||
.get(pfaf);
|
||||
FFMPVirtualGageBasin basin = (FFMPVirtualGageBasin) getBasinData().get(
|
||||
pfaf);
|
||||
if (basin == null) {
|
||||
basin = new FFMPVirtualGageBasin(lid, pfaf, false);
|
||||
getBasinData().put(pfaf, basin);
|
||||
|
@ -1167,7 +1168,8 @@ public class FFMPProcessor {
|
|||
|
||||
for (int j = 0; j < dataVals.length; j++) {
|
||||
try {
|
||||
val += ScanUtils.getZRvalue2(dataVals[j],//fval,// DR 13083
|
||||
val += ScanUtils.getZRvalue2(
|
||||
dataVals[j],// fval,// DR 13083
|
||||
dhrMap.get(DHRValues.ZRMULTCOEFF),
|
||||
dhrMap.get(DHRValues.MAXPRECIPRATEALLOW),
|
||||
dhrMap.get(DHRValues.ZRPOWERCOEFF),
|
||||
|
@ -1235,10 +1237,12 @@ public class FFMPProcessor {
|
|||
center = rc.asGridCell(getGridGeometry(),
|
||||
PixelInCell.CELL_CENTER);
|
||||
} catch (TransformException e) {
|
||||
statusHandler.handle(Priority.ERROR, "Error transforming pfaf! " +pfaf);
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Error transforming pfaf! " + pfaf);
|
||||
throw new Exception(e);
|
||||
} catch (FactoryException e) {
|
||||
statusHandler.handle(Priority.ERROR, "Error in geometry! " +pfaf);
|
||||
statusHandler.handle(Priority.ERROR, "Error in geometry! "
|
||||
+ pfaf);
|
||||
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 (source.getSourceType().equals(
|
||||
FFMPSourceConfigurationManager.SOURCE_TYPE.GUIDANCE
|
||||
|
@ -1293,12 +1298,12 @@ public class FFMPProcessor {
|
|||
} else {
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
// don't waste time calculating, it's zero regardless.
|
||||
if (val == 0.0f) {
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
return (val / arealWeight);
|
||||
}
|
||||
|
||||
|
@ -1437,7 +1442,8 @@ public class FFMPProcessor {
|
|||
gridCell = new Coordinate(x, y, 0.0);
|
||||
|
||||
} 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;
|
||||
}
|
||||
|
@ -1455,7 +1461,8 @@ public class FFMPProcessor {
|
|||
Type.GRID_CORNER);
|
||||
gridPoint = rc.asLatLon();
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR, "Unable translate grid coordinate! " +gridPoint);
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Unable translate grid coordinate! " + gridPoint);
|
||||
}
|
||||
return gridPoint;
|
||||
}
|
||||
|
@ -1746,16 +1753,19 @@ public class FFMPProcessor {
|
|||
SOURCE_TYPE.QPE.getSourceType())) {
|
||||
fftiSource = setting.getQpeSource();
|
||||
isFFTI = true;
|
||||
fftiAttribute.add(setting.getAttribute().getAttributeName());
|
||||
fftiAttribute.add(setting.getAttribute()
|
||||
.getAttributeName());
|
||||
} else if (source.getSourceType().equals(
|
||||
SOURCE_TYPE.QPF.getSourceType())) {
|
||||
fftiSource = setting.getQpfSource();
|
||||
isFFTI = true;
|
||||
fftiAttribute.add(setting.getAttribute().getAttributeName());
|
||||
fftiAttribute.add(setting.getAttribute()
|
||||
.getAttributeName());
|
||||
} else {
|
||||
fftiSource = setting.getGuidSource();
|
||||
isFFTI = true;
|
||||
fftiAttribute.add(setting.getAttribute().getAttributeName());
|
||||
fftiAttribute.add(setting.getAttribute()
|
||||
.getAttributeName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1768,7 +1778,8 @@ public class FFMPProcessor {
|
|||
.getDisplayName())) {
|
||||
fftiSource = setting.getQpeSource();
|
||||
isFFTI = true;
|
||||
fftiAttribute.add(setting.getAttribute().getAttributeName());
|
||||
fftiAttribute.add(setting.getAttribute()
|
||||
.getAttributeName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1783,7 +1794,8 @@ public class FFMPProcessor {
|
|||
|
||||
fftiSource = setting.getQpfSource();
|
||||
isFFTI = true;
|
||||
fftiAttribute.add(setting.getAttribute().getAttributeName());
|
||||
fftiAttribute.add(setting.getAttribute()
|
||||
.getAttributeName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1809,9 +1821,10 @@ public class FFMPProcessor {
|
|||
public FFTISourceXML getFFTISource() {
|
||||
return fftiSource;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the FFTI attributes for this source
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<String> getAttributes() {
|
||||
|
@ -1826,7 +1839,7 @@ public class FFMPProcessor {
|
|||
public String getSourceID() {
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Log bad configuration message and throw Configuration Exception
|
||||
*
|
||||
|
@ -1876,23 +1889,25 @@ public class FFMPProcessor {
|
|||
private short[][] getXMRGData() throws Exception {
|
||||
|
||||
String fileName = "MISSING";
|
||||
|
||||
|
||||
if (xmrg.getFile() != null) {
|
||||
fileName = xmrg.getFile().getAbsolutePath();
|
||||
}
|
||||
|
||||
|
||||
this.extent = getExtents(source.getHrapGridFactor());
|
||||
setHRAPSubGrid(extent, source.getHrapGridFactor());
|
||||
|
||||
|
||||
if (xmrg.getHrapExtent() != null) {
|
||||
xmrgData = xmrg.getData(extent);
|
||||
} 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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -54,6 +54,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
|
|||
* Jun 07, 2013 1981 mpduff Add user to OUPRequest.
|
||||
* Jun 18, 2013 2110 rferrel Modified to handle the new class RequestRouter.route
|
||||
* returns (SuccessfulExecution).
|
||||
* Feb 11, 2016 16939 zhao Modified sendTaf() to ensure bbb is null for routine TAF
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -184,7 +185,9 @@ public class TafQueueManager implements Runnable {
|
|||
oup.setUserDateTimeStamp(tstamp);
|
||||
oup.setSource("AvnFPS");
|
||||
if (!bbb.equals("___")) {
|
||||
oup.setWmoType(bbb);
|
||||
if (bbb.trim().length() == 3) {
|
||||
oup.setWmoType(bbb);
|
||||
}
|
||||
}
|
||||
|
||||
OUPRequest req = new OUPRequest();
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
<isfalse value="${client.build}"/>
|
||||
</condition>
|
||||
|
||||
<condition property="deploy.nwps" value="yes">
|
||||
<isfalse value="${client.build}"/>
|
||||
</condition>
|
||||
|
||||
<condition property="deploy.svcBackup" value="yes">
|
||||
<and>
|
||||
<isfalse value="${client.build}"/>
|
||||
|
@ -72,8 +76,6 @@
|
|||
<echo message="Updating ${gfe.suite.bin} with latest GFESuite tools" />
|
||||
<echo message="deploy.client=${deploy.client}" />
|
||||
<mkdir dir="${gfe.suite.bin}"/>
|
||||
<mkdir dir="${gfe.suite.hti}"/>
|
||||
<mkdir dir="${gfe.suite.nwps}"/>
|
||||
<antcall target="-deploy.cli.common"/>
|
||||
<antcall target="-deploy.hti"/>
|
||||
<antcall target="-deploy.nwps"/>
|
||||
|
@ -101,15 +103,17 @@
|
|||
<target name="-deploy.hti" if="deploy.hti"
|
||||
description="Deploys HTI software to a specific directory">
|
||||
<!-- copy the CLI tools to the deploy directory -->
|
||||
<mkdir dir="${gfe.suite.hti}"/>
|
||||
<echo message="Copying in HTI files" />
|
||||
<copy todir="${gfe.suite.hti}" overwrite="true">
|
||||
<fileset dir="${basedir}/hti"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="-deploy.nwps"
|
||||
<target name="-deploy.nwps" if="deploy.nwps"
|
||||
description="Deploys NWPS software to a specific directory">
|
||||
<!-- copy the CLI tools to the deploy directory -->
|
||||
<mkdir dir="${gfe.suite.nwps}"/>
|
||||
<echo message="Copying in NWPS files" />
|
||||
<copy todir="${gfe.suite.nwps}" overwrite="true">
|
||||
<fileset dir="${basedir}/nwps"/>
|
||||
|
|
|
@ -34,6 +34,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* -------------- ---------- ----------- --------------------------
|
||||
* July 17, 2015 Pwang Initial creation for STQ: Spot Request
|
||||
* Data plugin
|
||||
* Jan 21, 2016 18524 pwang Added the setter to avoid Archiver error
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -487,7 +488,15 @@ public class SpotRequestRecord extends PersistablePluginDataObject implements
|
|||
public String getStqSymbol() {
|
||||
return stqSymbol;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setStqSymbol (only for serialization / archive)
|
||||
*
|
||||
* @param stqSymbol
|
||||
*/
|
||||
public void setStqSymbol(String stqSymbol) {
|
||||
this.stqSymbol = stqDispSymbol;
|
||||
}
|
||||
|
||||
/**
|
||||
* toString
|
||||
|
|
|
@ -101,18 +101,20 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||
%defattr(775,awips,fxalpha,775)
|
||||
%dir /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)
|
||||
%dir /awips2/GFESuite/bin
|
||||
/awips2/GFESuite/bin/*
|
||||
%dir /awips2/GFESuite/hti/bin
|
||||
/awips2/GFESuite/hti/bin/*
|
||||
%dir /awips2/GFESuite/nwps/bin
|
||||
/awips2/GFESuite/nwps/bin/*
|
||||
%defattr(755,awips,fxalpha,777)
|
||||
%dir /awips2/GFESuite/hti/etc
|
||||
/awips2/GFESuite/hti/etc/*
|
||||
%dir /awips2/GFESuite/nwps/domains
|
||||
/awips2/GFESuite/nwps/domains/*
|
||||
%defattr(644,awips,fxalpha,755)
|
||||
%dir /awips2/GFESuite/bin/src
|
||||
/awips2/GFESuite/bin/src/*
|
||||
|
|
|
@ -169,6 +169,7 @@ cp ${_ldm_dir}/SOURCES/%{_ldm_src_tar} ${_ldm_dir}
|
|||
#/bin/tar -xf %{_ldm_src_tar} \
|
||||
# -C ${_ldm_dir}
|
||||
cd ${_ldm_dir}
|
||||
mkdir -p ${_ldm_root_dir}/src
|
||||
gunzip -c %{_ldm_src_tar} | pax -r '-s:/:/src/:'
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Reference in a new issue