Merge branch 'master_14.2.1' (14.1.1-13) into omaha_14.2.1
Conflicts: cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/SCANUnwarnedDlg.java cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/tables/AbstractTableDlg.java cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/tables/SCANCellTableDlg.java cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/tables/SCANDmdTableDlg.java cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/tables/SCANMesoTableDlg.java cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/tables/SCANTvsTableDlg.java cave/com.raytheon.viz.gfe/GFESuite/ifpIMAGE cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/GfeClient.java cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/vtec/GFEVtecUtil.java edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParmManager.java Change-Id: Ic1f763baa305eb65f7f5373dea34e01a6373fec7 Former-commit-id:cc89b16338
[formerlye4f59ea119
] [formerly1de516964b
] [formerlycc89b16338
[formerlye4f59ea119
] [formerly1de516964b
] [formerly2e7fd9ddba
[formerly1de516964b
[formerly 31f410bcf6ab8d069a1f1a2e1af0c25a0daabad9]]]] Former-commit-id:2e7fd9ddba
Former-commit-id:73f12bf669
[formerly5c0cf804f1
] [formerly 2e1688da3b0fce728ce5f4d9180206023aa31cf3 [formerly62fa535744
]] Former-commit-id: 3e8093536581ac6595438ca5eb497ae394fe30e8 [formerly4059813742
] Former-commit-id:1c743d4d44
This commit is contained in:
commit
08d2290f97
35 changed files with 1041 additions and 261 deletions
BIN
cave/.dm/.dirs.dmdb
Normal file
BIN
cave/.dm/.dirs.dmdb
Normal file
Binary file not shown.
|
@ -411,7 +411,7 @@
|
|||
<xmlproperty file="${builder}/memorySettings.xml"
|
||||
collapseAttributes="true"/>
|
||||
|
||||
<property name="caveXmx" value="2048M" />
|
||||
<property name="caveXmx" value="3072M" />
|
||||
<property name="caveMaxPermSize" value="256m" />
|
||||
|
||||
<update.ini
|
||||
|
|
|
@ -2,6 +2,36 @@
|
|||
# CAVE startup script
|
||||
# Note: CAVE will not run as 'root'
|
||||
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Dec 05, 2013 #2593 rjpeter Added check for number of running
|
||||
# cave sessions.
|
||||
# Dec 05, 2013 #2590 dgilling Modified so gfeclient.sh can be wrapped
|
||||
# around this script.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
user=`/usr/bin/whoami`
|
||||
if [ ${user} == 'root' ];then
|
||||
echo "WARNING: CAVE cannot be run as user '${user}'!"
|
||||
|
@ -9,13 +39,16 @@ if [ ${user} == 'root' ];then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
path_to_script=`readlink -f $0`
|
||||
dir=$(dirname $path_to_script)
|
||||
# Since, we no longer need to worry about re-location ...
|
||||
CAVE_INSTALL="/awips2/cave"
|
||||
JAVA_INSTALL="/awips2/java"
|
||||
PYTHON_INSTALL="/awips2/python"
|
||||
export AWIPS_INSTALL_DIR="${CAVE_INSTALL}"
|
||||
|
||||
source ${dir}/caveUtil.sh
|
||||
source ${CAVE_INSTALL}/caveUtil.sh
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
echo "ERROR: unable to find and/or access ${dir}/caveUtil.sh."
|
||||
echo "ERROR: unable to find and/or access ${CAVE_INSTALL}/caveUtil.sh."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -28,16 +61,11 @@ copyVizShutdownUtilIfNecessary
|
|||
# delete any old disk caches in the background
|
||||
deleteOldCaveDiskCaches &
|
||||
|
||||
# Since, we no longer need to worry about re-location ...
|
||||
CAVE_INSTALL="/awips2/cave"
|
||||
JAVA_INSTALL="/awips2/java"
|
||||
PYTHON_INSTALL="/awips2/python"
|
||||
|
||||
export AWIPS_INSTALL_DIR="${CAVE_INSTALL}"
|
||||
|
||||
export LD_LIBRARY_PATH=${JAVA_INSTALL}/lib:${PYTHON_INSTALL}/lib:$LD_LIBRARY_PATH
|
||||
export LD_PRELOAD=libpython.so
|
||||
extendLibraryPath
|
||||
if [[ -z "$CALLED_EXTEND_LIB_PATH" ]]; then
|
||||
extendLibraryPath
|
||||
fi
|
||||
export PATH=${JAVA_INSTALL}/bin:${PYTHON_INSTALL}/bin:$PATH
|
||||
export JAVA_HOME="${JAVA_INSTALL}/jre"
|
||||
|
||||
|
@ -60,16 +88,16 @@ if [ -x ${TESTCHECK} ]; then
|
|||
status=${?}
|
||||
if [ $status -eq 11 ]; then
|
||||
MODE="TEST"
|
||||
SWITCHES=" -mode TEST "
|
||||
SWITCHES="${SWITCHES} -mode TEST "
|
||||
elif [ $status -eq 12 ];then
|
||||
MODE="PRACTICE"
|
||||
SWITCHES=" -mode PRACTICE "
|
||||
SWITCHES="${SWITCHES} -mode PRACTICE "
|
||||
elif [ $status -eq 15 ];then
|
||||
MODE="OPERATIONAL"
|
||||
SWITCHES=" -mode OPERATIONAL"
|
||||
SWITCHES="${SWITCHES} -mode OPERATIONAL"
|
||||
else
|
||||
MODE="OPERATIONAL (no response)"
|
||||
SWITCHES=" "
|
||||
SWITCHES="${SWITCHES} "
|
||||
fi
|
||||
echo "getTestMode() returned ${MODE}"
|
||||
else
|
||||
|
@ -79,6 +107,30 @@ fi
|
|||
|
||||
export TEXTWS=`hostname | sed -e 's/lx/xt/g'`
|
||||
|
||||
hostName=`hostname -s`
|
||||
|
||||
if [[ $hostName =~ xt.* ]]; then
|
||||
export IGNORE_NUM_CAVES=1
|
||||
fi
|
||||
|
||||
# check number of running caves
|
||||
if [[ -z $IGNORE_NUM_CAVES ]]; then
|
||||
# free usually reports below on G threshold (11 instead of 12G), giving the 3 cave recommended in field
|
||||
mem=( `free -g | grep "Mem:"` )
|
||||
mem=${mem[1]}
|
||||
let _maxCaves=mem/3
|
||||
|
||||
getPidsOfMyRunningCaves
|
||||
if [[ "$_numPids" -ge "$_maxCaves" ]]; then
|
||||
zenity --question --title "Max CAVE sessions already running" --text "$_numPids CAVE sessions already running. Starting more may impact system performance and stability.\n\nProceed?"
|
||||
cancel="$?"
|
||||
|
||||
if [[ "$cancel" == "1" ]]; then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#check for gtk-2.0 value
|
||||
gtkResource=.gtkrc-2.0
|
||||
includeLine="include \"$HOME/.gtkrc.mine\""
|
||||
|
@ -108,8 +160,12 @@ else
|
|||
echo $altButtonLine >> $HOME/$mineFile
|
||||
fi
|
||||
|
||||
hostName=`hostname -s`
|
||||
LOGDIR=$HOME/caveData/logs/consoleLogs/$hostName/
|
||||
if [[ -z "$PROGRAM_NAME" ]]
|
||||
then
|
||||
PROGRAM_NAME="cave"
|
||||
fi
|
||||
|
||||
LOGDIR="$HOME/caveData/logs/consoleLogs/$hostName/"
|
||||
|
||||
# make sure directory exists
|
||||
if [ ! -d $LOGDIR ]; then
|
||||
|
@ -119,39 +175,46 @@ fi
|
|||
export pid=$$
|
||||
|
||||
curTime=`date +%Y%m%d_%H%M%S`
|
||||
LOGFILE=${LOGDIR}/cave_${curTime}_pid_${pid}_console.log
|
||||
export LOGFILE_CAVE=${LOGDIR}/cave_${curTime}_pid_${pid}_alertviz.log
|
||||
export LOGFILE_PERFORMANCE=${LOGDIR}/cave_${curTime}_pid_${pid}_perf.log
|
||||
|
||||
redirect="TRUE"
|
||||
for flag in $@; do
|
||||
if [ $flag == "-noredirect" ]; then
|
||||
redirect="FALSE"
|
||||
break
|
||||
fi
|
||||
done
|
||||
LOGFILE="${LOGDIR}/${PROGRAM_NAME}_${curTime}_pid_${pid}_console.log"
|
||||
export LOGFILE_CAVE="${LOGDIR}/${PROGRAM_NAME}_${curTime}_pid_${pid}_alertviz.log"
|
||||
export LOGFILE_PERFORMANCE="${LOGDIR}/${PROGRAM_NAME}_${curTime}_pid_${pid}_perf.log"
|
||||
|
||||
# can we write to log directory
|
||||
if [ -w ${LOGDIR} ]; then
|
||||
touch ${LOGFILE}
|
||||
fi
|
||||
|
||||
# remove "-noredirect" flag from command-line if set so it doesn't confuse any
|
||||
# commands we call later.
|
||||
redirect="true"
|
||||
USER_ARGS=()
|
||||
while [[ $1 ]]
|
||||
do
|
||||
if [[ "$1" == "-noredirect" ]]
|
||||
then
|
||||
redirect="false"
|
||||
else
|
||||
USER_ARGS+=("$1")
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
# Special instructions for the 64-bit jvm.
|
||||
ARCH_ARGS=""
|
||||
if [ -f /awips2/java/jre/lib/amd64/server/libjvm.so ]; then
|
||||
ARCH_ARGS="-vm /awips2/java/jre/lib/amd64/server/libjvm.so"
|
||||
fi
|
||||
|
||||
lookupINI $@
|
||||
lookupINI "${USER_ARGS[@]}"
|
||||
|
||||
if [[ "${runMonitorThreads}" == "true" ]] ; then
|
||||
# nohup to allow tar process to continue after user has logged out
|
||||
nohup ${dir}/monitorThreads.sh $pid >> /dev/null 2>&1 &
|
||||
nohup ${CAVE_INSTALL}/monitorThreads.sh $pid >> /dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
if ( [ ${redirect} == "TRUE" ] ); then
|
||||
exec ${dir}/cave ${ARCH_ARGS} ${SWITCHES} ${CAVE_INI_ARG} $@ > ${LOGFILE} 2>&1
|
||||
if [[ "${redirect}" == "true" ]] ; then
|
||||
exec ${CAVE_INSTALL}/cave ${ARCH_ARGS} ${SWITCHES} ${CAVE_INI_ARG} "${USER_ARGS[@]}" > ${LOGFILE} 2>&1
|
||||
else
|
||||
exec ${dir}/cave ${ARCH_ARGS} ${SWITCHES} ${CAVE_INI_ARG} $@ 2>&1 | tee ${LOGFILE}
|
||||
exec ${CAVE_INSTALL}/cave ${ARCH_ARGS} ${SWITCHES} ${CAVE_INI_ARG} "${USER_ARGS[@]}" 2>&1 | tee ${LOGFILE}
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,5 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Dec 05, 2013 #2593 rjpeter Fix getPidsOfMyRunningCaves
|
||||
# Dec 05, 2013 #2590 dgilling Modified extendLibraryPath() to export a
|
||||
# var if it's already been run.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
source /awips2/cave/iniLookup.sh
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
|
@ -60,6 +89,8 @@ function extendLibraryPath()
|
|||
if [ "${1}" = "-noX" ]; then
|
||||
export LD_LIBRARY_PATH="${CAVE_LIB_DIRECTORY}/lib_mesa:$LD_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
CALLED_EXTEND_LIB_PATH="true"
|
||||
}
|
||||
|
||||
function copyVizShutdownUtilIfNecessary()
|
||||
|
@ -89,7 +120,7 @@ function copyVizShutdownUtilIfNecessary()
|
|||
function getPidsOfMyRunningCaves()
|
||||
{
|
||||
local user=`whoami`
|
||||
local caveProcs=`ps -ef | grep "/awips2/cave/cave" | grep -v "grep" | grep $user`
|
||||
local caveProcs=`ps -ef | grep "/awips2/cave/cave " | grep -v "grep" | grep $user`
|
||||
|
||||
# preserve IFS and set it to line feed only
|
||||
local PREV_IFS=$IFS
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
|
||||
# ----------------------------------------------------------------
|
||||
# Returns heat index or wind chill
|
||||
#
|
||||
# History
|
||||
# 12/02/2013 DR 14455 Qinglu Lin Changed 1.85200 to 3.6 at
|
||||
# wSpd_kmh = wSpd * 1.85200
|
||||
# ----------------------------------------------------------------
|
||||
import numpy
|
||||
import T
|
||||
|
@ -62,7 +64,7 @@ def execute2(temperature,dewpoint,relHumidity,windSpeed):
|
|||
def execute3(T,DpT,wSpd):
|
||||
TC = T - 273.15 #convert from K to C
|
||||
DpTC = DpT - 273.15 #convert to from K to C
|
||||
wSpd_kmh = wSpd * 1.85200 #convert from m/s to km/h
|
||||
wSpd_kmh = wSpd * 3.6 #convert from m/s to km/h
|
||||
Hi = HeatIndex.calculate(TC,DpTC) #Outputs Celsius
|
||||
Wc = WindChill.calculate(TC,wSpd_kmh) #Outputs Celsius
|
||||
HiK = numpy.where(Hi != -9999.0, celciusToKelvin(Hi),-9999.0)
|
||||
|
|
BIN
cave/com.raytheon.uf.viz.monitor.scan/.dm/.dirs.dmdb
Normal file
BIN
cave/com.raytheon.uf.viz.monitor.scan/.dm/.dirs.dmdb
Normal file
Binary file not shown.
BIN
cave/com.raytheon.uf.viz.monitor.scan/src/.dm/.dirs.dmdb
Normal file
BIN
cave/com.raytheon.uf.viz.monitor.scan/src/.dm/.dirs.dmdb
Normal file
Binary file not shown.
BIN
cave/com.raytheon.uf.viz.monitor.scan/src/com/.dm/.dirs.dmdb
Normal file
BIN
cave/com.raytheon.uf.viz.monitor.scan/src/com/.dm/.dirs.dmdb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -192,6 +192,7 @@ public class ScanResourceData extends AbstractRequestableResourceData {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
getScan().closeDialog(icao);
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
# CAVE startup script
|
||||
# Note: CAVE will not run as 'root'
|
||||
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Dec 04, 2013 #2589 dgilling Create command-line arg that controls
|
||||
# xvfb initialization.
|
||||
# Dec 05, 2013 #2593 rjpeter set IGNORE_NUM_CAVES
|
||||
# Dec 05, 2013 #2590 dgilling Remove duplicated code and call to
|
||||
# cave.sh.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
user=`/usr/bin/whoami`
|
||||
if [ ${user} == 'root' ];then
|
||||
echo "WARNING: CAVE cannot be run as user '${user}'!"
|
||||
|
@ -16,75 +48,44 @@ if [ ${RC} -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
dir=${0%/*}
|
||||
PROGRAM_NAME="gfeclient"
|
||||
|
||||
if [ "$dir" = "$0" ]; then
|
||||
|
||||
dir="."
|
||||
|
||||
fi
|
||||
|
||||
cd "$dir"
|
||||
|
||||
# Since, we no longer need to worry about re-location ...
|
||||
CAVE_INSTALL="/awips2/cave"
|
||||
JAVA_INSTALL="/awips2/java"
|
||||
PYTHON_INSTALL="/awips2/python"
|
||||
|
||||
export AWIPS_INSTALL_DIR="${CAVE_INSTALL}"
|
||||
|
||||
export LD_LIBRARY_PATH=${JAVA_INSTALL}/lib:${PYTHON_INSTALL}/lib:$LD_LIBRARY_PATH
|
||||
export PATH=${JAVA_INSTALL}/bin:${PYTHON_INSTALL}/bin:$PATH
|
||||
export JAVA_HOME="${JAVA_INSTALL}/jre"
|
||||
|
||||
# The user can update this field if they choose to do so.
|
||||
export HYDRO_APPS_DIR="/awips2/edex/data/hdf5/hydroapps"
|
||||
|
||||
TESTCHECK="$TMCP_HOME/bin/getTestMode"
|
||||
if [ -x ${TESTCHECK} ]; then
|
||||
echo "Calling getTestMode()"
|
||||
${TESTCHECK}
|
||||
status=${?}
|
||||
if [ $status -eq 11 ]; then
|
||||
MODE="TEST"
|
||||
SWITCHES=" -mode TEST "
|
||||
elif [ $status -eq 12 ];then
|
||||
MODE="PRACTICE"
|
||||
SWITCHES=" -mode PRACTICE "
|
||||
elif [ $status -eq 15 ];then
|
||||
MODE="OPERATIONAL"
|
||||
SWITCHES=" -mode OPERATIONAL"
|
||||
# remove "-enablegl" flag from command-line if set so it doesn't confuse any
|
||||
# commands we call later.
|
||||
USER_ARGS=()
|
||||
while [[ $1 ]]
|
||||
do
|
||||
if [ "$1" == "-enablegl" ]
|
||||
then
|
||||
ENABLEGL="true"
|
||||
else
|
||||
MODE="OPERATIONAL (no response)"
|
||||
SWITCHES=" "
|
||||
USER_ARGS+=("$1")
|
||||
fi
|
||||
echo "getTestMode() returned ${MODE}"
|
||||
else
|
||||
MODE="UNKNOWN"
|
||||
echo "getTestMode() not found - going to use defaults"
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
export TEXTWS=`hostname | sed -e 's/lx/xt/g'`
|
||||
|
||||
# if display not set
|
||||
if [ -n "$DISPLAY" ]
|
||||
if [ -n "$ENABLEGL" ]
|
||||
then
|
||||
# if display not set
|
||||
if [ -n "$DISPLAY" ]
|
||||
then
|
||||
echo "Using Display set to $DISPLAY"
|
||||
extendLibraryPath
|
||||
else
|
||||
else
|
||||
echo "Display not set, creating offscreen x on port $$"
|
||||
extendLibraryPath "-noX"
|
||||
Xvfb :$$ -screen 0 1280x1024x24 &
|
||||
xvfb=$!
|
||||
export DISPLAY="localhost:$$.0"
|
||||
#don't use shader when no display set
|
||||
export SWITCHES="${SWITCHES} -no_shader"
|
||||
SWITCHES="${SWITCHES} -no_shader"
|
||||
fi
|
||||
fi
|
||||
|
||||
COMPONENT_ARGS="-component gfeclient"
|
||||
export LD_PRELOAD=libpython.so
|
||||
lookupINI ${COMPONENT_ARGS}
|
||||
/awips2/cave/cave ${SWITCHES} ${CAVE_INI_ARG} -nosplash ${COMPONENT_ARGS} "$@"
|
||||
export IGNORE_NUM_CAVES=1
|
||||
|
||||
source /awips2/cave/cave.sh -nosplash -noredirect -component gfeclient "${USER_ARGS[@]}" &
|
||||
wait
|
||||
|
||||
if [ -n "$xvfb" ]
|
||||
then
|
||||
|
|
|
@ -1,5 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Dec 04, 2013 #2589 dgilling Create command-line arg that controls
|
||||
# xvfb initialization.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
# get path to cave
|
||||
path_to_script=`readlink -f $0`
|
||||
RUN_FROM_DIR=`dirname $path_to_script`
|
||||
|
@ -9,7 +37,8 @@ CAVE_DIR=/awips2/cave
|
|||
|
||||
# execute the runProcedure module
|
||||
_GFECLI="${RUN_FROM_DIR}/gfeclient.sh"
|
||||
_MODULE="${RUN_FROM_DIR}/src/ifpimage/PngWriter.py"
|
||||
_GFECLI_ARGS="-enablegl"
|
||||
_MODULE="${CAVE_DIR}/etc/gfe/utility/PngWriter.py"
|
||||
|
||||
# quoting of '$@' is used to prevent command line interpretation
|
||||
if [ ! -f $_GFECLI ] || [ ! -d $CAVE_DIR ]
|
||||
|
@ -17,6 +46,6 @@ then
|
|||
echo "CAVE and/or gfeclient not installed on this workstation ..exiting"
|
||||
exit 1
|
||||
else
|
||||
$_GFECLI $_MODULE "$@"
|
||||
$_GFECLI $_GFECLI_ARGS $_MODULE "$@"
|
||||
fi
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ import java.io.File;
|
|||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import jep.Jep;
|
||||
import jep.JepException;
|
||||
|
@ -35,6 +37,7 @@ import com.raytheon.uf.common.python.PyUtil;
|
|||
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.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.viz.gfe.python.GfeCavePyIncludeUtil;
|
||||
|
@ -54,6 +57,7 @@ import com.raytheon.viz.ui.personalities.awips.AbstractCAVEComponent;
|
|||
* Sep 11, 2013 #2033 dgilling Update path to utilityDir and pyVizDir,
|
||||
* now that they're no longer in
|
||||
* localization store.
|
||||
* Dec 04, 2013 #2588 dgilling Add thread to force shutdown.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -158,6 +162,23 @@ public class GfeClient extends AbstractCAVEComponent {
|
|||
long t1 = System.currentTimeMillis();
|
||||
System.out.println("Entire execution to run python script: "
|
||||
+ (t1 - t0));
|
||||
|
||||
// operationally, we've found situations where gfeclient jobs seem to
|
||||
// hang around running even though all non-daemon threads have completed
|
||||
// their work. So, in attempt to prevent those cases from hanging around
|
||||
// as "zombie" processes let's set a timer to kill the JVM if things
|
||||
// haven't exited by themselves.
|
||||
Timer shutdownTimer = new Timer("gfe-client-shutdown", true);
|
||||
TimerTask shutdownTask = new TimerTask() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
statusHandler
|
||||
.warn("GFEClient should have already exited, but it hasn't. Manually exiting.");
|
||||
System.exit(0);
|
||||
}
|
||||
};
|
||||
shutdownTimer.schedule(shutdownTask, 45 * TimeUtil.MILLIS_PER_SECOND);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -44,10 +44,15 @@ import org.eclipse.swt.widgets.Text;
|
|||
import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DByte;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DFloat;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.lock.Lock;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.slice.DiscreteGridSlice;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.slice.ScalarGridSlice;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.slice.VectorGridSlice;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.slice.WeatherGridSlice;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.weather.WeatherKey;
|
||||
import com.raytheon.uf.common.message.WsId;
|
||||
import com.raytheon.uf.common.time.SimulatedTime;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
|
@ -79,7 +84,10 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* change gridInfoText from Label to Text
|
||||
* to make sure the info get displayed inside the screen
|
||||
* and can be scrolled.
|
||||
* Feb 15, 2013 1638 mschenke Moved Util.getUnixTime into TimeUtil
|
||||
* Feb 15, 2013 1638 mschenke Moved Util.getUnixTime into TimeUtil
|
||||
* Dec 03, 2013 2597 randerso Fixed spacing when displaying multiple grid histories.
|
||||
* Fixed weather element state and data distribution for
|
||||
* Weather and Discrete elements.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -107,9 +115,9 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
|
||||
// set gridInfoText to be Text
|
||||
private Text gridInfoText;
|
||||
|
||||
|
||||
private SimpleDateFormat gmtFormatter;
|
||||
|
||||
|
||||
public GridInfoDialog(Shell parent, Parm parm, Date clickTime) {
|
||||
super(parent);
|
||||
this.setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS);
|
||||
|
@ -129,7 +137,7 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
GridLayout layout = (GridLayout) top.getLayout();
|
||||
layout.numColumns = 2;
|
||||
layout.makeColumnsEqualWidth = false;
|
||||
|
||||
|
||||
initializeComponents();
|
||||
|
||||
return top;
|
||||
|
@ -145,52 +153,48 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
b.setText(gridInfoElements[i]);
|
||||
b.addSelectionListener(this);
|
||||
}
|
||||
|
||||
// Composite composite2 = new Composite(top, SWT.NONE);
|
||||
// layoutData = new GridData(SWT.DEFAULT, SWT.FILL, false, true);
|
||||
// composite2.setLayoutData(layoutData);
|
||||
// composite2.setLayout(new GridLayout(1, true));
|
||||
|
||||
gridInfoText = new Text(top, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.READ_ONLY);
|
||||
gridInfoText = new Text(top, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL
|
||||
| SWT.READ_ONLY);
|
||||
layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
gridInfoText.setBackground(group.getBackground());
|
||||
gridInfoText.setLayoutData(layoutData);
|
||||
}
|
||||
|
||||
/*
|
||||
* adjust the width of the dialog
|
||||
*/
|
||||
private void adjustDlg(String infoText){
|
||||
int screenWidth = this.getParentShell().getDisplay().
|
||||
getPrimaryMonitor().getBounds().width;
|
||||
int maxWidth = (int)Math.round(screenWidth * 0.75);
|
||||
|
||||
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
int maxLength = getMaxWidth(infoText);
|
||||
if ( maxLength > maxWidth ) {
|
||||
gd.widthHint = maxWidth;
|
||||
gridInfoText.setLayoutData(gd);
|
||||
} else {
|
||||
gridInfoText.setLayoutData(gd);
|
||||
}
|
||||
gridInfoText.setText(infoText);
|
||||
}
|
||||
|
||||
/*
|
||||
* get the maximum width of the info
|
||||
*/
|
||||
private int getMaxWidth(String textInfo){
|
||||
String[] splits = textInfo.split("\\n");
|
||||
GC gc = new GC (gridInfoText);
|
||||
FontMetrics fm = gc.getFontMetrics ();
|
||||
int acw = fm.getAverageCharWidth ();
|
||||
int maxStr = 0;
|
||||
for (String str : splits){
|
||||
maxStr = Math.max(maxStr, str.length());
|
||||
}
|
||||
return maxStr*acw;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* adjust the width of the dialog
|
||||
*/
|
||||
private void adjustDlg(String infoText) {
|
||||
int screenWidth = this.getParentShell().getDisplay()
|
||||
.getPrimaryMonitor().getBounds().width;
|
||||
int maxWidth = (int) Math.round(screenWidth * 0.75);
|
||||
|
||||
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
int maxLength = getMaxWidth(infoText);
|
||||
if (maxLength > maxWidth) {
|
||||
gd.widthHint = maxWidth;
|
||||
gridInfoText.setLayoutData(gd);
|
||||
} else {
|
||||
gridInfoText.setLayoutData(gd);
|
||||
}
|
||||
gridInfoText.setText(infoText);
|
||||
}
|
||||
|
||||
/*
|
||||
* get the maximum width of the info
|
||||
*/
|
||||
private int getMaxWidth(String textInfo) {
|
||||
String[] splits = textInfo.split("\\n");
|
||||
GC gc = new GC(gridInfoText);
|
||||
FontMetrics fm = gc.getFontMetrics();
|
||||
int acw = fm.getAverageCharWidth();
|
||||
int maxStr = 0;
|
||||
for (String str : splits) {
|
||||
maxStr = Math.max(maxStr, str.length());
|
||||
}
|
||||
return maxStr * acw;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createButtonsForButtonBar(Composite parent) {
|
||||
super.createButton(parent, Window.CANCEL, "Cancel", false);
|
||||
|
@ -239,17 +243,17 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
String choice = b.getText();
|
||||
|
||||
if (choice.equalsIgnoreCase("Grid Info")) {
|
||||
adjustDlg(getGridInfo());
|
||||
adjustDlg(getGridInfo());
|
||||
} else if (choice.equalsIgnoreCase("Grid History")) {
|
||||
adjustDlg(getGridHistory());
|
||||
} else if (choice.equalsIgnoreCase("ISC History")) {
|
||||
adjustDlg(getISCHistory());
|
||||
} else if (choice.equalsIgnoreCase("Weather Element Info")) {
|
||||
adjustDlg(getWEInfo());
|
||||
adjustDlg(getWEInfo());
|
||||
} else if (choice.equalsIgnoreCase("Weather Element State")) {
|
||||
adjustDlg(getWEState());
|
||||
} else if (choice.equalsIgnoreCase("Locks")) {
|
||||
adjustDlg(getLockInfo());
|
||||
adjustDlg(getLockInfo());
|
||||
} else if (choice.equalsIgnoreCase("Data Distribution")) {
|
||||
adjustDlg(getDataDistribution());
|
||||
} else {
|
||||
|
@ -266,8 +270,9 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
List<Lock> locks = parm.getLockTable().getLocks();
|
||||
|
||||
if (locks.isEmpty()) {
|
||||
info.append("Weather element is not locked");
|
||||
info.append("\nWeather element is not locked");
|
||||
} else {
|
||||
info.append("\n");
|
||||
for (Lock lock : locks) {
|
||||
info.append("(")
|
||||
.append(gmtFormatter.format(lock.getTimeRange()
|
||||
|
@ -303,9 +308,9 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
grid = iscGridID.grid();
|
||||
}
|
||||
if (grid == null) {
|
||||
info.append("No ISC Grid");
|
||||
info.append("\nNo ISC Grid");
|
||||
} else {
|
||||
info.append("ISC Grid Valid Time: ").append(grid.getGridTime())
|
||||
info.append("\nISC Grid Valid Time: ").append(grid.getGridTime())
|
||||
.append("\n\n");
|
||||
|
||||
GridDataHistory[] history = grid.getHistory();
|
||||
|
@ -360,50 +365,48 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
if (parm.getGridInfo().getGridType().equals(GridType.SCALAR)
|
||||
|| parm.getGridInfo().getGridType().equals(GridType.VECTOR)) {
|
||||
|
||||
info.append("Fuzz Value: ")
|
||||
info.append("\nFuzz Value: ")
|
||||
.append(parm.getParmState().getFuzzValue()).append("\n");
|
||||
|
||||
if (parm.isMutable()) {
|
||||
|
||||
if (parm.getGridInfo().getGridType().equals(GridType.SCALAR)
|
||||
|| parm.getGridInfo().getGridType()
|
||||
.equals(GridType.VECTOR)) {
|
||||
info.append("Delta value: ")
|
||||
.append(parm.getParmState().getDeltaValue())
|
||||
.append("\n");
|
||||
}
|
||||
info.append("Assign Value: ")
|
||||
.append(parm.getParmState().getPickUpValue())
|
||||
.append("\n");
|
||||
|
||||
if (parm.getGridInfo().getGridType().equals(GridType.VECTOR)) {
|
||||
info.append("Vector Edit Mode: ")
|
||||
.append(parm.getParmState().getVectorMode())
|
||||
.append("\n");
|
||||
}
|
||||
if (parm.getGridInfo().getGridType().equals(GridType.DISCRETE)
|
||||
|| parm.getGridInfo().getGridType()
|
||||
.equals(GridType.WEATHER)) {
|
||||
info.append("Weather/Discrete Combine Mode: ")
|
||||
.append(parm.getParmState().getCombineMode())
|
||||
.append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
info.append("Selected: ")
|
||||
.append((parm.getParmState().isSelected() ? "Yes" : "No"))
|
||||
.append("\n");
|
||||
|
||||
if (parm.getParmState().isSelected()) {
|
||||
info.append("Selected Time Range: ")
|
||||
.append(this.timeRangeToGMT(parm.getParmState()
|
||||
.getSelectedTimeRange())).append("\n");
|
||||
}
|
||||
info.append("Graphic Color: ")
|
||||
.append(formatRGB(parm.getDisplayAttributes()
|
||||
.getBaseColor())).append("\n");
|
||||
}
|
||||
|
||||
if (parm.isMutable()) {
|
||||
|
||||
if (parm.getGridInfo().getGridType().equals(GridType.SCALAR)
|
||||
|| parm.getGridInfo().getGridType().equals(GridType.VECTOR)) {
|
||||
info.append("Delta value: ")
|
||||
.append(parm.getParmState().getDeltaValue())
|
||||
.append("\n");
|
||||
}
|
||||
info.append("Assign Value: ")
|
||||
.append(parm.getParmState().getPickUpValue()).append("\n");
|
||||
|
||||
if (parm.getGridInfo().getGridType().equals(GridType.VECTOR)) {
|
||||
info.append("Vector Edit Mode: ")
|
||||
.append(parm.getParmState().getVectorMode())
|
||||
.append("\n");
|
||||
}
|
||||
if (parm.getGridInfo().getGridType().equals(GridType.DISCRETE)
|
||||
|| parm.getGridInfo().getGridType()
|
||||
.equals(GridType.WEATHER)) {
|
||||
info.append("Weather/Discrete Combine Mode: ")
|
||||
.append(parm.getParmState().getCombineMode())
|
||||
.append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
info.append("Selected: ")
|
||||
.append((parm.getParmState().isSelected() ? "Yes" : "No"))
|
||||
.append("\n");
|
||||
|
||||
if (parm.getParmState().isSelected()) {
|
||||
info.append("Selected Time Range: ")
|
||||
.append(this.timeRangeToGMT(parm.getParmState()
|
||||
.getSelectedTimeRange())).append("\n");
|
||||
}
|
||||
info.append("Graphic Color: ")
|
||||
.append(formatRGB(parm.getDisplayAttributes().getBaseColor()))
|
||||
.append("\n");
|
||||
|
||||
return info.toString();
|
||||
}
|
||||
|
||||
|
@ -426,14 +429,26 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
return value;
|
||||
}
|
||||
|
||||
private int[] calcCounts(Grid2DByte grid, int numKeys) {
|
||||
int[] counts = new int[numKeys];
|
||||
|
||||
byte[] data = grid.getBytes();
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
int index = data[i] & 0xFF;
|
||||
counts[index]++;
|
||||
}
|
||||
return counts;
|
||||
}
|
||||
|
||||
private String getDataDistribution() {
|
||||
|
||||
StringBuilder info = new StringBuilder();
|
||||
info.append(getBoxTitle(gridData, true, "Data Distribution"));
|
||||
|
||||
if (gridData == null) {
|
||||
info.append("No Grid");
|
||||
info.append("\nNo Grid");
|
||||
} else {
|
||||
info.append("\n");
|
||||
if (parm.getGridInfo().getGridType().equals(GridType.SCALAR)) {
|
||||
Grid2DFloat grid = ((ScalarGridSlice) gridData.getGridSlice())
|
||||
.getScalarGrid();
|
||||
|
@ -450,23 +465,29 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
.append(getMaxMin(grid, false)).append("\n");
|
||||
} else if (parm.getGridInfo().getGridType()
|
||||
.equals(GridType.WEATHER)) {
|
||||
WeatherGridSlice slice = (WeatherGridSlice) gridData
|
||||
.getGridSlice();
|
||||
Grid2DByte grid = slice.getWeatherGrid();
|
||||
WeatherKey[] keys = slice.getKeys();
|
||||
|
||||
// TODO
|
||||
// for i in xrange(len(dta[1])):
|
||||
// count = self._calcCounts(dta, i)
|
||||
// info += `count` + " ----> " \
|
||||
// + AFPS.WeatherKey_string(dta[1][i]).keyAsPrettyString() \
|
||||
// + "\n"
|
||||
int[] counts = calcCounts(grid, keys.length);
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
info.append(counts[i]).append(" ----> ");
|
||||
info.append(keys[i].toPrettyString());
|
||||
info.append("\n");
|
||||
}
|
||||
} else if (parm.getGridInfo().getGridType()
|
||||
.equals(GridType.DISCRETE)) {
|
||||
// TODO
|
||||
// elif grid.type() == AFPS.Parm.DISCRETE:
|
||||
// for i in xrange(len(dta[1])):
|
||||
// count = self._calcCounts(dta, i)
|
||||
// info += `count` + " ----> " \
|
||||
// + dta[1][i] \
|
||||
// + "\n" else:
|
||||
|
||||
DiscreteGridSlice slice = (DiscreteGridSlice) gridData
|
||||
.getGridSlice();
|
||||
Grid2DByte grid = slice.getDiscreteGrid();
|
||||
DiscreteKey[] keys = slice.getKey();
|
||||
int[] counts = calcCounts(grid, keys.length);
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
info.append(counts[i]).append(" ----> ");
|
||||
info.append(keys[i].toString());
|
||||
info.append("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -479,9 +500,9 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
info.append(getBoxTitle(gridData, true, "Grid Information"));
|
||||
|
||||
if (gridData == null) {
|
||||
info.append("No Grid");
|
||||
info.append("\nNo Grid");
|
||||
} else {
|
||||
info.append("Grid okay to edit: ")
|
||||
info.append("\nGrid okay to edit: ")
|
||||
.append((gridData.isOkToEdit() ? "Yes" : "No"))
|
||||
.append("\n");
|
||||
|
||||
|
@ -513,7 +534,7 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
StringBuilder info = new StringBuilder();
|
||||
info.append(getBoxTitle(null, false, "Weather Element Information"));
|
||||
|
||||
info.append("Weather Element Name: ")
|
||||
info.append("\nWeather Element Name: ")
|
||||
.append(parm.getParmID().getParmName()).append("\n");
|
||||
|
||||
info.append("Weather Element Level: ")
|
||||
|
@ -587,7 +608,8 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
} else {
|
||||
for (GridDataHistory h : gridData.getHistory()) {
|
||||
|
||||
info.append("Grid origin: ").append(h.getOrigin()).append("\n");
|
||||
info.append("\nGrid origin: ").append(h.getOrigin())
|
||||
.append("\n");
|
||||
info.append("Original Source: ")
|
||||
.append(uiFormat.uiParmIDcollapsed(h.getOriginParm()))
|
||||
.append("\n");
|
||||
|
@ -678,7 +700,7 @@ public class GridInfoDialog extends CaveJFACEDialog implements
|
|||
info.append("\n");
|
||||
}
|
||||
|
||||
info.append("\n").append(title).append(":\n\n");
|
||||
info.append("\n").append(title).append(":\n");
|
||||
return info.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ 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.TimeRange;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
@ -346,7 +347,20 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
|
||||
Set<VtecObject> vtecsToAssignEtn = GFEVtecUtil
|
||||
.getVtecLinesThatNeedEtn(productText);
|
||||
Map<String, Integer> etnCache = new HashMap<String, Integer>();
|
||||
// With GFE VTEC products, it's possible to have multiple segments
|
||||
// with
|
||||
// NEW vtec action codes and the same phensig. For this reason,
|
||||
// HazardsTable.py implemented a "cache" that would ensure all NEWs
|
||||
// for
|
||||
// the same phensig would be assigned the same ETN. This Map
|
||||
// replicates
|
||||
// that legacy behavior.
|
||||
//
|
||||
// This "cache" has two levels:
|
||||
// 1. The first level is keyed by the hazard's phensig.
|
||||
// 2. The second level is keyed by the valid period of the hazard.
|
||||
// Effectively, making this a Map<Phensig, Map<ValidPeriod, ETN>>.
|
||||
Map<String, Map<TimeRange, Integer>> etnCache = new HashMap<String, Map<TimeRange, Integer>>();
|
||||
|
||||
for (VtecObject vtec : vtecsToAssignEtn) {
|
||||
try {
|
||||
|
@ -410,7 +424,15 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
etnCache.put(vtec.getPhensig(), serverResponse.getNextEtn());
|
||||
TimeRange validPeriod = new TimeRange(vtec.getStartTime()
|
||||
.getTime(), vtec.getEndTime().getTime());
|
||||
String phensig = vtec.getPhensig();
|
||||
Map<TimeRange, Integer> etnsByTR = etnCache.get(phensig);
|
||||
if (etnsByTR == null) {
|
||||
etnsByTR = new HashMap<TimeRange, Integer>();
|
||||
etnCache.put(phensig, etnsByTR);
|
||||
}
|
||||
etnsByTR.put(validPeriod, serverResponse.getNextEtn());
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.CRITICAL,
|
||||
"Error setting ETNs for product", e);
|
||||
|
|
|
@ -59,7 +59,6 @@ import org.opengis.referencing.operation.TransformException;
|
|||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.exception.GfeException;
|
||||
import com.raytheon.uf.common.localization.FileUpdatedMessage;
|
||||
import com.raytheon.uf.common.localization.FileUpdatedMessage.FileChangeType;
|
||||
import com.raytheon.uf.common.localization.ILocalizationFileObserver;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
|
@ -98,6 +97,8 @@ import com.raytheon.viz.gfe.ui.zoneselector.ZoneSelector;
|
|||
* Oct 17, 2013 2481 randerso Fixed regression which cause configured level combinations
|
||||
* files to not be found. Removed message when combinations file
|
||||
* not found to match A1.
|
||||
* Dec 03, 2013 #2591 dgilling Ensure all change states to the combo
|
||||
* file are handled.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -985,8 +986,7 @@ public class ZoneCombinerComp extends Composite implements
|
|||
*/
|
||||
@Override
|
||||
public void fileUpdated(FileUpdatedMessage message) {
|
||||
if ((message.getChangeType().equals(FileChangeType.UPDATED))
|
||||
&& message.getFileName().equalsIgnoreCase(currentComboFile)) {
|
||||
if (message.getFileName().equalsIgnoreCase(currentComboFile)) {
|
||||
File file = new File(message.getFileName());
|
||||
String comboName = file.getName().replace(".py", "");
|
||||
statusHandler
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.util.regex.Matcher;
|
|||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.raytheon.uf.common.activetable.response.GetNextEtnResponse;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.common.util.StringUtil;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.viz.texteditor.util.VtecObject;
|
||||
|
@ -54,6 +55,9 @@ import com.raytheon.viz.texteditor.util.VtecUtil;
|
|||
* phensig.
|
||||
* Aug 29, 2013 #1843 dgilling Add hooks for inter-site ETN assignment.
|
||||
* Oct 21, 2013 #1843 dgilling Use new GetNextEtnResponse.
|
||||
* Nov 22, 2013 #2578 dgilling Fix ETN assignment for products with
|
||||
* multiple NEW VTEC lines for the same
|
||||
* phensig but disjoint TimeRanges.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -222,7 +226,7 @@ public class GFEVtecUtil {
|
|||
* If an error occurred sending the request to the server.
|
||||
*/
|
||||
public static String finalizeETNs(String product,
|
||||
Map<String, Integer> etnCache) {
|
||||
Map<String, Map<TimeRange, Integer>> etnCache) {
|
||||
if (StringUtil.isEmptyString(product)) {
|
||||
return product;
|
||||
}
|
||||
|
@ -239,14 +243,45 @@ public class GFEVtecUtil {
|
|||
.contains(vtec.getOffice()) && TROPICAL_PHENSIGS
|
||||
.contains(vtec.getPhensig())))) {
|
||||
// With GFE VTEC products, it's possible to have multiple
|
||||
// segments with NEW vtec action codes and the same phensig. For
|
||||
// this reason, HazardsTable.py implemented a "cache" that would
|
||||
// ensure all NEWs for the same phensig would be assigned the
|
||||
// same ETN. The etnCache Map replicaes this behavior.
|
||||
// segments with
|
||||
// NEW vtec action codes and the same phensig. For this reason,
|
||||
// HazardsTable.py implemented a "cache" that would ensure all
|
||||
// NEWs for
|
||||
// the same phensig would be assigned the same ETN. This Map
|
||||
// replicates
|
||||
// that legacy behavior.
|
||||
//
|
||||
// This "cache" has two levels:
|
||||
// 1. The first level is keyed by the hazard's phensig.
|
||||
// 2. The second level is keyed by the valid period of the
|
||||
// hazard.
|
||||
// Effectively, making this a Map<Phensig, Map<ValidPeriod,
|
||||
// ETN>>.
|
||||
|
||||
// Some more clarification on the ETN assignment behavior: all
|
||||
// NEW VTEC lines with the same phensig should be assigned the
|
||||
// same ETN if the hazards' valid periods are adjacent or
|
||||
// overlapping.
|
||||
// If there's a discontinuity in TimeRanges we increment to the
|
||||
// next ETN.
|
||||
Integer newEtn = null;
|
||||
String cacheKey = vtec.getPhensig();
|
||||
Integer newEtn = etnCache.get(cacheKey);
|
||||
vtec.setSequence(newEtn);
|
||||
TimeRange validPeriod = new TimeRange(vtec.getStartTime()
|
||||
.getTime(), vtec.getEndTime().getTime());
|
||||
|
||||
Map<TimeRange, Integer> etnsByTR = etnCache.get(cacheKey);
|
||||
if (etnsByTR != null) {
|
||||
newEtn = etnsByTR.get(validPeriod);
|
||||
for (TimeRange tr : etnsByTR.keySet()) {
|
||||
if ((validPeriod.isAdjacentTo(tr))
|
||||
|| (validPeriod.overlaps(tr))) {
|
||||
vtec.setSequence(newEtn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vtecMatcher
|
||||
.appendReplacement(
|
||||
finalOutput,
|
||||
|
|
|
@ -34,14 +34,14 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
|
||||
|
||||
/**
|
||||
* This class contains several utility methods that construct a ProfilerObs
|
||||
* instance from the BUFR decoded data.
|
||||
* Convert bufr packets into level data for bufrua mandatory levels.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 20080303 969 jkorman Initial implementation.
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Mar 03, 2008 969 jkorman Initial implementation.
|
||||
* Dec 05, 2013 2612 bsteffen Fix max wind decoding.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -212,8 +212,8 @@ public class BUFRUAManLevelAdapter extends AbstractBUFRUAAdapter {
|
|||
double pres = getDouble(p.get(0), -9999);
|
||||
if (pres > 0) {
|
||||
setViewData("prMaxW", view, p.get(0), maxWindIdx);
|
||||
setViewData("wdMaxW", view, p.get(3), maxWindIdx);
|
||||
setViewData("wsMaxW", view, p.get(4), maxWindIdx);
|
||||
setViewData("wdMaxW", view, p.get(2), maxWindIdx);
|
||||
setViewData("wsMaxW", view, p.get(3), maxWindIdx);
|
||||
maxWindIdx++;
|
||||
}
|
||||
if (maxWindIdx == maxMaxWinds) {
|
||||
|
|
|
@ -23,6 +23,7 @@ import static com.raytheon.uf.edex.decodertools.bufr.packets.DataPacketTypes.Rep
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.edex.plugin.bufrua.util.SigWindHeightConversionManager;
|
||||
import com.raytheon.uf.common.dataplugin.bufrua.LayerTools;
|
||||
import com.raytheon.uf.common.dataplugin.bufrua.UAObs;
|
||||
import com.raytheon.uf.common.pointdata.Dimension;
|
||||
|
@ -34,15 +35,16 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Convert bufr packets into level data for bufrua significant levels.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 21, 2009 jkorman Initial creation
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Jul 21, 2009 jkorman Initial creation
|
||||
* Dec 05, 2013 2612 bsteffen Convert heights for sig wind layers.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -190,6 +192,8 @@ public class BUFRUASigLevelAdapter extends AbstractBUFRUAAdapter {
|
|||
.getValue();
|
||||
int sig = getInt(p.get(1), IDecoderConstants.VAL_MISSING);
|
||||
double height = getDouble(p.get(0), -9999);
|
||||
height = SigWindHeightConversionManager.convertHeight(
|
||||
pointData, height);
|
||||
if (sig == 2) {
|
||||
if ((height > 0) && (height < 30000)) {
|
||||
view.setFloat(LayerTools.HT_SIGW, (float) height,
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.bufrua.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
* List of conversion factors for bufrua sites.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Dec 05, 2013 2612 bsteffen Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
* @see SigWindHeightConversionManager
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlRootElement
|
||||
public class SigWindHeightConversionList {
|
||||
|
||||
@XmlElement(name = "conversion")
|
||||
private List<SigWindHeightConversion> entries;
|
||||
|
||||
public List<SigWindHeightConversion> getEntries() {
|
||||
return entries;
|
||||
}
|
||||
|
||||
public void setEntries(List<SigWindHeightConversion> entries) {
|
||||
this.entries = entries;
|
||||
}
|
||||
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public static class SigWindHeightConversion {
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
private String stationId;
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
private double factor;
|
||||
|
||||
public String getStationId() {
|
||||
return stationId;
|
||||
}
|
||||
|
||||
public void setStationId(String stationId) {
|
||||
this.stationId = stationId;
|
||||
}
|
||||
|
||||
public double getFactor() {
|
||||
return factor;
|
||||
}
|
||||
|
||||
public void setFactor(double factor) {
|
||||
this.factor = factor;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.bufrua.util;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import com.raytheon.edex.plugin.bufrua.util.SigWindHeightConversionList.SigWindHeightConversion;
|
||||
import com.raytheon.uf.common.dataplugin.bufrua.UAObs;
|
||||
import com.raytheon.uf.common.localization.AutoUpdatingLocalizationFile;
|
||||
import com.raytheon.uf.common.localization.AutoUpdatingLocalizationFile.AutoUpdatingFileChangedListener;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.serialization.JAXBManager;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
/**
|
||||
* Some UAObs are incorrectly encoded so the Significant Wind heights are
|
||||
* multiples of 300 meters when in fact the observations were really taken at
|
||||
* multiples of 1000 feet. A conversion list is serialised and can be used to
|
||||
* determine which sites require unit conversion for the heights to match the
|
||||
* actual observations.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Dec 06, 2013 2612 bsteffen Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SigWindHeightConversionManager implements
|
||||
AutoUpdatingFileChangedListener {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(SigWindHeightConversionList.class);
|
||||
|
||||
private static final String FILE_NAME = "bufrua/sigWindHeightConversion.xml";
|
||||
|
||||
private static final SigWindHeightConversionManager instance = new SigWindHeightConversionManager();
|
||||
|
||||
/* Must keep reference to the file or listener doesn't work */
|
||||
@SuppressWarnings("unused")
|
||||
private final AutoUpdatingLocalizationFile file;
|
||||
|
||||
private Map<String, Double> factors;
|
||||
|
||||
private SigWindHeightConversionManager() {
|
||||
AutoUpdatingLocalizationFile file = null;
|
||||
try {
|
||||
file = new AutoUpdatingLocalizationFile(FILE_NAME,
|
||||
LocalizationType.EDEX_STATIC);
|
||||
file.addListener(this);
|
||||
loadFactors(file);
|
||||
} catch (Throwable e) {
|
||||
/*
|
||||
* Do not allow exceptions to propogate, this would break class
|
||||
* loading, instead no conversion will ever occur.
|
||||
*/
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"An error has occured loading the SigWind Height Conversion factors.",
|
||||
e);
|
||||
factors = Collections.emptyMap();
|
||||
}
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fileChanged(AutoUpdatingLocalizationFile file) {
|
||||
try {
|
||||
loadFactors(file);
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"An error has occured reloading the SigWind Height Conversion factors.",
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadFactors(AutoUpdatingLocalizationFile file)
|
||||
throws SerializationException, JAXBException {
|
||||
SigWindHeightConversionList list = file.loadObject(
|
||||
new JAXBManager(SigWindHeightConversionList.class),
|
||||
SigWindHeightConversionList.class);
|
||||
Map<String, Double> result = new HashMap<String, Double>(list
|
||||
.getEntries().size(), 1.0f);
|
||||
for (SigWindHeightConversion entry : list.getEntries()) {
|
||||
result.put(entry.getStationId(), entry.getFactor());
|
||||
}
|
||||
factors = result;
|
||||
}
|
||||
|
||||
public double getFactor(String stationId) {
|
||||
Double factor = factors.get(stationId);
|
||||
if (factor != null) {
|
||||
return factor.doubleValue();
|
||||
} else {
|
||||
return 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
public static double convertHeight(UAObs obs, double height) {
|
||||
return height * instance.getFactor(obs.getStationId());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,300 @@
|
|||
<sigWindHeightConversionList>
|
||||
<!-- Some UAObs are incorrectly encoded so the Significant Wind heights
|
||||
are multiples of 300 meters when in fact the observations were really taken
|
||||
at multiples of 1000 feet. This list specifies all affected sites and the
|
||||
corresponding conversion factor. -->
|
||||
<!--Tatoosh Island, WA -->
|
||||
<conversion stationId="72798" factor="1.016" />
|
||||
<!--South Vandenberg AFB -->
|
||||
<conversion stationId="74606" factor="1.016" />
|
||||
<!--Yuma, AZ (K1Y7) -->
|
||||
<conversion stationId="74004" factor="1.016" />
|
||||
<!--Yuma PG Site 2, AZ (K1Y8) -->
|
||||
<conversion stationId="74005" factor="1.016" />
|
||||
<!--Yuma PG Site 3, AZ (K1Y9) -->
|
||||
<conversion stationId="74006" factor="1.016" />
|
||||
<!--Albuquerque, NM (KABQ) -->
|
||||
<conversion stationId="72365" factor="1.016" />
|
||||
<!--Boise, ID (KBOI) -->
|
||||
<conversion stationId="72681" factor="1.016" />
|
||||
<!--Denver, CO (KDNR) -->
|
||||
<conversion stationId="72469" factor="1.016" />
|
||||
<!--Desert Rock, NV (KDRA) -->
|
||||
<conversion stationId="72387" factor="1.016" />
|
||||
<!--Edwards AFB, CA (KEDW) -->
|
||||
<conversion stationId="72381" factor="1.016" />
|
||||
<!--Flagstaff, AZ (KFGZ) -->
|
||||
<conversion stationId="72376" factor="1.016" />
|
||||
<!--Glasgow, MT (KGGW) -->
|
||||
<conversion stationId="72768" factor="1.016" />
|
||||
<!--Grand Junction, CO (KGJT) -->
|
||||
<conversion stationId="72476" factor="1.016" />
|
||||
<!--Elko, NV (KLKN) -->
|
||||
<conversion stationId="72582" factor="1.016" />
|
||||
<!--Las Vegas, NV (KVEF) -->
|
||||
<conversion stationId="72388" factor="1.016" />
|
||||
<!--Medford, OR (KMFR) -->
|
||||
<conversion stationId="72597" factor="1.016" />
|
||||
<!--San Diego, CA (KNKX) -->
|
||||
<conversion stationId="72293" factor="1.016" />
|
||||
<!--San Nicholas Island, CA (KNSI) -->
|
||||
<conversion stationId="72291" factor="1.016" />
|
||||
<!--Pt. Mugu NAWS, CA (KNTD) -->
|
||||
<conversion stationId="72391" factor="1.016" />
|
||||
<!--Oakland, CA (KOAK) -->
|
||||
<conversion stationId="72493" factor="1.016" />
|
||||
<!--Spokane, WA (KOTX) -->
|
||||
<conversion stationId="72786" factor="1.016" />
|
||||
<!--Phoenix (KPSR) -->
|
||||
<conversion stationId="74626" factor="1.016" />
|
||||
<!--Reno, NV (KREV) -->
|
||||
<conversion stationId="72489" factor="1.016" />
|
||||
<!--Riverton, WY (KRIW) -->
|
||||
<conversion stationId="72672" factor="1.016" />
|
||||
<!--Salt Lake City, UT (KSLC) -->
|
||||
<conversion stationId="72572" factor="1.016" />
|
||||
<!--Salem, OR (KSLE) -->
|
||||
<conversion stationId="72694" factor="1.016" />
|
||||
<!--Great Falls, MT (KTFX) -->
|
||||
<conversion stationId="72776" factor="1.016" />
|
||||
<!--Tucson, AZ (KTWC) -->
|
||||
<conversion stationId="72274" factor="1.016" />
|
||||
<!--Quillayute, WA (KUIL) -->
|
||||
<conversion stationId="72797" factor="1.016" />
|
||||
<!--Vanderberg AFB, CA (KVBG) -->
|
||||
<conversion stationId="72393" factor="1.016" />
|
||||
<!--White Sands, NM (KWSD) -->
|
||||
<conversion stationId="72269" factor="1.016" />
|
||||
<!--Yuma (Marine), AZ (KYUM) -->
|
||||
<conversion stationId="72280" factor="1.016" />
|
||||
<!--Aberdeen, SD (KABR) -->
|
||||
<conversion stationId="72659" factor="1.016" />
|
||||
<!--Amarillo, TX (KAMA) -->
|
||||
<conversion stationId="72363" factor="1.016" />
|
||||
<!--Bismarck, ND (KBIS) -->
|
||||
<conversion stationId="72764" factor="1.016" />
|
||||
<!--Brownsville, TX (KBRO) -->
|
||||
<conversion stationId="72250" factor="1.016" />
|
||||
<!--Corpus Christi, TX (KCRP) -->
|
||||
<conversion stationId="72251" factor="1.016" />
|
||||
<!--Dodge City, KS (KDDC) -->
|
||||
<conversion stationId="72451" factor="1.016" />
|
||||
<!--Del Rio, TX (KDRT) -->
|
||||
<conversion stationId="72261" factor="1.016" />
|
||||
<!--Quad Cities, IL (KDVN) -->
|
||||
<conversion stationId="74455" factor="1.016" />
|
||||
<!--El Paso, TX (KEPZ) -->
|
||||
<conversion stationId="72364" factor="1.016" />
|
||||
<!--Fort Worth, TX (KFWD) -->
|
||||
<conversion stationId="72249" factor="1.016" />
|
||||
<!--Green Bay, WI (KGRB) -->
|
||||
<conversion stationId="72645" factor="1.016" />
|
||||
<!--Fort Hood, TX (KHLR) -->
|
||||
<conversion stationId="72257" factor="1.016" />
|
||||
<!--Lincoln, IL (KILX) -->
|
||||
<conversion stationId="74560" factor="1.016" />
|
||||
<!--International Falls, MN (KINL) -->
|
||||
<conversion stationId="72747" factor="1.016" />
|
||||
<!--North Platte, NE (KLBF) -->
|
||||
<conversion stationId="72562" factor="1.016" />
|
||||
<!--Little Rock, AR (KLZK) -->
|
||||
<conversion stationId="72340" factor="1.016" />
|
||||
<!--Midland, TX (KMAF) -->
|
||||
<conversion stationId="72265" factor="1.016" />
|
||||
<!--Minneapolis, MN (KMPX) -->
|
||||
<conversion stationId="72649" factor="1.016" />
|
||||
<!--Omaha, NE (KOAX) -->
|
||||
<conversion stationId="72558" factor="1.016" />
|
||||
<!--Oklahoma City, OK (KOUN) -->
|
||||
<conversion stationId="72357" factor="1.016" />
|
||||
<!--Springfield, MO (KSGF) -->
|
||||
<conversion stationId="72440" factor="1.016" />
|
||||
<!--Topeka, KS (KTOP) -->
|
||||
<conversion stationId="72456" factor="1.016" />
|
||||
<!--Rapid City, SD (KUNR) -->
|
||||
<conversion stationId="72662" factor="1.016" />
|
||||
<!--Albany, NY (KALY) -->
|
||||
<conversion stationId="72518" factor="1.016" />
|
||||
<!--Phillips AAF, Aberdeen, MD (KAPG) -->
|
||||
<conversion stationId="74002" factor="1.016" />
|
||||
<!--Gaylord, MI (KAPX) -->
|
||||
<conversion stationId="72634" factor="1.016" />
|
||||
<!--Birmingham, AL (KBMX) -->
|
||||
<conversion stationId="72230" factor="1.016" />
|
||||
<!--Buffalo, NY (KBUF) -->
|
||||
<conversion stationId="72528" factor="1.016" />
|
||||
<!--Caribou, ME (KCAR) -->
|
||||
<conversion stationId="72712" factor="1.016" />
|
||||
<!--Chatham, MA (KCHH) -->
|
||||
<conversion stationId="74494" factor="1.016" />
|
||||
<!--Charleston, SC (KCHS) -->
|
||||
<conversion stationId="72208" factor="1.016" />
|
||||
<!--Detroit, MI (KDTX) -->
|
||||
<conversion stationId="72632" factor="1.016" />
|
||||
<!--Key West, FL (KKEY) -->
|
||||
<conversion stationId="72201" factor="1.016" />
|
||||
<!--Atlanta, GA (KFFC) -->
|
||||
<conversion stationId="72215" factor="1.016" />
|
||||
<!--Greensboro, NC (KGSO) -->
|
||||
<conversion stationId="72317" factor="1.016" />
|
||||
<!--Portland, ME (KGYX) -->
|
||||
<conversion stationId="74389" factor="1.016" />
|
||||
<!--Cincinnati, OH (KILN) -->
|
||||
<conversion stationId="72426" factor="1.016" />
|
||||
<!--Jackson, MS (KJAN) -->
|
||||
<conversion stationId="72235" factor="1.016" />
|
||||
<!--Jacksonville, FL (KJAX) -->
|
||||
<conversion stationId="72206" factor="1.016" />
|
||||
<!--Lake Charles, LA (KLCH) -->
|
||||
<conversion stationId="72240" factor="1.016" />
|
||||
<!--New Orleans, LA (KLIX) -->
|
||||
<conversion stationId="72233" factor="1.016" />
|
||||
<!--Wash-Dulles, VA (KIAD) -->
|
||||
<conversion stationId="72403" factor="1.016" />
|
||||
<!--Miami, FL (KMFL) -->
|
||||
<conversion stationId="72202" factor="1.016" />
|
||||
<!--Morehead City, NC (KMHX) -->
|
||||
<conversion stationId="72305" factor="1.016" />
|
||||
<!--Nashville, TN (KOHX) -->
|
||||
<conversion stationId="72327" factor="1.016" />
|
||||
<!--Upton, NY (KOKX) -->
|
||||
<conversion stationId="72501" factor="1.016" />
|
||||
<!--Pittsburgh, PA (KPBZ) -->
|
||||
<conversion stationId="72520" factor="1.016" />
|
||||
<!--Roanoke, VA (KRNK) -->
|
||||
<conversion stationId="72318" factor="1.016" />
|
||||
<!--Shreveport, LA (KSHV) -->
|
||||
<conversion stationId="72248" factor="1.016" />
|
||||
<!--Tallahasee, FL (KTAE) -->
|
||||
<conversion stationId="72214" factor="1.016" />
|
||||
<!--Tampa Bay, FL (KTBW) -->
|
||||
<conversion stationId="72210" factor="1.016" />
|
||||
<!--Valparaiso/Eglin, FL (KVPS) -->
|
||||
<conversion stationId="72221" factor="1.016" />
|
||||
<!--Wallops Island, VA (KWAL) -->
|
||||
<conversion stationId="72402" factor="1.016" />
|
||||
<!--Cape Canaveral, FL (KXMR) -->
|
||||
<conversion stationId="74794" factor="1.016" />
|
||||
<!--Redstone Arsenal, AL -->
|
||||
<conversion stationId="74001" factor="1.016" />
|
||||
<!--Eureka, NW (CWEU) -->
|
||||
<conversion stationId="71917" factor="1.016" />
|
||||
<!--Sachs Harbour, NW (CWSY) -->
|
||||
<conversion stationId="71051" factor="1.016" />
|
||||
<!--Baker Lake, NW (CYBK) -->
|
||||
<conversion stationId="71926" factor="1.016" />
|
||||
<!--Cambridge Bay, NW (CYCB) -->
|
||||
<conversion stationId="71925" factor="1.016" />
|
||||
<!--Inuvik, NW (CYEV) -->
|
||||
<conversion stationId="71957" factor="1.016" />
|
||||
<!--Frobisher Bay, NW (CYFB) -->
|
||||
<conversion stationId="71909" factor="1.016" />
|
||||
<!--Alert, NW (CYLT) -->
|
||||
<conversion stationId="71082" factor="1.016" />
|
||||
<!--Resolute Bay, NW (CYRB) -->
|
||||
<conversion stationId="71924" factor="1.016" />
|
||||
<!--Fort Smith, NW (CYSM) -->
|
||||
<conversion stationId="71934" factor="1.016" />
|
||||
<!--Hall Beach, NW (CYUX) -->
|
||||
<conversion stationId="71081" factor="1.016" />
|
||||
<!--Nonman Wells, NW (CYVQ) -->
|
||||
<conversion stationId="71043" factor="1.016" />
|
||||
<!--Whitehorse, YK (CYXY) -->
|
||||
<conversion stationId="71964" factor="1.016" />
|
||||
<!--Coral Harbour, NW (CYZS) -->
|
||||
<conversion stationId="71915" factor="1.016" />
|
||||
<!--Edmonton/Stony, AB (CWEG) -->
|
||||
<conversion stationId="71119" factor="1.016" />
|
||||
<!--Edmonton/Namao, AB (CYED) -->
|
||||
<conversion stationId="71121" factor="1.016" />
|
||||
<!--Edmonton Airport, AB (CYEG) -->
|
||||
<conversion stationId="71123" factor="1.016" />
|
||||
<!--Kelowna, BC (CYLW) -->
|
||||
<conversion stationId="71203" factor="1.016" />
|
||||
<!--Cold Lake, AB (CYOD) -->
|
||||
<conversion stationId="71120" factor="1.016" />
|
||||
<!--Edmonton, AB (CYXD) -->
|
||||
<conversion stationId="71879" factor="1.016" />
|
||||
<!--Prince George, BC (CYXS) -->
|
||||
<conversion stationId="71896" factor="1.016" />
|
||||
<!--Fort Nelson, BC (CYYE) -->
|
||||
<conversion stationId="71945" factor="1.016" />
|
||||
<!--Victoria, BC (CYYJ) -->
|
||||
<conversion stationId="71799" factor="1.016" />
|
||||
<!--Port Hardy, BC (CYZT) -->
|
||||
<conversion stationId="71109" factor="1.016" />
|
||||
<!--Camp Shilo, MB (CWLO) -->
|
||||
<conversion stationId="71853" factor="1.016" />
|
||||
<!--Pickle Lake, ON (CWPL) -->
|
||||
<conversion stationId="71845" factor="1.016" />
|
||||
<!--The Pas, MB (CYQD) -->
|
||||
<conversion stationId="71867" factor="1.016" />
|
||||
<!--Churchill, MB (CYYQ) -->
|
||||
<conversion stationId="71913" factor="1.016" />
|
||||
<!--Placentia, NF (CWAR) -->
|
||||
<conversion stationId="71807" factor="1.016" />
|
||||
<!--Maniwaki, QB (CWMW) -->
|
||||
<conversion stationId="71722" factor="1.016" />
|
||||
<!--Shelburne, NS (CWOS) -->
|
||||
<conversion stationId="71399" factor="1.016" />
|
||||
<!--Sable Island, NS (CWSA) -->
|
||||
<conversion stationId="71600" factor="1.016" />
|
||||
<!--Moosonee, ON (CWZC) -->
|
||||
<conversion stationId="71836" factor="1.016" />
|
||||
<!--La Grande 4, QB (CYAH) -->
|
||||
<conversion stationId="71823" factor="1.016" />
|
||||
<!--Camp Gagetown NB (CYCX) -->
|
||||
<conversion stationId="71701" factor="1.016" />
|
||||
<!--Halifax Metoc, NS (CYHZ) -->
|
||||
<conversion stationId="71396" factor="1.016" />
|
||||
<!--Stephenville, NF (CYJT) -->
|
||||
<conversion stationId="71815" factor="1.016" />
|
||||
<!--Inoucdjouac, QB (CYPH) -->
|
||||
<conversion stationId="71907" factor="1.016" />
|
||||
<!--Yarmouth, NS (CYQI) -->
|
||||
<conversion stationId="71603" factor="1.016" />
|
||||
<!--Montreal/Dorval, QB (CYUL) -->
|
||||
<conversion stationId="71627" factor="1.016" />
|
||||
<!--Fort Chimo, QB (CYVP) -->
|
||||
<conversion stationId="71906" factor="1.016" />
|
||||
<!--Goose Bay, NF (CYYR) -->
|
||||
<conversion stationId="71816" factor="1.016" />
|
||||
<!--St. Johns/Torbay, NF (CYYT) -->
|
||||
<conversion stationId="71801" factor="1.016" />
|
||||
<!--Toronto Int'l, ON (CYYZ) -->
|
||||
<conversion stationId="71624" factor="1.016" />
|
||||
<!--Sept-lies, QB (CYZV) -->
|
||||
<conversion stationId="71811" factor="1.016" />
|
||||
<!--Adak/Davis AFB, AK -->
|
||||
<conversion stationId="70454" factor="1.016" />
|
||||
<!--Barter Island, AK (PABA) -->
|
||||
<conversion stationId="70086" factor="1.016" />
|
||||
<!--Bethel, AK (PABE) -->
|
||||
<conversion stationId="70219" factor="1.016" />
|
||||
<!--Barrow, AK (PABR) -->
|
||||
<conversion stationId="70026" factor="1.016" />
|
||||
<!--Cold Bay, AK (PACB) -->
|
||||
<conversion stationId="70316" factor="1.016" />
|
||||
<!--Kodiak, AK (PADQ) -->
|
||||
<conversion stationId="70350" factor="1.016" />
|
||||
<!--Fairbanks, AK (PAFA) -->
|
||||
<conversion stationId="70261" factor="1.016" />
|
||||
<!--Anchorage, AK (PAFC) -->
|
||||
<conversion stationId="70273" factor="1.016" />
|
||||
<!--King Salmon, AK (PAKN) -->
|
||||
<conversion stationId="70326" factor="1.016" />
|
||||
<!--McGrath, AK (PAMC) -->
|
||||
<conversion stationId="70231" factor="1.016" />
|
||||
<!--Annette Is, AK (PANT) -->
|
||||
<conversion stationId="70398" factor="1.016" />
|
||||
<!--Nome, AK (PAOM) -->
|
||||
<conversion stationId="70200" factor="1.016" />
|
||||
<!--Kotzebue, AK (PAOT) -->
|
||||
<conversion stationId="70133" factor="1.016" />
|
||||
<!--St. Paul Island, AK (PASN) -->
|
||||
<conversion stationId="70308" factor="1.016" />
|
||||
<!--Shemya AFB, AK (PASY) -->
|
||||
<conversion stationId="70414" factor="1.016" />
|
||||
<!--Yakutat, AK (PAYA) -->
|
||||
<conversion stationId="70361" factor="1.016" />
|
||||
</sigWindHeightConversionList>
|
|
@ -119,6 +119,7 @@ import com.raytheon.uf.edex.database.purge.PurgeLogger;
|
|||
* the same parm simultaneously.
|
||||
* Added code to check the purge times when publishing and not publish
|
||||
* data that is eligible to be purged.
|
||||
* 12/03/13 #2595 randerso Added check for null update time in commitGrid
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -581,7 +582,8 @@ public class GridParmManager {
|
|||
// if update time is less than publish time, grid
|
||||
// has not changed since last published,
|
||||
// therefore only update history, do not publish
|
||||
if ((gdh.getPublishTime() == null)
|
||||
if ((gdh.getUpdateTime() == null)
|
||||
|| (gdh.getPublishTime() == null)
|
||||
|| (gdh.getUpdateTime().getTime() > gdh
|
||||
.getPublishTime().getTime())
|
||||
// in service backup, times on srcHistory
|
||||
|
|
|
@ -22,7 +22,9 @@ package com.raytheon.edex.plugin.gfe.server.handler;
|
|||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.Writer;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -36,10 +38,13 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.common.util.StringUtil;
|
||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Request handler for <code>SaveCombinationsFileRequest</code>. Writes the
|
||||
* specified zone combinations to the specified site's combinations file
|
||||
* directory.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -48,6 +53,8 @@ import com.raytheon.uf.edex.core.EDEXUtil;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 16, 2011 dgilling Initial creation
|
||||
* Dec 02, 2013 #2591 dgilling Only send notification after Writer is
|
||||
* flushed/closed.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -79,43 +86,48 @@ public class SaveCombinationsFileHandler implements
|
|||
FileUtil.join(COMBO_FILE_DIR, request.getFileName()));
|
||||
boolean isAdded = (!localFile.exists());
|
||||
|
||||
List<Object> listOfCombos = new ArrayList<Object>();
|
||||
FileWriter file = null;
|
||||
Writer outWriter = null;
|
||||
try {
|
||||
file = new FileWriter(localFile);
|
||||
BufferedWriter out = new BufferedWriter(file);
|
||||
outWriter = new BufferedWriter(new FileWriter(localFile));
|
||||
String zoneComments = "\n# Automatically generated combinations file\n# "
|
||||
+ request.getFileName() + "\n\nCombinations = [\n";
|
||||
out.write(zoneComments);
|
||||
DecimalFormat df = new DecimalFormat("00");
|
||||
outWriter.write(zoneComments);
|
||||
|
||||
NumberFormat df = new DecimalFormat("00");
|
||||
for (int i = 0; i < request.getCombos().size(); i++) {
|
||||
StringBuilder nextLineToWrite = new StringBuilder();
|
||||
List<String> modZGL = new ArrayList<String>(request.getCombos()
|
||||
.get(i).size());
|
||||
for (String zone : request.getCombos().get(i)) {
|
||||
modZGL.add("'" + zone + "'");
|
||||
}
|
||||
listOfCombos.add("\t(" + modZGL + ", " + "'Region"
|
||||
+ df.format((i + 1)) + "' ),\n");
|
||||
out.write(listOfCombos.get(i).toString());
|
||||
nextLineToWrite.append("\t([");
|
||||
nextLineToWrite.append(StringUtil.join(modZGL, ','));
|
||||
nextLineToWrite.append("], ");
|
||||
nextLineToWrite.append("'Region");
|
||||
nextLineToWrite.append(df.format(i + 1));
|
||||
nextLineToWrite.append("' ),\n");
|
||||
outWriter.write(nextLineToWrite.toString());
|
||||
}
|
||||
out.write("]");
|
||||
out.close();
|
||||
|
||||
FileChangeType changeType = FileChangeType.UPDATED;
|
||||
if (isAdded) {
|
||||
changeType = FileChangeType.ADDED;
|
||||
}
|
||||
EDEXUtil.getMessageProducer().sendAsync(
|
||||
"utilityNotify",
|
||||
new FileUpdatedMessage(localization, FileUtil.join(
|
||||
COMBO_FILE_DIR, request.getFileName()), changeType,
|
||||
localFile.lastModified()));
|
||||
outWriter.write("]");
|
||||
} finally {
|
||||
if (file != null) {
|
||||
file.close();
|
||||
if (outWriter != null) {
|
||||
outWriter.close();
|
||||
}
|
||||
}
|
||||
|
||||
// placing the notification code here ensures we only send the
|
||||
// notification on a successful file write operation. Otherwise we would
|
||||
// have thrown an IOException and never gotten to this portion of the
|
||||
// request handler.
|
||||
FileChangeType changeType = isAdded ? FileChangeType.ADDED
|
||||
: FileChangeType.UPDATED;
|
||||
EDEXUtil.getMessageProducer().sendAsync(
|
||||
"utilityNotify",
|
||||
new FileUpdatedMessage(localization, FileUtil.join(
|
||||
COMBO_FILE_DIR, request.getFileName()), changeType,
|
||||
localFile.lastModified()));
|
||||
|
||||
return new ServerResponse<Object>();
|
||||
}
|
||||
|
||||
|
|
|
@ -763,7 +763,7 @@ def storeScalarWE(we, trList, file, timeRange, databaseID,
|
|||
for i in xrange(len(overlappingTimes) -1, -1, -1):
|
||||
ot = overlappingTimes[i]
|
||||
if not ot in histDict:
|
||||
del overlappingTime[i]
|
||||
del overlappingTimes[i]
|
||||
del timeList[i]
|
||||
elif we.getGpi().isRateParm():
|
||||
durRatio = (float(timeList[i][1]-timeList[i][0]))/float((ot[1]-ot[0]))
|
||||
|
|
|
@ -81,6 +81,9 @@ import com.raytheon.uf.common.time.TimeRange;
|
|||
* Jun 20, 2013 2127 rjpeter Added OnDelete annotation.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Sep 20, 2013 2147 rferrel Changes to archive hdf5 files.
|
||||
* Dec 03, 2013 2597 randerso Cleared gridHistory id when adding new history
|
||||
* records in consolidateHistory so dao will recognize
|
||||
* it as a new record
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -265,6 +268,7 @@ public class GFERecord extends PluginDataObject implements IPersistable {
|
|||
} else {
|
||||
GridDataHistory hist = newHistory.get(i);
|
||||
hist.setParent(this);
|
||||
hist.setId(0);
|
||||
gridHistory.add(hist);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4148,4 +4148,15 @@ in | .03937 | 0 | 4 | | |..|8000F0FF| | 16 | \
|
|||
<displayUnits>kts</displayUnits>
|
||||
</contourStyle>
|
||||
</styleRule>
|
||||
</styleRuleset>
|
||||
<styleRule>
|
||||
<paramLevelMatches>
|
||||
<parameter>SnowT</parameter>
|
||||
</paramLevelMatches>
|
||||
<contourStyle>
|
||||
<displayUnits>C</displayUnits>
|
||||
<contourLabeling>
|
||||
<values>-15 -5 0</values>
|
||||
</contourLabeling>
|
||||
</contourStyle>
|
||||
</styleRule>
|
||||
</styleRuleset>
|
|
@ -409,12 +409,9 @@ fi
|
|||
|
||||
if [ "${1}" = "-viz" ]; then
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-common-base"
|
||||
#buildRPM "awips2-common-base"
|
||||
#buildRPM "awips2-python-dynamicserialize"
|
||||
#buildRPM "awips2-gfesuite-client"
|
||||
#buildRPM "awips2-gfesuite-server"
|
||||
#buildRPM "awips2-python-numpy"
|
||||
buildRPM "awips2-python"
|
||||
#buildRPM "awips2-python"
|
||||
#buildRPM "awips2-adapt-native"
|
||||
#unpackHttpdPypies
|
||||
#if [ $? -ne 0 ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue