From ac4b06261ecb509fd64e648a177fccbbab2d83a4 Mon Sep 17 00:00:00 2001 From: "Rici.Yu" Date: Fri, 27 May 2016 08:51:46 -0400 Subject: [PATCH 1/3] ASM #19014 - Fix data rounding causing Td to be greater than T Change-Id: Id021a4ddc4959423e9e6184d6707b0363612351d Former-commit-id: cf774dbaa31261ca96eb643bd9b615448d2e19ab --- .../utility/edex_static/base/gfe/isc/ifpnetCDF.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py index a2620efc39..ef7e8f7d1e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py @@ -43,6 +43,8 @@ # NumPy 1.9. # 04/07/2016 5539 randerso Reversed order of parameters/return value in collapseKey # to match order of Wx/Discrete tuple +# 05/27/2016 19014 ryu Fix rounding issue causing Td to be greater than T +# in output netCDF file. # ## @@ -766,7 +768,7 @@ def storeScalarWE(we, trList, file, timeRange, databaseID, if multiplier is not None: cube -= offset cube *= multiplier - numpy.around(cube,out=cube) + numpy.floor(cube+0.5, out=cube) # normal trim else: digits = we.getGpi().getPrecision() From 598ab33215b584df42190f8480e16c2a3b7bc90a Mon Sep 17 00:00:00 2001 From: "Loubna.Bousaidi" Date: Fri, 27 May 2016 14:44:00 +0000 Subject: [PATCH 2/3] ASM #19012 fixed colorscale manager issue Change-Id: Ifa4cfd6b380cb1cf7dc8410a168d9e495c843ef1 Former-commit-id: 3b3b48303647927fcee67ee873271bc15f406488 --- .../datamanager/HydroDBDataManager.java | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/HydroDBDataManager.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/HydroDBDataManager.java index beda314b1b..5931af560b 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/HydroDBDataManager.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/HydroDBDataManager.java @@ -32,6 +32,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.viz.core.exception.VizException; +import com.raytheon.viz.hydrocommon.data.ColorValueData; import com.raytheon.viz.hydrocommon.data.HydroDBData; import com.raytheon.viz.hydrocommon.util.DbUtils; @@ -47,6 +48,8 @@ import com.raytheon.viz.hydrocommon.util.DbUtils; * Nov 03, 2011 11273 lbousaidi added updateNewData and putNewData. * Apr 18, 2013 1790 rferrel Code cleanup part of non-blocking dialogs. * Jan 15, 2016 DCS18180 JingtaoD code improvement based on code review for DR17935 + * May 27, 2016 19012 lbousaidi remove the check for apostrophe when there is a call to + * ColorDataValue table class * * * @author askripsky @@ -355,15 +358,29 @@ public class HydroDBDataManager extends HydroDataManager { try { @SuppressWarnings("unchecked") T newDataForQuery = (T) newData.getClass().newInstance(); - DbUtils.escapeSpecialCharforData(newData, newDataForQuery); - - // Check if it's going to be an update or insert - if (checkData(newDataForQuery) > 0) { - // Do an update - updateData(newDataForQuery); + if (newData.getClass().getName().contains(ColorValueData.class.getName())) + { + // Check if it's going to be an update or insert + if (checkData(newData) > 0) { + // Do an update + updateData(newData); + } else { + // Do an insert + insertData(newData); + } + } else { - // Do an insert - insertData(newDataForQuery); + + DbUtils.escapeSpecialCharforData(newData, newDataForQuery); + + // Check if it's going to be an update or insert + if (checkData(newDataForQuery) > 0) { + // Do an update + updateData(newDataForQuery); + } else { + // Do an insert + insertData(newDataForQuery); + } } } catch (InstantiationException | IllegalAccessException e) { From 5f5d31f6baf10f4be0c88cee6057ed0e2a7996c5 Mon Sep 17 00:00:00 2001 From: David Friedman Date: Fri, 27 May 2016 13:44:52 +0000 Subject: [PATCH 3/3] ASM #18971 - caveUtil.sh may attempt to create a temporary Eclipse configuration directory in a deleted directory Change-Id: I3ad32f649bfb63d97861cc8423dce590700a2857 Former-commit-id: 676bce601f6b694de6da0584c6eecd4ea00990ae --- cave/build/static/linux/cave/caveUtil.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cave/build/static/linux/cave/caveUtil.sh b/cave/build/static/linux/cave/caveUtil.sh index 969a4ee92b..c92b504478 100644 --- a/cave/build/static/linux/cave/caveUtil.sh +++ b/cave/build/static/linux/cave/caveUtil.sh @@ -40,6 +40,7 @@ # Jul 23, 2015 ASM#13849 D. Friedman Use a unique Eclipse configuration directory # Aug 03, 2015 #4694 dlovely Fixed path for log file cleanup # Sep 16, 2015 #18041 lshi Purge CAVE logs after 30 days instead of 7 +# May 27, 2016 ASM#18971 dfriedman Fix local variable usage in deleteOldEclipseConfigurationDirs source /awips2/cave/iniLookup.sh RC=$? @@ -398,7 +399,7 @@ function deleteOldEclipseConfigurationDirs() { local tmp_dir=$1 local tmp_dir_pat=$(echo "$tmp_dir" | sed -e 's/|/\\|/g') - save_IFS=$IFS + local save_IFS=$IFS IFS=$'\n' # Find directories that are owned by the user and older than one hour local old_dirs=( $(find "$tmp_dir" -mindepth 1 -maxdepth 1 -type d -user "$USER" -mmin +60) ) @@ -408,6 +409,7 @@ function deleteOldEclipseConfigurationDirs() fi # Determine which of those directories are in use. local lsof_args=() + local d for d in "${old_dirs[@]}"; do lsof_args+=('+D') lsof_args+=("$d") @@ -416,9 +418,10 @@ function deleteOldEclipseConfigurationDirs() # Run lsof, producing machine readable output, filter the out process IDs, # the leading 'n' of any path, and any subpath under a configuration # directory. Then filter for uniq values. - in_use_dirs=$(lsof -w -n -l -P -S 10 -F pn "${lsof_args[@]}" | grep -v ^p | \ + local in_use_dirs=$(lsof -w -n -l -P -S 10 -F pn "${lsof_args[@]}" | grep -v ^p | \ sed -r -e 's|^n('"$tmp_dir_pat"'/[^/]*).*$|\1|' | uniq) IFS=$save_IFS + local p for p in "${old_dirs[@]}"; do if ! echo "$in_use_dirs" | grep -qxF "$p"; then rm -rf "$p"