From 5684a84a46939d7a2cbe88501217b0f6f7c1b685 Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Tue, 11 Sep 2012 15:50:57 -0500 Subject: [PATCH] 12.10.1-2 baseline Former-commit-id: dde1f4c54d33f930532c11b59b515dd029ddf65b [formerly 250f0ccac9e8fb9e65c70517c5ea5ba091c709bd] [formerly dde1f4c54d33f930532c11b59b515dd029ddf65b [formerly 250f0ccac9e8fb9e65c70517c5ea5ba091c709bd] [formerly a66f3f4b608ecb8e80f717ba157ab350da85160d [formerly 3dab4c2eb757ceea21f4db5bb78e8b92767dd18c]]] Former-commit-id: a66f3f4b608ecb8e80f717ba157ab350da85160d Former-commit-id: ec74f638e536fe18acfb2b6e3d35bd7d6eac2b2f [formerly 34d2ddee9d1b4449e14f9130dcd1de3df03c8776] Former-commit-id: cc3c3dadee2f373fb1f6923ab86c0925a02c982f --- .../textUtilities/regular/FWS_Overrides.py | 4 +- .../derivedParameters/definitions/wx.xml | 55 +++++-- .../formatterlauncher/ProductAreaComp.java | 4 + .../formatterlauncher/ProductEditorComp.java | 134 +++++++++++++++--- .../localization/volumebrowser/VbSources.xml | 1 + .../viz/warngen/gui/WarngenDialog.java | 3 +- .../edex_static/base/gfe/isc/iscMosaic.py | 10 +- .../base/grid/models/gribModels_NCEP-7.xml | 30 ++-- .../base/grib/parameterInfo/hpcGuideNDFD.xml | 4 +- .../base/grib/tables/7/5/4.2.0.1.table | 2 +- .../uf/common/dataplugin/ffmp/FFMPUtils.java | 7 +- .../config/FFMPRunConfigurationManager.java | 24 +++- .../FFMPSourceConfigurationManager.java | 23 ++- .../cli/rsyncGridsToCWF.sh | 80 ++--------- .../cli/rsync_parms.ccc | 78 +++++++++- 15 files changed, 326 insertions(+), 133 deletions(-) diff --git a/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/FWS_Overrides.py b/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/FWS_Overrides.py index d6e6711f0b..8784e8406c 100644 --- a/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/FWS_Overrides.py +++ b/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/FWS_Overrides.py @@ -1749,7 +1749,7 @@ class FWS_Overrides: # Add a "custom" component to sample data from current time # to product start time ct = self._issuanceInfo.issueTime() - currentTime = AbsTime.AbsTimeYMD(ct.year, ct.month, ct.day, + currentTime = AbsTime.absTimeYMD(ct.year, ct.month, ct.day, ct.hour) productStart = self._issuanceInfo.timeRange().startTime() tr = TimeRange.TimeRange(currentTime, productStart) @@ -3928,6 +3928,8 @@ in the future. *|''' % self._timeLabel elif rank == hiRank and subkey.wxType() != "T": coKey = subkey coRank = rank + if hiRank == -1: + return "" keyAttrs = hiKey.attributes() keyType = hiKey.wxType() if coRank == hiRank: diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/wx.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/wx.xml index 267e4a52f0..773145dd25 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/wx.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/wx.xml @@ -20,13 +20,52 @@ --> - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductAreaComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductAreaComp.java index 6d5969cbac..6ba210d317 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductAreaComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductAreaComp.java @@ -56,6 +56,7 @@ import com.raytheon.viz.gfe.textformatter.TextProductManager; * 2 SEP 2011 10654 gzhou Delete running/pending task and close tab. * 23 MAY 2012 14859 ryu Select VTEC formatting in practice mode * based on VTECMessageType setting. + * 10 AUG 2012 15178 mli Add autoWrite and autoStore capability * * * @@ -642,6 +643,9 @@ public class ProductAreaComp extends Composite implements if (productText != null) { productEditorComp.retrieveActiveVTEC(); productEditorComp.setProductText(productText); + + // handle autoWrite and autoStore... + productEditorComp.doAutoStuff(); } productEditorBtn.setSelection(true); diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java index aa6dbacf2d..84cc8ae5ac 100755 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java @@ -34,6 +34,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; +import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.HashSet; @@ -135,6 +136,8 @@ import com.raytheon.viz.gfe.product.TextDBUtil; * 27 AUG 2010 6730 jnjanga Port FixVTEC functionality from A1. * 21 SEP 2010 5817 jnjanga Fix attribution phrase append from issuance to issuance. * 27 OCT 2010 5817 jnjanga Fix N.P.E caused when call getVTECActionCodes on non VTEC products. + * 31 AUG 2012 15178 mli Add autoWrite and autoStore capability + * 31 AUG 2012 15037 mli Handle bad characters in text formatter definition * * * @@ -311,6 +314,9 @@ public class ProductEditorComp extends Composite implements private ProductDataStruct prodDataStruct; private TimeZone localTimeZone; + + private enum Action { + STORE, TRANSMIT, AUTOSTORE }; /** * Product transmission callback to report the state of transmitting a @@ -418,12 +424,12 @@ public class ProductEditorComp extends Composite implements } if (!editorCorrectionMode) { - wmoId = (String) productDefinition.get("wmoID"); - pil = (String) productDefinition.get("pil"); - productId = (String) productDefinition.get("awipsWANPil"); - textdbPil = (String) productDefinition.get("textdbPil"); - fullStationId = (String) productDefinition.get("fullStationID"); - autoSendAddress = (String) productDefinition.get("autoSendAddress"); + wmoId = getDefString("wmoID"); + pil = getDefString("pil"); + productId = getDefString("awipsWANPil"); + textdbPil = getDefString("textdbPil"); + fullStationId = getDefString("fullStationID"); + autoSendAddress = getDefString("autoSendAddress"); if (autoSendAddress == null) { autoSendAddress = "000"; } @@ -635,7 +641,7 @@ public class ProductEditorComp extends Composite implements storeMI.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - displayStoreTransmitDialog(true); + storeTransmit(Action.STORE); } }); menuItems.add(storeMI); @@ -648,7 +654,7 @@ public class ProductEditorComp extends Composite implements transmitMI.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - displayStoreTransmitDialog(false); + storeTransmit(Action.TRANSMIT); } }); menuItems.add(transmitMI); @@ -944,7 +950,7 @@ public class ProductEditorComp extends Composite implements transmitBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - displayStoreTransmitDialog(false); + storeTransmit(Action.TRANSMIT); } }); buttons.add(transmitBtn); @@ -1029,13 +1035,14 @@ public class ProductEditorComp extends Composite implements } /** - * Display the Store to Transmit dialog. + * Store or Transmit text product. * - * @param showStore - * If true show the Store dialog, false shows the Transmit - * dialog. + * @param action + * STORE: show the Store dialog + * TRANSMITT: shows the Transmit dialog. + * AUTOSTORE: implement autoStore */ - private void displayStoreTransmitDialog(boolean showStore) { + private void storeTransmit(Action action) { ProductDataStruct pds = textComp.getProductDataStruct(); @@ -1060,6 +1067,20 @@ public class ProductEditorComp extends Composite implements } if (fixText()) { + + // autoStore + if (action == Action.AUTOSTORE) { + if (testVTEC) { + devStore(textdbPil.substring(3)); + } else { + TextDBUtil.storeProduct(textdbPil, getProductText(), testVTEC); + } + + return; + } + + // Store/transmit... + boolean showStore = (action == Action.STORE) ? true : false; StoreTransmitDlg storeDlg = new StoreTransmitDlg(parent.getShell(), showStore, this, transmissionCB); String pid; @@ -1075,7 +1096,7 @@ public class ProductEditorComp extends Composite implements storeDlg.open(pid); } } - + private boolean fixText() { textComp.startUpdate(); // mmaron #7285: make sure there is \n in the end - to allow @@ -2227,11 +2248,69 @@ public class ProductEditorComp extends Composite implements } } } + + /* + * handle autoWrite, autoStore + */ + public void doAutoStuff() { + int autoWrite = 0; + Object autoWrite_obj = productDefinition.get("autoWrite"); + if (autoWrite_obj != null) + autoWrite = (Integer)autoWrite_obj; + + int autoStore = 0; + Object autoStore_obj = productDefinition.get("autoStore"); + if (autoStore_obj != null) + autoStore = (Integer)autoStore_obj; + + if (autoWrite == 1) { + autoWrite(); + } + + if (autoStore == 1) { + storeTransmit(Action.AUTOSTORE); + } + } + + /* + * autoWrite + */ + private void autoWrite() { + String fname = null; + if (productDefinition.get("outputFile") != null) { + fname = getDefString("outputFile"); + if (fname.equals(EMPTY)) return; + } else { + return; + } + + fname = fixfname(fname); + + try { + ProductFileUtil.writeFile(getProductText(), new File( + fname)); + } catch (IOException e) { + MessageBox mb = new MessageBox(parent.getShell(), SWT.OK + | SWT.ICON_WARNING); + mb.setText("Formatter AutoWrite failed: " + this.pil); + mb.open(); + } + } + + /* + * Replace {prddir} with siteConfig.GFESUITE_PRDDIR if applicable. + */ + private String fixfname(String fname) { + if (fname.contains("{prddir}")) + fname = fname.replace("{prddir}", prdDir); + + return fname; + } private String guessFilename() { if (productDefinition.get("outputFile") != null) { String basename = new File( - (String) productDefinition.get("outputFile")).getName(); + getDefString("outputFile")).getName(); return basename; } else { return guessTDBPil(); @@ -2356,7 +2435,7 @@ public class ProductEditorComp extends Composite implements if (!HazardCTA && !GenericCTA && !ProductCTA) { String[] Sig = new String[1]; - String pil = (String) productDefinition.get("pil"); + String pil = getDefString("pil"); if (pil != null) { Sig[0] = pil.substring(0, 3); ProductCTA = true; @@ -2643,8 +2722,8 @@ public class ProductEditorComp extends Composite implements List pils = VTECTableChangeNotification.DisableTable.get(pil); String brained = null; boolean allFound = false; - String sid = (String) productDefinition.get("fullStationID"); - String pil = (String) productDefinition.get("pil"); + String sid = getDefString("fullStationID"); + String pil = getDefString("pil"); if (pil != null) { pil = pil.substring(0, 3); @@ -2873,4 +2952,21 @@ public class ProductEditorComp extends Composite implements } } + + /* + * Handle bad characters in text formatter definition. + */ + private String getDefString(String key) { + String str = null; + + Object obj = productDefinition.get(key); + if (obj != null && obj instanceof Collection ) { + Collection collection = (Collection) obj; + str = (String)(collection.toArray())[0]; + } else { + str = (String) productDefinition.get(key); + } + + return str; + } } diff --git a/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/VbSources.xml b/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/VbSources.xml index 63f48fccad..dbd226f9bf 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/VbSources.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/VbSources.xml @@ -53,6 +53,7 @@ + diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java index 9c0ecffe9c..e5e4335650 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java @@ -120,6 +120,7 @@ import com.vividsolutions.jts.geom.Polygon; * Jul 10, 2012 #15099 Qinglu Lin Add updatePolygon() and apply it in xxxSelected methods. * Jul 26, 2012 #15227 Qinglu Lin Added removeDuplicateVertices(), removeOverlaidSegments(), * adjustLatLon(), etc. + * Sep 05, 2012 DR 15261 D. Friedman Prevent additional counties from being selected for EXPs * * * @@ -1904,7 +1905,7 @@ public class WarngenDialog extends CaveSWTDialog implements } updatePolygon(newWarn); - + warngenLayer.setOldWarningPolygon(newWarn); setTimesFromFollowup(newWarn.getStartTime().getTime(), newWarn .getEndTime().getTime()); try { diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py index ab1691f06f..46ce767df6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py @@ -345,10 +345,12 @@ class IscMosaic: self.__myOfficeType = IFPServerConfigManager.getServerConfig(DatabaseID(self.__databaseID).getSiteId()).officeType() #process each input file - self.__areaMask = None - for i in range(0, self.__inFiles.size()): + self.__areaMask = None self.__processInputFile(str(self.__inFiles.get(i))) + + if self.__deleteInput: + os.remove(str(self.__inFiles.get(i))) self.logEvent("iscMosaic Finished") @@ -532,9 +534,10 @@ class IscMosaic: minV = self.__dbwe.getGpi().getMinValue() # compute the site mask self.__siteID = str(getattr(vars[0], "siteID")) + if self.__areaMask is None: self.__areaMask = self.__computeAreaMask().getGrid().__numpy__[0] - + # create the mergeGrid class mGrid = mergeGrid.MergeGrid(self.__creTime, self.__siteID, inFillV, minV, self.__areaMask, gridType, self.__dbwe.getDiscreteKeys()) @@ -968,6 +971,7 @@ class IscMosaic: elif self.__altMask is not None: try: areaMask = iscUtil.getEditArea(self.__altMask, self.__mysite) + areaMask.setGloc(self.__dbwe.getGpi().getGridLoc()) except: self.logProblem("Unable to access edit mask [", self.__altMask, "]", traceback.format_exc()) diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/grid/models/gribModels_NCEP-7.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/grid/models/gribModels_NCEP-7.xml index 37aa32f136..cf9b89d206 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/grid/models/gribModels_NCEP-7.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/grid/models/gribModels_NCEP-7.xml @@ -2194,8 +2194,8 @@ - HPCGuide-AK - HPCGuide-AK + AK-HPCGuide + AK-HPCGuide
7
5 198 @@ -2206,6 +2206,20 @@
6
+ + AK-HPCGuide + AK-HPCGuide +
7
+ 5 + 198 + + 0 + + hpcGuideNDFD +
6
+
+ + HPC HPCqpfNDFD @@ -2219,18 +2233,6 @@
6
- - HPC-MODEL0 - HPC-MODEL0 -
7
- 5 - 198 - - 0 - - -
6
-
diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpcGuideNDFD.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpcGuideNDFD.xml index afb2131a42..3c5150e9e4 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpcGuideNDFD.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpcGuideNDFD.xml @@ -115,13 +115,13 @@ - wx + wxType Weather Weather 0.0 - 10.0 + 12.0 -99999.0 0 SFC diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/tables/7/5/4.2.0.1.table b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/tables/7/5/4.2.0.1.table index 0b57e342d0..403d07a1e5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/tables/7/5/4.2.0.1.table +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/tables/7/5/4.2.0.1.table @@ -1,6 +1,6 @@ # Product Discipline 0: Meteorological products, Parameter Category 1: Moisture #192-254 Reserved for local use -192:192:Categorical Rain::CRAIN +192:192:Weather::wxType 193:193:Categorical Freezing Rain::CFRZR 194:194:Categorical Ice Pellets::CICEP 195:195:Categorical Snow::CSNOW diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPUtils.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPUtils.java index 5758321623..d8197bc1a8 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPUtils.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPUtils.java @@ -71,6 +71,7 @@ import com.vividsolutions.jts.io.WKTWriter; * ------------ ---------- ----------- -------------------------- * 06/22/09 2152 D. Hladky Initial release * 06/18/12 DR 15108 G. Zhang Fix County FIPS 4-digit issue + * 09/05/12 DR 15164 G. Zhang Fix FFMP Table county/state name null issue * * * @author dhladky @@ -467,9 +468,11 @@ public class FFMPUtils { * @return */ public static FFMPCounty getCounty(Long pfaf, String mode) { - + + String ftxt = (pfaf>=10000 ? ""+pfaf : "0"+pfaf);// DR 15164 + String sql = "SELECT county.countyname, county.state FROM " - + " mapdata.county WHERE county.fips = '" + pfaf + "'"; + + " mapdata.county WHERE county.fips = '" + ftxt/*pfaf*/ + "'";// DR 15164 ISpatialQuery sq = null; FFMPCounty county = new FFMPCounty(); diff --git a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPRunConfigurationManager.java b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPRunConfigurationManager.java index 2f4bc03c1c..07311d42c3 100644 --- a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPRunConfigurationManager.java +++ b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPRunConfigurationManager.java @@ -42,6 +42,21 @@ import com.raytheon.uf.common.monitor.xml.SourceXML; import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; + +/** + * FFMPRunConfigurationManager + * + *
+ * 
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * 2012-09-04   DR 14404   gzhang      Fixing ConcurrentModificationException
+ * 
+ * 
+ * + */ + public class FFMPRunConfigurationManager implements ILocalizationFileObserver { /** Path to FFMP Source config. */ @@ -56,8 +71,9 @@ public class FFMPRunConfigurationManager implements ILocalizationFileObserver { protected boolean isPopulated; private LocalizationFile lf = null; - - private ArrayList listeners = new ArrayList(); + + private java.util.concurrent.CopyOnWriteArrayList listeners = new java.util.concurrent.CopyOnWriteArrayList();// DR 14404 + //private ArrayList listeners = new ArrayList();// DR 14404 /** Singleton instance of this class */ private static FFMPRunConfigurationManager instance = new FFMPRunConfigurationManager(); @@ -259,11 +275,11 @@ public class FFMPRunConfigurationManager implements ILocalizationFileObserver { try { readConfigXml(); // inform listeners - synchronized (listeners) { + //synchronized (listeners) {// DR 14404 for (MonitorConfigListener fl : listeners) { fl.configChanged(new MonitorConfigEvent(this)); } - } + //}// DR 14404 } catch (SerializationException e) { e.printStackTrace(); } diff --git a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPSourceConfigurationManager.java b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPSourceConfigurationManager.java index 3f997cde88..4fceac7b05 100644 --- a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPSourceConfigurationManager.java +++ b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPSourceConfigurationManager.java @@ -38,6 +38,20 @@ import com.raytheon.uf.common.monitor.xml.SourceXML; import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; +/** + * FFMPSourceConfigurationManager + * + *
+ * 
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * 2012-09-04   DR 14404   gzhang      Fixing ConcurrentModificationException
+ * 
+ * 
+ * + */ + public class FFMPSourceConfigurationManager implements ILocalizationFileObserver { @@ -64,8 +78,9 @@ public class FFMPSourceConfigurationManager implements private ArrayList accumulators = null; private LocalizationFile lf = null; - - private ArrayList listeners = new ArrayList(); + + private java.util.concurrent.CopyOnWriteArrayList listeners = new java.util.concurrent.CopyOnWriteArrayList();// DR 14404 + //private ArrayList listeners = new ArrayList();// DR 14404 /* Private Constructor */ private FFMPSourceConfigurationManager() { @@ -481,11 +496,11 @@ public class FFMPSourceConfigurationManager implements if (message.getFileName().equals(CONFIG_FILE_NAME)) { readConfigXml(); // inform listeners - synchronized (listeners) { + //synchronized (listeners) {// DR 14404 for (MonitorConfigListener fl : listeners) { fl.configChanged(new MonitorConfigEvent(this)); } - } + //}// DR 14404 } } diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF.sh b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF.sh index 7c549fd520..9b01df9704 100644 --- a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF.sh +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF.sh @@ -154,83 +154,21 @@ else site=$(echo ${1} | tr '[A-Z]' '[a-z]') fi -IFPS_DATA="/awips2/GFESuite/ServiceBackup/data" -GFESUITE_BIN="/awips2/GFESuite/bin" - ################################################################################ # Configuration Section # ################################################################################ -### Work Directory for Netcdf files. ### -DXwrkDir=$IFPS_DATA/rsyncGridsToCWF # must be a non-nas1 drive with enough space -if [ ! -d ${DXwrkDir} ] ;then - mkdir -p ${DXwrkDir} - chmod 777 ${DXwrkDir} - chown awips:fxalpha ${DXwrkDir} +IFPS_DATA="/awips2/GFESuite/ServiceBackup/data" + +if [ ! -f ${IFPS_DATA}/rsync_parms.${site} ] ;then + echo "${IFPS_DATA}/rsync_parms.${site} does not exist!" + echo "Please contact your ITO to create this file from /awips2/GFESuite/bin/rsync_parms.ccc" + exit +else + . ${IFPS_DATA}/rsync_parms.${site} fi -### Turn On/Off certain script functionality. ### -QCnetCDF="no" # Do you want the netCDF file checked before - # it is rsynced? This takes 5-15 minutes to - # complete depending on size of domain. - # *** Leave "no" for AWIPS 2. QC doesn't work *** - -checkCWFavailability="no" # Do you want the script to check to see if - # the netcdf file made it to the Consolidated - # web farm? - -### Banner notification configuration ### -SendQCgoodNotification="no" # Tell forecaster that netcdf file passed - # QC check. - -sendCWFnotification="no" # Tell forecaster when netcdf rsync complete - # to the consolidated web farm. - -turnOffAllNotifications="yes" # This will turn off all banner messages. - -### new ldad configuration ### -locServer="ldad@ls1" # Name of local rsync server. -locDirectory="/data/ldad/grid" # Directory where grids are stored on the - # local rsync server. Note that file will be - # stored in $site sub directory. -locRsyncSwitches="--address=192.168.1.10" # Needed to fix a noaanet rysnc problem. - -# Consolidated web farm -remServer1="sync.weather.gov" # Name of remote rsync server. -remDirectory1="netcdf-wfo" # Directory where grids are stored on the - # remote rsync server. - -# Edit area to limit the portion of the grid domain to send to the webfarms. -mask=ISC_Send_Area - -# Parameter list for the netcdf file -parmlist="" #send all parameters -. ${IFPS_DATA}/rsync_parms.${site} - -creationAttempts=3 # How many times do you want script to create and - # quality control netcdf files if bad netcdf files - # are detected? - -rsyncWait=30 # Minutes to wait for free rsync connection. -CWFcheckWait=360 # Delay in seconds to wait to check to see if file made it - # to the consolidated web farm. - -iscMosaicDelay=0.0 # Delay of 0.0 causes GFE pauses. - -probAlertNum=1 # Guardian alert level when problems occur. - -# Email notification configuration -sendEmailNotification="no" # Do you want to send email notification of grids are not sent? -emailAddress1="" -emailAddress2="" -emailAddress3="" - ################################################################################ -# Set some paths -WRKDIR="${DXwrkDir}/data" -FXA_BIN="/awips2/fxa/bin" -CDSHOST="ec" -CDSPORT="9581" # set current data and log file name currdate=$(date -u +%Y%m%d) @@ -278,6 +216,8 @@ else echo "Will send all elements" >> $LOG_FILE fi +echo "Using grid domain $mask" >> $LOG_FILE + # Determine the ifpnetCDF start and end times. start_time=$(date +%Y%m%d_%H00 -d "6 hours ago") end_time=$(date +%Y%m%d_%H00 -d "192 hours") diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsync_parms.ccc b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsync_parms.ccc index d4613a9b00..4813f80e85 100644 --- a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsync_parms.ccc +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsync_parms.ccc @@ -1,8 +1,78 @@ +# Configuration file for rsyncGridsToCWF.sh + +GFESUITE_BIN="/awips2/GFESuite/bin" + +### Work Directory for Netcdf files. ### +DXwrkDir=$IFPS_DATA/rsyncGridsToCWF # must be a non-nas1 drive with enough space +if [ ! -d ${DXwrkDir} ] ;then + mkdir -p ${DXwrkDir} + chmod 777 ${DXwrkDir} + chown awips:fxalpha ${DXwrkDir} +fi + +### Turn On/Off certain script functionality. ### +QCnetCDF="no" # Do you want the netCDF file checked before + # it is rsynced? This takes 5-15 minutes to + # complete depending on size of domain. + # *** Leave "no" for AWIPS 2. QC doesn't work *** + +checkCWFavailability="no" # Do you want the script to check to see if + # the netcdf file made it to the Consolidated + # web farm? + +### Banner notification configuration ### +SendQCgoodNotification="no" # Tell forecaster that netcdf file passed + # QC check. + +sendCWFnotification="no" # Tell forecaster when netcdf rsync complete + # to the consolidated web farm. + +turnOffAllNotifications="yes" # This will turn off all banner messages. + +### new ldad configuration ### +locServer="ldad@ls1" # Name of local rsync server. +locDirectory="/data/ldad/grid" # Directory where grids are stored on the + # local rsync server. Note that file will be + # stored in $site sub directory. +locRsyncSwitches="--address=192.168.1.10" # Needed to fix a noaanet rysnc problem. + +# Consolidated web farm +remServer1="sync.weather.gov" # Name of remote rsync server. +remDirectory1="netcdf-wfo" # Directory where grids are stored on the + # remote rsync server. + +# Edit area to limit the portion of the grid domain to send to the webfarms. +mask=ISC_Send_Area + # Parameter list for the netcdf file -# Example: parmlist1="-p ClearIndex -p MaxT" -parmlist1="" -parmlist2="" -parmlist3="" +parmlist1="-p MaxT -p MinT -p MaxRH -p MinRH -p T -p Td -p RH -p WindChill -p HeatIndex -p ApparentT" +parmlist2="-p PoP -p PoP12 -p Sky -p Wx -p Hazards -p SnowLevel -p QPF -p SnowAmt -p IceAccum -p Wind -p WindGust" +parmlist3="-p ClearIndex -p FreeWind -p LAL -p Haines -p MixHgt -p VentRate -p TransWind -p Wind20ft -p CLRIndx" parmlist5="" parmlist6="" parmlist="$parmlist1 $parmlist2 $parmlist3 $parmlist4 $parmlist5 $parmlist6" +parmlist="" #uncomment to send all parameters + +creationAttempts=3 # How many times do you want script to create and + # quality control netcdf files if bad netcdf files + # are detected? + +rsyncWait=30 # Minutes to wait for free rsync connection. +CWFcheckWait=360 # Delay in seconds to wait to check to see if file made it + # to the consolidated web farm. + +iscMosaicDelay=0.0 # Delay of 0.0 causes GFE pauses. + +probAlertNum=1 # Guardian alert level when problems occur. + +# Email notification configuration +sendEmailNotification="no" # Do you want to send email notification of grids are not sent? +emailAddress1="" +emailAddress2="" +emailAddress3="" + +# Set some paths +WRKDIR="${DXwrkDir}/data" +FXA_BIN="/awips2/fxa/bin" +CDSHOST="ec" +CDSPORT="9581"