diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesignSev.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesignSev.svg
new file mode 100644
index 0000000000..f9f900edff
--- /dev/null
+++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesignSev.svg
@@ -0,0 +1,155 @@
+
+
diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesign.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesign.svg
index dbb0e08d1f..6a203d6831 100644
--- a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesign.svg
+++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesign.svg
@@ -5,6 +5,65 @@ overflow="visible"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);">
+
+
+
+ 0
+ 75
+ 0
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.radar/localization/menus/radar/dualPol/terminal/baseRadarTerminalBestResBaseProducts.xml b/cave/com.raytheon.viz.radar/localization/menus/radar/dualPol/terminal/baseRadarTerminalBestResBaseProducts.xml
index e07dfad19e..308b33923e 100644
--- a/cave/com.raytheon.viz.radar/localization/menus/radar/dualPol/terminal/baseRadarTerminalBestResBaseProducts.xml
+++ b/cave/com.raytheon.viz.radar/localization/menus/radar/dualPol/terminal/baseRadarTerminalBestResBaseProducts.xml
@@ -822,160 +822,264 @@
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warngen/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.warngen/META-INF/MANIFEST.MF
index 70b4e72ba6..62049da129 100644
--- a/cave/com.raytheon.viz.warngen/META-INF/MANIFEST.MF
+++ b/cave/com.raytheon.viz.warngen/META-INF/MANIFEST.MF
@@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.viz.alerts,
com.raytheon.uf.common.site,
com.raytheon.viz.core.contours,
- com.raytheon.uf.viz.core.rsc
+ com.raytheon.uf.viz.core.rsc,
+ com.raytheon.uf.viz.d2d.ui
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.viz.warngen,
com.raytheon.viz.warngen.gis,
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 d1c4876187..d1e5396be1 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
@@ -81,6 +81,7 @@ import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.localization.LocalizationManager;
import com.raytheon.uf.viz.core.maps.MapManager;
+import com.raytheon.uf.viz.d2d.ui.map.SideView;
import com.raytheon.viz.awipstools.common.stormtrack.StormTrackState.DisplayType;
import com.raytheon.viz.awipstools.common.stormtrack.StormTrackState.Mode;
import com.raytheon.viz.texteditor.msgs.IWarngenObserver;
@@ -170,6 +171,9 @@ import com.vividsolutions.jts.geom.Polygon;
* May 7, 2015 ASM #17438 D. Friedman Clean up debug and performance logging.
* Jun 05, 2015 DR 17428 D. Friedman Fixed duration-related user interface issues. Added duration logging.
* Sep 22, 2015 4859 dgilling Prevent product generation in DRT mode.
+ * Nov 9, 2015 DR 14905 Qinglu Lin Updated backupSiteSelected(), disposed(), initializeComponents(), populateBackupGroup(), and
+ * createProductTypeGroup, and moved existing code to newly created setBackupCboColors() and setBackupSite().
+ * Nov 25, 2015 DR 17464 Qinglu Lin Updated changeTemplate().
*
*
* @author chammack
@@ -351,6 +355,10 @@ public class WarngenDialog extends CaveSWTDialog implements
timer.cancel();
updateTimeTask.cancel();
CurrentWarnings.removeListener(this);
+ IDisplayPaneContainer container = warngenLayer.getResourceContainer();
+ if (container != null && ! (container instanceof SideView)) {
+ WarngenLayer.setLastSelectedBackupSite(warngenLayer.getBackupSite());
+ }
warngenLayer = null;
}
@@ -384,6 +392,7 @@ public class WarngenDialog extends CaveSWTDialog implements
createTimeRangeGroup(mainComposite);
createBulletListAndLabel(mainComposite);
createBottomButtons(mainComposite);
+ setBackupSite();
setInstructions();
}
@@ -501,9 +510,6 @@ public class WarngenDialog extends CaveSWTDialog implements
productType.setLayout(gl);
productType.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,
false));
-
- createMainProductButtons(productType);
- createOtherProductsList(productType);
}
/**
@@ -766,14 +772,21 @@ public class WarngenDialog extends CaveSWTDialog implements
backupSiteCbo.add(NO_BACKUP_SELECTED);
String[] CWAs = warngenLayer.getDialogConfig().getBackupCWAs()
.split(",");
+ int index = 0, selectedIndex = 0;
for (String cwa : CWAs) {
if (cwa.length() > 0) {
+ index += 1;
BackupData data = new BackupData(cwa);
backupSiteCbo.setData(data.site, data);
backupSiteCbo.add(data.site);
+ if (data.site.equals(warngenLayer.getBackupSite())) {
+ selectedIndex = index;
+ warngenLayer.setBackupSite(data.site);
+ }
}
}
- backupSiteCbo.select(0);
+ backupSiteCbo.select(selectedIndex);
+ setBackupCboColors();
}
private void createTrackGroup(Composite backupTrackEditComp) {
@@ -1406,15 +1419,16 @@ public class WarngenDialog extends CaveSWTDialog implements
hide();
}
- /**
- * Action for when something is selected from the backup site combo
- */
- private void backupSiteSelected() {
+ private boolean setBackupSite() {
if ((backupSiteCbo.getSelectionIndex() >= 0)
&& (backupSiteCbo.getItemCount() > 0)) {
int index = backupSiteCbo.getSelectionIndex();
String backupSite = backupSiteCbo.getItem(index);
warngenLayer.setBackupSite(backupSite);
+ IDisplayPaneContainer container = warngenLayer.getResourceContainer();
+ if (container != null && ! (container instanceof SideView)) {
+ WarngenLayer.setLastSelectedBackupSite(backupSite);
+ }
if (backupSite.equalsIgnoreCase("none")) {
new TemplateRunnerInitJob().schedule();
} else {
@@ -1439,11 +1453,24 @@ public class WarngenDialog extends CaveSWTDialog implements
.error("Error occurred while switching to the default template.",
e);
}
+ return true;
+ } else {
+ return false;
+ }
+ }
+ /**
+ * Action for when something is selected from the backup site combo
+ */
+ private void backupSiteSelected() {
+ if (setBackupSite()) {
productType.layout(true, true);
getShell().pack(true);
}
+ setBackupCboColors();
+ }
+ private void setBackupCboColors() {
if (backupSiteCbo.getSelectionIndex() == 0) {
backupSiteCbo.setBackground(null);
backupSiteCbo.setForeground(null);
@@ -1706,21 +1733,11 @@ public class WarngenDialog extends CaveSWTDialog implements
boolean isDifferentAreaSources = !warngenLayer.getConfiguration()
.getHatchedAreaSource().getAreaSource()
.equalsIgnoreCase(lastAreaSource);
- boolean snapHatchedAreaToPolygon = isDifferentAreaSources;
boolean preservedSelection = !isDifferentAreaSources;
- if (isDifferentAreaSources
- || !warngenLayer.getConfiguration().getHatchedAreaSource()
- .getAreaSource().toLowerCase().equals("marinezones")) {
- // If template has a different hatched area source from the previous
- // template, then the warned area would be based on the polygon and
- // not
- // preserved.
- try {
- warngenLayer.updateWarnedAreas(snapHatchedAreaToPolygon,
- preservedSelection);
- } catch (VizException e1) {
- statusHandler.handle(Priority.PROBLEM, "WarnGen Error", e1);
- }
+ try {
+ warngenLayer.updateWarnedAreas(preservedSelection);
+ } catch (VizException e1) {
+ statusHandler.handle(Priority.PROBLEM, "WarnGen Error", e1);
}
// Properly sets the "Create Text" button.
setInstructions();
diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java
index b7c3ca7dd7..6e0832eb29 100644
--- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java
+++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java
@@ -240,6 +240,9 @@ import com.vividsolutions.jts.io.WKTReader;
* 04/24/2015 ASM #17394 D. Friedman Fix geometries that become invalid in local coordinate space.
* 05/07/2015 ASM #17438 D. Friedman Clean up debug and performance logging.
* 05/08/2015 ASM #17310 D. Friedman Log input polygon when output of AreaHatcher is invalid.
+ * 11/09/2015 DR 14905 Qinglu Lin Added lastSelectedBackupSite and its accessors, and updated constructor.
+ * 11/25/2015 DR 17464 Qinglu Lin Updated two updateWarnedAreas(), updateWarnedAreaState(), createSquare(),redrawBoxFromTrack(),
+ * redrawBoxFromHatched(), createDamThreatArea(), createPolygonFromRecord(), addOrRemoveCounty().
*
*
* @author mschenke
@@ -253,6 +256,8 @@ public class WarngenLayer extends AbstractStormTrackResource {
private static final IPerformanceStatusHandler perfLog = PerformanceStatus
.getHandler("WG:");
+ static String lastSelectedBackupSite;
+
String uniqueFip = null;
String backupOfficeShort = null;
@@ -814,6 +819,9 @@ public class WarngenLayer extends AbstractStormTrackResource {
statusHandler.handle(Priority.SIGNIFICANT,
"Error loading config.xml", e);
}
+
+ setBackupSite(WarngenLayer.getLastSelectedBackupSite());
+
// Load default template
String defaultTemplate = dialogConfig.getDefaultTemplate();
if (defaultTemplate.equals("")) {
@@ -1536,7 +1544,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
}
public void setBackupSite(String site) {
- if (site.equalsIgnoreCase("none")) {
+ if (site == null || site.equalsIgnoreCase("none")) {
backupSite = null;
} else {
backupSite = site;
@@ -1947,20 +1955,14 @@ public class WarngenLayer extends AbstractStormTrackResource {
}
}
- public void updateWarnedAreas(boolean snapHatchedAreaToPolygon)
- throws VizException {
- updateWarnedAreas(snapHatchedAreaToPolygon, false);
+ public void updateWarnedAreas() throws VizException {
+ updateWarnedAreas(false);
}
/**
- *
- * @param snapHatchedAreaToPolygon
- * If True, any hatched area outside the polygon will be
- * eliminated.
* @throws VizException
*/
- public void updateWarnedAreas(boolean snapHatchedAreaToPolygon,
- boolean preservedSelection) throws VizException {
+ public void updateWarnedAreas(boolean preservedSelection) throws VizException {
if (getPolygon() == null) {
return;
}
@@ -1970,11 +1972,10 @@ public class WarngenLayer extends AbstractStormTrackResource {
Geometry warningArea = state.getWarningArea();
Geometry warningPolygon = state.getWarningPolygon();
Geometry newWarningArea = createWarnedArea(
- latLonToLocal((snapHatchedAreaToPolygon || (warningArea == null)) ? warningPolygon
- : warningArea), preservedSelection
+ latLonToLocal(warningPolygon), preservedSelection
&& (warningArea != null) ? latLonToLocal(warningArea)
: null);
- updateWarnedAreaState(newWarningArea, snapHatchedAreaToPolygon);
+ updateWarnedAreaState(newWarningArea);
perfLog.logDuration("Determining hatchedArea",
System.currentTimeMillis() - t0);
@@ -2127,8 +2128,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
}
}
- private void updateWarnedAreaState(Geometry newHatchedArea,
- boolean snapToHatchedArea) throws VizException {
+ private void updateWarnedAreaState(Geometry newHatchedArea) throws VizException {
try {
// Ensure all geometries in local coords
Geometry warningPolygon = latLonToLocal(state.getWarningPolygon());
@@ -2251,7 +2251,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
state.setWarningPolygon((Polygon) state
.getMarkedWarningPolygon().clone());
state.resetMarked();
- updateWarnedAreas(snapToHatchedArea);
+ updateWarnedAreas();
}
} else {
state.setWarningArea(localToLatLon(newHatchedArea));
@@ -2447,7 +2447,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
LinearRing lr = gf.createLinearRing(c);
state.setWarningPolygon(gf.createPolygon(lr, null));
- updateWarnedAreas(true);
+ updateWarnedAreas();
}
public void redrawBoxFromTrack() throws VizException {
@@ -2619,7 +2619,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
LinearRing lr = gf.createLinearRing(c);
state.setWarningPolygon(gf.createPolygon(lr, null));
- updateWarnedAreas(true);
+ updateWarnedAreas();
/*
* NOT LINE OF STORMS
@@ -2664,7 +2664,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
LinearRing lr = gf.createLinearRing(c);
state.setWarningPolygon(gf.createPolygon(lr, null));
- updateWarnedAreas(true);
+ updateWarnedAreas();
}
if (dialog.box.getSelection()) {
displayState.editable = false;
@@ -2704,7 +2704,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
if (hatched != null) {
state.setWarningPolygon(hatched);
- updateWarnedAreaState(hatchedArea, true);
+ updateWarnedAreaState(hatchedArea);
issueRefresh();
// End of DR 15559
state.snappedToArea = true;
@@ -2752,7 +2752,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
try {
state.setWarningPolygon(gf.createPolygon(lr, null));
state.rightClickSelected = false;
- updateWarnedAreas(true);
+ updateWarnedAreas();
displayState.dragMeGeom = gf.createPoint(pt);
displayState.dragMePoint = gf.createPoint(pt);
displayState.mode = Mode.TRACK;
@@ -2868,7 +2868,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
state.setWarningPolygon(warnPolygon);
state.setWarningArea(getWarningAreaFromPolygon(
state.getWarningPolygon(), record));
- updateWarnedAreas(true, true);
+ updateWarnedAreas(true);
}
private DataTime recordFrameTime(AbstractWarningRecord warnRecord) {
@@ -3254,7 +3254,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
String fip = getFips(f);
if ((fip != null) && (uniqueFip != null)
&& fip.equals(uniqueFip)) {
- updateWarnedAreas(true);
+ updateWarnedAreas();
}
break;
}
@@ -3844,4 +3844,15 @@ public class WarngenLayer extends AbstractStormTrackResource {
return backupOfficeLoc;
}
+ public String getBackupSite() {
+ return backupSite;
+ }
+
+ public static String getLastSelectedBackupSite() {
+ return lastSelectedBackupSite;
+ }
+
+ public static void setLastSelectedBackupSite(String backupSite) {
+ lastSelectedBackupSite = backupSite;
+ }
}
diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java
index 2b9e8af8e2..449cc4778f 100644
--- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java
+++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java
@@ -67,6 +67,7 @@ import com.vividsolutions.jts.geom.Polygon;
* Jun 25, 2013 DR 16013 Qinglu Lin Called setUniqueFip() in handleMouseUp().
* Aug 15, 2013 DR 16418 D. Friedman Only raise dialog if editable. Don't call featureEdit if not editable.
* Sep 24, 2013 #2403 lvenable Fixed cursor memory leak.
+ * Nov 25, 2015 DR 17464 Qinglu Lin Updated handleMouseUp(), DeleteVertexAction(), and AddVertexAction class.
*
*
*
@@ -260,7 +261,7 @@ public class WarngenUIManager extends InputAdapter {
LinearRing lr = gf.createLinearRing(coordinates);
state.setWarningPolygon(gf.createPolygon(lr, null));
}
- warngenLayer.updateWarnedAreas(true);
+ warngenLayer.updateWarnedAreas();
} catch (VizException e) {
e.printStackTrace();
}
@@ -457,7 +458,7 @@ public class WarngenUIManager extends InputAdapter {
warngenLayer.getWarngenState().setWarningPolygon(newPoly);
try {
- warngenLayer.updateWarnedAreas(true);
+ warngenLayer.updateWarnedAreas();
} catch (VizException e) {
Status s = new Status(Status.ERROR, Activator.PLUGIN_ID,
"Error updating warned area", e);
@@ -597,7 +598,7 @@ public class WarngenUIManager extends InputAdapter {
Polygon newPoly = gf.createPolygon(newLs, null);
warngenLayer.getWarngenState().setWarningPolygon(newPoly);
try {
- warngenLayer.updateWarnedAreas(true);
+ warngenLayer.updateWarnedAreas();
} catch (VizException e) {
Status s = new Status(Status.ERROR,
Activator.PLUGIN_ID,
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllCWASPS.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllCWASPS.xml
new file mode 100644
index 0000000000..6b8bb7e599
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllCWASPS.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllMarineWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllMarineWarnings.xml
new file mode 100644
index 0000000000..05e6b58239
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllMarineWarnings.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllNationalWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllNationalWarnings.xml
new file mode 100644
index 0000000000..8d874e8a39
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllNationalWarnings.xml
@@ -0,0 +1,378 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-AR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-AR.xml
new file mode 100644
index 0000000000..42588166b7
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-AR.xml
@@ -0,0 +1,381 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-CR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-CR.xml
new file mode 100644
index 0000000000..d198ddf2cf
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-CR.xml
@@ -0,0 +1,381 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-ER.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-ER.xml
new file mode 100644
index 0000000000..6276d382a3
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-ER.xml
@@ -0,0 +1,381 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-PR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-PR.xml
new file mode 100644
index 0000000000..14ec27d479
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-PR.xml
@@ -0,0 +1,381 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-SR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-SR.xml
new file mode 100644
index 0000000000..5a89824c7d
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-SR.xml
@@ -0,0 +1,382 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-WR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-WR.xml
new file mode 100644
index 0000000000..5fd00185f4
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings-WR.xml
@@ -0,0 +1,381 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings.xml
index e219202574..ee4c188974 100644
--- a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings.xml
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings.xml
@@ -1,283 +1,382 @@
+
-
-
-
-
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalCWAFloodWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalCWAFloodWarnings.xml
index 77d9e8baed..1fa770726a 100644
--- a/cave/com.raytheon.viz.warnings/localization/bundles/LocalCWAFloodWarnings.xml
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalCWAFloodWarnings.xml
@@ -1,147 +1,215 @@
-
+
-
-
-
-
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalMarineWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalMarineWarnings.xml
new file mode 100644
index 0000000000..58458c1f18
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalMarineWarnings.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalFloodWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalFloodWarnings.xml
index 2eb75bd840..6d2153b89f 100644
--- a/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalFloodWarnings.xml
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalFloodWarnings.xml
@@ -1,146 +1,216 @@
+
-
-
-
-
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalMarineWarning.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalMarineWarning.xml
new file mode 100644
index 0000000000..d389d70aa1
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalMarineWarning.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalSPS.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalSPS.xml
new file mode 100644
index 0000000000..405d260b77
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalSPS.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalWarnings.xml
index d550e8e093..9dd1e3a77d 100644
--- a/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalWarnings.xml
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalWarnings.xml
@@ -1,147 +1,175 @@
-
+
-
-
-
-
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalStormReportsNational.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalStormReportsNational.xml
new file mode 100644
index 0000000000..58d2816f06
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalStormReportsNational.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/NationalConvWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/NationalConvWarnings.xml
new file mode 100644
index 0000000000..acc65e14e2
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/NationalConvWarnings.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/NationalFloodWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/NationalFloodWarnings.xml
new file mode 100644
index 0000000000..435183d081
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/NationalFloodWarnings.xml
@@ -0,0 +1,215 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-AR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-AR.xml
new file mode 100644
index 0000000000..aba15a6713
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-AR.xml
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-CR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-CR.xml
new file mode 100644
index 0000000000..56d05ee5fe
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-CR.xml
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-ER.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-ER.xml
new file mode 100644
index 0000000000..c60c5baa2f
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-ER.xml
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-PR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-PR.xml
new file mode 100644
index 0000000000..d6248d421d
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-PR.xml
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-SR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-SR.xml
new file mode 100644
index 0000000000..afbe6db6ed
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-SR.xml
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-WR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-WR.xml
new file mode 100644
index 0000000000..ad23d2b695
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalFloodWarnings-WR.xml
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-AR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-AR.xml
new file mode 100644
index 0000000000..5c05e124e4
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-AR.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-CR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-CR.xml
new file mode 100644
index 0000000000..1d1017b1ae
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-CR.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-ER.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-ER.xml
new file mode 100644
index 0000000000..9f57a2b113
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-ER.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-PR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-PR.xml
new file mode 100644
index 0000000000..6a6ba6c157
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-PR.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-SR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-SR.xml
new file mode 100644
index 0000000000..0d9bce3a89
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-SR.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-WR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-WR.xml
new file mode 100644
index 0000000000..8bebb84234
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalMarineWarning-WR.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-AR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-AR.xml
new file mode 100644
index 0000000000..34fc8afc3a
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-AR.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-CR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-CR.xml
new file mode 100644
index 0000000000..7f605112ab
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-CR.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-ER.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-ER.xml
new file mode 100644
index 0000000000..8ad23c52df
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-ER.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-PR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-PR.xml
new file mode 100644
index 0000000000..13579254f2
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-PR.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-SR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-SR.xml
new file mode 100644
index 0000000000..4878a8f5dd
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-SR.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-WR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-WR.xml
new file mode 100644
index 0000000000..3f4f2941b2
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalSPS-WR.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-AR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-AR.xml
new file mode 100644
index 0000000000..2542b37a34
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-AR.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-CR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-CR.xml
new file mode 100644
index 0000000000..c6e677c337
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-CR.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-ER.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-ER.xml
new file mode 100644
index 0000000000..7f6e59304c
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-ER.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-PR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-PR.xml
new file mode 100644
index 0000000000..7f3952c45d
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-PR.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-SR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-SR.xml
new file mode 100644
index 0000000000..fa67a9820f
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-SR.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-WR.xml b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-WR.xml
new file mode 100644
index 0000000000..bcdd259ee5
--- /dev/null
+++ b/cave/com.raytheon.viz.warnings/localization/bundles/RegionalWarnings-WR.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.warnings/localization/menus/warnings/baseWarnings.xml b/cave/com.raytheon.viz.warnings/localization/menus/warnings/baseWarnings.xml
index 04e9d2b022..e9565d7e12 100644
--- a/cave/com.raytheon.viz.warnings/localization/menus/warnings/baseWarnings.xml
+++ b/cave/com.raytheon.viz.warnings/localization/menus/warnings/baseWarnings.xml
@@ -19,49 +19,221 @@
further_licensing_information.
-->
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.warnings/localization/menus/warnings/index.xml b/cave/com.raytheon.viz.warnings/localization/menus/warnings/index.xml
index 1ce9f3ac2e..66307ec6e0 100644
--- a/cave/com.raytheon.viz.warnings/localization/menus/warnings/index.xml
+++ b/cave/com.raytheon.viz.warnings/localization/menus/warnings/index.xml
@@ -19,11 +19,22 @@
further_licensing_information.
-->
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/crh/gov.noaa.nws.crh.edex.grib.decoderpostprocessor/src/gov/noaa/nws/crh/edex/grib/decoderpostprocessor/GFS20PostProcessor.java b/crh/gov.noaa.nws.crh.edex.grib.decoderpostprocessor/src/gov/noaa/nws/crh/edex/grib/decoderpostprocessor/GFS20PostProcessor.java
deleted file mode 100644
index 6c46264d45..0000000000
--- a/crh/gov.noaa.nws.crh.edex.grib.decoderpostprocessor/src/gov/noaa/nws/crh/edex/grib/decoderpostprocessor/GFS20PostProcessor.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package gov.noaa.nws.crh.edex.grib.decoderpostprocessor;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import com.raytheon.edex.plugin.grib.decoderpostprocessors.ThreeHrPrecipGridProcessor;
-import com.raytheon.edex.plugin.grib.exception.GribException;
-import com.raytheon.uf.common.dataplugin.PluginException;
-import com.raytheon.uf.common.dataplugin.grid.GridConstants;
-import com.raytheon.uf.common.dataplugin.grid.GridRecord;
-import com.raytheon.uf.edex.database.DataAccessLayerException;
-import com.raytheon.uf.edex.database.query.DatabaseQuery;
-import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
-
-/**
- * Grib post processor implementation to generate 3-hr precipitation grids from
- * the alternating (3-hr, 6-hr, 3-hr, 3-hr, 6-hr, etc.) precip grids in the
- * GFS20 output.
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------- -------- ----------- --------------------------
- * Jun 08, 2015 M. Foster Initial Creation
- *
- *
- *
- *
- * @author matthew.foster
- * @version 1.0
- */
-
-public class GFS20PostProcessor extends ThreeHrPrecipGridProcessor {
-
- @Override
- public GridRecord[] process(GridRecord record) throws GribException {
- // Post process the data if this is a Total Precipitation grid
- if (record.getParameter().getAbbreviation().equals("TP6hr")) {
- return super.process(record);
- }
- return new GridRecord[] { record };
- }
-
- /**
- * Retrieves a List of GridRecord via DAO query for the given datasetId, parm
- * and refTime.
- *
- * @param datasetId
- * The datasetId from which to retrieve the GridRecords
- * @param parm
- * The parameter for which to retrieve GridRecords
- * @param refTime
- * The reference (cycle) time for the aforementioned datasetId
- * @return
- * @throws GribException
- */
- @SuppressWarnings("unchecked")
- protected List getPrecipInventory(String datasetId, String parm,
- Date refTime) throws GribException {
- GridDao dao = null;
- try {
- dao = new GridDao();
- } catch (PluginException e) {
- throw new GribException("Error instantiating grib dao!", e);
- }
- DatabaseQuery query = new DatabaseQuery(GridRecord.class);
- query.addQueryParam(GridConstants.PARAMETER_ABBREVIATION, parm);
- query.addQueryParam(GridConstants.DATASET_ID, datasetId);
- query.addQueryParam("dataTime.refTime", refTime);
- query.addOrder("dataTime.fcstTime", true);
- try {
- return (List) dao.queryByCriteria(query);
- } catch (DataAccessLayerException e) {
- throw new GribException(
- "Error getting Precip inventory for "+datasetId, e);
- }
- }
-
- /**
- * Generates the 3 hour accumulated grid by taking the difference of the
- * current 6-hr accumulation and the previous 3-hr accumulation.
- * This function will look in the inventory and generate any 3-hr grids
- * that can be generated.
- *
- * @param record
- * The grib record for which to generate the 3 hour accumulated
- * precipitation grid
- * @return The generated 3-hr precipitation grids
- * @throws GribException
- */
- protected synchronized GridRecord[] generate3hrPrecipGrids(GridRecord record)
- throws GribException {
-
- // The current 6-hr precipitation grid inventory in the database
- List precip6hrInventory = getPrecipInventory(record.getDatasetId(),
- "TP6hr", record.getDataTime().getRefTime());
-
- // The current 3-hr precipitation grid inventory in the database
- List precip3hrInventory = getPrecipInventory(record.getDatasetId(),
- "TP3hr", record.getDataTime().getRefTime());
-
- // Make a list of the 3-hr forecast times
- List precip3hrTimes = new ArrayList();
- for (int i=0; i < precip3hrInventory.size(); i++) {
- precip3hrTimes.add(precip3hrInventory.get(i)
- .getDataTime().getFcstTime());
- }
-
- // Adds the current record to the precip inventory
- float[] currentData = (float[]) record.getMessageData();
- record.setMessageData(currentData);
- precip6hrInventory.add(record);
-
- // Examine each grid in the inventory and generate the 3hr precipitation
- // grid if possible
- List generatedRecords = new ArrayList();
- for (int i = 0; i < precip6hrInventory.size(); i++) {
- // Check if the 3hr precipitation grid has already been produced
- if (!precip3hrTimes.contains(precip6hrInventory.get(i)
- .getDataTime().getFcstTime())) {
- // If the precipitation grid has not been produced, generate it
- List generated3hrPrecips = generate3hrPrecip(
- precip6hrInventory.get(i), precip3hrInventory);
- for (GridRecord newRecord : generated3hrPrecips) {
- // Add the generated grid to the current inventory
- if (newRecord != null) {
- precip3hrTimes.add(newRecord.getDataTime()
- .getFcstTime());
- generatedRecords.add(newRecord);
- }
- }
- }
- }
-
- return generatedRecords.toArray(new GridRecord[] {});
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void calculatePrecipValues(float[] inventoryData, float[] newData) {
- for (int i = 0; i < inventoryData.length; i++) {
- newData[i] = newData[i] - inventoryData[i];
- if (newData[i] < 0) {
- newData[i] = 0;
- }
- }
- }
-
-}
diff --git a/edexOsgi/com.raytheon.edex.feature.uframe/feature.xml b/edexOsgi/com.raytheon.edex.feature.uframe/feature.xml
index 0041c33bf6..f0521a7436 100644
--- a/edexOsgi/com.raytheon.edex.feature.uframe/feature.xml
+++ b/edexOsgi/com.raytheon.edex.feature.uframe/feature.xml
@@ -132,4 +132,8 @@
id="gov.noaa.nws.sr.oun.edex.mping.feature"
version="0.0.0"/>
+
+
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/configProps.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/configProps.py
new file mode 100644
index 0000000000..5af8f6944f
--- /dev/null
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/configProps.py
@@ -0,0 +1,13 @@
+# ----------------------------------------------------------------------------
+#
+# SOFTWARE HISTORY
+#
+# Date Ticket# Engineer Description
+# ------------ ---------- ----------- --------------------------
+# 09/09/2015 #16287 amoore Created
+#
+########################################################################
+
+#Pattern for requested ISC parms.
+#Alphanumeric pattern string form, potentially ending in _SFC
+ISC_PARM_PATTERN="^[a-zA-Z0-9]+(?:_SFC)?$"
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/doConfig.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/doConfig.py
index 298ceb3ae4..d913183dad 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/doConfig.py
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/doConfig.py
@@ -35,9 +35,10 @@
# 11/18/2014 #4953 randerso Added check for empty unit string
# 04/09/2015 #4383 dgilling Added support for FireWx ISC.
# Apr 23, 2015 4259 njensen Updated for new JEP API
+# 09/01/2015 16287 amoore Additional validation of user input
#
########################################################################
-import types
+import types,re,configProps
from java.util import ArrayList,LinkedHashMap
from java.lang import Integer,Float
@@ -431,7 +432,7 @@ def parseSat(satdata):
raise SyntaxError, "Invalid syntax for SATDATA" + `satdata`
return rval
-def otherParse(serverhost, mhsid, port,
+def otherParse(validSites, serverhost, mhsid, port,
initmodules, accumElem,
initskips, d2ddbver, logfilepurge, prddir, home,
extraWEPrec, vtecRequestTime, autoConfigureNotifyTextProd,
@@ -489,6 +490,9 @@ def otherParse(serverhost, mhsid, port,
if type(r) != str:
raise TypeError, "REQUESTED_ISC_SITES not list of strings: " + \
`requestedISCsites`
+ #Verify requested ISC site is of desired pattern
+ elif r not in validSites:
+ raise ValueError, "Requested ISC site: " + str(r) + " could not be found in serverConfig.py."
else:
reqISCsites.add(r);
@@ -501,15 +505,38 @@ def otherParse(serverhost, mhsid, port,
if type(r) != str:
raise TypeError, "REQUESTED_ISC_PARMS not list of strings: " + \
`requestedISCparms`
+ #Verify requested ISC parm is of desired pattern
+ elif not re.match(configProps.ISC_PARM_PATTERN, str(r)):
+ raise ValueError, "Requested ISC parm: " + str(r) + " does not match desired pattern: " + configProps.ISC_PARM_PATTERN
else:
reqISCparms.add(r)
- if type(requestISC) != int:
- raise TypeError, "REQUEST_ISC not an int: " + `requestISC`
- if type(sendiscOnSave) != int:
- raise TypeError, "SEND_ISC_ON_SAVE not an int: " + `sendiscOnSave`
- if type(sendiscOnPublish) != int:
- raise TypeError, "SEND_ISC_ON_PUBLISH not an int: " + `sendiscOnPublish`
+ if type(requestISC) != bool:
+ #If the type is boolean, it is already a valid value
+ #If the type is not boolean, and is not int, then it is not valid
+ if type(requestISC) != int:
+ raise TypeError, "REQUEST_ISC not an int or boolean: " + `requestISC`
+ #Verify request ISC is of valid value
+ elif not ((requestISC == 0) or (requestISC == 1)):
+ raise ValueError, "REQUEST_ISC is: " + `requestISC` + ", but expected True, False, 0 or 1"
+
+ if type(sendiscOnSave) != bool:
+ #If the type is boolean, it is already a valid value
+ #If the type is not boolean, and is not int, then it is not valid
+ if type(sendiscOnSave) != int:
+ raise TypeError, "SEND_ISC_ON_SAVE not an int or boolean: " + `sendiscOnSave`
+ #Verify send ISC on save is of valid value
+ elif not ((sendiscOnSave == 0) or (sendiscOnSave == 1)):
+ raise ValueError, "SEND_ISC_ON_SAVE is: " + `sendiscOnSave` + ", but expected True, False, 0 or 1"
+
+ if type(sendiscOnPublish) != bool:
+ #If the type is boolean, it is already a valid value
+ #If the type is not boolean, and is not int, then it is not valid
+ if type(sendiscOnPublish) != int:
+ raise TypeError, "SEND_ISC_ON_PUBLISH not an int or boolean: " + `sendiscOnPublish`
+ #Verify send ISC on publish is of valid value
+ elif not ((sendiscOnPublish == 0) or (sendiscOnPublish == 1)):
+ raise ValueError, "SEND_ISC_ON_PUBLISH is: " + `sendiscOnPublish` + ", but expected True, False, 0 or 1"
if type(transmitScript) not in [str, types.NoneType]:
raise TypeError, "TRANSMIT_SCRIPT not None or str: " + `transmitScript`
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py
index c54bacf446..e7f4a9c95b 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py
@@ -1,19 +1,19 @@
##
# 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.
##
@@ -22,7 +22,7 @@
# NOTE: THIS FILE SHOULD NOT BE USER-MODIFIED. INSTEAD REFER TO THE
# LOCAL CONFIG DOCUMENTATION ON HOW TO OVERRIDE SETTINGS IN THIS FILE.
#
-# Baseline GFE server configuration
+# Baseline GFE server configuration
#
# ----------------------------------------------------------------------------
#
@@ -30,7 +30,7 @@
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
-# 08/09/2013 #1571 randerso Changed projections to use the Java
+# 08/09/2013 #1571 randerso Changed projections to use the Java
# ProjectionType enumeration
# 10/03/2013 #2418 dgilling Update for new pSurge 2.0 data.
# 10/03/2013 #2424 randerso Change localTC to use dateutil instead of pytz
@@ -42,7 +42,7 @@
# 04/17/2014 #2934 dgilling Remove alias for TPCSurgeProb D2D database.
# 05/09/2014 #3148 randerso Add tpHPCndfd to D2DAccumulativeElements for HPCERP
# 06/20/2014 #3230 rferrel Added URMA25.
-# 05/29/2014 #3224 randerso Added "SPC":8 to D2DDBVERSIONS
+# 05/29/2014 #3224 randerso Added "SPC":8 to D2DDBVERSIONS
# 07/09/2014 #3146 randerso Removed unused import
# 07/10/2014 swhite Add surge and tropical threat WEs and their dependencies
# 01/08/2015 #15035 lshi add site WNJ
@@ -51,13 +51,13 @@
# Added Topo to ISCPARMS
# 01/19/2015 #4014 dgilling Added ETSS.
# 02/11/2015 #4053 rferrel Added GLWN and moved GLERL to display only for Great Lakes sites..
-# 01/19/2015 #4014 dgilling Added ETSS.
+# 01/19/2015 #4014 dgilling Added ETSS.
# 02/24/2015 #16692 byin Added RTMA. Removed gfsLR and GWW233
# 03/19/2015 #4300 randerso Remove GUMa as it is obsolete (per Shannon White)
# 03/30/2015 #17288 bhunder Added Guam-RTMA to D2D models
# 03/30/2015 #17206 yteng Changed some parameters that are not rate parameters
# 03/31/2015 #17288 bhunder Added Weather Params for RTMA
-# 04/03/2015 #4367 dgilling Change WindGust's time constraints back to TC1
+# 04/03/2015 #4367 dgilling Change WindGust's time constraints back to TC1
# for Fcst/Official.
# 04/08/2015 #4383 dgilling Define FireWX ISC configuration parameters.
# 04/15/2015 #17383 yteng Change localTC to fix error that time constraints
@@ -69,18 +69,520 @@
#
# 05/29/2015 #17144 bhunder Added weather Params for URMA25 and OCONUS RTMA
# 09/02/2015 #4819 rferrel Added HWRF.
-# 10/07/2015 #4958 dgilling Added support for NationalBlend D2D data.
+# 09/09/2015 16287 amoore Additional validation of user input
+# 10/07/2015 #4958 dgilling Added support for NationalBlend D2D data.
# 10/13/2015 #4961 randerso Updated NewTerrain/BaseTerrain database definitions
+# 10/30/2015 #17940 jendrowski Responded to Code Review. Mostly syntactical changes.
####################################################################################################
#----------------------------------------------------------------------------
# USEFUL DEFINES
#----------------------------------------------------------------------------
-#import siteConfig, LogStream, config, imp
-import siteConfig,imp
+import siteConfig,imp
+import pprint
+import re
+import sys
+import LogStream
+from collections import defaultdict
BASELINE = getattr(siteConfig, 'BASELINE', 0)
+#D scfp=open('/localapps/logs/scdebug.log','w')
+class dbConfig(object):
+ """Class to create GFE databases from modelDict"""
+ def __init__(self,modelDict):
+ self.modelDict=modelDict
+ self.dbs=[]
+ self.D2DMODELS=[]
+ self.D2DDBVERSIONS={}
+ self.D2DAccumulativeElements={}
+ self.INITMODULES={}
+ self.INITSKIPS={}
+
+ def addConfiguredModels(self,ignoreList=[]):
+ """Setup model databases defined in dbConfigDict.
+ ignoreList can be used to filter out specific models
+ """
+ for m in self.modelDict:
+ if m in ignoreList:
+ continue
+ # Don't allow BC model if regular is in ignore list
+ if m[-2:] == 'BC' and m[:-2] in ignoreList:
+ continue
+ self.addGfeDB(m,self.modelDict[m])
+ return
+ def addGfeDB(self,modelname,dbConfigDict):
+ """Does all the work needed for adding a model to GFE from entries
+ in dbConfigDict. This populates dbs and sets various self
+ variables.
+ """
+ if "DB" in dbConfigDict and "Parms" in dbConfigDict:
+ self.dbs.append((dbConfigDict["DB"],dbConfigDict["Parms"]))
+ if "D2DAccumulativeElements" in dbConfigDict:
+ self.D2DAccumulativeElements[modelname]=dbConfigDict["D2DAccumulativeElements"]
+ if "D2DDBVERSIONS" in dbConfigDict:
+ self.D2DDBVERSIONS[modelname]=dbConfigDict["D2DDBVERSIONS"]
+ if "D2DMODELS" in dbConfigDict:
+ self.D2DMODELS.append((dbConfigDict["D2DMODELS"],modelname))
+ if "INITMODULES" in dbConfigDict:
+ # Find if the model is used in any currently defined INITMODULES
+ entry=next((x for x in self.INITMODULES.iteritems() if len(x[1])==1 and modelname in x[1]),None)
+ if entry is not None:
+ del self.INITMODULES[entry[0]]
+ if type(dbConfigDict["INITMODULES"]) is tuple:
+ for mname in dbConfigDict["INITMODULES"][1]:
+ entry=next((x for x in self.INITMODULES.iteritems() if len(x[1])==1 and mname in x[1]),None)
+ if entry is not None:
+ del self.INITMODULES[entry[0]]
+ self.INITMODULES[dbConfigDict["INITMODULES"][0]] = dbConfigDict["INITMODULES"][1]
+ else:
+ self.INITMODULES[dbConfigDict["INITMODULES"]]=[modelname]
+ if "INITSKIPS" in dbConfigDict:
+ self.INITSKIPS[modelname]=dbConfigDict["INITSKIPS"]
+
+#===============================================================================
+# Utility methods to manage GFE configuration
+#===============================================================================
+def mergeModelDicts(baseDict,addDict):
+ """Combine serverConfig model dict and regional modelDict into one modelDict.
+ Settings in baseDict are maintained unless overridden in addDict. The merging
+ is done on a key by key basis of a specific model's dictionary (baseDict and
+ addDict are dictionaries of dictionaries)
+ This changes baseDict in place so the object passed in as baseDict is modified
+ in the caller's scope.
+ """
+ for m,v in addDict.iteritems():
+ if m not in baseDict:
+ baseDict[m]=v
+ else:
+ for key,val in v.iteritems():
+ baseDict[m][key]=val
+
+def updateModelDict(modelDict,model,key,value):
+ """Udates a specific entry for a model in modelDict. model and key are dictionary
+ keys into modelDict and modelDict[model] respectively. If model is not defined
+ in modelDict, then a new entry is created. Otherwise, value replaces any existing
+ value in modelDict[model][key].
+ This changes modelDict in place so the object passed in as modelDict is modified
+ in the caller's scope.
+ """
+ if model in modelDict:
+ modelDict[model][key]=value
+ else:
+ modelDict[model]= {key : value}
+
+def alterModelDef(dbTuple, name=None, format=None, dbType=None, single=None,
+ official=None, numver=None, purgeAge=None):
+ """Alter GFE database definition. The definition is used in the dbs setting
+ and has form:
+ (name, format, type, single, official, numVer, purgeAge)
+ i.e., Practice = ("Fcst", GRID, "Prac", YES, NO, 1, 24)
+
+ Won't use these exact names since some might conflict with builtins
+ Only supply what you want to change. To clone a model definition, just
+ supply name='newname'
+ """
+ n,f,t,s,o,v,p=dbTuple
+ l=[]
+ for old,new in [(n,name),(f,format),(t,dbType),(s,single),(o,official),
+ (v,numver),(p,purgeAge)]:
+ if new is None:
+ l.append(old)
+ else:
+ l.append(new)
+ return tuple(l)
+
+def createModelDict(localsDict,dbs,D2DMODELS,D2DDBVERSIONS,D2DAccumulativeElements,
+ INITMODULES,INITSKIPS):
+ """Convert serverConfig model configuration to a dictionary. This allows
+ legacy serverConfig settings in dbs,D2DMODELS,INITMODULES, etc. to be
+ maintained and then converted into a single dictionary where all settings
+ for a model are together.
+
+ WARNING: There can only be one version of a model in the dbs list. Fcst
+ practice and test databases have to be handled separately. This is ok
+ because these databases are defined after any localConfig customizations
+ of the normal Fcst database.
+
+ modelDict contains the following keys. Only define what is needed, i.e.,
+ it is not required to have every key defined
+ "DB": Definition of the database, i.e., the first value in a dbs entry:
+ ("wrfems", GRID, "", NO, NO, 3, 0). This must be a tuple. The name
+ in the DB entry must be the same as the model name used as the key
+ into the modelDict variable.
+
+ "Parms" : Definition of the weather element parameters in the database,
+ i.e., the second part of the dbs entry. This is a list of tuples.
+
+ "D2DMODELS" : D2D metadata database name for the source model.
+
+ "INITMODULES': Name of the SmartInit module. This should be just the module
+ name as a string, not a list.
+
+ "D2DAccumulativeElements" : List of parms that are accumulative
+
+ "D2DDBVERSIONS" : Number of versions of a D2D model to show in the Weather
+ Element Browser. Defaults to 2 if not supplied.
+
+ "INITSKIPS" : Used to skip model cycles.
+
+ Example for a model:
+
+ modelDict["CMCreg"]={
+ "DB": ("CMCreg", "GRID", "", NO, NO, 2, 0),
+ "Parms": [([Temp, Td, RH, Wind, WindGust, Sky, MixHgt, TransWind, QPF,
+ PoP, SnowAmt, SnowRatio], TC3),
+ ([PoP6, QPF6, QPF6hr, CQPF1],TC6NG),
+ ([QPF12, PoP12],TC12NG),
+ ([MinRH], MinRHTC), ([MaxRH], MaxRHTC),
+ ([MaxT], MaxTTC), ([MinT], MinTTC),
+ ],
+ "D2DMODELS": "Canadian-Reg",
+ "INITMODULES": "Local_CMCreg",
+ "D2DAccumulativeElements": ["tpgemreg","tprun","tp3hr","tp6hr"],
+ "D2DDBVERSIONS": 3,
+ }
+ """
+ # Create self initializing dictionary via collections.defaultdict
+ modelDict=defaultdict(dict)
+ parmsDict={}
+ tcDict={}
+
+ for n,v in sorted(localsDict.items()):
+ if type(v) is tuple and type(v[0]) is str and v[1] in [DISCRETE,SCALAR,VECTOR,WEATHER]:
+ parmsDict[n]=v
+ elif type(v) is tuple and len(v)==3 and type(v[0]) is int:
+ tcDict[n]=v
+
+ # Process dbs entries, i.e., model database definition
+ tcDict={}
+ for item in sorted(dbs):
+ plist=[]
+ parmTmpDict={}
+ pDict={}
+ for pt in item[1]:
+ parmsList=[]
+ # Try to find named parm setting
+ for p in pt[0]:
+ pname=p[0]
+ pDict[pname]=p
+ parmsList.append(pname)
+
+ # Try to get a named time constraint
+ name=next((name for name,v in tcDict.iteritems() if v == pt[1]), None)
+ if name is None:
+ name = `pt[1]`
+ tcDict[name]=pt[1]
+ if name in parmTmpDict:
+ parmTmpDict[name]+=parmsList
+ else:
+ parmTmpDict[name]=parmsList
+
+ # This consolidates parms by time constraint and sorts parm names.
+ for tc in sorted(parmTmpDict.keys()):
+ theParms=[]
+ for p in sorted(parmTmpDict[tc]):
+ theParms.append(pDict[p])
+ plist.append((theParms, tcDict[tc]))
+
+ modelDict[item[0][0]]={'DB':item[0],'Parms':plist}
+
+ for si,ml in INITMODULES.items():
+ m=ml[0]
+ modelDict[m]['INITMODULES']=si
+ for m,v in D2DDBVERSIONS.items():
+ modelDict[m]['D2DDBVERSIONS']=D2DDBVERSIONS[m]
+
+ for m,v in D2DAccumulativeElements.items():
+ modelDict[m]['D2DAccumulativeElements']=v
+ for m,v in INITSKIPS.items():
+ modelDict[m]['INITSKIPS']=v
+ for item in D2DMODELS:
+ if type(item) is str:
+ m=item
+ v=item
+ else:
+ v,m=item
+ if m in modelDict:
+ modelDict[m]['D2DMODELS']=v
+ else:
+ modelDict[m]={'D2DMODELS':v}
+ return modelDict
+
+def changeParm(modelDict,pname,value,modelList=['Fcst']):
+ """Alter a parm that is defined in modelDict Parm setting.
+
+ pname: name of parm. This is a string not the parm definition
+ value: the parm definition tuple. If the None object, then the parm
+ will be deleted.
+ modelList: List of model names to check. An empty list will check all
+ models in modelDict.
+ Return: Nothing. modelDict is altered in place.
+ """
+ if not modelList:
+ modelList=modelDict.keys()
+ for m in modelList:
+ if m not in modelDict or 'Parms' not in modelDict[m] or \
+ not checkForParm(modelDict[m]['Parms'],pname):
+ continue
+
+ newpt=[]
+ # parms is tuple (parmList,TC)
+ for pList,tc in modelDict[m]['Parms']:
+ # This makes a copy of the list of parms, not a reference
+ # this is needed because we are changing the list in place.
+ theParms= list(pList)
+ matchParm=next((p for p in theParms if p[0] == pname),None)
+ if matchParm:
+ theParms.remove(matchParm)
+ if value is not None:
+ theParms.append(value)
+ if theParms:
+ newpt.append((theParms,tc))
+ if newpt != modelDict[m]['Parms']:
+ modelDict[m]['Parms'] = newpt
+
+def changeParmTC(modelDict,pname,newTC,modelList=['Fcst']):
+ """Alter a parm in that is defined in modelDict Parm setting.
+
+ pname: name of parm. This is a string not the parm definition
+ newTC: the new Time Contraint (tuple)
+ modelList: List of model names to check. An empty list will check all
+ models in modelDict.
+ Return: Nothing. modelDict is altered in place.
+ """
+ if not modelList:
+ modelList=modelDict.keys()
+ for m in sorted(modelList):
+ if m not in modelDict or 'Parms' not in modelDict[m]:
+ continue
+#d print m,"checkForParm=",checkForParm(modelDict[m]['Parms'],pname)
+ if not checkForParm(modelDict[m]['Parms'],pname):
+ continue
+
+ newpt=[]
+ # Parms is tuple (parmList,TC)
+ for pList,tc in modelDict[m]['Parms']:
+ # This makes a copy of the list of parms, not a reference
+ # this is needed because we are changing the list in place.
+ theParms= list(pList)
+ matchParm=next((p for p in theParms if p[0] == pname),None)
+#d print m,matchParm,tc,newTC,len(theParms)
+ if matchParm:
+ theParms.remove(matchParm)
+ newpt.append(([matchParm],newTC))
+#d print "Added",matchParm,newTC
+ if theParms:
+#d print "restored",theParms," to",tc
+ newpt.append((theParms,tc))
+ if newpt != modelDict[m]['Parms']:
+#d print 'Updated model',m
+ modelDict[m]['Parms'] = newpt
+#d print modelDict[m]['Parms'],'\n'
+
+def checkForParm(parmDef,pname):
+ """Check a model parm definition if a parm named pname is in it.
+
+ parmDef: list of tuples, each tuple is a list of parms and a time
+ contraint. Call with modelDict[modelname]['Parms].
+ pname: Name of parm (string).
+ Returns: Boolean True if found, or False
+ """
+ for item in parmDef:
+ t=next((pt for pt in item[0] if pt[0] == pname),None)
+ if t is not None:
+ return True
+ return False
+
+def getParmNames(parmsDef):
+ """Return a list of parm names in a model parm definition
+
+ parmsDef: list of tuples, each tuple is a list of parms and a time
+ constraint. Call with modelDict[modelname]['Parms].
+ Returns: List of string parameter names
+
+ Here's an example of how to remove unused parms from Fcst, this can
+ run in localConfig:
+
+ parmsToRemove=[]
+ for p in getParmNames(serverConfig.modelDict['Fcst']):
+ pl=p.lower()
+ for t in ['period','swell','wave','surf', 'surge']:
+ if t in pl:
+ parmsToRemove.append(p)
+ break
+ removeParms(serverConfig.modelDict,'Fcst',parmsToRemove)
+ """
+ result=[]
+ for pList,tc in parmsDef:
+ # p is the parmDef tuple where first item is the parm name
+ newParms=[p[0] for p in pList]
+ result+=newParms
+ return sorted(result)
+
+def printServerConfig(moduleObj,localsDict, logFile="/awips2/edex/logs/localConfig.log"):
+ """Dump out ServerConfig final settings. localsDict is a dictionary of
+ local variables in localConfig, normally locals().
+ """
+ # serverConfig log text
+ scText=""
+ try:
+ with open(logFile,"w") as fp:
+ # Print out dbs entries, i.e., model database definition
+ dbs=DATABASES
+ for item in sorted(dbs):
+ scText += "\ndbs[%s]: %s\n" % (item[0][0], str(item[0]))
+ scText += _dumpParms(item[1])
+
+ # Dump out serverConfig settings likely to be modified by localConfig
+ scvars=["D2DMODELS", "INITMODULES",
+ "D2DDBVERSIONS", "D2DAccumulativeElements",
+ "REQUEST_ISC", "SEND_ISC_ON_SAVE",
+ "SEND_ISC_ON_PUBLISH", "REQUESTED_ISC_PARMS",
+ "ExtraWEPrecision", "INITSKIPS",
+ "HazardKeys",
+ "MAX_USER_BACKGROUND_PROCESSES",
+ ]
+
+ for item in scvars:
+ scText += "\n%s:\n" % item
+ obj=getattr(moduleObj,item,None)
+ if type(obj) is list:
+ obj.sort()
+ scText += pprint.pformat(obj) +'\n'
+
+ # This prints out all variables named parms*, i.e., parmsNAM12
+ for k in sorted(localsDict.keys()):
+ if k == "OFFICIALDBS" or re.match("parms[A-Z]+",k) is not None or \
+ k == "extraISCparms":
+ scText += "\n%s:\n" % k
+ scText += _dumpParms(localsDict[k])
+ scText += printModelDict(localsDict)
+ fp.write(scText)
+ except IOError as e:
+ LogStream.logProblem("printServerConfig open file problem "+logFile+" - log not created\n" +LogStream.exc(e))
+
+def printModelDict(localsDict):
+ """Convert serverConfig model configuration to a dictionary. This writes
+ the dictionary as text. This does not create a usable modelDict, just one to
+ use to print out the dictionary as python code."""
+
+ modelDict={}
+ parmsDict={}
+ tcDict={}
+ dbs=DATABASES
+ scText=""
+ for n,v in localsDict.items():
+ if type(v) is tuple and type(v[0]) is str and v[1] in [DISCRETE,SCALAR,VECTOR,WEATHER]:
+ parmsDict[n]=v
+ elif type(v) is tuple and len(v)==3 and type(v[0]) is int:
+ tcDict[n]=v
+
+ scText += '\n'
+ for n in sorted(parmsDict):
+ scText += 'parmVar: %s = %s\n' % (n,`parmsDict[n]`)
+ scText += '\n'
+ for n in sorted(tcDict):
+ scText += 'TC: %s = %s\n' % (n,`tcDict[n]`)
+ scText += '\n'
+
+ # Print out dbs entries, i.e., model database definition
+ for item in sorted(dbs):
+ plist=[]
+ parmTmpDict={}
+ for pt in item[1]:
+ parmsList=[]
+ # Try to find named parm setting
+ for p in pt[0]:
+ name=next((name for name,v in parmsDict.iteritems() if v == p), None)
+ if name is not None:
+ parmsList.append(name)
+ else:
+ parmsList.append(p[0])
+ theParms='&nlq(['+', '.join(parmsList)+'], '
+ # Try to get a named time constraint
+ name=next((name for name,v in tcDict.iteritems() if v == pt[1]), None)
+ if name is None:
+ name = `pt[1]`
+ if name in parmTmpDict:
+ parmTmpDict[name]+=parmsList
+ else:
+ parmTmpDict[name]=parmsList
+ # This consolidates parms by time constraint and sorts parm names.
+ for tc in sorted(parmTmpDict.keys()):
+ parmTmpDict[tc]=sorted(parmTmpDict[tc])
+ theParms='&nlq(['+', '.join(parmTmpDict[tc])+'], '
+ plist.append(theParms + tc +')&nrq')
+
+ modelDict[item[0][0]]={'DB':item[0],'Parms':plist}
+ for si,ml in INITMODULES.items():
+ m=ml[0]
+ entry=si
+ if len(ml) > 1:
+ # Multiple d2d models for smartinit
+ # Try to get model from si name
+ if si.find('Local_') == 0:
+ m=si[6:]
+ entry=(si,ml)
+ if m in modelDict:
+ modelDict[m]['INITMODULES']=entry
+ else:
+ modelDict[m]={'INITMODULES':entry}
+
+ for m,v in D2DDBVERSIONS.items():
+ if m in modelDict:
+ modelDict[m]['D2DDBVERSIONS']=D2DDBVERSIONS[m]
+ else:
+ modelDict[m]={'D2DDBVERSIONS':D2DDBVERSIONS[m]}
+
+ for m,v in D2DAccumulativeElements.items():
+ if m in modelDict:
+ modelDict[m]['D2DAccumulativeElements']=v
+ else:
+ modelDict[m]={'D2DAccumulativeElements':v}
+ for m,v in INITSKIPS.items():
+ if m in modelDict:
+ modelDict[m]['INITSKIPS']=v
+ else:
+ modelDict[m]={'INITSKIPS':v}
+ for item in D2DMODELS:
+ if type(item) is str:
+ m=item
+ v=item
+ else:
+ v,m=item
+ if m in modelDict:
+ modelDict[m]['D2DMODELS']=v
+ else:
+ modelDict[m]={'D2DMODELS':v}
+
+ for m in sorted(modelDict):
+ text=pprint.pformat(modelDict[m],width=80,indent=0)
+ text=text.replace("'&nlq",'')
+ text=text.replace("&nrq'",'')
+ text=text.replace('"&nlq','')
+ text=text.replace('&nrq"','')
+ text=text.replace(", 'INITMODULES':",",\n'INITMODULES':")
+ text=text.replace(')]}','),\n ]\n}')
+ text=text.replace('\n','\n ')
+ scText += "modelDict['%s'] = {\n %s\n\n" % (m,text[1:])
+ return scText
+
+def _dumpParms(parms):
+ """Pretty prints parms."""
+ pDict={}
+ result=""
+ for item in parms:
+ if type(item) is not tuple:
+ # Not a parm definition!
+ return
+ pList,tc = item
+ for p in pList:
+ pDict[p[0]]=(p,tc)
+ for k in sorted(pDict.keys()):
+ result += " %s\n" % repr(pDict[k])
+ return result
+
# imports the named module. If the module
# does not exist, it is just ignored. But
# if it exists and has an error, the exception
@@ -92,7 +594,6 @@ def siteImport(modName):
if fp:
fp.close()
except ImportError:
- import LogStream
LogStream.logEvent("No " + modName + " file found, using baseline settings.");
return 0
globals()[modName] = __import__(modName)
@@ -112,17 +613,62 @@ GFESUITE_PRDDIR = siteConfig.GFESUITE_PRDDIR
SID = GFESUITE_SITEID
-ALASKA_SITES = ['AFG', 'AJK', 'AICE', 'ALU', 'AER', 'ACR', 'AFC']
-GreatLake_SITES = ['LOT', 'MKX', 'GRB', 'DLH', 'MQT', 'APX', 'GRR', 'DTX',
- 'IWX', 'CLE', 'BUF', 'PBZ', 'ILN', 'IND', 'ILX', 'MPX', 'FGF']
-CONUS_EAST_SITES = ['ALY', 'AKQ', 'APX', 'BGM', 'BMX', 'BOX', 'BTV', 'BUF',
- 'CAE', 'CAR', 'CHS', 'CLE', 'CTP', 'DTX', 'FFC', 'GRR',
- 'GSP', 'GYX', 'ILM', 'ILN', 'IND', 'JAN', 'JAX', 'JKL',
- 'LCH', 'LMK', 'LWX', 'MEG', 'MFL', 'MHX', 'MLB', 'MOB',
- 'MQT', 'MRX', 'OKX', 'PAH', 'PBZ', 'PHI', 'RAH', 'RLX',
- 'RNK', 'TAE', 'TBW', 'ALR', 'RHA', 'TAR', 'TIR']
-RFC_SITES = ["ACR", "FWR", "KRF", "MSR", "ORN", "PTR",
- "RHA", "RSA", "STR", "TAR", "TIR", "TUA"]
+# Groups are a way of setting up groups of parms for special or optionally used
+# methodology. For example, the Probability of Weather Type methodology.
+groups={}
+groups['ALASKA_SITES'] = ['AFG', 'AJK', 'AICE', 'ALU', 'AER', 'ACR', 'AFC']
+groups['GreatLake_SITES'] = ['LOT', 'MKX', 'GRB', 'DLH', 'MQT', 'APX', 'GRR', 'DTX',
+ 'IWX', 'CLE', 'BUF', 'PBZ', 'ILN', 'IND', 'ILX', 'MPX', 'FGF']
+groups['CONUS_EAST_SITES'] = ['ALY', 'AKQ', 'APX', 'BGM', 'BMX', 'BOX', 'BTV', 'BUF',
+ 'CAE', 'CAR', 'CHS', 'CLE', 'CTP', 'DTX', 'FFC', 'GRR',
+ 'GSP', 'GYX', 'ILM', 'ILN', 'IND', 'JAN', 'JAX', 'JKL',
+ 'LCH', 'LMK', 'LWX', 'MEG', 'MFL', 'MHX', 'MLB', 'MOB',
+ 'MQT', 'MRX', 'OKX', 'PAH', 'PBZ', 'PHI', 'RAH', 'RLX',
+ 'RNK', 'TAE', 'TBW', 'ALR', 'RHA', 'TAR', 'TIR']
+groups['RFC_SITES'] = ["ACR", "ALR", "FWR", "KRF", "MSR", "ORN", "PTR",
+ "RHA", "RSA", "STR", "TAR", "TIR", "TUA"]
+
+siteRegion={}
+# need to account for RFCs?
+siteRegion['AR'] = ['AFC','AFG','AJK']
+siteRegion['CR'] = ['ABR','APX','ARX','BIS','BOU','CYS','DDC','DLH','DMX','DTX',
+ 'DVN','EAX','FGF','FSD','GID','GJT','GLD','GRB','GRR','ICT',
+ 'ILX','IND','IWX','JKL','LBF','LMK','LOT','LSX','MKX','MPX',
+ 'MQT','OAX','PAH','PUB','RIW','SGF','TOP','UNR']
+siteRegion['ER'] = ['AKQ','ALY','BGM','BOX','BTV','BUF','CAE','CAR','CHS','CLE',
+ 'CTP','GSP','GYX','ILM','ILN','LWX','MHX','OKX','PBZ','PHI',
+ 'RAH','RLX','RNK']
+siteRegion['PR'] = ['GUM','HFO','PPG']
+siteRegion['SR'] = ['ABQ','AMA','BMX','BRO','CRP','EPZ','EWX','FFC','FWD','HGX',
+ 'HUN','JAN','JAX','KEY','LCH','LIX','LUB','LZK','MAF','MEG',
+ 'MFL','MLB','MOB','MRX','OHX','OUN','SHV','SJT','SJU','TAE',
+ 'TBW','TSA']
+siteRegion['WR'] = ['BOI','BYZ','EKA','FGZ','GGW','HNX','LKN','LOX','MFR','MSO',
+ 'MTR','OTX','PDT','PIH','PQR','PSR','REV','SEW','SGX','SLC',
+ 'STO','TFX','TWC','VEF']
+
+groups['OCONUS_SITES'] = groups['ALASKA_SITES'] + siteRegion['PR'] + ['SJU']
+
+myRegion='ALL'
+for r in siteRegion:
+ if SID in siteRegion[r]:
+ myRegion=r
+ break
+
+groups['powt']=siteRegion['CR']
+groups['marineSites']=["CAR","GYX","BOX","OKX","PHI","LWX","AKQ","MHX","ILM","CHS",
+ "BRO","CRP","HGX","LCH","LIX","MOB","TAE","TBW","KEY","MFL",
+ "MLB","JAX","SJU",
+ "SEW","PQR","MFR","EKA","MTR","LOX","SGX"]
+# Override due to DR 17496 fix forcing TC3NG
+# These are coastal sites that need TC1
+groups['marineTC1']=["CAR","GYX","BOX","OKX","PHI","LWX","AKQ","ILM","CHS","MHX",
+ ]
+groups['winterProbs']= ['AKQ','ALY','BGM','BOX','BTV','BUF','CAE','CAR','CHS','CLE',
+ 'CTP','GSP','GYX','ILM','ILN','LWX','MHX','OKX','PBZ','PHI',
+ 'RAH','RLX','RNK']
+
+groups['rainfallProbs'] = ["BOX"]
#---------------------------------------------------------------------------
#
@@ -158,17 +704,15 @@ Wind = ("Wind", VECTOR, "kts", "Surface Wind", 125.0, 0.0, 0, NO)
# special for TPC hurricane winds
HiWind = ("Wind", VECTOR, "kts", "Surface Wind", 200.0, 0.0, 0, NO)
Weather = ("Wx", WEATHER, "wx", "Weather")
-IceAcc = ("IceAccum", SCALAR, "in", "Ice Accumulation", 12.0, 0.0, 1, YES)
+IceAcc = ("IceAccum", SCALAR, "in", "Ice Accumulation", 5.0, 0.0, 2, YES)
SnowAmt = ("SnowAmt", SCALAR, "in", "Snowfall amount", 20.0, 0.0, 1, YES)
-StormTotalSnow = ("StormTotalSnow", SCALAR, "in","Storm Total Snow", 50.0,
- 0.0, 1, NO)
+StormTotalSnow = ("StormTotalSnow", SCALAR, "in","Storm Total Snow", 50.0, 0.0, 1, NO)
PoP = ("PoP", SCALAR, "%", "Prob of Precip", 100.0, 0.0, 0, NO)
PoP6 = ("PoP6", SCALAR, "%", "Prob of Precip (6hr)", 100.0, 0.0, 0, NO)
PoP12 = ("PoP12", SCALAR, "%", "Prob of Precip (12hr)", 100.0, 0.0, 0, NO)
TstmPrb3 = ("TstmPrb3", SCALAR, "%", "Prob of Tstorm (3hr)", 100.0, 0.0, 0, NO)
TstmPrb6 = ("TstmPrb6", SCALAR, "%", "Prob of Tstorm (6hr)", 100.0, 0.0, 0, NO)
-TstmPrb12 = ("TstmPrb12", SCALAR, "%", "Prob of Tstorm (12hr)", 100.0, 0.0, 0,
- NO)
+TstmPrb12 = ("TstmPrb12", SCALAR, "%", "Prob of Tstorm (12hr)", 100.0, 0.0, 0, NO)
Sky = ("Sky", SCALAR, "%", "Sky Condition", 100.0, 0.0, 0, NO)
FzLevel = ("FzLevel", SCALAR, "ft", "Freezing level", 30000.0, 0.0, 0, NO)
SnowLevel = ("SnowLevel", SCALAR, "ft", "Snow Level", 18000.0, 0.0, 0, NO)
@@ -179,9 +723,9 @@ PoP12hr = ("PoP12hr", SCALAR, "%", "12 hr Chance of Precip", 100.0, 0.0, 0, NO)
QPF6hr = ("QPF6hr", SCALAR, "in", "6 hr Precipitation (in)", 5.0, 0.0, 2, YES)
SnowAmt6hr = ("SnowAmt6hr", SCALAR, "in", "6 hr Snowfall", 30.0, 0.0, 1, YES)
-# Cobb SnowTool included.
-SnowRatio = ('SnowRatio', SCALAR, '%', 'Snow Ratio', 40.0, 0.0, 1, NO)
-#totalVV = ('totalVV', SCALAR, 'ubar/s', 'Total VV', 400.0, 0.0, 0, YES)
+# Cobb SnowTool included.
+SnowRatio = ('SnowRatio', SCALAR, 'none', 'Snow Ratio', 40.0, 0.0, 0, NO)
+#totalVV = ('totalVV', SCALAR, 'ubar/s', 'Total VV', 400.0, 0.0, 0, YES)
cape = ("cape", SCALAR, "1unit", "CAPE", 8000.0, 0.0, 1, NO)
ApparentT = ("ApparentT", SCALAR, "F", "Apparent Temperature", 130.0, -120.0, 0, NO)
UWaveDir = ("UWaveDir", SCALAR, "m/s", "U WaveDir Comp", 0.50, -0.50, 3, NO)
@@ -189,28 +733,23 @@ VWaveDir = ("VWaveDir", SCALAR, "m/s", "V WaveDir Comp", 0.50, -0.50, 3, NO)
LkSfcT = ("LkSfcT", SCALAR, "C", "Lake Surface T", 40.0, -2.0, 1, NO)
SnowMap = ("SnowMap", SCALAR, "in", "Snowfall Map", 20.0, 0.0, 1, NO)
WaveDir = ("WaveDir", VECTOR, "m/s", "Wave Direction", 5.0, 0.0, 2, NO)
-StormTotalQPF = ('StormTotalQPF', SCALAR, 'in', 'Storm Total QPF (in)', 10.0, 0.0, 2, NO)
+StormTotalQPF = ('StormTotalQPF', SCALAR, 'in', 'Storm Total QPF (in)', 36.0, 0.0, 2, NO)
SeasonTotalSnow = ('SeasonTotalSnow', SCALAR, 'in', 'Season Total Snow (in)', 150.0, 0.0, 2, NO)
# Marine Weather Elements
-WindWaveHeight = ("WindWaveHgt", SCALAR, "ft", "Wind Wave Height",
- 100.0, 0.0, 0, NO)
-WaveHeight = ("WaveHeight", SCALAR, "ft", "Total Wave Height",
- 100.0, 0.0, 0, NO)
+WindWaveHeight = ("WindWaveHgt", SCALAR, "ft", "Wind Wave Height", 100.0, 0.0, 0, NO)
+WaveHeight = ("WaveHeight", SCALAR, "ft", "Total Wave Height", 100.0, 0.0, 0, NO)
Swell = ("Swell", VECTOR, "ft", "Primary Swell", 100.0, 0.0, 0, NO)
Swell2 = ("Swell2", VECTOR, "ft", "Secondary Swell", 100.0, 0.0, 0, NO)
Period = ("Period", SCALAR, "sec", "Primary Period", 20.0, 0.0, 0, NO)
WindGust = ("WindGust", SCALAR, "kts", "Wind Gust", 125.0, 0.0, 0, NO)
-IceCoverage = ("IceCoverage", SCALAR, "%", "Ice Coverage Amount",
- 100.0, 0.0, 0, NO)
-SurfHeight = ("SurfHeight", SCALAR, "ft", "Total Wave Height",
- 100.0, 0.0, 0, NO)
+IceCoverage = ("IceCoverage", SCALAR, "%", "Ice Coverage Amount", 100.0, 0.0, 0, NO)
+SurfHeight = ("SurfHeight", SCALAR, "ft", "Total Wave Height", 100.0, 0.0, 0, NO)
##########DCS3499
-SigWaveHgt = ("SigWaveHgt", SCALAR, "ft",
- "Significant wave height of combined wind waves and swells",
- 30.0, 0.0, 0, NO)
-WindWaveHgt = ("WindWaveHgt", SCALAR, "ft", "Significant wave height of wind waves",
- 30.0, 0.0, 0, NO)
+SigWaveHgt = ("SigWaveHgt", SCALAR, "ft",
+ "Significant wave height of combined wind waves and swells",
+ 30.0, 0.0, 0, NO)
+WindWaveHgt = ("WindWaveHgt", SCALAR, "ft", "Significant wave height of wind waves", 30.0, 0.0, 0, NO)
WindWavePeriod = ("WindWavePeriod", SCALAR, "sec.", "Wind wave peak period", 20.0, 0.0, 0, NO)
WindWaveDir = ("WindWaveDir", VECTOR, "degree", "Direction of wind waves", 100.0, 0.0, 0, NO)
@@ -275,40 +814,30 @@ FreeWind = ("FreeWind", VECTOR, "kts", "Free Air Wind", 125.0, 0.0, 0, NO)
TransWind = ("TransWind", VECTOR, "kts", "Transport Wind", 125.0, 0.0, 0, NO)
Stability = ("Stability",SCALAR,"cat","Stability", 6.0,1.0,0, NO)
HrsOfSun = ("HrsOfSun",SCALAR,"hrs","Hours of Sun",24.0,0.0,1, NO)
-MarineLayer = ("MarineLayer",SCALAR,"ft","Depth of Marine Layer",
- 20000.0,0.0,0,NO)
-InvBurnOffTemp = ("InvBurnOffTemp",SCALAR,"F","Inversion Burn-off Temperature",
- 120.0,-30.0,0, NO)
+MarineLayer = ("MarineLayer",SCALAR,"ft","Depth of Marine Layer", 20000.0,0.0,0,NO)
+InvBurnOffTemp = ("InvBurnOffTemp",SCALAR,"F","Inversion Burn-off Temperature", 120.0,-30.0,0, NO)
VentRate = ("VentRate", SCALAR, "kt*ft", "VentRate", 500000.0, 0.0, 0, NO)
DSI = ("DSI", SCALAR, "index", "DSI", 6.0, 0.0, 0, NO)
-MaxRH = ("MaxRH", SCALAR, "%", "Maximum Relative Humidity",
- 100.0, 0.0, 0, NO)
-MinRH = ("MinRH", SCALAR, "%", "Minimum Relative Humidity",
- 100.0, 0.0, 0, NO)
+MaxRH = ("MaxRH", SCALAR, "%", "Maximum Relative Humidity", 100.0, 0.0, 0, NO)
+MinRH = ("MinRH", SCALAR, "%", "Minimum Relative Humidity", 100.0, 0.0, 0, NO)
Wetflag = ("Wetflag", SCALAR, "yn", "1300LT WetFlag", 1.0, 0.0, 0, NO)
Ttrend = ("Ttrend", SCALAR, "F", "24hr Temperature Trend", 50.0, -50.0, 0, NO)
-RHtrend = ("RHtrend", SCALAR, "F", "24hr Relative Humidity Trend",
- 100.0, -100.0, 0, NO)
+RHtrend = ("RHtrend", SCALAR, "F", "24hr Relative Humidity Trend", 100.0, -100.0, 0, NO)
# HPC Delta weather elements
-DeltaMinT = ("DeltaMinT", SCALAR, "F", "Delta Minimum Temperature",
- 50.0, -50.0, 0, NO)
-DeltaMaxT = ("DeltaMaxT", SCALAR, "F", "Delta Maximum Temperature",
- 50.0, -50.0, 0, NO)
-DeltaWind = ("DeltaWind", VECTOR, "kts", "Surface Delta Wind",
- 125.0, 0.0, 0, NO)
-DeltaSky = ("DeltaSky", SCALAR, "%", "Delta Sky Condition",
- 100.0, -100.0, 0, NO)
-DeltaPoP = ("DeltaPoP", SCALAR, "%", "Delta Prob of Precip",
- 100.0, -100.0, 0, NO)
+DeltaMinT = ('DeltaMinT', SCALAR, 'F', 'DeltaMinT', 130.0, -80.0, 0, NO)
+DeltaMaxT = ('DeltaMaxT', SCALAR, 'F', 'DeltaMaxT', 130.0, -80.0, 0, NO)
+DeltaWind = ("DeltaWind", VECTOR, "kts", "Surface Delta Wind", 125.0, 0.0, 0, NO)
+DeltaSky = ("DeltaSky", SCALAR, "%", "Delta Sky Condition", 100.0, -100.0, 0, NO)
+DeltaPoP = ("DeltaPoP", SCALAR, "%", "Delta Prob of Precip", 100.0, -100.0, 0, NO)
# Special LAPS parms
Radar = ("Radar", SCALAR, "dbz", "Radar Reflectivity", 80.0, -20.0, 0, NO)
# RTMA parms
QPE = ("QPE", SCALAR, "in", "QPE", 5.0, 0.0, 2, YES)
-#if SID in ALASKA_SITES: - not sure if this needs to be like that
-if SID in ALASKA_SITES or SID in ["HFO", "SJU", "GUM"]:
+#if SID in groups['ALASKA_SITES']: - not sure if this needs to be like that
+if SID in groups['OCONUS_SITES']:
TUnc = ("TUnc", SCALAR, "F", "Temperature Anl Uncertainty", 20.0, 0.0, 0, NO)
TdUnc = ("TdUnc", SCALAR, "F", "Dewpoint Anl Uncertainty", 25.0, 0.0, 0, NO)
else:
@@ -325,7 +854,7 @@ Pressure = ("Pressure", SCALAR, "Pa", "Pressure", 110000.0, 0.0, 2, NO)
WGustUnc = ("WGustUnc", SCALAR, "kts", "WGust Anl Uncertainty", 12.0, 0.0, 0, NO)
# NamDNG5 parms
-QPF3 = ("QPF3", SCALAR, "in", "3HR QPF", 3.0, 0.0, 2, YES)
+QPF3 = ("QPF3", SCALAR, "in", "3HR QPF", 5.0, 0.0, 2, YES)
QPF6 = ("QPF6", SCALAR, "in", "6HR QPF", 5.0, 0.0, 2, YES)
QPF12 = ("QPF12", SCALAR, "in", "12HR QPF", 10.0, 0.0, 2, YES)
Vis = ("Vis", SCALAR, "SM", "Visibility", 10.0, 0.0, 2, NO)
@@ -336,24 +865,18 @@ MinT3 = ("MinT3", SCALAR, "F", "3hr Minimum Temperature", 120.0, -80.0, 0, NO)
MaxRH3 = ("MaxRH3", SCALAR, "%", "3hr Maximum Relative Humidity", 100.0, 0.0, 0, NO)
# Parms for Satellite
-SatVisE = ("VisibleE", SCALAR, "count", "Satellite Albdo %",
- 255.0, 0.0, 0, NO)
+SatVisE = ("VisibleE", SCALAR, "count", "Satellite Albdo %", 255.0, 0.0, 0, NO)
SatIR11E = ("IR11E", SCALAR, "C", "11 micron temperature", 58.0, -111.0, 0, NO)
SatIR13E = ("IR13E", SCALAR, "C", "13 micron temperature", 50.0, -111.0, 0, NO)
-SatIR39E = ("IR39E", SCALAR, "C", "3.9 micron temperature", 50.0,
- -111.0, 0, NO)
-SatWVE = ("WaterVaporE", SCALAR, "C", "water vapor temperature",
- -11.0, -62.0, 0, NO)
+SatIR39E = ("IR39E", SCALAR, "C", "3.9 micron temperature", 50.0, -111.0, 0, NO)
+SatWVE = ("WaterVaporE", SCALAR, "C", "water vapor temperature", -11.0, -62.0, 0, NO)
SatFogE = ("FogE", SCALAR, "C", "ir11 - ir39", 50.0, -111.0, 0, NO)
-SatVisW = ("VisibleW", SCALAR, "count", "Satellite Albdo %",
- 255.0, 0.0, 0, NO)
+SatVisW = ("VisibleW", SCALAR, "count", "Satellite Albdo %", 255.0, 0.0, 0, NO)
SatIR11W = ("IR11W", SCALAR, "C", "11 micron temperature", 58.0, -111.0, 0, NO)
SatIR13W = ("IR13W", SCALAR, "C", "13 micron temperature", 50.0, -111.0, 0, NO)
-SatIR39W = ("IR39W", SCALAR, "C", "3.9 micron temperature", 50.0,
- -111.0, 0, NO)
-SatWVW = ("WaterVaporW", SCALAR, "C", "water vapor temperature",
- -11.0, -62.0, 0, NO)
+SatIR39W = ("IR39W", SCALAR, "C", "3.9 micron temperature", 50.0, -111.0, 0, NO)
+SatWVW = ("WaterVaporW", SCALAR, "C", "water vapor temperature", -11.0, -62.0, 0, NO)
SatFogW = ("FogW", SCALAR, "C", "ir11 - ir39", 50.0, -111.0, 0, NO)
# TPC Wind Probability parms
@@ -394,7 +917,7 @@ FloodingRainThreat = ("FloodingRainThreat", DISCRETE, "Cat", "Flooding Rain Thre
StormSurgeThreat = ("StormSurgeThreat", DISCRETE, "Cat", "Storm Surge Threat", NO, Threat4Keys,2)
WindThreat = ("WindThreat", DISCRETE, "Cat", "Wind Threat", NO, Threat4Keys,2)
TornadoThreat = ("TornadoThreat", DISCRETE, "Cat", "Tornado Threat", NO, Threat4Keys,2)
-QPFtoFFGRatio = ("QPFtoFFGRatio", SCALAR, "1", "QPF to FFG Ratio", 8.0, 0.0, 0, NO)
+QPFtoFFGRatio = ("QPFtoFFGRatio", SCALAR, "1", "QPF to FFG Ratio", 8.0, 0.0, 0, NO)
# Hazards
HazardKeys = []
@@ -587,12 +1110,433 @@ types = [NOWX, THUNDER, WATERSPOUT, RAIN, RAINSHOWERS,
BLWGSAND, SMOKE, BLWGDUST, FROST, FRZSPRAY, VOLASH]
+# PARMS FROM NwsInitsConfig
+#-------------------------------------------------------------------------------
+# Discrete Keys
+#-------------------------------------------------------------------------------
+#
+AirKeys = [("","None"), ("Watch","Watch"), ("Advisory","Advisory"),("Warning", "Warning"),]
+ThreatKeys=[('', 'None'), ('Very Low', 'Very Low'), ('Low', 'Low'),
+ ('Moderate', 'Moderate'), ('High', 'High'), ('Extreme','Extreme')]
+#
+SevereKeys = [('NONE', '0'), ('TSTM', '2'), ('MRGL', '3'), ('SLGT', '4'), ('ENH', '5'), ('MOD', '6'), ('HIGH', '8')]
+
+AirQuality = ('AirQuality', DISCRETE, 'cat', 'Air Quality', 0,AirKeys)
+BasinFFP = ('BasinFFP', DISCRETE, 'none', 'Basin Flash Flood Potential', 0,
+ [('Dry', 'Dry'), ('Low', 'Low'), ('Moderate', 'Moderate'), ('High', 'High'), ('Very High', 'Very High')])
+CLRIndx = ('CLRIndx', SCALAR, 'none', 'Clearing Index', 1050.0, 0.0, 0, NO)
+CQPF1 = ('CQPF1', SCALAR, 'in', '6hr Cont QPF', 10.0, 0.0, 2, NO)
+Ceiling = ('Ceiling', SCALAR, 'ft', 'Lowest Cloud Base Height', 25000.0, -30000.0, 0, NO)
+CigHgtCat = ('CigHgtCat', SCALAR, 'index', 'Cloud Ceiling Height Category', 6.0, 0.0, 0, NO)
+CloudBaseConditional = ('CloudBaseConditional', SCALAR, '100ft', 'Conditional Cloud Base Height', 250.0, 0.0, 0, NO)
+CloudBasePrimary = ('CloudBasePrimary', SCALAR, '100ft', 'Primary Cloud Base Height', 250.0, 0.0, 0, NO)
+CloudBaseSecondary = ('CloudBaseSecondary', SCALAR, '100ft', 'Secondary Cloud Base Height', 250.0, 0.0, 0, NO)
+ClimoET = ('ClimoET', SCALAR, 'in', 'ClimoET', 0.75, 0.0, 2, NO)
+ClimoETAprA = ('ClimoETAprA', SCALAR, 'in', 'ClimoET AprA', 0.75, 0.0, 2, NO)
+ClimoETAprB = ('ClimoETAprB', SCALAR, 'in', 'ClimoET AprB', 0.75, 0.0, 2, NO)
+ClimoETAugA = ('ClimoETAugA', SCALAR, 'in', 'ClimoET AugA', 0.75, 0.0, 2, NO)
+ClimoETAugB = ('ClimoETAugB', SCALAR, 'in', 'ClimoET AugB', 0.75, 0.0, 2, NO)
+ClimoETDecA = ('ClimoETDecA', SCALAR, 'in', 'ClimoET DecA', 0.75, 0.0, 2, NO)
+ClimoETDecB = ('ClimoETDecB', SCALAR, 'in', 'ClimoET DecB', 0.75, 0.0, 2, NO)
+ClimoETFebA = ('ClimoETFebA', SCALAR, 'in', 'ClimoET FebA', 0.75, 0.0, 2, NO)
+ClimoETFebB = ('ClimoETFebB', SCALAR, 'in', 'ClimoET FebB', 0.75, 0.0, 2, NO)
+ClimoETJanA = ('ClimoETJanA', SCALAR, 'in', 'ClimoET JanA', 0.75, 0.0, 2, NO)
+ClimoETJanB = ('ClimoETJanB', SCALAR, 'in', 'ClimoET JanB', 0.75, 0.0, 2, NO)
+ClimoETJulA = ('ClimoETJulA', SCALAR, 'in', 'ClimoET JulA', 0.75, 0.0, 2, NO)
+ClimoETJulB = ('ClimoETJulB', SCALAR, 'in', 'ClimoET JulB', 0.75, 0.0, 2, NO)
+ClimoETJunA = ('ClimoETJunA', SCALAR, 'in', 'ClimoET JunA', 0.75, 0.0, 2, NO)
+ClimoETJunB = ('ClimoETJunB', SCALAR, 'in', 'ClimoET JunB', 0.75, 0.0, 2, NO)
+ClimoETMarA = ('ClimoETMarA', SCALAR, 'in', 'ClimoET MarA', 0.75, 0.0, 2, NO)
+ClimoETMarB = ('ClimoETMarB', SCALAR, 'in', 'ClimoET MarB', 0.75, 0.0, 2, NO)
+ClimoETMayA = ('ClimoETMayA', SCALAR, 'in', 'ClimoET MayA', 0.75, 0.0, 2, NO)
+ClimoETMayB = ('ClimoETMayB', SCALAR, 'in', 'ClimoET MayB', 0.75, 0.0, 2, NO)
+ClimoETNovA = ('ClimoETNovA', SCALAR, 'in', 'ClimoET NovA', 0.75, 0.0, 2, NO)
+ClimoETNovB = ('ClimoETNovB', SCALAR, 'in', 'ClimoET NovB', 0.75, 0.0, 2, NO)
+ClimoETOctA = ('ClimoETOctA', SCALAR, 'in', 'ClimoET OctA', 0.75, 0.0, 2, NO)
+ClimoETOctB = ('ClimoETOctB', SCALAR, 'in', 'ClimoET OctB', 0.75, 0.0, 2, NO)
+ClimoETSepA = ('ClimoETSepA', SCALAR, 'in', 'ClimoET SepA', 0.75, 0.0, 2, NO)
+ClimoETSepB = ('ClimoETSepB', SCALAR, 'in', 'ClimoET SepB', 0.75, 0.0, 2, NO)
+ClimoPoP = ('ClimoPoP', SCALAR, '%', 'ClimoPoP', 100.0, 0.0, 0, NO)
+ClimoPoPAprA = ('ClimoPoPAprA', SCALAR, '%', 'ClimoPoP AprA', 100.0, 0.0, 0, NO)
+ClimoPoPAprB = ('ClimoPoPAprB', SCALAR, '%', 'ClimoPoP AprB', 100.0, 0.0, 0, NO)
+ClimoPoPAugA = ('ClimoPoPAugA', SCALAR, '%', 'ClimoPoP AugA', 100.0, 0.0, 0, NO)
+ClimoPoPAugB = ('ClimoPoPAugB', SCALAR, '%', 'ClimoPoP AugB', 100.0, 0.0, 0, NO)
+ClimoPoPDecA = ('ClimoPoPDecA', SCALAR, '%', 'ClimoPoP DecA', 100.0, 0.0, 0, NO)
+ClimoPoPDecB = ('ClimoPoPDecB', SCALAR, '%', 'ClimoPoP DecB', 100.0, 0.0, 0, NO)
+ClimoPoPFG = ('ClimoPoPFG', SCALAR, '%', 'ClimoPoP First Guess', 100.0, 0.0, 0, NO)
+ClimoPoPFebA = ('ClimoPoPFebA', SCALAR, '%', 'ClimoPoP FebA', 100.0, 0.0, 0, NO)
+ClimoPoPFebB = ('ClimoPoPFebB', SCALAR, '%', 'ClimoPoP FebB', 100.0, 0.0, 0, NO)
+ClimoPoPJanA = ('ClimoPoPJanA', SCALAR, '%', 'ClimoPoP JanA', 100.0, 0.0, 0, NO)
+ClimoPoPJanB = ('ClimoPoPJanB', SCALAR, '%', 'ClimoPoP JanB', 100.0, 0.0, 0, NO)
+ClimoPoPJulA = ('ClimoPoPJulA', SCALAR, '%', 'ClimoPoP JulA', 100.0, 0.0, 0, NO)
+ClimoPoPJulB = ('ClimoPoPJulB', SCALAR, '%', 'ClimoPoP JulB', 100.0, 0.0, 0, NO)
+ClimoPoPJunA = ('ClimoPoPJunA', SCALAR, '%', 'ClimoPoP JunA', 100.0, 0.0, 0, NO)
+ClimoPoPJunB = ('ClimoPoPJunB', SCALAR, '%', 'ClimoPoP JunB', 100.0, 0.0, 0, NO)
+ClimoPoPMarA = ('ClimoPoPMarA', SCALAR, '%', 'ClimoPoP MarA', 100.0, 0.0, 0, NO)
+ClimoPoPMarB = ('ClimoPoPMarB', SCALAR, '%', 'ClimoPoP MarB', 100.0, 0.0, 0, NO)
+ClimoPoPMayA = ('ClimoPoPMayA', SCALAR, '%', 'ClimoPoP MayA', 100.0, 0.0, 0, NO)
+ClimoPoPMayB = ('ClimoPoPMayB', SCALAR, '%', 'ClimoPoP MayB', 100.0, 0.0, 0, NO)
+ClimoPoPNovA = ('ClimoPoPNovA', SCALAR, '%', 'ClimoPoP NovA', 100.0, 0.0, 0, NO)
+ClimoPoPNovB = ('ClimoPoPNovB', SCALAR, '%', 'ClimoPoP NovB', 100.0, 0.0, 0, NO)
+ClimoPoPOctA = ('ClimoPoPOctA', SCALAR, '%', 'ClimoPoP OctA', 100.0, 0.0, 0, NO)
+ClimoPoPOctB = ('ClimoPoPOctB', SCALAR, '%', 'ClimoPoP OctB', 100.0, 0.0, 0, NO)
+ClimoPoPSepA = ('ClimoPoPSepA', SCALAR, '%', 'ClimoPoP SepA', 100.0, 0.0, 0, NO)
+ClimoPoPSepB = ('ClimoPoPSepB', SCALAR, '%', 'ClimoPoP SepB', 100.0, 0.0, 0, NO)
+CoastalFlood = ('CoastalFlood', DISCRETE, 'cat', 'Coastal Flood', 0, ThreatKeys)
+CondPredHgt = ('CondPredHgt', SCALAR, '100ft', 'Conditional Predominant Cloud Height', 250.0, 0.0, 0, NO)
+CondPredVsby = ('CondPredVsby', SCALAR, 'mi', 'Conditional Predominant Visibility', 10.0, 0.0, 2, NO)
+DenseFogSmoke = ('DenseFogSmoke', DISCRETE, 'cat', 'Dense Fog', 0, ThreatKeys)
+DepartNormFRET = ('DepartNormFRET', SCALAR, 'in', 'DepartNormFRET', 0.35, -0.35, 2, NO)
+Dryness = ('Dryness', DISCRETE, 'none', 'EGB Fuel Dryness', 0,
+ [('NoData', 'NoData'), ('Moist', 'Moist'), ('Dry', 'Dry'), ('VeryDry', 'VeryDry')])
+ExcessiveCold = ('ExcessiveCold', DISCRETE, 'cat', 'Extreme Cold', 0, ThreatKeys)
+ExcessiveHeat = ('ExcessiveHeat', DISCRETE, 'cat', 'Excessive Heat', 0, ThreatKeys)
+FFP = ('FFP', DISCRETE, 'none', 'Flash Flood Potential', 0,
+ [('Dry', 'Dry'), ('Low', 'Low'), ('Moderate', 'Moderate'), ('High', 'High'), ('Very High', 'Very High')])
+FFPI = ('FFPI', SCALAR, 'index', 'Flash Flood Potential Index', 10.0, 0.0, 2, NO)
+FRET = ('FRET', SCALAR, 'in', 'Forecast Reference ET', 0.75, 0.0, 2, NO)
+FRET7Day = ('FRET7Day', SCALAR, 'in/week', 'Weekly Forecast Reference ET', 5.0, 0.0, 2, NO)
+FireWeather = ('FireWeather', DISCRETE, 'cat', 'Wild Fire', 0, ThreatKeys)
+FlashFlood = ('FlashFlood', DISCRETE, 'cat', 'Flash Flood', 0, ThreatKeys)
+Flood = ('Flood', DISCRETE, 'cat', 'River Flood', 0, ThreatKeys)
+FrostFreeze = ('FrostFreeze', DISCRETE, 'cat', 'Frost/Freeze', 0, ThreatKeys)
+FuelMstr = ('FuelMstr', SCALAR, 'none', '10 Hour Fuel Moisture', 40.0, 1.0, 0, NO)
+HainesMid = ('HainesMid', SCALAR, 'cat', 'Mid Level Haines Index', 6.0, 2.0, 0, NO)
+HeatImpactLevels = ('HeatImpactLevels', SCALAR, 'none', 'HeatImpactLevels', 4.0, 0.0, 0, NO)
+HeatImpactLevelsMaxT = ('HeatImpactLevelsMaxT', SCALAR, 'none', 'HeatImpactLevelsMaxT', 4.0, 0.0, 0, NO)
+HeatImpactLevelsMinT = ('HeatImpactLevelsMinT', SCALAR, 'none', 'HeatImpactLevelsMinT', 4.0, 0.0, 0, NO)
+HeatOrangeMaxT = ('HeatOrangeMaxT', SCALAR, 'F', 'Heat Orange MaxT', 130.0, -80.0, 0, NO)
+HeatOrangeMinT = ('HeatOrangeMinT', SCALAR, 'F', 'Heat Orange MinT', 130.0, -80.0, 0, NO)
+HeatRedMaxT = ('HeatRedMaxT', SCALAR, 'F', 'Heat Red MaxT', 130.0, -80.0, 0, NO)
+HeatRedMinT = ('HeatRedMinT', SCALAR, 'F', 'Heat Red MinT', 130.0, -80.0, 0, NO)
+HeatYellowMaxT = ('HeatYellowMaxT', SCALAR, 'F', 'Heat Yellow MaxT', 130.0, -80.0, 0, NO)
+HeatYellowMinT = ('HeatYellowMinT', SCALAR, 'F', 'Heat Yellow MinT', 130.0, -80.0, 0, NO)
+HighWind = ('HighWind', DISCRETE, 'cat', 'High Wind', 0, ThreatKeys)
+IceAccum6hr = ('IceAccum6hr', SCALAR, 'in', '6-hr Ice Accumulation', 2.0, 0.0, 2, NO)
+LLWS = ('LLWS', VECTOR, 'kts', 'Low Level Wind Shear', 125.0, 0.0, 0, NO)
+LLWSHgt = ('LLWSHgt', SCALAR, '100 ft', 'Wind Shear Height', 20.0, 0.0, 0, NO)
+LTG = ('LTG', SCALAR, 'CNT', 'LTG', 100.0, 0.0, 0, NO)
+LTG12 = ('LTG12', SCALAR, 'CNT', 'LTG12', 100.0, 0.0, 0, NO)
+LTG24 = ('LTG24', SCALAR, 'CNT', 'LTG24', 100.0, 0.0, 0, NO)
+Lightning = ('Lightning', DISCRETE, 'cat', 'Lightning', 0, ThreatKeys)
+Max3 = ('Max3', SCALAR, 'F', '3hr Maximum Temperature', 120.0, -80.0, 0, NO)
+Max6 = ('Max6', SCALAR, 'F', '6hr Maximum Temperature', 120.0, -80.0, 0, NO)
+MaxApT = ('MaxApT', SCALAR, 'F', 'Max Apparent Temperature', 130.0, -120.0, 0, NO)
+MaxRHError = ('MaxRHError', SCALAR, '%', 'Maximum Relative Humidity Error', 100.0, -100.0, 0, NO)
+MaxRHFcst = ('MaxRHFcst', SCALAR, '%', 'Forecast Maximum Relative Humidity', 100.0, 0.0, 0, NO)
+MaxRHOb = ('MaxRHOb', SCALAR, '%', 'Observed Maximum Relative Humidity', 100.0, 0.0, 0, NO)
+MaxRHObs = ('MaxRHObs', SCALAR, '%', 'Maximum Observed RH', 100.0, 0.0, 0, NO)
+MaxT10 = ('MaxT10', SCALAR, 'F', '10th Percentile for MaxT', 110.0, 10.0, 0, NO)
+MaxT50 = ('MaxT50', SCALAR, 'F', '50th Percentile for MaxT', 110.0, 10.0, 0, NO)
+MaxT90 = ('MaxT90', SCALAR, 'F', '90th Percentile for MaxT', 110.0, 10.0, 0, NO)
+MaxTAloft = ('MaxTAloft', SCALAR, 'C', 'Max Temp in Warm Nose', 40.0, -20.0, 1, NO)
+MaxTError = ('MaxTError', SCALAR, 'F', 'Maximum Temperature Error', 120.0, -120.0, 0, NO)
+MaxTFcst = ('MaxTFcst', SCALAR, 'F', 'Observed Maximum Temperature', 120.0, -80.0, 0, NO)
+MaxTOb = ('MaxTOb', SCALAR, 'F', 'Observed Maximum Temperature', 120.0, -80.0, 0, NO)
+MaxTObs = ('MaxTObs', SCALAR, 'F', 'Maximum Temperature Obs', 130.0, -80.0, 0, NO)
+Min3 = ('Min3', SCALAR, 'F', '3hr Minimum Temperature', 120.0, -80.0, 0, NO)
+Min6 = ('Min6', SCALAR, 'F', '6hr Minimum Temperature', 120.0, -80.0, 0, NO)
+MinApT = ('MinApT', SCALAR, 'F', 'Min Apparent Temperature', 130.0, -120.0, 0, NO)
+MinRH3 = ('MinRH3', SCALAR, '%', '3hr Minimum Relative Humidity', 100.0, 0.0, 0, NO)
+MinRHError = ('MinRHError', SCALAR, '%', 'Minimum Relative Humidity Error', 100.0, -100.0, 0, NO)
+MinRHFcst = ('MinRHFcst', SCALAR, '%', 'Forecast Minimum Relative Humidity', 100.0, 0.0, 0, NO)
+MinRHOb = ('MinRHOb', SCALAR, '%', 'Observed Minimum Relative Humidity', 100.0, 0.0, 0, NO)
+MinRHObs = ('MinRHObs', SCALAR, '%', 'Minimum Observed RH', 100.0, 0.0, 0, NO)
+MinT10 = ('MinT10', SCALAR, 'F', '10th Percentile for MinT', 110.0, 10.0, 0, NO)
+MinT50 = ('MinT50', SCALAR, 'F', '50th Percentile for MinT', 110.0, 10.0, 0, NO)
+MinT6 = ('MinT6', SCALAR, 'F', 'Minimum Temperature 6Hr', 120.0, -80.0, 0, NO)
+MinT90 = ('MinT90', SCALAR, 'F', '90th Percentile for MinT', 110.0, 10.0, 0, NO)
+MinTError = ('MinTError', SCALAR, 'F', 'Minimum Temperature Error', 120.0, -120.0, 0, NO)
+MinTFcst = ('MinTFcst', SCALAR, 'F', 'Forecast Minimum Temperature', 120.0, -80.0, 0, NO)
+MinTOb = ('MinTOb', SCALAR, 'F', 'Observed Minimum Temperature', 120.0, -80.0, 0, NO)
+MinTObs = ('MinTObs', SCALAR, 'F', 'Minimum Temperature Obs', 120.0, -80.0, 0, NO)
+MixHgtAve = ('MixHgtAve', SCALAR, 'ft', 'Mixing Hgt Average', 20000.0, 0.0, 0, NO)
+MixHgtMSL = ('MixHgtMSL', SCALAR, 'ft', 'Mixing Height above sea level', 30000.0, 0.0, 0, NO)
+MixT1700 = ('MixT1700', SCALAR, 'F', '1700Foot MixingTemp', 110.0, -10.0, 0, NO)
+P95MaxT = ('P95MaxT', SCALAR, 'F', 'P95MaxT', 130.0, -80.0, 0, NO)
+P95MinT = ('P95MinT', SCALAR, 'F', 'P95MinT', 130.0, -80.0, 0, NO)
+ # EKDMOS
+PQPF06001 = ('PQPF06001', SCALAR, '%', '6hr Prob QPF > 0.01', 100.0, 0.0, 0, NO)
+PQPF06005 = ('PQPF06005', SCALAR, '%', '6hr Prob QPF > 0.05', 100.0, 0.0, 0, NO)
+PQPF06010 = ('PQPF06010', SCALAR, '%', '6hr Prob QPF > 0.10', 100.0, 0.0, 0, NO)
+PQPF06015 = ('PQPF06015', SCALAR, '%', '6hr Prob QPF > 0.15', 100.0, 0.0, 0, NO)
+PQPF06020 = ('PQPF06020', SCALAR, '%', '6hr Prob QPF > 0.20', 100.0, 0.0, 0, NO)
+PQPF06025 = ('PQPF06025', SCALAR, '%', '6hr Prob QPF > 0.25', 100.0, 0.0, 0, NO)
+PQPF06030 = ('PQPF06030', SCALAR, '%', '6hr Prob QPF > 0.30', 100.0, 0.0, 0, NO)
+PQPF06040 = ('PQPF06040', SCALAR, '%', '6hr Prob QPF > 0.40', 100.0, 0.0, 0, NO)
+PQPF06050 = ('PQPF06050', SCALAR, '%', '6hr Prob QPF > 0.50', 100.0, 0.0, 0, NO)
+PQPF06075 = ('PQPF06075', SCALAR, '%', '6hr Prob QPF > 0.75', 100.0, 0.0, 0, NO)
+PQPF06100 = ('PQPF06100', SCALAR, '%', '6hr Prob QPF > 1.00', 100.0, 0.0, 0, NO)
+PQPF06150 = ('PQPF06150', SCALAR, '%', '6hr Prob QPF > 1.50', 100.0, 0.0, 0, NO)
+PoP12Fcst = ('PoP12Fcst', SCALAR, '%', 'Forecast Prob. of Precip.', 100.0, 0.0, 0, NO)
+PoP3 = ('PoP3', SCALAR, '%', 'PoP3', 100.0, 0.0, 0, NO)
+PoPPCECMWF = ('PoPPatternClimoECMWF', SCALAR, '%', 'PatternClimoECMWF', 100.0, 0.0, 0, NO)
+PoPPCFIM = ('PoPPatternClimoFIM', SCALAR, '%', 'PatternClimoFIM', 100.0, 0.0, 0, NO)
+PoPPCGEM = ('PoPPatternClimoGEM', SCALAR, '%', 'PatternClimoGEM', 100.0, 0.0, 0, NO)
+PoPPCGFS = ('PoPPatternClimoGFS', SCALAR, '%', 'PatternClimoGFS', 100.0, 0.0, 0, NO)
+PoPPattern1 = ('PoPNortherlyFlow', SCALAR, '%', 'NortherlyFlow', 100.0, 0.0, 0, NO)
+PoPPattern10 = ('PoPRockiesRidge', SCALAR, '%', 'RockiesRidge', 100.0, 0.0, 0, NO)
+PoPPattern11 = ('PoPSouthernFirehose', SCALAR, '%', 'SouthernFirehose', 100.0, 0.0, 0, NO)
+PoPPattern12 = ('PoPNorthernFirehose', SCALAR, '%', 'NorthernFirehose', 100.0, 0.0, 0, NO)
+PoPPattern2 = ('PoPGreatBasinLow', SCALAR, '%', 'GreatBasinLow', 100.0, 0.0, 0, NO)
+PoPPattern3 = ('PoPBroadCyclonicFlow', SCALAR, '%', 'BroadCyclonicFlow', 100.0, 0.0, 0, NO)
+PoPPattern4 = ('PoPCoastalRidge', SCALAR, '%', 'CoastalRidge', 100.0, 0.0, 0, NO)
+PoPPattern5 = ('PoPNorthwestFlow', SCALAR, '%', 'NorthwestFlow', 100.0, 0.0, 0, NO)
+PoPPattern6 = ('PoPZonalFlow', SCALAR, '%', 'ZonalFlow', 100.0, 0.0, 0, NO)
+PoPPattern7 = ('PoPBroadAntiCyclonicFlow', SCALAR, '%', 'BroadAntiCyclonicFlow', 100.0, 0.0, 0, NO)
+PoPPattern8 = ('PoPDiffluentOnshoreFlow', SCALAR, '%', 'DiffluentOnshoreFlow', 100.0, 0.0, 0, NO)
+PoPPattern9 = ('PoPSouthwestFlow', SCALAR, '%', 'SouthwestFlow', 100.0, 0.0, 0, NO)
+PoPWG = ('PoPWG', SCALAR, '%', 'Climo PoP Work Grid', 30.0, -30.0, 0, NO)
+PPFFG = ("PPFFG", SCALAR, "%", "Prob of Excessive Rain in %", 100.0, 0.0 ,0, NO)
+PrecipDur = ('PrecipDur', SCALAR, 'hrs', 'Precipitation Duration', 12.0, 0.0, 1, YES)
+PredHgt = ('PredHgt', SCALAR, '100ft', 'Predominant Cloud Height', 250.0, 0.0, 0, NO)
+PredHgtCat = ('PredHgtCat', SCALAR, 'index', 'Predominant Cloud Height Category', 6.0, 0.0, 0, NO)
+PredHgtRH = ('PredHgtRH', SCALAR, '100ft', 'Pred Cloud Height from RH', 250.0, 1.0, 0, NO)
+PredHgtTempo = ('PredHgtTempo', SCALAR, '100ft', 'Predominant Cloud Height Tempo', 250.0, 0.0, 0, NO)
+PredVsby = ('PredVsby', SCALAR, 'mi', 'Predominant Visibility', 10.0, 0.0, 2, NO)
+Pres = ('Pres', SCALAR, 'mb', 'Pressure', 1100.0, 900.0, 2, NO)
+ProbDmgWind = ('ProbDmgWind', SCALAR, '%', 'Probability of Damaging Wind', 100.0, 0.0, 0, NO)
+ProbExtrmDmgWind = ('ProbExtrmDmgWind', SCALAR, '%', 'Probability of Extreme Damaging Wind', 100.0, 0.0, 0, NO)
+ProbExtrmHail = ('ProbExtrmHail', SCALAR, '%', 'Probability of Extreme Hail', 100.0, 0.0, 0, NO)
+ProbExtrmSvr = ('ProbExtrmSvr', SCALAR, '%', 'Probability of Extreme Severe', 100.0, 0.0, 0, NO)
+ProbExtrmTor = ('ProbExtrmTor', SCALAR, '%', 'Probability of Extreme Tornado', 100.0, 0.0, 0, NO)
+ProbSvrHail = ('ProbSvrHail', SCALAR, '%', 'Probability of Severe Hail', 100.0, 0.0, 0, NO)
+ProbTor = ('ProbTor', SCALAR, '%', 'Probability of Tornado', 100.0, 0.0, 0, NO)
+ProbTotSvr = ('ProbTotSvr', SCALAR, '%', 'Probability of Severe', 100.0, 0.0, 0, NO)
+ProbSnowGTT = ("ProbSnowGTT", SCALAR, "%", "Prob. snow > trace", 100.0, 0.0, 0, NO)
+ProbSnowGT1 = ("ProbSnowGT1", SCALAR, "%", "Prob. snow > 1 inch", 100.0, 0.0, 0, NO)
+ProbSnowGT2 = ("ProbSnowGT2", SCALAR, "%", "Prob. snow > 2 inches ", 100.0, 0.0, 0, NO)
+ProbSnowGT4 = ("ProbSnowGT4", SCALAR, "%", "Prob. snow > 4 inches ", 100.0, 0.0, 0, NO)
+ProbSnowGT6 = ("ProbSnowGT6", SCALAR, "%", "Prob. snow > 6 inches ", 100.0, 0.0, 0, NO)
+ProbSnowGT8 = ("ProbSnowGT8", SCALAR, "%", "Prob. snow > 8 inches", 100.0, 0.0, 0, NO)
+ProbSnowGT12 = ("ProbSnowGT12", SCALAR, "%", "Prob. snow > 12 inches", 100.0, 0.0, 0, NO)
+ProbSnowGT18 = ("ProbSnowGT18", SCALAR, "%", "Prob. snow > 18 inches", 100.0, 0.0, 0, NO)
+ProbSnowRT1 = ("ProbSnowRT1", SCALAR, "%", "Prob. snow T-1 inch", 100.0, 0.0, 0, NO)
+ProbSnowR12 = ("ProbSnowR12", SCALAR, "%", "Prob. snow 1-2 inches", 100.0, 0.0, 0, NO)
+ProbSnowR24 = ("ProbSnowR24", SCALAR, "%", "Prob. snow 2-4 inches ", 100.0, 0.0, 0, NO)
+ProbSnowR48 = ("ProbSnowR48", SCALAR, "%", "Prob. snow 4-8 inches ", 100.0, 0.0, 0, NO)
+ProbSnowR812 = ("ProbSnowR812", SCALAR, "%", "Prob. snow 8-12 inches ", 100.0, 0.0, 0, NO)
+ProbSnowR1218 = ("ProbSnowR1218", SCALAR, "%", "Prob. snow 12-18 inches", 100.0, 0.0, 0, NO)
+ProbSnowR18 = ("ProbSnowR18", SCALAR, "%", "Prob. snow > 18 inches", 100.0, 0.0, 0, NO)
+QPE06 = ('QPE06', SCALAR, 'in', 'QPE06', 10.0, 0.0, 2, YES)
+QPE06Ob = ('QPE06Ob', SCALAR, 'in', 'Observed Precip', 20.0, 0.0, 2, NO)
+QPE12 = ('QPE12', SCALAR, 'in', 'QPE12', 15.0, 0.0, 2, YES)
+QPE24 = ('QPE24', SCALAR, 'in', 'QPE24', 15.0, 0.0, 2, YES)
+QPFDS = ('QPFDS', SCALAR, 'in', 'QPFDS', 5.0, 0.0, 2, YES)
+QPFFcst = ('QPFFcst', SCALAR, 'in', 'Forecast Precip.', 10.0, 0.0, 2, NO)
+QPFPCECMWF = ('QPFPatternClimoECMWF', SCALAR, 'in', 'PatternClimoECMWF', 5.0, 0.0, 2, NO)
+QPFPCFIM = ('QPFPatternClimoFIM', SCALAR, 'in', 'PatternClimoFIM', 5.0, 0.0, 2, NO)
+QPFPCGEM = ('QPFPatternClimoGEM', SCALAR, 'in', 'PatternClimoGEM', 5.0, 0.0, 2, NO)
+QPFPCGFS = ('QPFPatternClimoGFS', SCALAR, 'in', 'PatternClimoGFS', 5.0, 0.0, 2, NO)
+QPFPattern1 = ('QPFNortherlyFlow', SCALAR, 'in', 'NortherlyFlow', 5.0, 0.0, 2, NO)
+QPFPattern10 = ('QPFRockiesRidge', SCALAR, 'in', 'RockiesRidge', 5.0, 0.0, 2, NO)
+QPFPattern11 = ('QPFSouthernFirehose', SCALAR, 'in', 'SouthernFirehose', 5.0, 0.0, 2, NO)
+QPFPattern12 = ('QPFNorthernFirehose', SCALAR, 'in', 'NorthernFirehose', 5.0, 0.0, 2, NO)
+QPFPattern2 = ('QPFGreatBasinLow', SCALAR, 'in', 'GreatBasinLow', 5.0, 0.0, 2, NO)
+QPFPattern3 = ('QPFBroadCyclonicFlow', SCALAR, 'in', 'BroadCyclonicFlow', 5.0, 0.0, 2, NO)
+QPFPattern4 = ('QPFCoastalRidge', SCALAR, 'in', 'CoastalRidge', 5.0, 0.0, 2, NO)
+QPFPattern5 = ('QPFNorthwestFlow', SCALAR, 'in', 'NorthwestFlow', 5.0, 0.0, 2, NO)
+QPFPattern6 = ('QPFZonalFlow', SCALAR, 'in', 'ZonalFlow', 5.0, 0.0, 2, NO)
+QPFPattern7 = ('QPFBroadAntiCyclonicFlow', SCALAR, 'in', 'BroadAntiCyclonicFlow', 5.0, 0.0, 2, NO)
+QPFPattern8 = ('QPFDiffluentOnshoreFlow', SCALAR, 'in', 'DiffluentOnshoreFlow', 5.0, 0.0, 2, NO)
+QPFPattern9 = ('QPFSouthwestFlow', SCALAR, 'in', 'SouthwestFlow', 5.0, 0.0, 2, NO)
+QPFPct = ('QPFPct', SCALAR, '%', 'QPFPct', 300.0, 0.0, 1, YES)
+QPFPctMonthlyClimo = ('QPFPctMonthlyClimo', SCALAR, '%', 'QPF Pct Monthly PRISMClimo', 200.0, 0.0, 0, NO)
+QPFRaw = ('QPFRaw', SCALAR, 'in', 'QPFRaw', 5.0, 0.0, 2, YES)
+QSE06 = ('QSE06', SCALAR, 'in', 'QSE06', 100.0, 0.0, 1, YES)
+RipCurrent = ('RipCurrent', DISCRETE, 'cat', 'Rip Current', 0, ThreatKeys)
+RipCurrentIndex = ('RipCurrentIndex', SCALAR, 'ft', 'Rip Current Index', 16.0, -1.0, 1, NO)
+RipRisk = ("RipRisk", SCALAR, "none", "Rip Current Risk", 3, 0, 0, NO)
+SPC12hrLP1 = ('SPC12hrLP1', SCALAR, '%', 'SPC 12HR Lightning Probability (1)', 100.0, 0.0, 0, NO)
+SPC12hrLP10 = ('SPC12hrLP10', SCALAR, '%', 'SPC 12HR Lightning Probability (10)', 100.0, 0.0, 0, NO)
+SPC12hrLP100 = ('SPC12hrLP100', SCALAR, '%', 'SPC 12HR Lightning Probability (100)', 100.0, 0.0, 0, NO)
+SPC24hrLP1 = ('SPC24hrLP1', SCALAR, '%', 'SPC 24HR Lightning Probability (1)', 100.0, 0.0, 0, NO)
+SPC24hrLP10 = ('SPC24hrLP10', SCALAR, '%', 'SPC 24HR Lightning Probability (10)', 100.0, 0.0, 0, NO)
+SPC24hrLP100 = ('SPC24hrLP100', SCALAR, '%', 'SPC 24HR Lightning Probability (100)', 100.0, 0.0, 0, NO)
+SPC3hrLP1 = ('SPC3hrLP1', SCALAR, '%', 'SPC 3HR Lightning Probability (1)', 100.0, 0.0, 0, NO)
+SPC3hrLP10 = ('SPC3hrLP10', SCALAR, '%', 'SPC 3HR Lightning Probability (10)', 100.0, 0.0, 0, NO)
+SPC3hrLP100 = ('SPC3hrLP100', SCALAR, '%', 'SPC 3HR Lightning Probability (100)', 100.0, 0.0, 0, NO)
+SevereHail = ('SevereHail', DISCRETE, 'cat', 'Severe Hail', 0, ThreatKeys)
+SevereTstmWind = ('SevereTstmWind', DISCRETE, 'cat', 'SevereTstmWind', 0, ThreatKeys)
+SnowAmt10Prcntl = ('SnowAmt10Prcntl', SCALAR, 'in', 'min case', 50.0, 0.0, 1, NO)
+SnowAmt50Prcntl = ('SnowAmt50Prcntl', SCALAR, 'in', 'avg case', 50.0, 0.0, 1, NO)
+SnowAmt90Prcntl = ('SnowAmt90Prcntl', SCALAR, 'in', 'max case', 50.0, 0.0, 1, NO)
+SnowDepth = ('SnowDepth', SCALAR, 'in', 'Snow Depth', 50.0, 0.0, 0, NO)
+SnowRatioCLIMO = ('SnowRatioCLIMO', SCALAR, '%', 'Snow Ratio Climatology SON-DJF-MAM', 40.0, 0.0, 1, YES)
+SnowRatioGFS = ('SnowRatioGFS', SCALAR, '%', 'Snow Ratio from GFS40', 40.0, 0.0, 1, YES)
+SnowRatioHPCMEAN = ('SnowRatioHPCMEAN', SCALAR, '%', 'Snow Ratio from HPC MEAN', 40.0, 0.0, 1, YES)
+SnowRatioNAM = ('SnowRatioNAM', SCALAR, '%', 'Snow Ratio from NAM40', 40.0, 0.0, 1, YES)
+SST = ("SST", SCALAR, "F", "Sea Sfc Temp", 100.0, 25.0, 0, NO)
+StormTide = ('StormTide', SCALAR, 'ft', 'Storm Tide', 30.0, -8.0, 1, NO)
+T10 = ('T10', SCALAR, 'F', '10th Percentile for T', 110.0, 10.0, 0, NO)
+T50 = ('T50', SCALAR, 'F', '50th Percentile for T', 110.0, 10.0, 0, NO)
+T90 = ('T90', SCALAR, 'F', '90th Percentile for T', 110.0, 10.0, 0, NO)
+TAloft = ('TAloft', SCALAR, 'F', 'Temperature Aloft', 120.0, -50.0, 1, NO)
+Td10 = ('Td10', SCALAR, 'F', '10th Percentile for DpT', 100.0, -20.0, 0, NO)
+Td50 = ('Td50', SCALAR, 'F', '50th Percentile for DpT', 100.0, -20.0, 0, NO)
+Td90 = ('Td90', SCALAR, 'F', '90th Percentile for DpT', 100.0, -20.0, 0, NO)
+TdAft = ('TdAft', SCALAR, 'F', 'Afternoon Dewpoint', 120.0, -80.0, 0, NO)
+TdAftError = ('TdAftError', SCALAR, 'F', 'Afternoon Dewpoint Error', 120.0, -120.0, 0, NO)
+TdAftFcst = ('TdAftFcst', SCALAR, 'F', 'Forecast Afternoon Dewpoint', 120.0, -120.0, 0, NO)
+TdAftOb = ('TdAftOb', SCALAR, 'F', 'Observed Afternoon Dewpoint', 120.0, -120.0, 0, NO)
+TdAftObs = ('TdAftObs', SCALAR, 'F', 'Afternoon Dewpoint Obs', 120.0, -80.0, 0, NO)
+TdMrn = ('TdMrn', SCALAR, 'F', 'Morning Dewpoint', 120.0, -80.0, 0, NO)
+TdMrnError = ('TdMrnError', SCALAR, 'F', 'Morning Dewpoint Error', 120.0, -120.0, 0, NO)
+TdMrnFcst = ('TdMrnFcst', SCALAR, 'F', 'Forecast Morning Dewpoint', 120.0, -120.0, 0, NO)
+TdMrnOb = ('TdMrnOb', SCALAR, 'F', 'Observed Morning Dewpoint', 120.0, -120.0, 0, NO)
+TdMrnObs = ('TdMrnObs', SCALAR, 'F', 'Morning Dewpoint Obs', 120.0, -80.0, 0, NO)
+Tornado = ('Tornado', DISCRETE, 'cat', 'Tornado', 0, ThreatKeys)
+TransWindAve = ('TransWindAve', VECTOR, 'mph', 'Transport Wind Average', 125.0, 0.0, 0, NO)
+Tw = ('Tw', SCALAR, 'F', 'Surface Wet Bulb Temp', 80.0, -50.0, 0, NO)
+VentRateAve = ('VentRateAve', SCALAR, 'mph-ft', 'Vent Rate Average', 500000.0, 0.0, 0, NO)
+Visibility = ('Visibility', SCALAR, 'SM', 'Visibility', 10.0, 0.0, 2, NO)
+VisibilityConditional = ('VisibilityConditional', SCALAR, 'SM', 'Conditional Visibility', 10.0, 0.0, 2, NO)
+Vsby = ('Vsby', SCALAR, 'mi', 'Visibility', 10.0, 0.0, 2, NO)
+WG1 = ('WG1', SCALAR, 'none', 'WorkGrid1', 100.0, -100.0, 0, NO)
+WinterWx = ('WinterWx', DISCRETE, 'cat', 'Winter Weather', 0, ThreatKeys)
+
+# Parameter set for Probability of weather type, Optional for sites.
+PoTBD = ('PotBlowingDust', SCALAR, '%', 'Prob of Blowing Dust', 100.0, 0.0, 0, NO)
+PoTBN = ('PotBlowingSand', SCALAR, '%', 'Prob of Blowing Sand', 100.0, 0.0, 0, NO)
+PoTBS = ('PotBlowingSnow', SCALAR, '%', 'Prob of Blowing Snow', 100.0, 0.0, 0, NO)
+PoTF = ('PotFog', SCALAR, '%', 'Prob of Fog', 100.0, 0.0, 0, NO)
+PoTFR = ('PotFrost', SCALAR, '%', 'Prob of Frost', 100.0, 0.0, 0, NO)
+PoTFl = ('PotFlurries', SCALAR, '%', 'Prob of Flurries', 100.0, 0.0, 0, NO)
+PoTH = ('PotHaze', SCALAR, '%', 'Prob of Haze', 100.0, 0.0, 0, NO)
+PoTIC = ('PotIceCrystals', SCALAR, '%', 'Prob of Ice Crystals', 100.0, 0.0, 0, NO)
+PoTIF = ('PotIceFog', SCALAR, '%', 'Prob of Ice Fog', 100.0, 0.0, 0, NO)
+PoTIP = ('PotSleet', SCALAR, '%', 'Prob of Sleet', 100.0, 0.0, 0, NO)
+PoTK = ('PotSmoke', SCALAR, '%', 'Prob of Smoke', 100.0, 0.0, 0, NO)
+PoTL = ('PotDrizzle', SCALAR, '%', 'Prob of Drizzle', 100.0, 0.0, 0, NO)
+PoTLWrk = ('PotDrizzleWork', SCALAR, '%', 'Prob of Drizzle Work', 100.0, 0.0, 0, NO)
+PoTR = ('PotRain', SCALAR, '%', 'Prob of Rain', 100.0, 0.0, 0, NO)
+PoTRW = ('PotRainShowers', SCALAR, '%', 'Prob of Rain Showers', 100.0, 0.0, 0, NO)
+PoTRWrk = ('PotRainWork', SCALAR, '%', 'Prob of Rain Work', 100.0, 0.0, 0, NO)
+PoTS = ('PotSnow', SCALAR, '%', 'Prob of Snow', 100.0, 0.0, 0, NO)
+PoTSW = ('PotSnowShowers', SCALAR, '%', 'Prob of Snow Showers', 100.0, 0.0, 0, NO)
+PoTSp = ('PotSprinkles', SCALAR, '%', 'Prob of Sprinkles', 100.0, 0.0, 0, NO)
+PoTT = ('PotThunder', SCALAR, '%', 'Prob of Thunder', 100.0, 0.0, 0, NO)
+PoTVA = ('PotVolcanicAsh', SCALAR, '%', 'Prob of Volcanic Ash', 100.0, 0.0, 0, NO)
+PoTWP = ('PotWaterspout', SCALAR, '%', 'Prob of Waterspout', 100.0, 0.0, 0, NO)
+PoTZF = ('PotFreezingFog', SCALAR, '%', 'Prob of Freezing Fog', 100.0, 0.0, 0, NO)
+PoTZL = ('PotFreezingDrizzle', SCALAR, '%', 'Prob of Freezing Drizzle', 100.0, 0.0, 0, NO)
+PoTZLWrk = ('PotFreezingDrizzleWork', SCALAR, '%', 'Prob of Freezing Drizzle Work', 100.0, 0.0, 0, NO)
+PoTZR = ('PotFreezingRain', SCALAR, '%', 'Prob of Freezing Rain', 100.0, 0.0, 0, NO)
+PoTZRWrk = ('PotFreezingRainWork', SCALAR, '%', 'Prob of Freezing Rain Work', 100.0, 0.0, 0, NO)
+PoTZY = ('PotFreezingSpray', SCALAR, '%', 'Prob of Freezing Spray', 100.0, 0.0, 0, NO)
+RoadTemp = ("RoadTemp", SCALAR, "F", "Road Temperature", 120.0, -50.0, 0, NO)
+SleetAmt = ("SleetAmt", SCALAR, "in", "Sleet Accumulation", 5.0, 0.0, 1, YES),
+IceLineAcc = ("IceLineAccum", SCALAR, "in", "Line Ice Accumulation", 3.00, 0.00, 2, YES)
+IceFlatAcc = ("IceFlatAccum", SCALAR, "in", "Flat Ice Accumulation", 3.00, 0.00, 2, YES)
+ProbIcePresent = ("ProbIcePresent", SCALAR, "%", "Prob of Ice Present", 100.0, 0.0, 0, NO)
+ProbRefreezeSleet = ("ProbRefreezeSleet", SCALAR, "%", "Prob of Refreeze into Sleet", 100.0, 0.0, 0, NO)
+PoWTpList=[PoTBD, PoTBN, PoTBS, PoTF, PoTFR, PoTFl, PoTH, PoTIC, PoTIF, PoTIP,
+ PoTK, PoTL, PoTLWrk, PoTR, PoTRW, PoTRWrk, PoTS, PoTSW, PoTSp, PoTT,
+ PoTVA, PoTWP, PoTZF, PoTZL, PoTZLWrk, PoTZR, PoTZRWrk, PoTZY,
+ RoadTemp, SleetAmt, IceLineAcc, IceFlatAcc, ProbIcePresent, ProbRefreezeSleet,
+ ]
+
+# Parameter set for Winter Weather probabilities, optional for sites.
+
+# Define keys for total snow graphic - we'll need these in a bit
+StormTotalSnowWeb1Keys=[("0","0"),("<1","<1"),("1", "1"), ("2", "2"), ("3", "3"),
+ ("4", "4"), ("5", "5"), ("6", "6"), ("7", "7"), ("8", "8"),
+ ("9", "9"), ("10", "10"), ("11", "11"), ("12", "12"), ("13", "13"),
+ ("14", "14"), ("15", "15"), ("16", "16"), ("17", "17"), ("18", "18"), ("19", "19"),
+ ("20", "20"), ("21", "21"), ("22", "22"), ("23", "23"),("24","24"),
+ ("25", "25"), ("26", "26"), ("27", "27"), ("28", "28"),("29","29"),
+ ("30", "30"), ("31", "31"), ("32", "32"), ("33", "33"),("34","34"),
+ ("35", "35"), ("36", "36"), ("37","37"), ("38","38"), ("39","39"),
+ ("40", "40"), ("41", "41"), ("42", "42"), ("43", "43"),("44","44"),
+ ("45", "45"), ("46", "46"), ("47", "47"), ("48", "48"),(">48",">48"),]
+
+# Storm Total Snow related
+StormTotalSnowWPC = ("StormTotalSnowWPC", SCALAR, "in","WPC Storm Total Snow", 50.0, 0.0, 1, NO)
+StormTotalSnowWeb1 = ("StormTotalSnowWeb1", DISCRETE, "Cat", "Storm Total Snow Web1", NO, StormTotalSnowWeb1Keys)
+MinSnowWeb = ("MinSnowWeb", DISCRETE, "Cat", "Min Snow Web", NO, StormTotalSnowWeb1Keys)
+MaxSnowWeb = ("MaxSnowWeb", DISCRETE, "Cat", "Min Snow Web", NO, StormTotalSnowWeb1Keys)
+
+# Snow Percentiles
+SnowAmt5Prcntl = ("SnowAmt5Prcntl", SCALAR, "in","5 percentile", 50.0, -40.0, 1, NO)
+SnowAmt10Prcntl = ("SnowAmt10Prcntl", SCALAR, "in","10 percentile", 50.0, -40.0, 1, NO)
+SnowAmt25Prcntl = ("SnowAmt25Prcntl", SCALAR, "in","25 percentile", 50.0, -40.0, 1, NO)
+SnowAmt50Prcntl = ("SnowAmt50Prcntl", SCALAR, "in","50 percentile", 50.0, -40.0, 1, NO)
+SnowAmt75Prcntl = ("SnowAmt75Prcntl", SCALAR, "in","75 percentile", 50.0, -40.0, 1, NO)
+SnowAmt90Prcntl = ("SnowAmt90Prcntl", SCALAR, "in","90 percentile", 50.0, -40.0, 1, NO)
+SnowAmt95Prcntl = ("SnowAmt95Prcntl", SCALAR, "in","95 percentile", 50.0, -40.0, 1, NO)
+
+# Snow Exceedance Probabilities (Add others as needed)
+ProbSnowGET = ("ProbSnowGET", SCALAR, "%", "Prob. snow >= trace", 100.0, 0.0, 0, NO)
+ProbSnowGE1 = ("ProbSnowGE1", SCALAR, "%", "Prob. snow >= 1 inch", 100.0, 0.0, 0, NO)
+ProbSnowGE2 = ("ProbSnowGE2", SCALAR, "%", "Prob. snow >= 2 inches", 100.0, 0.0, 0, NO)
+ProbSnowGE4 = ("ProbSnowGE4", SCALAR, "%", "Prob. snow >= 4 inches", 100.0, 0.0, 0, NO)
+ProbSnowGE6 = ("ProbSnowGE6", SCALAR, "%", "Prob. snow >= 6 inches", 100.0, 0.0, 0, NO)
+ProbSnowGE8 = ("ProbSnowGE8", SCALAR, "%", "Prob. snow >= 8 inches", 100.0, 0.0, 0, NO)
+ProbSnowGE12 = ("ProbSnowGE12", SCALAR, "%", "Prob. snow >= 12 inches", 100.0, 0.0, 0, NO)
+ProbSnowGE18 = ("ProbSnowGE18", SCALAR, "%", "Prob. snow >= 18 inches", 100.0, 0.0, 0, NO)
+
+# Freezing Rain Percentiles
+IceAccum5Prcntl = ("IceAccum5Prcntl", SCALAR, "in","5 percentile", 5.0, -4.0, 2, NO)
+IceAccum10Prcntl = ("IceAccum10Prcntl", SCALAR, "in","10 percentile", 5.0, -4.0, 2, NO)
+IceAccum25Prcntl = ("IceAccum25Prcntl", SCALAR, "in","25 percentile", 5.0, -4.0, 2, NO)
+IceAccum50Prcntl = ("IceAccum50Prcntl", SCALAR, "in","50 percentile", 5.0, -4.0, 2, NO)
+IceAccum75Prcntl = ("IceAccum75Prcntl", SCALAR, "in","75 percentile", 5.0, -4.0, 2, NO)
+IceAccum90Prcntl = ("IceAccum90Prcntl", SCALAR, "in","90 percentile", 5.0, -4.0, 2, NO)
+IceAccum95Prcntl = ("IceAccum95Prcntl", SCALAR, "in","95 percentile", 5.0, -4.0, 2, NO)
+
+# Freezing rain accretion probabilities
+ProbIceGE001 = ("ProbIceGE001", SCALAR, "%", "Prob. ice >= 0.01", 100.0, 0.0, 0, NO)
+ProbIceGE010 = ("ProbIceGE010", SCALAR, "%", "Prob. ice >= 0.10", 100.0, 0.0, 0, NO)
+ProbIceGE025 = ("ProbIceGE025", SCALAR, "%", "Prob. ice >= 0.25", 100.0, 0.0, 0, NO)
+ProbIceGE050 = ("ProbIceGE050", SCALAR, "%", "Prob. ice >= 0.50", 100.0, 0.0, 0, NO)
+
+winterProbsParmList = [
+ StormTotalSnowWPC, StormTotalSnowWeb1, MinSnowWeb, MaxSnowWeb,
+ SnowAmt5Prcntl, SnowAmt10Prcntl, SnowAmt25Prcntl, SnowAmt50Prcntl,
+ SnowAmt75Prcntl, SnowAmt90Prcntl, SnowAmt95Prcntl, ProbSnowGET,
+ ProbSnowGE1, ProbSnowGE2, ProbSnowGE4, ProbSnowGE6, ProbSnowGE8,
+ ProbSnowGE12, ProbSnowGE18, IceAccum5Prcntl, IceAccum10Prcntl,
+ IceAccum25Prcntl, IceAccum50Prcntl, IceAccum75Prcntl, IceAccum90Prcntl,
+ IceAccum95Prcntl, ProbIceGE001, ProbIceGE010, ProbIceGE025, ProbIceGE050
+]
+
+# Add rainfall probability definitions
+
+# Rain Percentiles
+QPF5Prcntl = ("QPF5Prcntl", SCALAR, "in","5 percentile", 36.0, -24.0, 2, NO)
+QPF10Prcntl = ("QPF10Prcntl", SCALAR, "in","10 percentile", 36.0, -24.0, 2, NO)
+QPF25Prcntl = ("QPF25Prcntl", SCALAR, "in","25 percentile", 36.0, -24.0, 2, NO)
+QPF50Prcntl = ("QPF50Prcntl", SCALAR, "in","50 percentile", 36.0, -24.0, 2, NO)
+QPF75Prcntl = ("QPF75Prcntl", SCALAR, "in","75 percentile", 36.0, -24.0, 2, NO)
+QPF90Prcntl = ("QPF90Prcntl", SCALAR, "in","90 percentile", 36.0, -24.0, 2, NO)
+QPF95Prcntl = ("QPF95Prcntl", SCALAR, "in","95 percentile", 36.0, -24.0, 2, NO)
+
+# Rain Exceedance Probabilities (Add others as needed)
+ProbRainGE001 = ("ProbRainGET", SCALAR, "%", "Prob. Rain >= 0.01 in", 100.0, 0.0, 0, NO)
+ProbRainGE010 = ("ProbRainGE1", SCALAR, "%", "Prob. Rain >= 0.10 in", 100.0, 0.0, 0, NO)
+ProbRainGE025 = ("ProbRainGE2", SCALAR, "%", "Prob. Rain >= 0.25 in", 100.0, 0.0, 0, NO)
+ProbRainGE050 = ("ProbRainGE4", SCALAR, "%", "Prob. Rain >= 0.50 in", 100.0, 0.0, 0, NO)
+ProbRainGE075 = ("ProbRainGE6", SCALAR, "%", "Prob. Rain >= 0.75 in", 100.0, 0.0, 0, NO)
+ProbRainGE100 = ("ProbRainGE8", SCALAR, "%", "Prob. Rain >= 1.00 in", 100.0, 0.0, 0, NO)
+ProbRainGE150 = ("ProbRainGE12", SCALAR, "%", "Prob. Rain >= 1.50 in", 100.0, 0.0, 0, NO)
+ProbRainGE200 = ("ProbRainGE18", SCALAR, "%", "Prob. Rain >= 2.00 in", 100.0, 0.0, 0, NO)
+ProbRainGE250 = ("ProbRainGE12", SCALAR, "%", "Prob. Rain >= 2.50 in", 100.0, 0.0, 0, NO)
+ProbRainGE300 = ("ProbRainGE18", SCALAR, "%", "Prob. Rain >= 3.00 in", 100.0, 0.0, 0, NO)
+
+rainfallProbsParmList = [
+ QPF5Prcntl, QPF10Prcntl, QPF25Prcntl, QPF50Prcntl, QPF75Prcntl, QPF90Prcntl,
+ QPF95Prcntl, ProbRainGE001, ProbRainGE010, ProbRainGE025, ProbRainGE050,
+ ProbRainGE075, ProbRainGE100, ProbRainGE150, ProbRainGE200, ProbRainGE250,
+ ProbRainGE300
+]
+
#-----------------------------------
# DO NOT CHANGE THE FOLLOWING SECTION
#------------------------------------
if not BASELINE and siteImport('localWxConfig'):
types = localWxConfig.types
+
#---------------------------------------------------------------------------
#
# Projection Configuration section.
@@ -789,23 +1733,18 @@ allProjections = [Grid201, Grid202, Grid203, Grid204, Grid205, Grid206,
# of this section that adjusts the resolution for the RPP sites.
# [xdim, ydim] / (origin) /( extent) / TimeZone / Projection / OfficeType
+
SITES = {
#WFOs
# Experimental combined AFC site
- 'AFC' : ([1057, 449], (1.0, 19.00), (66.0, 28.0), 'America/Anchorage',
- Grid214AK, "wfo"),
-
+ 'AFC' : ([1057, 449], (1.0, 19.00), (66.0, 28.0), 'America/Anchorage', Grid214AK, "wfo"),
'ABQ' : ([145, 145], (36.00, 22.00), (9.0, 9.0), 'MST7MDT', Grid211,"wfo"),
'ABR' : ([145, 145], (45.00, 35.00), (9.0, 9.0), 'CST6CDT', Grid211,"wfo"),
- 'AER' : ([369, 337], (44.00, 23.00), (23.0, 21.0), 'America/Anchorage',
- Grid214AK, "wfo"),
- 'AFG' : ([313, 201], (27.0, 39.0), (39.0, 25.0), 'America/Anchorage',
- Grid214AK, "wfo"),
- 'AJK' : ([337, 241], (62.0, 23.0), (21.0, 15.0), 'America/Juneau',
- Grid214AK, "wfo"),
+ 'AER' : ([369, 337], (44.00, 23.00), (23.0, 21.0), 'America/Anchorage', Grid214AK, "wfo"),
+ 'AFG' : ([313, 201], (27.0, 39.0), (39.0, 25.0), 'America/Anchorage', Grid214AK, "wfo"),
+ 'AJK' : ([337, 241], (62.0, 23.0), (21.0, 15.0), 'America/Juneau', Grid214AK, "wfo"),
'AKQ' : ([145, 145], (68.00, 25.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
- 'ALU' : ([433, 225], (1.0, 19.0), (54.0, 28.0), 'America/Anchorage',
- Grid214AK, "wfo"),
+ 'ALU' : ([433, 225], (1.0, 19.0), (54.0, 28.0), 'America/Anchorage', Grid214AK, "wfo"),
'ALY' : ([145, 145], (70.00, 33.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'AMA' : ([145, 145], (41.00, 21.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'APX' : ([145, 145], (58.00, 34.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
@@ -815,9 +1754,9 @@ SITES = {
'BMX' : ([145, 145], (58.00, 19.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'BOI' : ([177, 177], (25.00, 34.00), (11.0, 11.0), 'MST7MDT', Grid211, "wfo"),
'BOU' : ([145, 145], (38.00, 27.00), (9.0, 9.0), 'MST7MDT', Grid211, "wfo"),
- 'BOX' : ([193, 193], (74.00, 33.00), (12.0, 12.0), 'EST5EDT', Grid211, "wfo"),
+ 'BOX' : ([187, 154], (75.375,34.59375), (5.8125,4.78125), "EST5EDT", Grid211, "wfo"), #updated
'BRO' : ([145, 145], (44.00, 10.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
- 'BTV' : ([145, 145], (72.00, 36.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
+ 'BTV' : ([193, 157], (72.00, 37.15), (6.0, 4.875), 'EST5EDT', Grid211, "wfo"), #updated
'BUF' : ([145, 145], (66.00, 32.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'BYZ' : ([145, 145], (36.00, 37.00), (9.0, 9.0), 'MST7MDT', Grid211, "wfo"),
'CAE' : ([145, 145], (65.00, 20.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
@@ -849,12 +1788,11 @@ SITES = {
'GRR' : ([145, 145], (58.00, 33.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'GSP' : ([145, 145], (63.00, 21.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'GUM' : ([433, 225], (15.00, 20.00), (27.0, 14.0), 'Pacific/Guam', Grid204, "wfo"),
- 'GYX' : ([145, 145], (75.00, 37.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
- 'HFO' : ([321, 225], (7.00, 11.00), (10.0, 7.0), 'Pacific/Honolulu',
- Grid208, 'wfo'),
+ 'GYX' : ([193,209], (76.00, 37.375), (6.0, 6.5), 'EST5EDT', Grid211, "wfo"), #updated
+ 'HFO' : ([321, 225], (7.00, 11.00), (10.0, 7.0), 'Pacific/Honolulu', Grid208, 'wfo'),
'HGX' : ([145, 145], (48.00, 13.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'HNX' : ([145, 145], (22.00, 24.00), (9.0, 9.0), 'PST8PDT', Grid211, "wfo"),
- 'HUN' : ([145, 145], (57.00, 20.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
+ 'HUN' : ([161, 161], (60.0, 22.0), (5.0, 5.0), 'CST6CDT', Grid211, "wfo"), #updated
'ICT' : ([145, 145], (45.00, 25.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'ILM' : ([145, 145], (67.00, 21.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'ILN' : ([145, 145], (60.00, 27.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
@@ -864,7 +1802,7 @@ SITES = {
'JAN' : ([145, 145], (54.00, 18.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'JAX' : ([145, 145], (64.00, 14.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'JKL' : ([145, 145], (61.00, 25.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
- 'KEY' : ([145, 145], (66.00, 8.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
+ 'KEY' : ([145, 145], (66.00, 8.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'LBF' : ([145, 145], (43.00, 30.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'LCH' : ([145, 145], (52.00, 15.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'LIX' : ([145, 145], (54.00, 14.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
@@ -876,7 +1814,7 @@ SITES = {
'LUB' : ([145, 145], (39.00, 17.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'LWX' : ([145, 145], (67.00, 27.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'LZK' : ([145, 145], (51.00, 20.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
- 'MAF' : ([145, 145], (40.00, 16.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
+ 'MAF' : ([205,247], (40.375, 16.8125), (6.375, 7.6875), 'CST6CDT', Grid211, "wfo"), #updated
'MEG' : ([145, 145], (54.00, 22.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'MFL' : ([145, 145], (66.00, 9.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
'MFR' : ([145, 145], (20.00, 34.00), (9.0, 9.0), 'PST8PDT', Grid211, "wfo"),
@@ -906,13 +1844,13 @@ SITES = {
'REV' : ([145, 145], (23.00, 29.00), (9.0, 9.0), 'PST8PDT', Grid211, "wfo"),
'RIW' : ([145, 145], (35.00, 33.00), (9.0, 9.0), 'MST7MDT', Grid211, "wfo"),
'RLX' : ([145, 145], (63.00, 26.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
- 'RNK' : ([145, 145], (64.00, 24.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
+ 'RNK' : ([161, 161], (67.0, 26.00), (5.0, 5.0), 'EST5EDT', Grid211, 'wfo'), #updated
'SEW' : ([145, 145], (21.00, 42.00), (9.0, 9.0), 'PST8PDT', Grid211, "wfo"),
'SGF' : ([145, 145], (51.00, 24.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'SGX' : ([145, 145], (24.00, 21.00), (9.0, 9.0), 'PST8PDT', Grid211, "wfo"),
'SHV' : ([145, 145], (50.00, 17.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
'SJT' : ([145, 145], (43.00, 16.00), (9.0, 9.0), 'CST6CDT', Grid211, "wfo"),
- 'SJU': ([32, 28], (10.0, 10.0), (8.0, 7.0), 'America/Puerto_Rico',Grid210, "wfo"),
+ 'SJU' : ([32, 28], (10.0, 10.0), (8.0, 7.0), 'America/Puerto_Rico',Grid210, "wfo"),
'SLC' : ([161, 161], (30.00, 28.00), (10.0, 10.0), 'MST7MDT', Grid211, "wfo"),
'STO' : ([145, 145], (20.00, 28.00), (9.0, 9.0), 'PST8PDT', Grid211, "wfo"),
'TAE' : ([145, 145], (60.00, 15.00), (9.0, 9.0), 'EST5EDT', Grid211, "wfo"),
@@ -924,8 +1862,7 @@ SITES = {
'UNR' : ([145, 145], (40.00, 34.00), (9.0, 9.0), 'MST7MDT', Grid211, "wfo"),
'VEF' : ([145, 145], (26.00, 25.00), (9.0, 9.0), 'PST8PDT', Grid211, "wfo"),
#RFCs
- 'ACR' : ([271, 173], (20.0, 21.0), (57.0, 40.0), 'America/Anchorage',
- Grid214, "rfc"), # this grid is at 10 km resolution
+ 'ACR' : ([271, 173], (20.0, 21.0), (57.0, 40.0), 'America/Anchorage', Grid214, "rfc"), # this grid is at 10 km resolution
'ALR' : ([299, 278], (59.0, 11.0), (17.0, 19.0), 'CST6CDT', Grid211, "rfc"),
'FWR' : ([362, 334], (36.0, 11.0), (20.0, 20.0), 'CST6CDT', Grid211, "rfc"),
'KRF' : ([408, 356], (33.0, 27.0), (26.0, 22.0), 'CST6CDT', Grid211, "rfc"),
@@ -939,11 +1876,9 @@ SITES = {
'TIR' : ([220, 171], (59.0, 25.0), (13.0, 12.0), 'EST5EDT', Grid211, "rfc"),
'TUA' : ([281, 168], (39.0, 22.0), (18.0, 10.0), 'CST6CDT', Grid211, "rfc"),
-#Special Sites - Added Hawaiian High Seas domain
+#Special Sites - Added Hawaiian High Seas domain
'US' : ([267, 159], (18.0, 9.5), (67.0, 40.0), 'EDT5EDT', Grid211, "other"),
'FSL' : ([161, 145], (38.50, 27.00), (10.0, 9.0), 'MST7MDT', Grid211, "other"),
-# 'NH1' : ([667, 461], (69.5, 4.5), (52.03125, 35.9375), 'EST5EDT', Grid204, "wfo"),
-# 'NH2' : ([950, 289], (-33.0, -7.0), (148.276, 45.0), 'EST5EDT', Grid210, "wfo"),
'NH1' : ([838, 577], (887.0, 121.0), (837.0, 576.0), 'EST5EDT', NDFD_Oceanic_10K, "wfo"),
'NH2' : ([1188, 363], (1328.0, 365.0), (1187.0, 362.0), 'EST5EDT', NDFD_Oceanic_10K, "wfo"),
'ONA' : ([244, 383], (68.9375, 19.5625), (15.1875, 23.875), 'EST5EDT', Grid211, "wfo"),
@@ -952,10 +1887,10 @@ SITES = {
'WNJ' : ([301, 346], (1000.0, 475.0), (300.0, 345.0), 'CST6CDT', NDFD_Oceanic_10K, "wfo"),
#Ice Desk for AFC
- 'AICE' : ([560, 340], (9.0, 11.0), (29.0, 19.0), 'America/Anchorage',
- Grid203, "nc"),
-#Nested for GUM (future)
-# 'GUMa': ([193, 193], (23.0, 26.0), (3.0, 3.0), 'Pacific/Guam', Grid204, "other"),
+ 'AICE' : ([560, 340], (9.0, 11.0), (29.0, 19.0), 'America/Anchorage', Grid203, "nc"),
+ 'AAWU' : ([705, 457], (1.0, 11.0), (88.0, 57.0), 'America/Anchorage', Grid214AK, 'nc'),
+ 'AVAK' : ([465, 417], (8.0, 12.0), (29.0, 26.0), 'America/Anchorage', Grid203, 'nc'),
+
#Regional Offices
'VUY' : ([337,449], (62.00, 19.00), (21.0, 28.0), 'EST5EDT', Grid211, "ro"),
'BCQ' : ([145,145], (50.00, 27.00), (9.0, 9.0), 'CST6CDT', Grid211, "ro"),
@@ -964,15 +1899,23 @@ SITES = {
'PBP' : ([321,225], (7.00, 11.00), (10.0, 7.0), 'Pacific/Honolulu', Grid208, "ro"),
'ARE' : ([369,337], (44.00, 23.00), (23.0, 21.0), 'America/Anchorage', Grid214AK, "ro"),
'ARW' : ([433,225], (1.00, 19.00), (54.0, 21.0), 'America/Anchorage', Grid214AK, "ro"),
-
+
#National Centers
'HAK' : ( [825,553], ( 1.0, 1.0), (103.0, 69.0), 'EST5EDT', Grid214AK, "nc"),
'HUS' : ([1073,689], (19.0, 8.0), ( 67.0, 43.0), 'EST5EDT', Grid211, "nc"),
#'NHA' : ([1729,1601], (1.0,1.0), (1728.0, 1600.0), 'EST5EDT', GridForNHA, "nc"),
- 'NHA' : ([1833,1241], (41.5,5.0), (54.0,40.5), 'EST5EDT', Grid211, "nc"),
-}
-
+ 'NHA' : ([1873,1361], (35.5,3.5), (58.5,42.5), 'EST5EDT', Grid211, "nc"), # updated
+ }
+# Get list of valid office types, for validation.
+VALID_OFFICE_TYPES = []
+# List of all values of all sites.
+for siteValues in SITES.values():
+ # Office type is the 5th element of each site's values
+ officeType = siteValues[5]
+ if officeType not in VALID_OFFICE_TYPES:
+ # A new office type
+ VALID_OFFICE_TYPES.append(officeType)
#---------------------------------------------------------------------------
#
# Time Constraint configuration section
@@ -1001,6 +1944,7 @@ TC12 = (0, 12 * HOUR, HOUR)
TC3NG = (0, 3 * HOUR, 3 * HOUR)
TC6NG = (0, 6 * HOUR, 6 * HOUR)
TC12NG = (0, 12 * HOUR, 12 * HOUR)
+TC24NG = (0, 24 * HOUR, 24 * HOUR)
TC061212 = (6 * HOUR, 12 * HOUR, 12 * HOUR)
Persistent = (0, 0, 0) # special time constraint
@@ -1044,6 +1988,17 @@ FireWx1300TC = localTC(13*HOUR, 24*HOUR, 1*HOUR, 0) #special FireWx 1pm snap
PWSDTC = localTC(11*HOUR, 24*HOUR, 12*HOUR, 0)
PWSNTC = localTC(23*HOUR, 24*HOUR, 12*HOUR, 0)
+# From NwsInitsConfig
+LT24APT = localTC(7*HOUR, 24*HOUR, 24*HOUR, 0)
+FireWxAvgTC = localTC( 12*HOUR, 24*HOUR, 6*HOUR, 0)
+LT4HH = localTC(11*HOUR, 24*HOUR, 4*HOUR, 0)
+SPC24 = (12*HOUR, 24*HOUR, 24*HOUR)
+# For WR
+TC0624NG=(6*HOUR,24*HOUR,24*HOUR)
+TC12NG6=(6*HOUR,12*HOUR,12*HOUR)
+# HIL Time Constraint
+HILTC=(6*HOUR,24*HOUR,24*HOUR)
+
#---------------------------------------------------------------------------
#
# Database/(Model) Attribute Configuration
@@ -1163,7 +2118,7 @@ D2DDBVERSIONS = {
#
#---------------------------------------------------------------------------
# Alaska OCONUS
-if SID in ALASKA_SITES:
+if SID in groups['ALASKA_SITES']:
D2DMODELS = [('mesoEta216', 'NAM40'),
('mesoEta217', 'NAM20'),
('AVN203', 'GFS190'),
@@ -1224,7 +2179,7 @@ elif SID == "HFO":
('TPCWindProb', 'TPCProb'),
('ECMWF-HiRes','ECMWFHiRes'),
'RTOFS-Honolulu',
- ('estofsHI', 'ESTOFS'),
+ ('estofsHI', 'ESTOFS'),
'NPHwave15',
'WPHwave10',
'NPHwave4',
@@ -1290,7 +2245,7 @@ elif SID == "GUM":
]
#CONUS sites
-elif SID in CONUS_EAST_SITES:
+elif SID in groups['CONUS_EAST_SITES']:
D2DMODELS = [('GFS212', 'GFS40'),
('AVN211', 'GFS80'),
('ETA', 'NAM80'),
@@ -1329,7 +2284,7 @@ elif SID in CONUS_EAST_SITES:
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
'MOSGuide',
- ##############DR17144
+ ##############DR17144
('RTMA25', 'RTMA'),
'NamDNG5',
('TPCWindProb','TPCProb'),
@@ -1459,24 +2414,27 @@ else: #######DCS3501 WEST_CONUS
('NCOM-ALASKA', 'NCOMALASKA'),
]
-if SID in GreatLake_SITES:
+if SID in groups['GreatLake_SITES']:
D2DMODELS.append(('GRLKwave', 'GLWM'))
D2DMODELS.append('GLERL')
D2DMODELS.append('GLWN')
+ # Redefine the WaveHeight field to include a decimal point
+ WaveHeight = ("WaveHeight", SCALAR, "ft", "Wave Height", 40.0, 0.0, 1, NO)
+
#---------------------------------------------------------------------------
#
-# Search path for netCDF data files.
+# Search path for netCDF data files.
# NOTE: This feature was implemented only backward compatibility with existing A1 datasets.
# New datasets should be generated in a from that can be ingested by A2
-# It shoudl only be used for static datasets.
-# New files will not be recognized without a server restart.
+# It shoudl only be used for static datasets.
+# New files will not be recognized without a server restart.
#
#---------------------------------------------------------------------------
# Alaska OCONUS
-if SID in ALASKA_SITES:
+if SID in groups['ALASKA_SITES']:
NETCDFDIRS = []
-
+
# Hawaii OCONUS
elif SID == "HFO":
NETCDFDIRS = [('/awips2/edex/data/gfe/topo/NED3ARCSTOPO','CRMTopo'),
@@ -1489,21 +2447,21 @@ elif SID == "SJU":
('/awips2/edex/data/gfe/topo/NED3ARCSTOPONEW','NED'),
('/awips2/edex/data/gfe/topo/VDATUMS','VDATUMS'),
]
-
+
# Guam OCONUS
elif SID == "GUM":
NETCDFDIRS = []
-
+
#CONUS sites
-elif SID in CONUS_EAST_SITES:
+elif SID in groups['CONUS_EAST_SITES']:
NETCDFDIRS = [('/awips2/edex/data/gfe/climo/PRISM'),
('/awips2/edex/data/gfe/climo/NCDC'),
('/awips2/edex/data/gfe/topo/NED3ARCSTOPO','CRMTopo'),
('/awips2/edex/data/gfe/topo/NED3ARCSTOPONEW','NED'),
('/awips2/edex/data/gfe/topo/VDATUMS','VDATUMS'),
]
-
+
else: #######DCS3501 WEST_CONUS
NETCDFDIRS = [('/awips2/edex/data/gfe/climo/PRISM'),
@@ -1512,7 +2470,7 @@ else: #######DCS3501 WEST_CONUS
('/awips2/edex/data/gfe/topo/NED3ARCSTOPONEW','NED'),
('/awips2/edex/data/gfe/topo/VDATUMS','VDATUMS'),
]
-
+
#---------------------------------------------------------------------------
#
@@ -1527,7 +2485,7 @@ else: #######DCS3501 WEST_CONUS
# satellite product.
#
# Examples:
-#
+#
# "East CONUS/Imager Visible"
# "East CONUS/Imager 11 micron IR"
# "East CONUS/Imager 13 micron (IR)"
@@ -1535,7 +2493,7 @@ else: #######DCS3501 WEST_CONUS
#
# Alaska OCONUS
-if SID in ALASKA_SITES:
+if SID in groups['ALASKA_SITES']:
SATDATA = []
# Hawaii OCONUS
@@ -1574,11 +2532,11 @@ else:
#---------------------------------------------------------------------------
#
# RFCs
-if SID in RFC_SITES:
+if SID in groups['RFC_SITES']:
INITMODULES = {} #disable smart inits for RFCs
# Alaska OCONUS
-elif SID in ALASKA_SITES:
+elif SID in groups['ALASKA_SITES']:
INITMODULES = {
# "AKNAM40" : ["NAM40", "NAM20"],
"AKWAVE" : ['AKWAVE'],
@@ -1591,8 +2549,8 @@ elif SID in ALASKA_SITES:
"NAM12" : ["NAM12"],
"GFS80" : ["GFS80"],
# "GFS190" : ["GFS190"],
-#DCS3501
- "HIRESWarw" : ["HIRESWarw"],
+#DCS3501
+ "HIRESWarw" : ["HIRESWarw"],
"HIRESWnmm" : ["HIRESWnmm"],
#DR20634 "SPC" : ["SPC"],
"LAPS" : ["LAPS"],
@@ -1617,7 +2575,7 @@ elif SID in ALASKA_SITES:
elif SID == "HFO":
INITMODULES= {
"GFS75" : ["GFS75"],
-#####DCS3501
+#####DCS3501
"HIRESWarw" : ["HIRESWarw"],
"HIRESWnmm" : ["HIRESWnmm"],
##DR20634 "SPC" : ["SPC"],
@@ -1628,7 +2586,7 @@ elif SID == "HFO":
"RTMA" : ['RTMA'],
"NamDNG5" : ["NamDNG5"],
"MOSGuide" : ['MOSGuide'],
- "ESTOFS" : ["ESTOFS"],
+ "ESTOFS" : ["ESTOFS"],
"nwpsCG1" : ['nwpsCG1'],
"nwpsTrkngCG0" : ['nwpsTrkngCG0'],
}
@@ -1646,9 +2604,9 @@ elif SID == "SJU":
"NAM12" : ["NAM12"],
"GFS80" : ["GFS80"],
"GFS40" : ["GFS40"],
-#####DCS3501
+#####DCS3501
"HIRESWarw" : ["HIRESWarw"],
- "HIRESWnmm" : ["HIRESWnmm"],
+ "HIRESWnmm" : ["HIRESWnmm"],
#DR20634 "SPC" : ["SPC"],
"LAPS" : ["LAPS"],
"HPCQPF" : ['HPCQPF'],
@@ -1768,7 +2726,7 @@ D2DAccumulativeElements= {
"HIRESWnmm": ["tp"],
"RTMA": ["tp"],
"URMA25": ["tp"],
- "HPCERP": ["tpHPCndfd"],
+ "HPCERP": ["tpHPCndfd"],
#DR20634 "SPC": ["tp"],
#Dummy ones for the transition from Eta to NAM. These are ignored.
@@ -1842,121 +2800,16 @@ AUTO_CONFIGURE_NOTIFYTEXTPROD = 1 #0=off,1=on
# DO NOT CHANGE THE FOLLOWING SECTION
#------------------------------------
# import the local config file
-localParms = localNAM12Parms = localRUC13Parms = localRUC80Parms = localNGM80Parms = []
-localGFS80Parms = localgfsLRParms = localNAM40Parms = localDBs = []
-localOPCWavEParms = localOPCWavNWParms = localOPCWavSWParms = []
-localMOSGuideParms = localGFS40Parms = []
-localNAM80Parms = localLAPSParms = localISCParms = localGWWParms = []
-localNAM95Parms = localNGM95Parms = localDGEXParms = []
-localMSASParms = localGLERLParms = localWNAWAVEParms = localAKWAVEParms = []
-localMOSParms = localHPCQPFParms = localRFCQPFParms = []
-#DR3511 localHPCDeltaParms = []
-localTCMParms = localSATParms = localGFS75Parms = localGFS190Parms = []
-localAKwave10Parms = localAKwave4Parms = localEPwave10Parms = localGlobalWaveParms = []
-localWCwave10Parms = localWCwave4Parms = localWNAwave10Parms = localWNAwave4Parms = []
-localENPwaveParms = []
-localGLWMParms = [] #####DCS3499
-localParms = localHIRESWarwParms = localHIRESWnmmParms = [] #######DCS3501
-#DR20634 localParms = localSPCParms = []
-localHPCGuideParms = []
-localRTMAParms = []
-localURMA25Parms = [] ###DR17144
-localNamDNG5Parms = []
-localSREFParms = []
-localTPCProbParms = []
-localGFSLAMPGridParms = []
-localETSSParms = []
-localHRRRParms = []
-localESTOFSParms = []
-localnwpsCG1Parms = []
-localnwpsTrkngCG0Parms = []
-localISCExtraParms = []
myOfficeType = SITES[GFESUITE_SITEID][5]
-AdditionalISCRouting = [
+AdditionalISCRouting = [
# Configure by adding entries to this list in the form of:
# ([WeatherElements], ModelName, EditAreaPrefix)
- # Example:
- # ([Hazards, LAL, CWR], "ISCFire", "FireWxAOR_"),
+ # Example:
+ # ([Hazards, LAL, CWR], "ISCFire", "FireWxAOR_"),
]
-if not BASELINE and siteImport('localConfig'):
- #ensure office type is set properly in localConfig SITES[]
- if len(SITES[GFESUITE_SITEID]) == 5:
- a = list(SITES[GFESUITE_SITEID])
- a.append(myOfficeType)
- SITES[GFESUITE_SITEID] = tuple(a)
- else:
- myOfficeType = SITES[GFESUITE_SITEID] #probably from localConfig
-
- localESTOFSParms = getattr(localConfig, 'parmsESTOFS', localESTOFSParms)
- localETSSParms = getattr(localConfig, 'parmsETSS', localETSSParms)
- localnwpsCG1Parms = getattr(localConfig, 'parmsnwpsCG1', localnwpsCG1Parms)
- localnwpsTrkngCG0Parms = getattr(localConfig, 'parmsnwpsTrkngCG0', localnwpsTrkngCG0Parms)
- localParms = getattr(localConfig, 'parms', localParms)
- localNAM12Parms = getattr(localConfig, 'parmsNAM12', localNAM12Parms)
- localOPCWavEParms = getattr(localConfig, 'parmsOPCWavE', localOPCWavEParms)
- localOPCWavSWParms = getattr(localConfig, 'parmsOPCWavSW',
- localOPCWavSWParms)
- localOPCWavNWParms = getattr(localConfig, 'parmsOPCWavNW',
- localOPCWavNWParms)
- localNAM40Parms = getattr(localConfig, 'parmsNAM40', localNAM40Parms)
- localNAM80Parms = getattr(localConfig, 'parmsNAM80', localNAM80Parms)
- localNAM95Parms = getattr(localConfig, 'parmsNAM95', localNAM95Parms)
- localRUC13Parms = getattr(localConfig, 'parmsRUC13', localRUC13Parms)
- localRUC80Parms = getattr(localConfig, 'parmsRUC80', localRUC80Parms)
- localNGM80Parms = getattr(localConfig, 'parmsNGM80', localNGM80Parms)
- localNGM95Parms = getattr(localConfig, 'parmsNGM95', localNGM95Parms)
- localGFS40Parms = getattr(localConfig, 'parmsGFS40', localGFS40Parms)
- localGFS80Parms = getattr(localConfig, 'parmsGFS80', localGFS80Parms)
- localGFS190Parms = getattr(localConfig, 'parmsGFS190', localGFS190Parms)
- localGFS75Parms = getattr(localConfig, 'parmsGFS75', localGFS75Parms)
- localgfsLRParms = getattr(localConfig, 'parmsgfsLR', localgfsLRParms)
- localISCParms = getattr(localConfig, 'parmsISC', localISCParms)
- localGWWParms = getattr(localConfig, 'parmsGWW', localGWWParms)
- localGLWMParms = getattr(localConfig, 'parmsGLWM', localGLWMParms) #########DCS3499
- localHIRESWarwParms = getattr(localConfig, 'parmsHIRESWarw', localHIRESWarwParms) ########DCS3501
- localHIRESWnmmParms = getattr(localConfig, 'parmsHIRESWnmm', localHIRESWnmmParms)
- localHRRRParms = getattr(localConfig, 'parmsHRRR', localHRRRParms)
-#DR20634 localSPCParms = getattr(localConfig, 'parmsSPC', localSPCParms)
- localWNAWAVEParms = getattr(localConfig, 'parmsWNAWAVE', localWNAWAVEParms)
- localAKWAVEParms = getattr(localConfig, 'parmsAKWAVE', localAKWAVEParms)
- localLAPSParms = getattr(localConfig, 'parmsLAPS', localLAPSParms)
- localMOSGuideParms = getattr(localConfig, 'parmsMOSGuide',
- localMOSGuideParms)
- localSREFParms = getattr(localConfig, 'parmsSREF', localSREFParms)
- localSATParms = getattr(localConfig, 'parmsSAT', localSATParms)
- localMSASParms = getattr(localConfig, 'parmsMSAS', localMSASParms)
- localGLERLParms = getattr(localConfig, 'parmsGLERL', localGLERLParms)
- localDBs = getattr(localConfig, 'dbs', localDBs)
- localMOSParms = getattr(localConfig, 'parmsMOS', localMOSParms)
- localHPCQPFParms = getattr(localConfig, 'parmsHPCQPF', localHPCQPFParms)
- localRFCQPFParms = getattr(localConfig, 'parmsRFCQPF', localRFCQPFParms)
-#DR3511 localHPCDeltaParms = getattr(localConfig, 'parmsHPCDelta',
-#DR3511 localHPCDeltaParms)
- localTCMParms = getattr(localConfig, 'parmsTCM', localTCMParms)
- localDGEXParms = getattr(localConfig, 'parmsDGEX', localDGEXParms)
- localHPCGuideParms = getattr(localConfig, 'parmsHPCGuide',
- localHPCGuideParms)
- localRTMAParms = getattr(localConfig, 'parmsRTMA', localRTMAParms)
- localURMA25Parms = getattr(localConfig, 'parmsURMA25', localURMA25Parms) ###DR17144
- localNamDNG5Parms = getattr(localConfig, 'parmsNamDNG5', localNamDNG5Parms)
- localTPCProbParms = getattr(localConfig, 'parmsTPCProb', localTPCProbParms)
- localAKwave10Parms = getattr(localConfig, 'parmsAKwave10', localAKwave10Parms)
- localAKwave4Parms = getattr(localConfig, 'parmsAKwave4', localAKwave4Parms)
- localEPwave10Parms = getattr(localConfig, 'parmsEPwave10', localEPwave10Parms)
- localGlobalWaveParms = getattr(localConfig, 'parmsGlobalWave', localGlobalWaveParms)
- localWCwave10Parms = getattr(localConfig, 'parmsWCwave10', localWCwave10Parms)
- localWCwave4Parms = getattr(localConfig, 'parmsWCwave4', localWCwave4Parms)
- localWNAwave10Parms = getattr(localConfig, 'parmsWNAwave10', localWNAwave10Parms)
- localWNAwave4Parms = getattr(localConfig, 'parmsWNAwave4', localWNAwave4Parms)
- localENPwaveParms = getattr(localConfig, 'parmsENPwave', localENPwaveParms)
- localGFSLAMPGridParms = getattr(localConfig, 'parmsGFSLAMPGrid', localGFSLAMPGridParms)
- #note that extraISCparms are not in the standard format. These
- #are a list of ([p, p, p, p], officeType)
- localISCExtraParms = getattr(localConfig, 'extraISCparms', localISCExtraParms)
-
#---------------------------------------------------------------------------
# Parm groups. Combine parms with time constraints
# list of ([parms], timeConstraints)
@@ -2052,7 +2905,7 @@ OFFICIALDBS = [([Temp, Td, Wind, NWPSwind, Weather, Sky, FzLevel, SnowLevel], TC
]
# Add wind/wave paramters based of site ID - DR 17496
-if SID in GreatLake_SITES:
+if SID in groups['GreatLake_SITES'] or SID in groups['marineTC1']:
OFFICIALDBS.append(([WaveHeight, WindWaveHeight, SurfHeight, Swell, Swell2, Period, Period2], TC1))
else:
OFFICIALDBS.append(([WaveHeight, WindWaveHeight, SurfHeight, Swell, Swell2, Period, Period2], TC3NG))
@@ -2119,9 +2972,8 @@ HPCGUIDE_MODEL = [([MaxT], MaxTTC), ([MinT], MinTTC),
TPCTCM_MODEL = [([HiWind], TC3)]
# RTMA database parameter groupings
-#if SID in ALASKA_SITES: - not sure if this is right
# DCS17288/DR17144
-if SID in ALASKA_SITES or SID in ["HFO", "SJU", "GUM"]:
+if SID in groups['OCONUS_SITES']:
RTMAPARMS = [([Temp,Td,RH,Wind,Vis,Pressure,WindGust],TC1),
([MinT],MinTTC), ([MaxT],MaxTTC),
([MinRH],MinRHTC), ([MaxRH],MaxRHTC),
@@ -2166,91 +3018,79 @@ GFSLAMPGridPARMS=[([Temp, Td, Vis, CigHgt],TC1)]
#---------------------------------------------------------------------------
# Databases for a site.
# list of (Database, [parms])
+# Official, Practice, TestFcst, Test are all set after Fcst is defined.
#---------------------------------------------------------------------------
-DATABASES = [(Official, OFFICIALDBS + localParms),
- (Fcst, OFFICIALDBS + localParms),
- (Practice, OFFICIALDBS + localParms),
- (TestFcst, OFFICIALDBS + localParms),
- (NAM80, STD6_MODEL + localNAM80Parms),
- (NAM95, STD6_MODEL + localNAM95Parms),
- (RUC13, STD1_MODEL + localRUC13Parms),
- (RUC80, STD1_MODEL + localRUC80Parms),
- (NGM80, STD6_MODEL + localNGM80Parms),
- (NGM95, STD6_MODEL + localNGM95Parms),
- (GFS40, STD6_MODEL + localGFS40Parms),
- (GFS80, STD6_MODEL + localGFS80Parms),
- (GFS75, STD6_MODEL + localGFS75Parms),
- (GFS190, STD6_MODEL + localGFS190Parms),
- (NAM40, STD3_MODEL + localNAM40Parms),
- (NAM12, STD3_MODEL + localNAM12Parms),
- (gfsLR, STD12_MODEL + localgfsLRParms),
- (GWW, WAVEPARMS + localGWWParms),
- (WNAWAVE, WAVEPARMS + localWNAWAVEParms),
- (AKWAVE, WAVEPARMS + localAKWAVEParms),
- (AKwave10, WAVEPARMS + localAKwave10Parms),
- (AKwave4, WAVEPARMS + localAKwave4Parms),
- (EPwave10, WAVEPARMS + localEPwave10Parms),
- (ESTOFS, ESTOFSPARMS + localESTOFSParms),
- (ETSS, ETSSPARMS + localETSSParms),
- (nwpsCG1, nwpsCG1_MODEL + localnwpsCG1Parms),
- (nwpsTrkngCG0, nwpsTrkngCG0_MODEL + localnwpsTrkngCG0Parms),
- (GlobalWave, WAVEPARMS + localGlobalWaveParms),
- (GLWM, GLWMPARMS + localGLWMParms), #####DCS3499
- (HIRESWarw, STD3_MODEL + localHIRESWarwParms), #####DCS3501
- (HIRESWnmm, STD3_MODEL + localHIRESWnmmParms),
- (HRRR, HRRRPARMS + localHRRRParms),
-#DR20634 (SPC, SPCPARMS + localSPCParms),
- (WCwave10, WAVEPARMS + localWCwave10Parms),
- (WCwave4, WAVEPARMS + localWCwave4Parms),
- (WNAwave10, WAVEPARMS + localWNAwave10Parms),
- (WNAwave4, WAVEPARMS + localWNAwave4Parms),
- (HPCGrid, MOS_MODEL + localMOSParms),
- (HPCQPF, HPCQPF_MODEL + localHPCQPFParms),
- (RFCQPF, RFCQPF_MODEL + localRFCQPFParms),
-#DR3511 (HPCDelta, HPCDELTA_MODEL + localHPCDeltaParms),
- (HPCGuide, HPCGUIDE_MODEL + localHPCGuideParms),
- (TPCTCM, TPCTCM_MODEL + localTCMParms),
- (DGEX, STD6_MODEL + localDGEXParms),
- (LAPS, LAPSPARMS + localLAPSParms),
- (MOSGuide, MOSGuidePARMS + localMOSGuideParms),
- (SREF, SREFPARMS + localSREFParms),
- (OPCTAFBE, OPCTAFBPARMS + localOPCWavEParms),
- (OPCTAFBNW, OPCTAFBPARMS + localOPCWavNWParms),
- (OPCTAFBSW, OPCTAFBPARMS + localOPCWavSWParms),
- (SAT, SATPARMS + localSATParms),
- (MSAS, MSASPARMS + localMSASParms),
- (GLERL, GLERLPARMS + localGLERLParms),
- (RTMA, RTMAPARMS + localRTMAParms),
- (URMA25, URMA25PARMS + localURMA25Parms), ####DR17144
- (NamDNG5, NamDNG5PARMS + localNamDNG5Parms),
- (TPCProb, TPCProbPARMS + localTPCProbParms),
- (ENPwave, ENPwave_parms + localENPwaveParms),
- (GFSLAMPGrid, GFSLAMPGridPARMS + localGFSLAMPGridParms),
- (Test, OFFICIALDBS + localParms)] + localDBs
+DATABASES = [
+ (Fcst, OFFICIALDBS),
+ (NAM80, STD6_MODEL),
+ (NAM95, STD6_MODEL),
+ (RUC13, STD1_MODEL),
+ (RUC80, STD1_MODEL),
+ (NGM80, STD6_MODEL),
+ (NGM95, STD6_MODEL),
+ (GFS40, STD6_MODEL),
+ (GFS80, STD6_MODEL),
+ (GFS75, STD6_MODEL),
+ (GFS190, STD6_MODEL),
+ (NAM40, STD3_MODEL),
+ (NAM12, STD3_MODEL),
+ (gfsLR, STD12_MODEL),
+ (GWW, WAVEPARMS),
+ (WNAWAVE, WAVEPARMS),
+ (AKWAVE, WAVEPARMS),
+ (AKwave10, WAVEPARMS),
+ (AKwave4, WAVEPARMS),
+ (EPwave10, WAVEPARMS),
+ (ESTOFS, ESTOFSPARMS),
+ (ETSS, ETSSPARMS),
+ (nwpsCG1, nwpsCG1_MODEL),
+ (nwpsTrkngCG0, nwpsTrkngCG0_MODEL),
+ (GlobalWave, WAVEPARMS),
+ (GLWM, GLWMPARMS),
+ (HIRESWarw, STD3_MODEL),
+ (HIRESWnmm, STD3_MODEL),
+ (HRRR, HRRRPARMS),
+#DR20634 (SPC, SPCPARMS),
+ (WCwave10, WAVEPARMS),
+ (WCwave4, WAVEPARMS),
+ (WNAwave10, WAVEPARMS),
+ (WNAwave4, WAVEPARMS),
+ (HPCGrid, MOS_MODEL),
+ (HPCQPF, HPCQPF_MODEL),
+ (RFCQPF, RFCQPF_MODEL),
+#DR3511 (HPCDelta, HPCDELTA_MODEL),
+ (HPCGuide, HPCGUIDE_MODEL),
+ (TPCTCM, TPCTCM_MODEL),
+ (DGEX, STD6_MODEL),
+ (LAPS, LAPSPARMS),
+ (MOSGuide, MOSGuidePARMS),
+ (SREF, SREFPARMS),
+ (OPCTAFBE, OPCTAFBPARMS),
+ (OPCTAFBNW, OPCTAFBPARMS),
+ (OPCTAFBSW, OPCTAFBPARMS),
+ (SAT, SATPARMS),
+ (MSAS, MSASPARMS),
+ (GLERL, GLERLPARMS),
+ (RTMA, RTMAPARMS),
+ (URMA25, URMA25PARMS),
+ (NamDNG5, NamDNG5PARMS),
+ (TPCProb, TPCProbPARMS),
+ (ENPwave, ENPwave_parms),
+ (GFSLAMPGrid, GFSLAMPGridPARMS),
+ ]
# Intersite coordination database parameter groupings, based on
# OFFICIALDBS, but time constraint is always TC1
ISCPARMS = []
-for wes, tc in (OFFICIALDBS + localISCParms):
- ISCPARMS.append((wes, TC1))
-# We also add in any extraISCparms as needed, but only for office
-# types other than our own.
-for wes, officeType in (EXTRA_ISC_PARMS + localISCExtraParms):
- if myOfficeType == officeType:
- continue
- for we in wes:
- wecopy = list(we)
- wecopy[0] = wecopy[0] + officeType #rename the weather element
- wecopy = tuple(wecopy)
- ISCPARMS.append(([wecopy], TC1))
+ if type(officeType) != str:
+ raise TypeError, "Office type not a str: " + `officeType`
+ else:
+ if officeType not in VALID_OFFICE_TYPES:
+ raise ValueError, "Office type: " + str(officeType) + " does not match any of the following: [" + (', '.join(VALID_OFFICE_TYPES)) + "]"
+
-# Restore database parameter groupings (based on OFFICIALDBS, but TC1)
-RESTOREPARMS = []
-for wes, tc in (OFFICIALDBS + localParms):
- RESTOREPARMS.append((wes, TC1))
-
#
-# Add new parameters for NewTerrain
+# new parameters for NewTerrain
#
NewTopo = ("NewTopo", SCALAR, "ft", "New Topo", 50000.0, -32000.0, 1, NO)
PrevTopo = ("PrevTopo", SCALAR, "ft", "Previous Topo", 50000.0, -32000.0, 1, NO)
@@ -2271,11 +3111,6 @@ if type(REQUESTED_ISC_PARMS) is list and not "NewTopo" in REQUESTED_ISC_PARMS:
REQUESTED_ISC_PARMS.append("NewTopo")
ISCPARMS.append(([NewTopo], Persistent))
-
-# Now add the ISC and Restore databases to the DATABASES groupings
-DATABASES.append((Restore, RESTOREPARMS))
-DATABASES.append((ISC, ISCPARMS))
-
for entry in AdditionalISCRouting:
(parmList, dbName, editAreaPrefix) = entry
parmList = list(parmList)
@@ -2334,13 +3169,13 @@ def doIt():
sendiscOnSave, sendiscOnPublish, \
requestedISCparms, \
transmitScript) \
- = doConfig.otherParse(\
+ = doConfig.otherParse(SITES.keys(), \
GFESUITE_SERVER, GFESUITE_MHSID, \
GFESUITE_PORT, INITMODULES,
D2DAccumulativeElements,
- INITSKIPS, D2DDBVERSIONS, LOG_FILE_PURGE_AFTER,
+ INITSKIPS, D2DDBVERSIONS, LOG_FILE_PURGE_AFTER,
GFESUITE_PRDDIR, GFESUITE_HOME,
- ExtraWEPrecision, VTECPartners.VTEC_REMOTE_TABLE_FETCH_TIME,
+ ExtraWEPrecision, VTECPartners.VTEC_REMOTE_TABLE_FETCH_TIME,
AUTO_CONFIGURE_NOTIFYTEXTPROD, ISC_ROUTING_TABLE_ADDRESS,
REQUESTED_ISC_SITES, REQUEST_ISC, SEND_ISC_ON_SAVE, SEND_ISC_ON_PUBLISH,
REQUESTED_ISC_PARMS, TRANSMIT_SCRIPT)
@@ -2366,4 +3201,108 @@ def doIt():
IFPConfigServer.transmitScript = transmitScript
IFPConfigServer.iscRoutingConfig = doConfig.parseAdditionalISCRouting(AdditionalISCRouting)
+#D logfp=open('/localapps/logs/serverConfig.log','w')
+#D logfp.write('DATABASE names:\n')
+#D for m in sorted(DATABASES):
+#D logfp.write('%s\n' % m[0][0])
+#D logfp.write('\n\nDATABASES\n')
+#D pprint.pprint(sorted(DATABASES),logfp,width=130)
+#D logfp.write('\n\nINITMODULES\n')
+#D pprint.pprint(INITMODULES,logfp,width=130)
+#D logfp.write('\n\nD2DMODELS\n')
+#D pprint.pprint(D2DMODELS,logfp,width=130)
+#D logfp.close()
+
+
+modelDict=createModelDict(locals(),DATABASES,D2DMODELS,D2DDBVERSIONS,D2DAccumulativeElements,
+ INITMODULES,INITSKIPS)
+
+D2DMODELS=[]
+D2DDBVERSIONS={}
+D2DAccumulativeElements={}
+INITMODULES={}
+INITSKIPS={}
+
+ignoreDatabases=[]
+localParms = []
+localISCParms = []
+localISCExtraParms = []
+localLogFile = ''
+
+if not BASELINE and siteImport('localConfig'):
+ localParms = getattr(localConfig, 'parms', [])
+ localISCParms = getattr(localConfig, 'parmsISC', [])
+ localISCExtraParms = getattr(localConfig, 'extraISCparms', [])
+ localLogFile = getattr(localConfig, 'logFile', '')
+ modelDict['Fcst']['Parms'] += localParms
+ #ensure office type is set properly in localConfig SITES[]
+ if len(SITES[GFESUITE_SITEID]) == 5:
+ a = list(SITES[GFESUITE_SITEID])
+ a.append(myOfficeType)
+ SITES[GFESUITE_SITEID] = tuple(a)
+ else:
+ myOfficeType = SITES[GFESUITE_SITEID][5] #probably from localConfig
+
+# Instantiate settings from modelDict
+db=dbConfig(modelDict)
+db.addConfiguredModels(ignoreDatabases)
+DATABASES = db.dbs
+D2DMODELS = db.D2DMODELS
+D2DDBVERSIONS = db.D2DDBVERSIONS
+D2DAccumulativeElements = db.D2DAccumulativeElements
+INITMODULES = db.INITMODULES
+INITSKIPS = db.INITSKIPS
+
+# Create Practice and test databases from Fcst
+DATABASES.append((Official, modelDict['Fcst']['Parms'])),
+DATABASES.append((Practice, modelDict['Fcst']['Parms'])),
+DATABASES.append((TestFcst, modelDict['Fcst']['Parms'])),
+DATABASES.append((Test, modelDict['Fcst']['Parms'])),
+
+# Intersite coordination database parameter groupings, based on
+# OFFICIALDBS, but time constraint is always TC1
+for wes, tc in (OFFICIALDBS + localISCParms):
+ ISCPARMS.append((wes, TC1))
+
+# We also add in any extraISCparms as needed, but only for office
+# types other than our own.
+for wes, officeType in (EXTRA_ISC_PARMS + localISCExtraParms):
+ if myOfficeType == officeType:
+ continue
+ for we in wes:
+ wecopy = list(we)
+ wecopy[0] = wecopy[0] + officeType #rename the weather element
+ wecopy = tuple(wecopy)
+ ISCPARMS.append(([wecopy], TC1))
+
+# Restore database parameter groupings (based on OFFICIALDBS, but TC1)
+RESTOREPARMS = []
+for wes, tc in modelDict['Fcst']['Parms']:
+ RESTOREPARMS.append((wes, TC1))
+
+# Now add the ISC and Restore databases to the DATABASES groupings
+DATABASES.append((Restore, RESTOREPARMS))
+DATABASES.append((ISC, ISCPARMS))
+
+
+#D logfp=open('/localapps/logs/serverConfig2.log','w')
+#D logfp.write('DATABASE names:\n')
+#D for m in sorted(DATABASES):
+#D logfp.write('%s\n' % m[0][0])
+#D logfp.write('\n\nDATABASES\n')
+#D pprint.pprint(sorted(DATABASES),logfp,width=130)
+#D logfp.write('\n\nINITMODULES\n')
+#D pprint.pprint(INITMODULES,logfp,width=130)
+#D logfp.write('\n\nD2DMODELS\n')
+#D pprint.pprint(D2DMODELS,logfp,width=130)
+#D logfp.close()
+
doIt()
+
+#D logfp=open('/localapps/logs/SC_MD2.py','w')
+#D modelDict=createModelDict(locals(),DATABASES,D2DMODELS,D2DDBVERSIONS,D2DAccumulativeElements,
+#D INITMODULES,INITSKIPS,logfp)
+#D logfp.close()
+if localLogFile:
+ printServerConfig(sys.modules[__name__],vars(localConfig),localLogFile)
+#D scfp.close()
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/Init.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/Init.py
index c16506e8f5..b05836ddcf 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/Init.py
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/Init.py
@@ -590,7 +590,8 @@ class Forecaster(GridUtilities):
times = self.__sortTimes(methods, validTime)
tr, numGrids = self.__process(methods, times, int(dbInfo[1]))
stop = time.time()
- msgTime = "Elapsed time: " + ("%-.1f" % (stop - start)) + "sec."
+ msgTime = "%s: Elapsed time: %-.1f sec." % (self.newdb().getModelIdentifier(), (stop - start))
+
LogStream.logEvent(msgTime)
#LogStream.logEvent("Network stats: ", self._client.getStats())
self._announce(self.newdb(), tr, numGrids)
@@ -977,7 +978,7 @@ class Forecaster(GridUtilities):
# LogStream.logEvent("missing:",missing)
if len(missing):
- LogStream.logEvent("Skipping calc" + we + " for some times due to the following " +
+ LogStream.logEvent(self.newdb().getModelIdentifier() + ": Skipping calc" + we + " for some times due to the following " +
"missing data:", missing)
# these become the times to run the method for
rval.append(times)
@@ -1072,11 +1073,11 @@ class Forecaster(GridUtilities):
doStore = False
if mthd.im_func is Forecaster.__exists.im_func:
- msg = "Get : " + we + " " + self._timeRangeStr(time)
+ msg = self.newdb().getModelIdentifier() + ": Get : " + we + " " + self._timeRangeStr(time)
LogStream.logEvent(msg)
else:
doStore = True
- msg = "Calc : " + we + " " + self._timeRangeStr(time)
+ msg = self.newdb().getModelIdentifier() + ": Calc : " + we + " " + self._timeRangeStr(time)
LogStream.logEvent(msg)
try:
@@ -1096,7 +1097,7 @@ class Forecaster(GridUtilities):
parm = self.__getNewWE(we)
self._ifpio.store(parm, cache['mtime'][0], cache[we][0])
except:
- LogStream.logProblem("Error while running method " + str(we) +
+ LogStream.logProblem(self.newdb().getModelIdentifier() + ": Error while running method " + str(we) +
"\n" + LogStream.exc())
cache[we] = (None, time)
diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/postProcessModels/precipitationAccumulation.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/postProcessModels/precipitationAccumulation.xml
index 3ab1bbf1aa..9e11b172e3 100644
--- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/postProcessModels/precipitationAccumulation.xml
+++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/postProcessModels/precipitationAccumulation.xml
@@ -18,6 +18,7 @@
GFS215|GFS217|GFS20-.*
+
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java
index 569d2bc855..8db285746b 100644
--- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java
@@ -88,6 +88,8 @@ import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
* Oct 02, 2014 3693 mapeters Added Pattern constants.
* Apr 22, 2015 DR 16923 MPorricelli Modified cleanMessage to eliminate extra spaces
* Jul 13, 2015 4389 skorolev Added correction of invalid (NUL) characters in the message.
+ * Nov 01, 2015 DR 14741 MPorricelli Modified WIND_VAR_DIR_EXP pattern to prevent its matching
+ * some RVR strings
*
*
*
@@ -116,9 +118,11 @@ public class MetarDecoder {
private static final Pattern WIND_GROUP_EXP_MPS = Pattern
.compile("(\\d{3}|VRB)(\\d{2,3})((G)(\\d{2,3}))?MPS");
- // Variable wind direction
+ // Variable wind direction: e.g. 050V120
+ // Exclude case where RVR has similar construct:
+ // e.g R13R/0600V1200FT so it will not be read as var wind dir
private static final Pattern WIND_VAR_DIR_EXP = Pattern
- .compile("\\d{3}V\\d{3}");
+ .compile("\\d{3}V\\d{3}(?!\\d{1}FT)");
/** Regular expression for the visibility */
// private final Pattern VISIBILITY_EXP = Pattern
diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tdwrElevations.txt b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tdwrElevations.txt
index d768fb8162..c1a0652b9f 100644
--- a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tdwrElevations.txt
+++ b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tdwrElevations.txt
@@ -87,6 +87,8 @@ PHX PSR HAZ 0.6 0.6 0.6 1.0 3.7 7.4 0.6 11.2 15.0 19.3 0.6 25.7 34.7 3.7 0.6 7.4
PHX PSR MON 0.6 0.6 0.6 1.0 3.7 6.1 11.0 15.9 20.8 25.7 30.6 35.5 40.4 45.3 50.2 55.1 60.0
PIT PBZ HAZ 0.6 0.3 0.3 1.0 1.8 3.7 0.3 5.7 8.6 11.4 0.3 15.3 20.6 1.8 0.3 3.7 5.7 8.6 0.3 11.4 15.3 20.6 0.3
PIT PBZ MON 0.6 0.3 0.3 1.0 1.8 6.1 11.0 15.9 20.8 25.7 30.6 35.5 40.4 45.3 50.2 55.1 60.0
+PSF OSF HAZ 0.3 0.3 1.0 2.5 5.1 0.3 7.7 11.5 15.3 0.3 20.4 27.4 1.0 0.3 2.5 5.1 7.7 0.3 11.5 15.3 20.4 0.3 27.4
+PSF OSF MON 0.3 0.3 1.0 2.5 6.0 10.0 15.0 20.0 25.0 30.0 35.0 40.0 45.0 50.0 55.0 60.0
RDU RAH HAZ 0.6 0.3 0.3 1.0 2.3 4.8 0.3 7.2 10.9 14.8 0.3 20.3 27.9 2.3 0.3 4.8 7.2 10.9 0.3 14.8 20.3 27.9 0.3
RDU RAH MON 0.6 0.3 0.3 1.0 2.3 6.1 11.0 15.9 20.8 25.7 30.6 35.5 40.4 45.3 50.2 55.1 60.0
SDF LMK HAZ 0.6 0.3 0.3 1.0 2.0 4.3 0.3 6.6 9.8 13.0 0.3 17.4 23.3 2.0 0.3 4.3 6.6 9.8 0.3 13.0 17.4 23.3 0.3
diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radarInfo.txt b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radarInfo.txt
index 45ff7044e3..22de5ecacb 100755
--- a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radarInfo.txt
+++ b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radarInfo.txt
@@ -65,11 +65,12 @@
25 |16 |0 |0.25 |60 |V |Velocity |{S} {T} Velocity {B}bit ({U}) |{S} {T} Vel {B} |Radial |y | | | |V | | | | |1 |kts |
26 |16 |0 |0.50 |115 |V |Velocity |{S} {T} Velocity ({U}) |{S} {T} V |Radial |y | | | |V | | | | |1 |kts |
27 |16 |0 |1.00 |230 |V |Velocity |{S} {T} Velocity ({U}) |{S} {T} V |Radial |y | | | |V | | | | |1 |kts |
+184|256 |0 |0.15 |90 |SW |Spectrum Width |{S} {T} Spec Width ({U}) |{S} {T} Spec Width |Radial |y | | | | | | | | |2 |kts | y
185|8 |0 |0.15 |90 |SW |Spectrum Width |{S} {T} Spec Width ({U}) |{S} {T} Spec Width |Radial |y | | | | | | | | |2 |kts |
28 |8 |0 |0.25 |60 |SW |Spectrum Width |{S} {T} Spectrum Width ({U}) {B}bit |{S} {T} SW {B}bit |Radial |y | | | | | | | | |2 |kts |
29 |8 |0 |0.50 |115 |SW |Spectrum Width |{S} {T} Spectrum Width ({U}) {B}bit |{S} {T} SW {B}bit |Radial |y | | | | | | | | |2 |kts |
30 |8 |0 |1.0 |230 |SW |Spectrum Width |{S} {T} Spectrum Width ({U}) {B}bit |{S} {T} SW {B}bit |Radial |y | | | | | | | | |2 |kts |
-155|256 |0 |0.25 |300 |HSW |Spec Width |{S} {T} Spectrum Width ({U}) {B}bit |{S} {T} SW {B}bit |Radial |y | | | |5m | | | | |2 |kts/10 | y
+155|256 |0 |0.25 |300 |HSW |Spec Width |{S} {T} Spectrum Width ({U}) {B}bit |{S} {T} SW {B}bit |Radial |y | | | |5m | | | | |2 |(m/s)/10| y
31 |16 |0 |2.0 |460 |USP |User Select Precip |{S} User Selectable Precip ({U}) |{S} USP |Radial | | | | | | |y | | |47 |in |
32 |256 |0 |1.0 |230 |DHR |Digital Hybrid Scan Refl |{S} Hybrid Scan Refl ({U}) |{S} DHR |Radial | | | | | | | | | |48 |dBZ/10 | y
33 |16 |0 |1.0 |230 |HSR |Hybrid Scan Reflectivity |{S} {B} bit Hyb Scan Refl ({U}) |{S} HSR |Radial | | | | | | | | | |64 |dBZ |
diff --git a/edexOsgi/com.raytheon.edex.plugin.warning/WarningDecoder.py b/edexOsgi/com.raytheon.edex.plugin.warning/WarningDecoder.py
index a5b8087bd6..8b71a743f0 100644
--- a/edexOsgi/com.raytheon.edex.plugin.warning/WarningDecoder.py
+++ b/edexOsgi/com.raytheon.edex.plugin.warning/WarningDecoder.py
@@ -48,6 +48,8 @@
# when decoding product not from a file.
# Mar 26, 2015 4324 dgilling Improve handling of all 0s time values in HVTEC strings.
# Sep 23, 2015 4848 nabowle Handle UGC-like lines in the text segment.
+# Nov 10, 2015 17068 ryu Improve handling of lines starting with a UGC code
+# but do not really begin new segments
#
#
# @author rferrel
@@ -173,6 +175,8 @@ class StdWarningDecoder():
self._endSegmentRE = r'^\$\$'
self._dlineRE = r"^1?[0-9]{3} [AP]M [A-Z][A-Z]?[DS]T.*[A-Z][A-Z,a-z]{2} " + \
r"[0123]?[0-9] 2[0-9]{3}.*$"
+ self._ugcRE = r'^[A-Z][A-Z][CZ][0-9]{3}[->]'
+ self._endTimeRE = r'-[0-3][0-9][0-2][0-9][0-5][0-9]-$'
#maximum future time (used for until further notice)
self._maxFutureTime = float(2**31 - 1) #max signed int
@@ -353,7 +357,7 @@ usage: VTECDecoder -f productfilename -d -a activeTableName
count = startLine
dlineFlag = 0
while count < 12 and count < len(self._lines):
- if re.search(r'^[A-Z][A-Z][CZ][0-9][0-9][0-9].*',
+ if re.search(self._ugcRE,
self._lines[count]):
if dlineFlag == 0:
return 0
@@ -386,10 +390,8 @@ usage: VTECDecoder -f productfilename -d -a activeTableName
startOverviewLine = count #next line after MND date line
#search for the 1st UGC line
- ugcRE = r'^[A-Z][A-Z][CZ][0-9][0-9][0-9].*'
while 1:
- ugc_search = re.search(ugcRE, self._lines[count])
- if ugc_search:
+ if self.checkForBeginSegment(count):
stopOverviewLine = count - 1
break
count = count + 1
@@ -490,8 +492,7 @@ usage: VTECDecoder -f productfilename -d -a activeTableName
count = lineStart #start on line following PIL
while 1:
#look for the first UGC line
- if re.search(r'^[A-Z][A-Z][CZ][0-9][0-9][0-9].*',
- self._lines[count]):
+ if self.checkForBeginSegment(count):
LogStream.logDebug("First line of UGC found on line: ", count,
'[' + self._lines[count] + ']')
@@ -503,16 +504,15 @@ usage: VTECDecoder -f productfilename -d -a activeTableName
nxt = 0 #number of lines from the first UGC line
ugc = "" #final UGC codes
while count+nxt < len(self._lines):
- if not re.search(r'.*[0-9][0-9][0-9][0-9][0-9][0-9]-',
- self._lines[count+nxt]):
- nxt = nxt + 1
- else:
+ if re.search(self._endTimeRE, self._lines[count+nxt]):
LogStream.logDebug("Last line of UGC found on line: ",
count+nxt, '[' + self._lines[count+nxt] + ']')
ugc = string.join(self._lines[count:count+nxt+1],
sep="")
break
+ nxt = nxt + 1
+
# if we hit the end, break out and let the len(ugc) check fail
if count+nxt == len(self._lines):
break;
@@ -584,16 +584,11 @@ usage: VTECDecoder -f productfilename -d -a activeTableName
# found a probable UGC line, terminate the segment
# if a DDMMHH or VTEC can be found
- elif re.search(r'^[A-Z][A-Z][CZ][0-9][0-9][0-9].*',
- self._lines[count+nxt]):
- toCheck = count+nxt
- falsePositive = self.checkForFalseUGCLine(toCheck)
-
- if not falsePositive:
- segmentText = self._prepSegmentText(\
- self._lines[textFirst:count+nxt])
- nxt = nxt - 1 #back up one line to redo UGC outer loop
- break
+ elif self.checkForBeginSegment(count+nxt):
+ segmentText = self._prepSegmentText(\
+ self._lines[textFirst:count+nxt])
+ nxt = nxt - 1 #back up one line to redo UGC outer loop
+ break
# end of file, terminate the segment
elif count+nxt+1 == len(self._lines):
@@ -625,10 +620,17 @@ usage: VTECDecoder -f productfilename -d -a activeTableName
count = count + 1
if count >= len(self._lines):
break
+
for e in ugcList:
LogStream.logVerbose("UGC/VTEC found: ", e[0], e[1])
return ugcList
+ def checkForBeginSegment(self, start):
+ if re.search(self._ugcRE, self._lines[start]) and \
+ not self.checkForFalseUGCLine(start):
+ return True
+ return False
+
def checkForFalseUGCLine(self, toCheck):
# tries to determine if an apparent UGC line encountered in a text
# segment is an actual UGC line, or is a UGC-like line in the free-text
@@ -641,12 +643,16 @@ usage: VTECDecoder -f productfilename -d -a activeTableName
while toCheck < len(self._lines):
# look for the end date or vtec line before "$$" or the end of the
# file
- if re.search(r'.*[0-9][0-9][0-9][0-9][0-9][0-9]-',
+ if re.search(self._endTimeRE,
self._lines[toCheck]) or \
re.search(self._vtecRE, self._lines[toCheck]):
falsePositive = False
break;
+ # blank line
+ if not self._lines[toCheck]:
+ break
+
if re.search(self._endSegmentRE, self._lines[toCheck]):
break;
diff --git a/edexOsgi/com.raytheon.uf.common.activetable/src/com/raytheon/uf/common/activetable/ActiveTableUtil.java b/edexOsgi/com.raytheon.uf.common.activetable/src/com/raytheon/uf/common/activetable/ActiveTableUtil.java
index b956314e2e..f9f4875f8b 100644
--- a/edexOsgi/com.raytheon.uf.common.activetable/src/com/raytheon/uf/common/activetable/ActiveTableUtil.java
+++ b/edexOsgi/com.raytheon.uf.common.activetable/src/com/raytheon/uf/common/activetable/ActiveTableUtil.java
@@ -39,6 +39,7 @@ import com.vividsolutions.jts.geom.Geometry;
* ------------ ---------- ----------- --------------------------
* Mar 4, 2013 dgilling Initial creation
* Apr 28, 2015 #4027 randerso Expunged Calendar from ActiveTableRecord
+ * Dec 09, 2015 #5197 reblum Fixed copy/paste error in convertToDict().
*
*
*
@@ -123,7 +124,7 @@ public class ActiveTableUtil {
if (floodEnd != null) {
long floodEndMillis = floodEnd.getTime();
if (floodEndMillis != 0) {
- template.put("floodBegin", floodEndMillis / 1000);
+ template.put("floodEnd", floodEndMillis / 1000);
}
}
String floodStatus = atr.getFloodRecordStatus();
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period1.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period1.xml
index fca06d7d4a..be6b86a3a5 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period1.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period1.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period10.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period10.xml
index 3b65787e02..74420aab5f 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period10.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period10.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period2.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period2.xml
index d27d4ed6d8..f8d0eb6816 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period2.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period2.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period3.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period3.xml
index d7091d75fd..a1c9e4e199 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period3.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period3.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period4.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period4.xml
index 2be0d8123a..1069996978 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period4.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period4.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period5.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period5.xml
index 9288bca990..3dbc9c61fd 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period5.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period5.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period6.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period6.xml
index 3e657e35d4..4b65b4daa7 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period6.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period6.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period7.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period7.xml
index fa9e05e35a..555f12df10 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period7.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period7.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period8.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period8.xml
index 3a70e77517..6e869c90f6 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period8.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period8.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period9.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period9.xml
index ed930e45fd..2f65cd320a 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period9.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Period9.xml
@@ -19,7 +19,7 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave1.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave1.xml
index d6466e8aa4..21676f7974 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave1.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave1.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave10.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave10.xml
index e00d063a51..f336b34611 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave10.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave10.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave2.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave2.xml
index 9f0562c3f8..85cf30c94a 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave2.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave2.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave3.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave3.xml
index 65f0d2edb5..319436a7a9 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave3.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave3.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave4.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave4.xml
index 3d02321de0..888428eb75 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave4.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave4.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave5.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave5.xml
index 578e5e5b74..01bd053e40 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave5.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave5.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave6.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave6.xml
index 3054ee4cf2..43d2d93599 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave6.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave6.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave7.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave7.xml
index a0e01be71d..5dc146b5c7 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave7.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave7.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave8.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave8.xml
index d0ded47b97..80a56e2ae5 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave8.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave8.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave9.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave9.xml
index e952f4dc47..8a0fa40e52 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave9.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/derivedParameters/definitions/NWPS/Wave9.xml
@@ -19,8 +19,8 @@
further_licensing_information.
-->
-
-
+
+
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/styleRules/d2dContourStyleRules.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/styleRules/d2dContourStyleRules.xml
index aaa8d69056..d07921f6b2 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/styleRules/d2dContourStyleRules.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/styleRules/d2dContourStyleRules.xml
@@ -2426,7 +2426,11 @@ F | 1.8 |-459.67| 4 | | |..|8000F0FF| | 0 | 5
MxT6hr
MxT12hr
MnT12hr
-
+
+
+ 10
+ 0
+
F
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/styleRules/gridImageryStyleRules.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/styleRules/gridImageryStyleRules.xml
index d2c6732f89..10da4e6645 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/styleRules/gridImageryStyleRules.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/utility/common_static/base/styleRules/gridImageryStyleRules.xml
@@ -3040,6 +3040,10 @@
MxT12hr
MnT12hr
+
+ 10
+ 0
+
F
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/utility/common_static/base/styleRules/viirsImageryStyleRules.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/utility/common_static/base/styleRules/viirsImageryStyleRules.xml
index 8493123bad..8b4ffc2e34 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/utility/common_static/base/styleRules/viirsImageryStyleRules.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/utility/common_static/base/styleRules/viirsImageryStyleRules.xml
@@ -66,5 +66,18 @@
NPP/VIIRS/CA (Low Light Vis)
-
+
+
+
+ Ref
+ 1.378
+
+
+
+ 0
+ 0.6
+
+ NPP/VIIRS/CA (Low Light Vis)
+
+
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/res/scripts/radarSpatial.sql b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/res/scripts/radarSpatial.sql
index a7e1659a17..137b230af2 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/res/scripts/radarSpatial.sql
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/res/scripts/radarSpatial.sql
@@ -205,6 +205,7 @@ INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id"
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TSTL','3043','3043.0000','LSX','646.6900','Lambert-St. Louis International Airp','-90.48900','38.80500','197.11111',GeometryFromText('POINT(-90.489 38.805)',4326) );
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TTPA','3044','3044.0000','TBW','92.5200','Tampa International Airport','-82.51800','27.86000','28.20010',GeometryFromText('POINT(-82.518 27.86)',4326) );
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TTUL','3045','3045.0000','TSA','823.2000','Tulsa International Airport','-95.82700','36.07100','250.91136',GeometryFromText('POINT(-95.827 36.071)',4326) );
+INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TPSF','3046','3046.0000','OSF','1392.0604','Program Support Facility','-97.62800','35.39300','424.30000',GeometryFromText('POINT(-97.628 35.393)',4326) );
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('EERI','4105','4105.0000','CLE','1173.0000','Erie','-80.15700','42.01800','357.53040',GeometryFromText('POINT(-80.157 42.018)',4326) );
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('FQKW','4020','4020.0000','SEW','1513.0000','Makah','-124.67600','48.37200','461.16240',GeometryFromText('POINT(-124.676 48.372)',4326) );
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('FQWA','4043','4043.0000','BIS','2575.0000','Watford City','-103.78100','47.67900','784.86000',GeometryFromText('POINT(-103.781 47.679)',4326) );
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java
index 4243a69364..fc49cee271 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java
@@ -138,6 +138,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Jun 11, 2014 2061 bsteffen Remove IDecoderGettable
* Nov 06, 2014 16776 zwang Handle AMDA product
* Mar 25, 2015 4319 bsteffen Add volume scan number.
+ * Sep 09, 2015 17568 wkwock Fix incorrect 8-bit SW display
*
*
*
@@ -913,7 +914,7 @@ public class RadarRecord extends PersistablePluginDataObject implements
}
double[] pix = { 256 - nLevels, 255 };
if (getProductCode() == 155) {
- pix = new double[] { 129, 149 };
+ pix = new double[] { 129, 171 };
} else if(getProductCode() == 32) {
pix = new double[]{ 2, 256 };
}
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.shef/src/com/raytheon/uf/common/dataplugin/shef/util/SHEFTimezone.java b/edexOsgi/com.raytheon.uf.common.dataplugin.shef/src/com/raytheon/uf/common/dataplugin/shef/util/SHEFTimezone.java
index c024a23e40..70d86ee667 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.shef/src/com/raytheon/uf/common/dataplugin/shef/util/SHEFTimezone.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.shef/src/com/raytheon/uf/common/dataplugin/shef/util/SHEFTimezone.java
@@ -28,12 +28,15 @@ import java.util.TimeZone;
public class SHEFTimezone {
+ public static final HashMap sysTimeZones = new HashMap();
+
public static final int TZ_NOTFOUND = -9999;
public static final TimeZone GMT_TIMEZONE = TimeZone
.getTimeZone(ShefConstants.Z);
private static final HashMap timeZoneMap = new HashMap();
+
static {
timeZoneMap.put("Z", new TimeZoneEntry("Z", 0, null,
"Zulu time, also Greenwich Mean Time (GMT)"));
@@ -122,9 +125,25 @@ public class SHEFTimezone {
timeZoneMap.put("J",
new TimeZoneEntry("J", -480, TimeZone.getTimeZone("PRC"),
"China"));
+ timeZoneMap.put(
+ "G",
+ new TimeZoneEntry("G", -600, TimeZone
+ .getTimeZone("Pacific/Guam"), "Chamorro local time"));
+ timeZoneMap
+ .put("GS",
+ new TimeZoneEntry("GS", -600, TimeZone
+ .getTimeZone("Pacific/Guam"),
+ "Chamorro standard time"));
+ timeZoneMap.put(
+ "S",
+ new TimeZoneEntry("S", 660, TimeZone
+ .getTimeZone("Pacific/Samoa"), "Samoan local time"));
+ timeZoneMap.put(
+ "SS",
+ new TimeZoneEntry("SS", 660, TimeZone
+ .getTimeZone("Pacific/Samoa"), "Samoan standard time"));
}
- public static final HashMap sysTimeZones = new HashMap();
static {
// Use this timezone to "clone" the daylight savings time rules.
for (String key : timeZoneMap.keySet()) {
@@ -187,15 +206,6 @@ public class SHEFTimezone {
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
- if(h == 1) {
- GregorianCalendar g = (GregorianCalendar) c.clone();
- g.set(Calendar.HOUR_OF_DAY, 0);
- if(tz.inDaylightTime(g.getTime())) {
-
-
-
- }
- }
System.out.println(String.format("hour = %2d time = %s", h, sdf.format(c.getTime())));
}
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/area.suppress b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/area.suppress
new file mode 100644
index 0000000000..ddedce01e4
--- /dev/null
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/area.suppress
@@ -0,0 +1,13 @@
+# NOTE: both number sign, # and the space ahead of UGC code need to be removed
+# in the following examples to make it work. Each site should copy this file
+# to SITE-LEVEL area.suppress and append appropriate UGC code and direction to it
+# if there's a need to suppress direction in the first bullet for certain counties.
+
+# The following example suppresses east west direction for MTC087 at BYZ
+# MTC087 ew
+
+# The following example suppresses north south direction for ORC051 at PQR
+# ORC051 ns
+
+# The following example suppresses all directions for ORC051 at PQR
+# ORC051
diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/reportalarm/RecordMgr.java b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/reportalarm/RecordMgr.java
index be4c0c428f..ab33a07b43 100644
--- a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/reportalarm/RecordMgr.java
+++ b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/reportalarm/RecordMgr.java
@@ -46,7 +46,7 @@ import com.raytheon.uf.edex.database.dao.DaoConfig;
* Feb 13, 2014 #2783 dgilling Refactored to support running as part
* of an EDEX service.
* Jan 07, 2015 3692 bclement AlertalarmRecord is no longer a singleton
- *
+ * Jul 02, 2015 16579 wkwock Add hsa filter
*
*
*
@@ -66,6 +66,8 @@ class RecordMgr {
static final int PEFILTER = 105;
+ static final int HSAFILTER = 106;
+
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(RecordMgr.class);
@@ -98,6 +100,7 @@ class RecordMgr {
.append(whereSubClauseFor(AA_CAT, opt))
.append(whereSubClauseFor(AA_CHCK, opt))
.append(whereSubClauseFor(PEFILTER, opt))
+ .append(whereSubClauseFor(HSAFILTER,opt))
.append(" AND (aav.ts NOT LIKE 'F%' OR aav.validtime >= current_timestamp) ")
.append(" ORDER BY aav.lid ASC, aav.pe, aav.ts, aav.aa_check, aav.validtime DESC ");
@@ -132,6 +135,8 @@ class RecordMgr {
return aaCheckSubClause(options.getFilter());
case PEFILTER:
return peFilterSubClause(options.getPEfilter());
+ case HSAFILTER:
+ return hsaFilterSubClause(options.getHsa());
default:
return null;
}
@@ -147,6 +152,10 @@ class RecordMgr {
return pe == null ? "" : " AND pe = " + pe;
}
+ private static String hsaFilterSubClause (String hsa) {
+ return hsa == null ? "" : " AND hsa = '" + hsa + "'";
+ }
+
private static String modeSubClause(ReportMode mode) {
if (mode == ReportMode.UNREPORTED) {
return " AND action_time IS NULL ";
diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/reportalarm/ReportOptions.java b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/reportalarm/ReportOptions.java
index 5c968e5a6b..3626d935d0 100644
--- a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/reportalarm/ReportOptions.java
+++ b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/reportalarm/ReportOptions.java
@@ -40,6 +40,7 @@ import com.raytheon.uf.common.util.StringUtil;
* Jun 15, 2011 9377 jnjanga Initial creation
* Jul 12, 2013 15711 wkwock Fix verbose, observe mode, etc
* Feb 12, 2014 #2783 dgilling Major refactor, cleanup.
+ * Jul 02, 2015 16579 wkwock Add hsa filter
*
*
*
@@ -65,6 +66,8 @@ class ReportOptions {
private static final String VERBOSE_MODE_KEY = "alarm_verbose";
+ private static final String HSA_KEY = "alarm_hsa_filter";
+
private static final EnumSet IGNORE_MINS = EnumSet.of(
ReportMode.ALL, ReportMode.UNREPORTED, ReportMode.NEAREST,
ReportMode.LATEST_MAXFCST);
@@ -86,6 +89,8 @@ class ReportOptions {
private boolean verboseFlag;
+ private String hsa = null;
+
/**
* @param appsDefaults
* @throws IllegalArgumentException
@@ -119,6 +124,10 @@ class ReportOptions {
if (isMinutesGiven() && IGNORE_MINS.contains(this.mode)) {
statusHandler.warn("Minutes value ignored for this report mode.");
}
+
+ if (appsDefaults.getTokens().contains(HSA_KEY)) {
+ setHsa(appsDefaults.getToken(HSA_KEY));
+ }
}
public String getProductId() {
@@ -218,6 +227,14 @@ class ReportOptions {
this.verboseFlag = verboseFlg;
}
+ public String getHsa() {
+ return hsa;
+ }
+
+ private void setHsa(String hsa) {
+ this.hsa = hsa;
+ }
+
public String getDbname() {
return DB_NAME;
}
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/utility/common_static/base/ffmp/FFMPSourceConfig.xml b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/utility/common_static/base/ffmp/FFMPSourceConfig.xml
index 24057d6753..b6b1dbd274 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/utility/common_static/base/ffmp/FFMPSourceConfig.xml
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/utility/common_static/base/ffmp/FFMPSourceConfig.xml
@@ -147,6 +147,7 @@
true
0.03937
true
+ RFC
RFCFFG
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsGenerator.java
index 445367766d..3da7912f93 100755
--- a/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsGenerator.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsGenerator.java
@@ -29,6 +29,7 @@ import com.raytheon.edex.site.SiteUtil;
import com.raytheon.edex.urifilter.URIFilter;
import com.raytheon.edex.urifilter.URIGenerateMessage;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
+import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
import com.raytheon.uf.common.geospatial.SpatialException;
import com.raytheon.uf.common.monitor.MonitorAreaUtils;
@@ -37,6 +38,7 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.M
import com.raytheon.uf.common.monitor.data.ObConst;
import com.raytheon.uf.common.monitor.events.MonitorConfigEvent;
import com.raytheon.uf.common.monitor.events.MonitorConfigListener;
+import com.raytheon.uf.common.monitor.xml.AreaIdXML;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
@@ -61,6 +63,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Sep 04, 2014 3220 skorolev Replaced 3 URI filters with one.
* Sep 18, 2015 3873 skorolev Added moving platforms testing.
* Oct 19, 2015 3841 skorolev Corrected isNearZone.
+ * Nov 12, 2015 3841 dhladky Augmented Slav's moving platform fix.
*
*
*
@@ -88,6 +91,9 @@ public class FSSObsGenerator extends CompositeProductGenerator implements
public FSSObsMonitorConfigurationManager snowmcm = null;
+ /** Zone constant char */
+ private static final char Z = 'Z';
+
/**
* Public construction
*/
@@ -111,7 +117,7 @@ public class FSSObsGenerator extends CompositeProductGenerator implements
fss_config = new FSSObsConfig(genMessage, this);
this.setPluginDao(new FSSObsDAO(productType));
} catch (Exception e) {
- statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
+ statusHandler.handle(Priority.PROBLEM, "Couldn't read FSSObs configuration information.", e);
}
List fssRecs = new ArrayList();
for (String uri : genMessage.getUris()) {
@@ -126,7 +132,9 @@ public class FSSObsGenerator extends CompositeProductGenerator implements
}
} catch (SpatialException e) {
statusHandler.handle(Priority.PROBLEM,
- e.getLocalizedMessage(), e);
+ "URI: "+uri+" could not be checked for Location information.", e);
+ // If the location info is bad. we don't want it.
+ continue;
}
}
@@ -146,42 +154,72 @@ public class FSSObsGenerator extends CompositeProductGenerator implements
}
/**
- * Test distance between moving platform and zone centroud.
+ * Checks if ship is near monitoring zones and should be included in FSSObs
+ * data.
*
* @param uri
- * @return
+ * sfcobs URI
+ * @return true if ship is in vicinity of zone
* @throws SpatialException
*/
private boolean isNearZone(String uri) throws SpatialException {
boolean retVal = false;
- Set marineZone = new HashSet();
- for (String z : getSSConfig().getAreaList()) {
- if (z.charAt(2) == 'Z') {
- marineZone.add(z);
- }
- }
- for (String z : getFogConfig().getAreaList()) {
- if (z.charAt(2) == 'Z') {
- marineZone.add(z);
- }
- }
+ String[] items = uri.split(DataURI.SEPARATOR);
+ double latShip = Double.parseDouble(items[6]);
+ double lonShip = Double.parseDouble(items[7]);
+
double ssShipDist = getSSConfig().getShipDistance();
+ if (ssShipDist != 0.0) {
+ // check SAFSEAS zones
+ retVal = checkMarineZones(getSSConfig(), ssShipDist, latShip,
+ lonShip);
+ }
double fogShipDist = getFogConfig().getShipDistance();
- // take the biggest distance
- double configDist = ssShipDist > fogShipDist ? ssShipDist : fogShipDist;
- if (configDist != 0.0) {
- String[] items = uri.split("/");
- double latShip = Double.parseDouble(items[6]);
- double lonShip = Double.parseDouble(items[7]);
- for (String zone : marineZone) {
- Coordinate coor = MonitorAreaUtils.getZoneCenter(zone);
- // zone should have center coordinates.
- if (coor != null) {
- double shipTozone = distance(latShip, lonShip, coor.y,
- coor.x);
- if (shipTozone < configDist) {
- retVal = true;
+ if (fogShipDist != 0.0) {
+ // check Fog zones
+ retVal = checkMarineZones(getFogConfig(), fogShipDist, latShip,
+ lonShip);
+ }
+ return retVal;
+ }
+
+ /**
+ *
+ * Test distance between moving platform and marine zone centroid.
+ *
+ * @param cfg
+ * configuration manager
+ * @param configDist
+ * configuration distance
+ * @param lat
+ * ship latitude
+ * @param lon
+ * ship longitude
+ * @return true if distance less configDist
+ */
+ private boolean checkMarineZones(FSSObsMonitorConfigurationManager cfg,
+ double configDist, double lat, double lon) {
+ boolean retVal = false;
+ for (String zone : cfg.getAreaList()) {
+ if (zone.charAt(2) == Z) {
+ // initial distance
+ double shipTozone = configDist;
+ try {
+ Coordinate coor = MonitorAreaUtils.getZoneCenter(zone);
+ // zone should have center coordinates.
+ if (coor != null) {
+ shipTozone = distance(lat, lon, coor.y, coor.x);
+ } else {
+ // newly added zone
+ AreaIdXML ssXML = cfg.getAreaXml(zone);
+ shipTozone = distance(lat, lon, ssXML.getCLat(),
+ ssXML.getCLon());
}
+ } catch (SpatialException e) {
+ statusHandler.handle(Priority.PROBLEM, "Couldn't find marine zone within distance. lon: "+lon+" lat: "+lat+" dist: "+configDist, e);
+ }
+ if (shipTozone < configDist) {
+ retVal = true;
}
}
}
@@ -329,4 +367,4 @@ public class FSSObsGenerator extends CompositeProductGenerator implements
return snowmcm;
}
-}
+}
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grid/src/com/raytheon/uf/edex/plugin/grid/dao/GridDao.java b/edexOsgi/com.raytheon.uf.edex.plugin.grid/src/com/raytheon/uf/edex/plugin/grid/dao/GridDao.java
index 46f32d453e..f3d7f4d9de 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.grid/src/com/raytheon/uf/edex/plugin/grid/dao/GridDao.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.grid/src/com/raytheon/uf/edex/plugin/grid/dao/GridDao.java
@@ -1,19 +1,19 @@
/**
* 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.
**/
@@ -65,21 +65,22 @@ import com.raytheon.uf.edex.plugin.grid.PartialGrid;
/**
* Data access object for accessing Grid records from the database
- *
+ *
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 07, 2009 1994 bphillip Initial Creation
* Mar 14, 2013 1587 bsteffen Fix static data persisting to datastore.
- * Mar 27, 2013 1821 bsteffen Speed up GridInfoCache.
+ * Mar 27, 2013 1821 bsteffen Speed up GridInfoCache.
* Mar 20, 2013 2910 bsteffen Clear dataURI after loading cached info.
* Jul 09, 2015 4500 rjpeter Fix SQL Injection concern.
* Sep 15, 2015 4819 rferrel Made {@link #validateDataset(GridRecord)} public.
+ * Nov 24, 2015 5154 nabowle Handle id=0 when validating the level.
*
- *
+ *
* @author bphillip
* @version 1
*/
@@ -364,6 +365,14 @@ public class GridDao extends PluginDao {
if ((ml != null)
&& !LevelFactory.UNKNOWN_LEVEL.equals(ml.getName())) {
result = true;
+ if (level.getId() == 0) {
+ level = LevelFactory.getInstance().getLevel(ml.getName(),
+ level.getLevelonevalue(), level.getLeveltwovalue(),
+ ml.getUnitString());
+ if (level != null) {
+ record.setLevel(level);
+ }
+ }
}
}
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.loctables/src/com/raytheon/uf/edex/plugin/loctables/util/store/ObStationRow.java b/edexOsgi/com.raytheon.uf.edex.plugin.loctables/src/com/raytheon/uf/edex/plugin/loctables/util/store/ObStationRow.java
index 6f3f4413a0..85f7ba3688 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.loctables/src/com/raytheon/uf/edex/plugin/loctables/util/store/ObStationRow.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.loctables/src/com/raytheon/uf/edex/plugin/loctables/util/store/ObStationRow.java
@@ -35,6 +35,7 @@ import com.vividsolutions.jts.geom.Point;
* ------------ ---------- ----------- --------------------------
* Apr 14, 2010 jkorman Initial creation
* Oct 12, 2015 4911 rjpeter Updated requiresUpdate.
+ * Dec 04, 2015 4911 rjpeter Added additional fields to requiresUpdate.
*
*
* @author jkorman
@@ -346,6 +347,14 @@ public class ObStationRow {
public boolean requiresUpdate(ObStation b) {
boolean newStation = false;
+ /*
+ * For non ICAO stations this isn't part of the key
+ */
+ if (copyItem(getIcao(), b.getIcao())) {
+ b.setIcao(getIcao());
+ newStation = true;
+ }
+
if (copyItem(getName(), b.getName())) {
b.setName(getName());
newStation = true;
@@ -361,6 +370,11 @@ public class ObStationRow {
newStation = true;
}
+ if (copyItem(getWmoIndex(), b.getWmoIndex())) {
+ b.setWmoIndex(getWmoIndex());
+ newStation = true;
+ }
+
if (copyItem(getWmoRegion(), b.getWmoRegion())) {
b.setWmoRegion(getWmoRegion());
newStation = true;
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/utility/edex_static/base/viirs/viirsHeaderMapping.xml b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/utility/edex_static/base/viirs/viirsHeaderMapping.xml
index 34ccdc81e6..a5208ca019 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/utility/edex_static/base/viirs/viirsHeaderMapping.xml
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/utility/edex_static/base/viirs/viirsHeaderMapping.xml
@@ -42,6 +42,11 @@
Puerto Rico
+
+
+
+ Global
+
@@ -136,11 +141,11 @@
750.0
-
-
- Moderate
- 0.7
- 10
- 750.0
-
-
\ No newline at end of file
+
+
+ Moderate
+ 0.7
+ 10
+ 750.0
+
+
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/utility/common_static/base/roles/userRoles.xml b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/utility/common_static/base/roles/userRoles.xml
index 22e46d7e2c..0345944ca1 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/utility/common_static/base/roles/userRoles.xml
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/utility/common_static/base/roles/userRoles.xml
@@ -103,14 +103,7 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ glm
+
+
+
+
+
+
+
+
+ java.lang.Throwable
+
+
+
+
+
+
diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/src/gov/nasa/msfc/sport/edex/glmdecoder/decoder/GLMDecoder.java b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/src/gov/nasa/msfc/sport/edex/glmdecoder/decoder/GLMDecoder.java
new file mode 100644
index 0000000000..bf0a498394
--- /dev/null
+++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/src/gov/nasa/msfc/sport/edex/glmdecoder/decoder/GLMDecoder.java
@@ -0,0 +1,241 @@
+package gov.nasa.msfc.sport.edex.glmdecoder.decoder;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.List;
+import java.util.TimeZone;
+
+import ucar.ma2.Array;
+import ucar.nc2.NetcdfFile;
+import ucar.nc2.Variable;
+
+import com.raytheon.uf.common.dataplugin.PluginDataObject;
+import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
+import com.raytheon.uf.common.dataplugin.binlightning.impl.LightningStrikePoint;
+import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgMsgType;
+import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgStrikeType;
+import com.raytheon.uf.common.status.IUFStatusHandler;
+import com.raytheon.uf.common.status.UFStatus;
+import com.raytheon.uf.common.wmo.WMOHeader;
+
+/**
+ * The Class GLMDecoder decodes the GLM Netcdf format files. The decoder
+ * extracts flash, groups, and events and encodes them into BinLightningRecords.
+ */
+public class GLMDecoder {
+
+ /** The Constant handler for logging. */
+ private static final IUFStatusHandler handler = UFStatus
+ .getHandler(GLMDecoder.class);
+
+ /** The Constant Greenwich Mean Time zone. */
+ private static final TimeZone gmt = TimeZone.getTimeZone("GMT");
+
+ /**
+ * The Enum Type to indentify various types of decoded types of detections.
+ */
+ private static enum Type {
+
+ /** The flash lightning element. */
+ FLASH("flash", "flash_time_offset_of_first_event"),
+ /** The event lightning element. */
+ EVENT("event", "event_time_offset"),
+ /** The group lightning element. */
+ GROUP("group", "group_time_offset");
+
+ /** The name. */
+ public final String name;
+
+ /** The offset name. */
+ public final String offsetName;
+
+ /**
+ * Instantiates a new type.
+ *
+ * @param name
+ * the name of the lightning type
+ * @param offsetName
+ * the offset name of the variable in the netcdf file that
+ * describes the offset of time for the particular record.
+ */
+ Type(String name, String offsetName) {
+ this.name = name;
+ this.offsetName = offsetName;
+ }
+ }
+
+ /**
+ * Decode the netcdf data from ingest and return the lightning flashes,
+ * groups and events from the input netcdf GLM file.
+ *
+ * @param data
+ * the data input array of the netcdf input file.
+ * @return the plugin data object[] that contains all of the flashes,
+ * groups, and events in the file. They are of type
+ * BinLightningRecord.
+ */
+ public PluginDataObject[] decode(byte[] data) {
+ WMOHeader wmoHdr = new WMOHeader(data);
+ if (wmoHdr.isValid()) {
+ data = removeWMOHeader(data, wmoHdr);
+ }
+ NetcdfFile netCdfFile = null;
+ List records = new ArrayList();
+ try {
+ netCdfFile = NetcdfFile.openInMemory(null, data);
+
+ Date productTime = decodeProductTime(netCdfFile);
+ List flashes = decode(Type.FLASH, netCdfFile,
+ productTime);
+ List groups = decode(Type.GROUP, netCdfFile,
+ productTime);
+ List events = decode(Type.EVENT, netCdfFile,
+ productTime);
+
+ if (events != null) {
+ BinLightningRecord eventsRecord = new BinLightningRecord(events);
+ eventsRecord.setSource("GLMev");
+ records.add(eventsRecord);
+ }
+
+ if (flashes != null) {
+ BinLightningRecord flashrecord = new BinLightningRecord(flashes);
+ flashrecord.setSource("GLMfl");
+ records.add(flashrecord);
+ }
+ if (groups != null) {
+ BinLightningRecord groupsRecord = new BinLightningRecord(groups);
+ groupsRecord.setSource("GLMgr");
+ records.add(groupsRecord);
+ }
+
+ } catch (IOException e) {
+ handler.error(e.getMessage());
+ } finally {
+ if (netCdfFile != null) {
+ try {
+ netCdfFile.close();
+ } catch (IOException e) {
+
+ }
+ }
+ }
+ int size = records.size();
+ PluginDataObject[] objs = new PluginDataObject[size];
+ return records.toArray(objs);
+ }
+
+ /**
+ * Removes the wmo header.
+ *
+ * @param data
+ * the data input array.
+ * @param wmoHdr
+ * the wmo hdr
+ * @return the byte[] of the data without the WMOHeader
+ */
+ private byte[] removeWMOHeader(byte[] data, WMOHeader wmoHdr) {
+ return Arrays.copyOfRange(data, wmoHdr.getMessageDataStart(),
+ data.length);
+ }
+
+ /**
+ * Decode product time which is the basis for all other time measurements in
+ * the file. The times are based on January 1, 2000 at 12Z.
+ *
+ * @param netCdfFile
+ * the net cdf file input
+ * @return the date for the basis of the file
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ private Date decodeProductTime(NetcdfFile netCdfFile) throws IOException {
+ Variable product_time_var = netCdfFile.findVariable("product_time");
+
+ GregorianCalendar cal = new GregorianCalendar(gmt);
+ // Dates are based on seconds since January 1, 2000 at 12Z
+ cal.set(2000, 0, 1, 12, 0, 0);
+ int secondstimesince2000 = (int) product_time_var.readScalarFloat();
+ cal.add(Calendar.SECOND, secondstimesince2000);
+ Date date = cal.getTime();
+ return date;
+
+ }
+
+ /**
+ * Decode actual elements in the file. The method decodes flashes, events,
+ * and groups from the netcdf file.
+ *
+ * @param type
+ * the type to decode, can be group, flash or event.
+ * @param netCdfFile
+ * the net cdf file to read the data.
+ * @param producttime
+ * the producttime is the basis time for the file.
+ * @return the list of plugin objects that represent the lightning element
+ * type decoded.
+ */
+ private List decode(Type type, NetcdfFile netCdfFile,
+ Date producttime) {
+ List points = new ArrayList();
+
+ Variable lon = netCdfFile.findVariable(type.name + "_lon");
+ Variable lat = netCdfFile.findVariable(type.name + "_lat");
+ double event_lon_scale_factor = 1;
+ double event_lon_add_offset = 0;
+ double event_lat_scale_factor = 1;
+ double event_lat_add_offset = 0;
+ if (type == Type.EVENT) {
+ event_lon_scale_factor = lon.findAttribute("scale_factor")
+ .getNumericValue().doubleValue();
+ event_lon_add_offset = lon.findAttribute("add_offset")
+ .getNumericValue().doubleValue();
+ event_lat_scale_factor = lat.findAttribute("scale_factor")
+ .getNumericValue().doubleValue();
+ event_lat_add_offset = lat.findAttribute("add_offset")
+ .getNumericValue().doubleValue();
+ }
+
+ Variable offset = netCdfFile.findVariable(type.offsetName);
+ try {
+ Array lon_array = lon.read();
+ Array lat_array = lat.read();
+ Array offset_array = offset.read();
+
+ while (lon_array.hasNext() && lat_array.hasNext()
+ && offset_array.hasNext()) {
+ float lonValue;
+ float latValue;
+
+ if (type == Type.EVENT) {
+ int lon_short = ucar.ma2.DataType
+ .unsignedShortToInt(lon_array.nextShort());
+ lonValue = (float) (lon_short * event_lon_scale_factor + event_lon_add_offset);
+ latValue = (float) (ucar.ma2.DataType
+ .unsignedShortToInt(lat_array.nextShort())
+ * event_lat_scale_factor + event_lat_add_offset);
+ } else {
+ lonValue = lon_array.nextFloat();
+ latValue = lat_array.nextFloat();
+ }
+
+ short offsetValue = offset_array.nextShort();
+ GregorianCalendar cal = new GregorianCalendar(gmt);
+ cal.setTimeInMillis(producttime.getTime() + offsetValue);
+ LightningStrikePoint point = new LightningStrikePoint(latValue,
+ lonValue, cal, LtgMsgType.TOTAL_LIGHTNING);
+ point.setType(LtgStrikeType.TOTAL_FLASH);
+ points.add(point);
+ }
+
+ } catch (IOException e) {
+ handler.error(e.getMessage());
+ }
+ return points;
+ }
+
+}
diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/test/TestGLMDecoder.java b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/test/TestGLMDecoder.java
new file mode 100644
index 0000000000..b679ebdd0d
--- /dev/null
+++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/test/TestGLMDecoder.java
@@ -0,0 +1,38 @@
+import gov.nasa.msfc.sport.edex.glmdecoder.decoder.GLMDecoder;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import com.raytheon.uf.common.dataplugin.PluginDataObject;
+
+public class TestGLMDecoder {
+
+ public void processFile(String file) {
+ try {
+ byte[] array = readFileInAsByteArray(file);
+ GLMDecoder decoder = new GLMDecoder();
+ PluginDataObject[] objects = decoder.decode(array);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ public byte[] readFileInAsByteArray(String file) throws IOException {
+ Path path = Paths.get(file);
+
+ return Files.readAllBytes(path);
+
+ }
+
+ public static void main(String[] args) {
+ TestGLMDecoder testDecoder = new TestGLMDecoder();
+ testDecoder
+ .processFile("/data1/awips/sampledata/GLM/OR_GLM-L2-LCFA_G16_s20151831153096_e20151831153297_c20152020147422.nc");
+ testDecoder
+ .processFile("/data1/awips/sampledata/GLM/newsamples/glm/IXTR99_KNES_190001_18889.2015081900");
+ }
+
+}
diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/common_static/base/menus/glm/glmlightningMenuItems.xml b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/common_static/base/menus/glm/glmlightningMenuItems.xml
new file mode 100644
index 0000000000..1ffcf7587d
--- /dev/null
+++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/common_static/base/menus/glm/glmlightningMenuItems.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/common_static/base/menus/glm/index.xml b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/common_static/base/menus/glm/index.xml
new file mode 100644
index 0000000000..b0d5fd1b47
--- /dev/null
+++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/common_static/base/menus/glm/index.xml
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/edex_static/base/distribution/glm.xml b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/edex_static/base/distribution/glm.xml
new file mode 100644
index 0000000000..d215030948
--- /dev/null
+++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.glmdecoder/utility/edex_static/base/distribution/glm.xml
@@ -0,0 +1,6 @@
+
+
+
+ OR_GLM-L2-LCFA_G16
+ ^IXTR99 KNES
+
diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/menus/lma/lma.xml b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/menus/lma/lma.xml
index 6b2e35ee45..9043aabcc2 100644
--- a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/menus/lma/lma.xml
+++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/menus/lma/lma.xml
@@ -1,828 +1,923 @@
-
-
-
-
- /grid/NALMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/NALMA/%/%/lmamsd
-
-
-
-
-
-
-
- /grid/NALMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/NALMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/NALMA/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/NALMA/%/%/lmaroc
-
-
-
-
-
-
-
-
-
- /grid/DCLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/DCLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/DCLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/DCLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/KLDAR/%/%/lmasd
-
-
-
-
-
-
-
- /grid/KLDAR/%/%/lmafed
-
-
-
-
-
-
-
- /grid/KLDAR/%/%/lmafid
-
-
-
-
-
-
-
- /grid/KLDAR/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/OKLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/OKLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/OKLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/OKLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/COLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/COLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/COLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/COLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/HGLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/HGLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/HGLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/HGLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/WTLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/WTLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/WTLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/WTLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/CFLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/CFLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/CFLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/CFLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/LLLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/LLLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/LLLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/LLLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
-
- /grid/KSCLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/KSCLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/KSCLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/KSCLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/NGLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/NGLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/NGLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/NGLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/ONLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/ONLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/ONLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/ONLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/WILMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/WILMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/WILMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/WILMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
- /grid/WSLMA/%/%/lmasd
-
-
-
-
-
-
-
- /grid/WSLMA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/WSLMA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/WSLMA/%/%/lmamfd
-
-
-
-
-
-
-
-
-
-
-
-
- /grid/PGNA/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGNA/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGNA/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGNA/%/%/lmasum
-
-
-
-
-
-
-
-
-
-
- /grid/PGDC/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGDC/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGDC/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGDC/%/%/lmasum
-
-
-
-
-
-
-
-
-
-
- /grid/PGSC/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGSC/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGSC/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGSC/%/%/lmasum
-
-
-
-
-
-
-
-
-
-
- /grid/PGOK/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGOK/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGOK/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGOK/%/%/lmasum
-
-
-
-
-
-
-
-
-
-
- /grid/PGCO/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGCO/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGCO/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGCO/%/%/lmasum
-
-
-
-
-
-
-
-
-
-
- /grid/PGHG/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGHG/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGHG/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGHG/%/%/lmasum
-
-
-
-
-
-
-
-
-
-
- /grid/PGWT/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGWT/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGWT/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGWT/%/%/lmasum
-
-
-
-
-
-
-
-
-
-
- /grid/PGCF/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGCF/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGCF/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGCF/%/%/lmasum
-
-
-
-
-
-
-
-
-
-
- /grid/PGLL/%/%/lmafed
-
-
-
-
-
-
-
- /grid/PGLL/%/%/lmafid
-
-
-
-
-
-
-
- /grid/PGLL/%/%/lmamfd
-
-
-
-
-
-
-
- /grid/PGLL/%/%/lmasum
-
-
-
-
-
-
-
-
+
+
+
+
+ /grid/NALMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/NALMA/%/%/lmamsd
+
+
+
+
+
+
+
+ /grid/NALMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/NALMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/NALMA/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/NALMA/%/%/lmaroc
+
+
+
+
+
+
+
+
+
+ /grid/DCLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/DCLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/DCLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/DCLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/KLDAR/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/KLDAR/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/KLDAR/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/KLDAR/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/OKLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/OKLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/OKLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/OKLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/COLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/COLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/COLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/COLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/HGLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/HGLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/HGLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/HGLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/WTLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/WTLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/WTLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/WTLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/CFLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/CFLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/CFLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/CFLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/LLLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/LLLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/LLLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/LLLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+
+ /grid/KSCLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/KSCLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/KSCLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/KSCLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/NGLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/NGLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/NGLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/NGLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/ONLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/ONLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/ONLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/ONLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/WILMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/WILMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/WILMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/WILMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+ /grid/WSLMA/%/%/lmasd
+
+
+
+
+
+
+
+ /grid/WSLMA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/WSLMA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/WSLMA/%/%/lmamfd
+
+
+
+
+
+
+
+
+
+
+
+
+ /grid/PGNA/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGNA/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGNA/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGNA/%/%/lmasum
+
+
+
+
+
+
+
+
+
+
+ /grid/PGDC/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGDC/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGDC/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGDC/%/%/lmasum
+
+
+
+
+
+
+
+
+
+
+ /grid/PGSC/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGSC/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGSC/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGSC/%/%/lmasum
+
+
+
+
+
+
+
+
+
+
+ /grid/PGOK/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGOK/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGOK/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGOK/%/%/lmasum
+
+
+
+
+
+
+
+
+
+
+ /grid/PGCO/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGCO/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGCO/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGCO/%/%/lmasum
+
+
+
+
+
+
+
+
+
+
+ /grid/PGHG/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGHG/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGHG/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGHG/%/%/lmasum
+
+
+
+
+
+
+
+
+
+
+ /grid/PGWT/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGWT/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGWT/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGWT/%/%/lmasum
+
+
+
+
+
+
+
+
+
+
+ /grid/PGCF/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGCF/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGCF/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGCF/%/%/lmasum
+
+
+
+
+
+
+
+
+
+
+ /grid/PGLL/%/%/lmafed
+
+
+
+
+
+
+
+ /grid/PGLL/%/%/lmafid
+
+
+
+
+
+
+
+ /grid/PGLL/%/%/lmamfd
+
+
+
+
+
+
+
+ /grid/PGLL/%/%/lmasum
+
+
+
+
+
+
+
+
diff --git a/javaUtilities/com.raytheon.wes2bridge.manager/.settings/org.eclipse.jdt.core.prefs b/javaUtilities/com.raytheon.wes2bridge.manager/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index aa69ecdc52..0000000000
--- a/javaUtilities/com.raytheon.wes2bridge.manager/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Jan 11 13:37:48 CST 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Alaska_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Alaska_Reg.xml
new file mode 100755
index 0000000000..d310cc3124
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Alaska_Reg.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Albers_Conic_Equal_Area",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Albers_Conic_Equal_Area"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -150.0],
+ PARAMETER["latitude_of_origin", 60.0],
+ PARAMETER["standard_parallel_1", 60.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ PARAMETER["standard_parallel_2", 60.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/AsiaPacific.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/AsiaPacific.xml
new file mode 100755
index 0000000000..566b9b2052
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/AsiaPacific.xml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ the_geom
+ name not in ('CANADA', 'MEXICO', 'UNITED STATES')
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+
+
+ State/County Boundaries
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ latlon10.lpi
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+ 12
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371200.0],
+ PARAMETER["semi_minor", 6371200.0],
+ PARAMETER["central_meridian", 130.0],
+ PARAMETER["latitude_of_origin", 10.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Atlantic.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Atlantic.xml
new file mode 100755
index 0000000000..49fa31520a
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Atlantic.xml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ the_geom
+ name not in ('CANADA', 'MEXICO', 'UNITED STATES')
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+
+
+ State/County Boundaries
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ latlon10.lpi
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+ 12
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371200.0],
+ PARAMETER["semi_minor", 6371200.0],
+ PARAMETER["central_meridian", -50.0],
+ PARAMETER["latitude_of_origin", 10.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/EuroAfrica.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/EuroAfrica.xml
new file mode 100755
index 0000000000..9c377127f7
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/EuroAfrica.xml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ the_geom
+ name not in ('CANADA', 'MEXICO', 'UNITED STATES')
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+
+
+ State/County Boundaries
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ latlon10.lpi
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+ 12
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371200.0],
+ PARAMETER["semi_minor", 6371200.0],
+ PARAMETER["central_meridian", 40.0],
+ PARAMETER["latitude_of_origin", 10.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/GreatLakes_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/GreatLakes_Reg.xml
new file mode 100755
index 0000000000..ac524d75ca
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/GreatLakes_Reg.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -84.5],
+ PARAMETER["latitude_of_origin", 43.25],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/GulfCoast_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/GulfCoast_Reg.xml
new file mode 100755
index 0000000000..a7ade57a4e
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/GulfCoast_Reg.xml
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -89.5],
+ PARAMETER["latitude_of_origin", 30.0],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Hawaii_regional.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Hawaii_regional.xml
new file mode 100755
index 0000000000..97eee6c827
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Hawaii_regional.xml
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('CANADA',
+ 'MEXICO', 'UNITED STATES')
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ latlon10.lpi
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+ 12
+
+ PROJCS["Mercator_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Mercator_1SP"],
+ PARAMETER["semi_major", 6371200.0],
+ PARAMETER["semi_minor", 6371200.0],
+ PARAMETER["latitude_of_origin", 0.0],
+ PARAMETER["central_meridian", -158.5],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
+
\ No newline at end of file
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Hawaii_state.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Hawaii_state.xml
new file mode 100755
index 0000000000..47fdbb7a3d
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Hawaii_state.xml
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('CANADA',
+ 'MEXICO', 'UNITED STATES')
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ latlon10.lpi
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+ 12
+
+ PROJCS["Mercator_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Mercator_1SP"],
+ PARAMETER["semi_major", 6371200.0],
+ PARAMETER["semi_minor", 6371200.0],
+ PARAMETER["latitude_of_origin", 0.0],
+ PARAMETER["central_meridian", -160.0],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Mid-Atlantic_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Mid-Atlantic_Reg.xml
new file mode 100755
index 0000000000..5d09ec85b0
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Mid-Atlantic_Reg.xml
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -76.5],
+ PARAMETER["latitude_of_origin", 36.5],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NorthEast_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NorthEast_Reg.xml
new file mode 100755
index 0000000000..253d6fb3ff
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NorthEast_Reg.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -71.0],
+ PARAMETER["latitude_of_origin", 42.5],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NorthWest_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NorthWest_Reg.xml
new file mode 100755
index 0000000000..a71caa046c
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NorthWest_Reg.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -117.25],
+ PARAMETER["latitude_of_origin", 43.5],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NrnPlains_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NrnPlains_Reg.xml
new file mode 100755
index 0000000000..51d1a7e83b
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/NrnPlains_Reg.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -98.0],
+ PARAMETER["latitude_of_origin", 43.0],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/OzarkTennV_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/OzarkTennV_Reg.xml
new file mode 100755
index 0000000000..5414441acf
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/OzarkTennV_Reg.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -88.75],
+ PARAMETER["latitude_of_origin", 35.25],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Pacific.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Pacific.xml
new file mode 100755
index 0000000000..f92df9eaeb
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Pacific.xml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ the_geom
+ name not in ('CANADA', 'MEXICO', 'UNITED STATES')
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+
+
+ State/County Boundaries
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ latlon10.lpi
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+ 12
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -130.0],
+ PARAMETER["latitude_of_origin", 10.0],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Puerto_Rico.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Puerto_Rico.xml
new file mode 100755
index 0000000000..c9623e3412
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/Puerto_Rico.xml
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+ World
+
+ name not in ('CANADA', 'MEXICO', 'UNITED STATES')
+ the_geom
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+ Lat/Lon 10 over Ocean
+
+ the_geom
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+ latlon10.lpi
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_2SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_2SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -66.43333300000002],
+ PARAMETER["latitude_of_origin", 17.833333],
+ PARAMETER["standard_parallel_1", 18.433333],
+ PARAMETER["false_easting", 200000.0],
+ PARAMETER["false_northing", 200000.0],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["standard_parallel_2", 18.433333],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SouthEast_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SouthEast_Reg.xml
new file mode 100755
index 0000000000..d75e0e0b90
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SouthEast_Reg.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -82.0],
+ PARAMETER["latitude_of_origin", 30.5],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SouthWest_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SouthWest_Reg.xml
new file mode 100755
index 0000000000..205f76657a
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SouthWest_Reg.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -114.0],
+ PARAMETER["latitude_of_origin", 36.75],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SrnPlains_Reg.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SrnPlains_Reg.xml
new file mode 100755
index 0000000000..0ea0583dff
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/SrnPlains_Reg.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ name not in ('Canada', 'Mexico', 'United States')
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+ the_geom
+
+
+ State/County Boundaries
+
+
+
+ 12
+ 2147483647
+
+ PROJCS["Lambert_Conformal_Conic_1SP",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Lambert_Conformal_Conic_1SP"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -97.25],
+ PARAMETER["latitude_of_origin", 33.0],
+ PARAMETER["scale_factor", 1.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/World.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/World.xml
new file mode 100755
index 0000000000..4a63a53e03
--- /dev/null
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/World.xml
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ World
+
+ the_geom
+ name not in ('CANADA', 'MEXICO', 'UNITED STATES')
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ State Boundaries
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Canada
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ Mexico
+
+ the_geom
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ County Boundaries
+
+
+
+ State/County Boundaries
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+
+
+
+
+
+ PLAN_VIEW
+
+
+
+
+
+ latlon10.lpi
+
+
+ Lat/Lon 10 over Ocean
+
+
+
+ 12
+
+
+
+ PROJCS["Equidistant Cylindrical (Spherical)",
+ GEOGCS["WGS84(DD)",
+ DATUM["WGS84",
+ SPHEROID["WGS84", 6378137.0, 298.257223563]],
+ PRIMEM["Greenwich", 0.0],
+ UNIT["degree", 0.017453292519943295],
+ AXIS["Geodetic longitude", EAST],
+ AXIS["Geodetic latitude", NORTH]],
+ PROJECTION["Equidistant Cylindrical (Spherical)"],
+ PARAMETER["semi_major", 6371229.0],
+ PARAMETER["semi_minor", 6371229.0],
+ PARAMETER["central_meridian", -95.0],
+ PARAMETER["latitude_of_origin", 0.0],
+ PARAMETER["standard_parallel_1", 0.0],
+ PARAMETER["false_easting", 0.0],
+ PARAMETER["false_northing", 0.0],
+ UNIT["m", 1.0],
+ AXIS["Easting", EAST],
+ AXIS["Northing", NORTH]]
+
+
+
+
+
+
diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/scalesInfo.xml b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/scalesInfo.xml
old mode 100644
new mode 100755
index 4d8ea295f6..40f573c603
--- a/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/scalesInfo.xml
+++ b/localization/localization.OAX/utility/cave_static/site/OAX/bundles/scales/scalesInfo.xml
@@ -19,21 +19,63 @@
further_licensing_information.
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/read_params.c b/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/read_params.c
index 1795bc0594..f7644d3730 100644
--- a/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/read_params.c
+++ b/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/read_params.c
@@ -378,6 +378,43 @@ extern int mpe_editor_call;
case mlqmosaic:
pMPEParams->mosaic_type = display_mlqMosaic;
break;
+
+ case rdmosaic:
+ pMPEParams->mosaic_type = display_rdMosaic;
+ break;
+
+ case avgrdmosaic:
+ pMPEParams->mosaic_type = display_avgrdMosaic;
+ break;
+
+ case maxrdmosaic:
+ pMPEParams->mosaic_type = display_maxrdMosaic;
+ break;
+
+ case bdmosaic:
+ pMPEParams->mosaic_type = display_bdMosaic;
+ break;
+
+ case ldmosaic:
+ pMPEParams->mosaic_type = display_ldMosaic;
+ break;
+
+ case mdmosaic:
+ pMPEParams->mosaic_type = display_mdMosaic;
+ break;
+
+ case mldmosaic:
+ pMPEParams->mosaic_type = display_mldMosaic;
+ break;
+
+ case srdmosaic:
+ pMPEParams->mosaic_type = display_srdMosaic;
+ break;
+
+ case srdgmosaic:
+ pMPEParams->mosaic_type = display_srdgMosaic;
+ break;
+
case p3lmosaic:
pMPEParams->mosaic_type = display_p3Mosaic;
break;
diff --git a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/empe_fieldgen.h b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/empe_fieldgen.h
index 16959f674b..bf36bcba61 100644
--- a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/empe_fieldgen.h
+++ b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/empe_fieldgen.h
@@ -1,20 +1,20 @@
/*******************************************************************************
-* FILENAME: empe_fieldgen.h
-*
-* DESCRIPTION: This file contains parameters and
-* user-defined types for the empe_fieldgen main function.
-*
-* ORIGINAL AUTHOR: Guoxian Zhou
-* CREATION DATE: January 2007
-* ORGANIZATION: HSEB / OHD
-* MACHINE: Dell-Redhat Linux
-* MODIFICATION HISTORY:
-* DATE PROGRAMMER DESCRIPTION/REASON
-* 07/2013 JingtaoD add prototypes for dual pol proudcts DSA/DPR
-* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
-* update wrtodb_HPERadarResult()
-********************************************************************************
-*/
+ * FILENAME: empe_fieldgen.h
+ *
+ * DESCRIPTION: This file contains parameters and
+ * user-defined types for the empe_fieldgen main function.
+ *
+ * ORIGINAL AUTHOR: Guoxian Zhou
+ * CREATION DATE: January 2007
+ * ORGANIZATION: HSEB / OHD
+ * MACHINE: Dell-Redhat Linux
+ * MODIFICATION HISTORY:
+ * DATE PROGRAMMER DESCRIPTION/REASON
+ * 07/2013 JingtaoD add prototypes for dual pol proudcts DSA/DPR
+ * 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
+ * update wrtodb_HPERadarResult()
+ ********************************************************************************
+ */
#ifndef EMPE_FIELDGEN_H
#define EMPE_FIELDGEN_H
@@ -50,21 +50,32 @@
/* Ordering of the elements in this list must be the same as the beginning
* of the enum DisplayFieldData type in the mpe_field_names.h header file. */
-typedef enum {dhrmosaic = 0, bdhrmosaic, ermosaic, avgermosaic, maxermosaic,
- gaugeonly, ebmosaic, lmosaic, mmosaic, mlmosaic, lsatpre,
- p3lmosaic, num_mosaics}mosaicType ;
+typedef enum {
+ dhrmosaic = 0,
+ bdhrmosaic,
+ ermosaic,
+ avgermosaic,
+ maxermosaic,
+ gaugeonly,
+ ebmosaic,
+ lmosaic,
+ mmosaic,
+ mlmosaic,
+ lsatpre,
+ p3lmosaic,
+ num_mosaics
+} mosaicType;
-extern char currTime[HHMMSS_LEN + 1];
-extern char message[MESSAGE_LEN] ;
+extern char currTime[HHMMSS_LEN + 1];
+extern char message[MESSAGE_LEN];
-extern FILE * logFile ;
+extern FILE * logFile;
+extern run_date_struct * ptrRunDate;
-extern run_date_struct * ptrRunDate ;
+extern geo_data_struct * ptrGeoData;
-extern geo_data_struct * ptrGeoData ;
-
-extern empe_params_struct * ptrEMPEParams ;
+extern empe_params_struct * ptrEMPEParams;
extern gage_table_struct ** ptrGageTable;
extern gage_table_struct ** ptrGageTableP3;
@@ -77,674 +88,389 @@ extern radarLoc_table_struct * ptrRadarLocTable;
/* function prototypes */
/*-----------------------------*/
-void apply_mpe_polygons ( double ** real_mosaic,
- const char * dateYMD,
- int year,
- int month,
- int day,
- int hour,
- enum DisplayFieldData field,
- const geo_data_struct * pGeoData,
- double factor,
- int add_flag,
- int draw_only_persistent );
+void apply_mpe_polygons(double ** real_mosaic, const char * dateYMD, int year,
+ int month, int day, int hour, enum DisplayFieldData field,
+ const geo_data_struct * pGeoData, double factor, int add_flag,
+ int draw_only_persistent);
-void hpe_fieldgen_constructor() ;
-void hpe_fieldgen_constructorByRunTime() ;
-void hpe_fieldgen_constructorByGeodata(int blnMosaic[]) ;
-void constructorForMeanBias(int radarLocNum) ;
+void hpe_fieldgen_constructor();
+void hpe_fieldgen_constructorByRunTime();
+void hpe_fieldgen_constructorByGeodata(int blnMosaic[]);
+void constructorForMeanBias(int radarLocNum);
-void hpe_fieldgen_destructor() ;
+void hpe_fieldgen_destructor();
-void editPolygonConstructor ( const geo_data_struct * pGeoData );
-void editPolygonDestructor ( const geo_data_struct * pGeoData );
+void editPolygonConstructor(const geo_data_struct * pGeoData);
+void editPolygonDestructor(const geo_data_struct * pGeoData);
-void readGeoData(const int hrap_grid_factor,
- geo_data_struct* pGeoData);
+void readGeoData(const int hrap_grid_factor, geo_data_struct* pGeoData);
-void readParams(empe_params_struct *) ;
+void readParams(empe_params_struct *);
-void readDBParams(empe_params_struct *) ;
+void readDBParams(empe_params_struct *);
-void readRWParams ( RWParams * , long int * ) ;
+void readRWParams(RWParams *, long int *);
-void readRWBiasStat ( RWBiasStat * pRWBiasStat,
- const char * office_id,
- long int * ircbia ) ;
+void readRWBiasStat(RWBiasStat * pRWBiasStat, const char * office_id,
+ long int * ircbia);
-void writeParams(const empe_params_struct *) ;
+void writeParams(const empe_params_struct *);
-void hpe_fieldgen_parseArgs(const int , char **, run_date_struct *);
+void hpe_fieldgen_parseArgs(const int, char **, run_date_struct *);
-void readGageData(const run_date_struct * pRunDate ,
- const empe_params_struct * pMPEParams ,
- const geo_data_struct *pGeoData ,
- gage_table_struct ** pGageTable ,
- gage_table_struct ** pGageTableP3 ,
- gage_table_struct ** pQCGageTable );
+void readGageData(const run_date_struct * pRunDate,
+ const empe_params_struct * pMPEParams, const geo_data_struct *pGeoData,
+ gage_table_struct ** pGageTable, gage_table_struct ** pGageTableP3,
+ gage_table_struct ** pQCGageTable);
-void checkMultiple( gage_table_struct * pGageTable);
+void checkMultiple(gage_table_struct * pGageTable);
-void readGagePrecip ( const int runHours ,
- char ** datetimes ,
- const int hrap_grid_factor ,
- const geo_data_struct *pGeoData,
- const int gage_qc,
- gage_table_struct ** pGageTable,
- gage_table_struct ** pGageTableP3,
- int * gageSize,
- int * gageSizeP3 ) ;
+void readGagePrecip(const int runHours, char ** datetimes,
+ const int hrap_grid_factor, const geo_data_struct *pGeoData,
+ const int gage_qc, gage_table_struct ** pGageTable,
+ gage_table_struct ** pGageTableP3, int * gageSize, int * gageSizeP3);
-void readPseudoPrecip( const int runHours ,
- char ** datetimes ,
- const int hrap_grid_factor ,
- const geo_data_struct * pGeoData,
- gage_table_struct ** pGageTable,
- gage_table_struct ** pGageTableP3,
- int * gageSize,
- int * gageSizeP3 ) ;
+void readPseudoPrecip(const int runHours, char ** datetimes,
+ const int hrap_grid_factor, const geo_data_struct * pGeoData,
+ gage_table_struct ** pGageTable, gage_table_struct ** pGageTableP3,
+ int * gageSize, int * gageSizeP3);
-void read_lightning(char dt[19], int *ihrap, int *jhrap,
- int *num_strike, long int *irc) ;
+void read_lightning(char dt[19], int *ihrap, int *jhrap, int *num_strike,
+ long int *irc);
-double readPrecipLimit( const char * gageID ,
- const time_t datetime) ;
+double readPrecipLimit(const char * gageID, const time_t datetime);
void checkSpatialConsistency(const empe_params_struct * pMPEParams,
- const geo_data_struct *pGeoData,
- const gage_table_struct * pGageTable,
- int * gageqc) ;
+ const geo_data_struct *pGeoData, const gage_table_struct * pGageTable,
+ int * gageqc);
-void writeGageQC ( const char * lid,
- const double value,
- const char * ts,
- const int dur,
- const char * dt,
- const int qctype,
- long int *irc,
- int *messageid ) ;
+void writeGageQC(const char * lid, const double value, const char * ts,
+ const int dur, const char * dt, const int qctype, long int *irc,
+ int *messageid);
-void writeRWResult ( const char *rfc,
- const char * dt,
- const int ngag,
- const int isat,
- const int nrad,
- const char *field,
- int * overwrt,
- long int *irc ) ;
+void writeRWResult(const char *rfc, const char * dt, const int ngag,
+ const int isat, const int nrad, const char *field, int * overwrt,
+ long int *irc);
-void writeArrayConstructor ( const geo_data_struct * pGeoData );
-void writeArrayDestructor ( const geo_data_struct * pGeoData );
+void writeArrayConstructor(const geo_data_struct * pGeoData);
+void writeArrayDestructor(const geo_data_struct * pGeoData);
-void writeArray( const geo_data_struct * pGeoData ,
- const char * filedir ,
- const char * filename ,
- const double factor ,
- const int replace_missing ,
- const char * user ,
- const time_t tRunTime ,
- const char * proc_flag ,
- double ** real_mosaic ,
- long int * irc ) ;
+void writeArray(const geo_data_struct * pGeoData, const char * filedir,
+ const char * filename, const double factor, const int replace_missing,
+ const char * user, const time_t tRunTime, const char * proc_flag,
+ double ** real_mosaic, long int * irc);
-void writeQPE(const run_date_struct * pRunDate ,
- const empe_params_struct * pMPEParams ,
- const geo_data_struct * pGeoData ,
- const int gageNum ,
- const int gageNumP3 ,
- double ** pQPEMosaic ) ;
+void writeQPE(const run_date_struct * pRunDate,
+ const empe_params_struct * pMPEParams, const geo_data_struct * pGeoData,
+ const int gageNum, const int gageNumP3, double ** pQPEMosaic);
-void writeRadarResult(const char * rad,
- const char * dt,
- const int ngag,
- const int irad,
- const double bias_used,
- const double mem_span_bias,
- long int * irc) ;
+void writeRadarResult(const char * rad, const char * dt, const int ngag,
+ const int irad, const double bias_used, const double mem_span_bias,
+ long int * irc);
-void saveGif( const geo_data_struct * pGeoData ,
- const char * datestring,
- const char * filen,
- double ** mosaic,
- long int * irc) ;
+void saveGif(const geo_data_struct * pGeoData, const char * datestring,
+ const char * filen, double ** mosaic, long int * irc);
-void saveNetCDF( const int max_x ,
- const int max_y,
- const char * strDateTime ,
- const char * fname,
- double ** pMosaic ,
- const char * proc_flag ,
- const char * external_dir ,
- long int *irc) ;
+void saveNetCDF(const int max_x, const int max_y, const char * strDateTime,
+ const char * fname, double ** pMosaic, const char * proc_flag,
+ const char * external_dir, long int *irc);
-void checkMultisensorQC(const char * datetime ,
- double ** mosaic ,
- const geo_data_struct * pGeoData,
- const gage_table_struct * pGageArray ) ;
+void checkMultisensorQC(const char * datetime, double ** mosaic,
+ const geo_data_struct * pGeoData, const gage_table_struct * pGageArray);
void runERMosaic(const run_date_struct * pRunDate,
- const geo_data_struct * pGeoData,
- empe_params_struct * pMPEParams,
- const radarLoc_table_struct * pRadarLocTable ,
- const gage_table_struct * pGageTable,
- const gage_table_struct * pGageTableP3,
- const gage_table_struct * pQCGageTable,
- double * meanFieldBias,
- double ** RadarBeamHeight,
- int ** ID,
- double ** RMosaic,
- double ** QPEMosaic,
- int * blnMosaic) ;
+ const geo_data_struct * pGeoData, empe_params_struct * pMPEParams,
+ const radarLoc_table_struct * pRadarLocTable,
+ const gage_table_struct * pGageTable,
+ const gage_table_struct * pGageTableP3,
+ const gage_table_struct * pQCGageTable, double * meanFieldBias,
+ double ** RadarBeamHeight, int ** ID, double ** RMosaic,
+ double ** QPEMosaic, int * blnMosaic);
-void readRadarLoc ( radarLoc_table_struct * pRadarLocTable ) ;
-
-void readRadarResult (const char * datetime,
- radar_result_struct * pRadarResult,
- short * count ,
- int * dual_pol_flag,
- long int * irc) ;
+void readRadarLoc(radarLoc_table_struct * pRadarLocTable);
+void readRadarResult(const char * datetime, radar_result_struct * pRadarResult,
+ short * count, int * dual_pol_flag, long int * irc);
void readDAARadarResult(const char * datetime,
- radar_result_struct * pRadarResult,
- short * count,
- int * dual_pol_flag,
- long int * irc);
+ radar_result_struct * pRadarResult, short * count, int * dual_pol_flag,
+ long int * irc);
-void readRadarData(const char * radarID,
- const char * datetime,
- const int dpa_wind,
- const int ignoreRadarFlag,
- float radar [ ] [ NUM_DPA_COLS ] ,
- int * radarAvailFlag) ;
+void readRadarData(const char * radarID, const char * datetime,
+ const int dpa_wind, const int ignoreRadarFlag,
+ float radar[][NUM_DPA_COLS], int * radarAvailFlag);
-void readDPARadar(const char * rad,
- const char * datetime,
- const int idpawind,
- double * maxvald,
- double * bias,
- char * fname,
- int * itim,
- long int * irc) ;
+void readDPARadar(const char * rad, const char * datetime, const int idpawind,
+ double * maxvald, double * bias, char * fname, int * itim,
+ long int * irc);
void readMisc(const radarLoc_table_struct * pRadarLocTable,
- short int ** radarMiscBins ) ;
+ short int ** radarMiscBins);
void getMeanBias(const radarLoc_record_struct * pRadarLocRecord,
- const char * datetime ,
- const int grid_rows,
- const int grid_cols,
- short ** radarMiscBins ,
- float ** radar,
- const geo_data_struct * pGeoData ,
- const gage_table_struct * pGageArray ,
- const empe_params_struct * pMPEParams ,
- int dualpol_data_avail,
- double * meanBias,
- double * memSpanBias,
- int * gageRadarPairNum) ;
+ const char * datetime, const int grid_rows, const int grid_cols,
+ short ** radarMiscBins, float ** radar,
+ const geo_data_struct * pGeoData, const gage_table_struct * pGageArray,
+ const empe_params_struct * pMPEParams, int dualpol_data_avail,
+ double * meanBias, double * memSpanBias, int * gageRadarPairNum);
-void retrieveMeanBias(const char * radarID,
- const char * datetime ,
- const empe_params_struct * pMPEParams ,
- int dualpol_data_avail,
- double * meanBias,
- double * memSpanBias );
+void retrieveMeanBias(const char * radarID, const char * datetime,
+ const empe_params_struct * pMPEParams, int dualpol_data_avail,
+ double * meanBias, double * memSpanBias);
void readMeanBias(const run_date_struct * pRunDate,
- const radarLoc_table_struct * pRadarLocTable ,
- const empe_params_struct * pMPEParams ,
- double * meanFieldBias,
- int dualpol_data_avail);
+ const radarLoc_table_struct * pRadarLocTable,
+ const empe_params_struct * pMPEParams, double * meanFieldBias,
+ int dualpol_data_avail);
void pairGageRadar(const radarLoc_record_struct * pRadarLocRecord,
- const int grid_rows,
- const int grid_cols,
- short ** radarMiscBins,
- float ** radar,
- const geo_data_struct * pGeoData ,
- const gage_table_struct * pGageArray ,
- const empe_params_struct * pMPEParams ,
- gage_radar_pair_table_struct * pGageRadarPairTable) ;
+ const int grid_rows, const int grid_cols, short ** radarMiscBins,
+ float ** radar, const geo_data_struct * pGeoData,
+ const gage_table_struct * pGageArray,
+ const empe_params_struct * pMPEParams,
+ gage_radar_pair_table_struct * pGageRadarPairTable);
-void calculatePixelHeight(const double lon_coord,
- const double lat_coord,
- const double hrap_coord_x,
- const double hrap_coord_y,
- const double hrap_x,
- const double hrap_y,
- double * pixelHeight ) ;
+void calculatePixelHeight(const double lon_coord, const double lat_coord,
+ const double hrap_coord_x, const double hrap_coord_y,
+ const double hrap_x, const double hrap_y, double * pixelHeight);
-void calculateMeanBias(const char * radarID,
- const char * datetime ,
- const empe_params_struct * pMPEParams ,
- const gage_table_struct * pGageArray,
- gage_radar_pair_table_struct * pGageRadarPairTable ,
- int dualpol_data_avail,
- double * meanBias,
- double * memSpanBias ) ;
+void calculateMeanBias(const char * radarID, const char * datetime,
+ const empe_params_struct * pMPEParams,
+ const gage_table_struct * pGageArray,
+ gage_radar_pair_table_struct * pGageRadarPairTable,
+ int dualpol_data_avail, double * meanBias, double * memSpanBias);
-void gageRadarPairsQC(const empe_params_struct * pMPEParams ,
- const double bias_long ,
- gage_radar_pair_table_struct * pGageRadarPairTable ,
- int * flag) ;
+void gageRadarPairsQC(const empe_params_struct * pMPEParams,
+ const double bias_long,
+ gage_radar_pair_table_struct * pGageRadarPairTable, int * flag);
-void updateStateVariable(const empe_params_struct * pMPEParams ,
- const float mem_span[] ,
- const int lag ,
- const gage_radar_pair_table_struct * pGageRadarPairTable ,
- double sumGage[] ,
- double sumRadar[] ,
- double num_pairs[] ) ;
+void updateStateVariable(const empe_params_struct * pMPEParams,
+ const float mem_span[], const int lag,
+ const gage_radar_pair_table_struct * pGageRadarPairTable,
+ double sumGage[], double sumRadar[], double num_pairs[]);
-void write_rwbiasdyn(const char *rad,
- const char * dt,
- const int num_span,
- double * num_pairs,
- double * sumgag,
- double * sumrad,
- double * bb,
- long int *irc) ;
+void write_rwbiasdyn(const char *rad, const char * dt, const int num_span,
+ double * num_pairs, double * sumgag, double * sumrad, double * bb,
+ long int *irc);
-void readRWBiasDyn(const char *radar_id,
- const char *office_id,
- const char * str,
- const int lag_cut,
- double *num_pairs,
- double *sumgag,
- double *sumrad,
- double *bias,
- int *lag,
- char sstr1[19],
- int dualpol_data_avail,
- long int *irc) ;
+void readRWBiasDyn(const char *radar_id, const char *office_id,
+ const char * str, const int lag_cut, double *num_pairs, double *sumgag,
+ double *sumrad, double *bias, int *lag, char sstr1[19],
+ int dualpol_data_avail, long int *irc);
-void readDAABiasDyn(const char *radar_id,
- const char *office_id,
- const char * str,
- const int lag_cut,
- double *num_pairs,
- double *sumgag,
- double *sumrad,
- double *bias,
- int *lag,
- char sstr1[19],
- long int *irc);
+void readDAABiasDyn(const char *radar_id, const char *office_id,
+ const char * str, const int lag_cut, double *num_pairs, double *sumgag,
+ double *sumrad, double *bias, int *lag, char sstr1[19], long int *irc);
+void read_spe(const char * satpre_filename, const geo_data_struct * pGeoData,
+ const int hrap_grid_factor, double ** pSatPre, int * spe_status);
-void read_spe ( const char * satpre_filename ,
- const geo_data_struct * pGeoData,
- const int hrap_grid_factor,
- double ** pSatPre,
- int * spe_status );
+double ** read_satellite(const run_date_struct * pRunDate,
+ const geo_data_struct * pGeoData, const int hrap_grid_factor,
+ int run_hour, int * is_sat_avail);
-double ** read_satellite ( const run_date_struct * pRunDate,
- const geo_data_struct * pGeoData,
- const int hrap_grid_factor,
- int run_hour,
- int * is_sat_avail );
-
-void free_spe_memory ( const geo_data_struct * pGeoData,
- const int hrap_grid_factor );
+void free_spe_memory(const geo_data_struct * pGeoData,
+ const int hrap_grid_factor);
void free_locbias_memory(const geo_data_struct * pGeoData,
- const int hrap_grid_factor);
+ const int hrap_grid_factor);
-void deleteZeros( int * gageSize,
- short * iug, short * ivg, float * zg,
- double ** mosaic) ;
+void deleteZeros(int * gageSize, short * iug, short * ivg, float * zg,
+ double ** mosaic);
-void get_climate(const char * os, const int rowSize, const int colSize,
- const char* cem, double ** umeang) ;
+void get_climate(const char * os, const int rowSize, const int colSize,
+ const char* cem, double ** umeang);
void readxmrg(const char * os, const int rowSize, const int colSize,
- const char * fname, const int lenf, const double factor,
- double ** xmrg , int * irc);
+ const char * fname, const int lenf, const double factor, double ** xmrg,
+ int * irc);
void runGageonly(const run_date_struct * pRunDate,
- const geo_data_struct * pGeoData,
- empe_params_struct * pMPEParams,
- const int gageSize,
- short * iug ,
- short * ivg ,
- float * zg ,
- double ** umeang,
- double ** QPEMosaic) ;
+ const geo_data_struct * pGeoData, empe_params_struct * pMPEParams,
+ const int gageSize, short * iug, short * ivg, float * zg,
+ double ** umeang, double ** QPEMosaic);
+void check_autosave(const char * rfcname, const int * rfclen,
+ const char dt[ANSI_YEARSEC_TIME_LEN], const int * datelen,
+ int * ioverwrt);
-void check_autosave ( const char * rfcname, const int * rfclen,
- const char dt[ANSI_YEARSEC_TIME_LEN],
- const int * datelen,
- int * ioverwrt ) ;
+void apply_mfb(const double * mfbias, const int rowSize, const int colSize,
+ int ** ID, double ** RMosaic, double ** BMosaic);
-void apply_mfb(const double * mfbias ,
- const int rowSize ,
- const int colSize ,
- int ** ID ,
- double ** RMosaic ,
- double ** BMosaic) ;
+int applyLocalBias(const time_t tRunTime, const geo_data_struct * pGeoData,
+ const empe_params_struct * pEMPEParams, double ** ERMosaic,
+ double ** EBMosaic);
-int applyLocalBias(const time_t tRunTime ,
- const geo_data_struct * pGeoData ,
- const empe_params_struct * pEMPEParams ,
- double ** ERMosaic ,
- double ** EBMosaic);
+void runEBMosaic(const run_date_struct * pRunDate,
+ const geo_data_struct * pGeoData, const empe_params_struct * pMPEParams,
+ double * meanFieldBias, int ** ID, double ** RMosaic, double ** BMosaic,
+ double ** QPEMosaic);
-void runEBMosaic(const run_date_struct * pRunDate ,
- const geo_data_struct * pGeoData ,
- const empe_params_struct * pMPEParams ,
- double * meanFieldBias ,
- int ** ID ,
- double ** RMosaic ,
- double ** BMosaic,
- double ** QPEMosaic) ;
+void runLMosaic(const run_date_struct * pRunDate,
+ const geo_data_struct * pGeoData, empe_params_struct * pMPEParams,
+ const int gageSize, short * iug, short * ivg, float * zg,
+ double ** RMosaic, double ** LMosaic, double ** QPEMosaic);
-void runLMosaic(const run_date_struct * pRunDate ,
- const geo_data_struct * pGeoData ,
- empe_params_struct * pMPEParams ,
- const int gageSize,
- short * iug ,
- short * ivg ,
- float * zg ,
- double ** RMosaic ,
- double ** LMosaic,
- double ** QPEMosaic) ;
+void lb_gr_pairs(float gr_min_value, const int gageSize, short * iug,
+ short * ivg, float * zg, double ** mosaic,
+ gage_radar_pair_table_struct * pGageRadarPairTable);
-void lb_gr_pairs ( float gr_min_value ,
- const int gageSize,
- short * iug ,
- short * ivg ,
- float * zg ,
- double ** mosaic ,
- gage_radar_pair_table_struct * pGageRadarPairTable) ;
+void runMMosaic(const run_date_struct * pRunDate,
+ const geo_data_struct * pGeoData, empe_params_struct * pMPEParams,
+ const int gageSize, short * iug, short * ivg, float * zg, int ** ID,
+ double ** RMosaic, double ** BMosaic, double ** umeang,
+ double ** QPEMosaic);
-void runMMosaic(const run_date_struct * pRunDate ,
- const geo_data_struct * pGeoData ,
- empe_params_struct * pMPEParams ,
- const int gageSize,
- short * iug ,
- short * ivg ,
- float * zg ,
- int ** ID ,
- double ** RMosaic ,
- double ** BMosaic ,
- double ** umeang ,
- double ** QPEMosaic) ;
+void runMLMosaic(const run_date_struct * pRunDate,
+ const geo_data_struct * pGeoData, empe_params_struct * pMPEParams,
+ const int gageSize, short * iug, short * ivg, float * zg, int ** ID,
+ double ** RMosaic, double ** LMosaic, double ** umeang,
+ double ** QPEMosaic);
-void runMLMosaic(const run_date_struct * pRunDate ,
- const geo_data_struct * pGeoData ,
- empe_params_struct * pMPEParams ,
- const int gageSize,
- short * iug ,
- short * ivg ,
- float * zg ,
- int ** ID ,
- double ** RMosaic ,
- double ** LMosaic ,
- double ** umeang ,
- double ** QPEMosaic) ;
+void runLSatpre(const run_date_struct * pRunDate,
+ const geo_data_struct * pGeoData, empe_params_struct * pMPEParams,
+ const int gageSize, short * iug, short * ivg, float * zg,
+ double ** RMosaic, double ** LSatpre, double ** QPEMosaic);
-void runLSatpre ( const run_date_struct * pRunDate,
- const geo_data_struct * pGeoData,
- empe_params_struct * pMPEParams,
- const int gageSize,
- short * iug ,
- short * ivg ,
- float * zg ,
- double ** RMosaic,
- double ** LSatpre,
- double ** QPEMosaic ) ;
-
-int runP3LMosaic ( const run_date_struct * pRunDate,
- const empe_params_struct * pMPEParams,
- const radarLoc_table_struct * pRadarLocTable,
- const gage_table_struct * pGageTableP3,
- const geo_data_struct * pGeoData,
- enum DisplayFieldData radar_display_type,
- double ** P3Mosaic,
- double ** AvgMosaic,
- double ** QPEMosaic);
+int runP3LMosaic(const run_date_struct * pRunDate,
+ const empe_params_struct * pMPEParams,
+ const radarLoc_table_struct * pRadarLocTable,
+ const gage_table_struct * pGageTableP3,
+ const geo_data_struct * pGeoData,
+ enum DisplayFieldData radar_display_type, double ** P3Mosaic,
+ double ** AvgMosaic, double ** QPEMosaic);
/* Routines for computing local bias fields. */
-const local_bias_params * getLocalBiasParams ( );
-void local_bias ( const run_date_struct * pRunDate,
- const geo_data_struct * pGeoData,
- const int gageSize,
- short * iug ,
- short * ivg ,
- float * zg ,
- empe_params_struct * pMPEParams,
- const local_bias_params * pLocalBiasParams,
- float si_cut,
- gage_radar_pair_table_struct * pGageRadarPair,
- double ** RMosaic,
- short int ** local_span,
- double ** local_bias,
- const char * dirname,
- double ** lmosaic,
- int * ierr ) ;
-
+const local_bias_params * getLocalBiasParams();
+void local_bias(const run_date_struct * pRunDate,
+ const geo_data_struct * pGeoData, const int gageSize, short * iug,
+ short * ivg, float * zg, empe_params_struct * pMPEParams,
+ const local_bias_params * pLocalBiasParams, float si_cut,
+ gage_radar_pair_table_struct * pGageRadarPair, double ** RMosaic,
+ short int ** local_span, double ** local_bias, const char * dirname,
+ double ** lmosaic, int * ierr);
/* Quick sort routines. */
-void qksort4 ( gage_radar_pair_table_struct * pGageRadarTable );
-void qksort22 ( int n, float * dd, short * ii );
-void qksort32 ( int n, double * dd, short * ii, short * jj );
-void qksorti22 ( int n, short * dd, short * ii );
+void qksort4(gage_radar_pair_table_struct * pGageRadarTable);
+void qksort22(int n, float * dd, short * ii);
+void qksort32(int n, double * dd, short * ii, short * jj);
+void qksorti22(int n, short * dd, short * ii);
/* heap sort functionss. */
-void heapSortForGeoIndex(float heapArray[], short hrap_x[],
- short hrap_y[], int arraySize) ;
+void heapSortForGeoIndex(float heapArray[], short hrap_x[], short hrap_y[],
+ int arraySize);
void heapSortForDoubleAndGeoIndex(double heapArray[], int index_x[],
- int index_y[], int arraySize) ;
-
+ int index_y[], int arraySize);
/* Routines for handling binary search for station
- latitude and longitude data. */
+ latitude and longitude data. */
-void free_mpe_latlon_info ( );
+void free_mpe_latlon_info();
void freeRadarLocMemory();
-int get_mpe_loc_latlon ( char * lid, double * dlat, double * dlon );
-int get_mpe_loc_latlon_list ( int * arraySize ,
- double * dlat ,
- double * dlon ) ;
+int get_mpe_loc_latlon(char * lid, double * dlat, double * dlon);
+int get_mpe_loc_latlon_list(int * arraySize, double * dlat, double * dlon);
-void buildNeighborList (const geo_data_struct * pGeoData ,
- empe_params_struct * pMPEParams,
- const int gageSize, short * iug,
- short * ivg, float * zg ) ;
+void buildNeighborList(const geo_data_struct * pGeoData,
+ empe_params_struct * pMPEParams, const int gageSize, short * iug,
+ short * ivg, float * zg);
-void findNeighborList (
- const int radius,
- const int index_x,
- const int index_y,
- short * arrIndex,
- float * arrDist,
- int * listNum ) ;
+void findNeighborList(const int radius, const int index_x, const int index_y,
+ short * arrIndex, float * arrDist, int * listNum);
-void findLocalBiasNeighborList (
- const gage_radar_pair_table_struct * pGageRadarPair,
- const short * iug,
- const short * ivg,
- const int radius,
- const int index_x,
- const int index_y,
- short * arrIndex,
- float * arrDist,
- int * listNum );
+void findLocalBiasNeighborList(
+ const gage_radar_pair_table_struct * pGageRadarPair, const short * iug,
+ const short * ivg, const int radius, const int index_x,
+ const int index_y, short * arrIndex, float * arrDist, int * listNum);
-void find_nbrsX(const int size ,
- short * iu ,
- short * iv ,
- const int iu0 ,
- const int iv0 ,
- const int iradi ,
- int * k ,
- short * ilist ,
- float * rlist ,
- int * iu0_prev ,
- int * m ,
- short * ivv ,
- short * in ) ;
+void find_nbrsX(const int size, short * iu, short * iv, const int iu0,
+ const int iv0, const int iradi, int * k, short * ilist, float * rlist,
+ int * iu0_prev, int * m, short * ivv, short * in);
-void freeNeighborList(const geo_data_struct * pGeoData) ;
+void freeNeighborList(const geo_data_struct * pGeoData);
void createMosaic(const radarLoc_record_struct * pRadarLocRecord,
- const int grid_rows,
- const int grid_cols,
- float ** radar ,
- short ** radarMiscBins,
- const geo_data_struct * pGeoData ,
- const int index ,
- double ** RadarBeamHeight,
- double ** RMosaic ,
- double ** MHeight,
- int ** ID,
- double ** MaxMosaic,
- double ** AvgMosaic,
- int ** AvgMosaicNumRadars,
- int * blnMosaic);
+ const int grid_rows, const int grid_cols, float ** radar,
+ short ** radarMiscBins, const geo_data_struct * pGeoData,
+ const int index, double ** RadarBeamHeight, double ** RMosaic,
+ double ** MHeight, int ** ID, double ** MaxMosaic, double ** AvgMosaic,
+ int ** AvgMosaicNumRadars, int * blnMosaic);
-void rfcw_load_static (const int hrap_grid_factor, int * status );
+void rfcw_load_static(const int hrap_grid_factor, int * status);
void runDHRMosaic(const run_date_struct * pRunDate,
- const geo_data_struct * pGeoData,
- empe_params_struct * pMPEParams,
- const radarLoc_table_struct * pRadarLocTable ,
- double * meanFieldBias,
- double ** radar_bean_height,
- int ** ID,
- double ** DHRMosaic,
- double ** QPEMosaic);
+ const geo_data_struct * pGeoData, empe_params_struct * pMPEParams,
+ const radarLoc_table_struct * pRadarLocTable,
+ const gage_table_struct * pGageTable, double * meanFieldBias,
+ double ** radar_bean_height, int ** ID, double ** DHRMosaic,
+ double ** QPEMosaic);
-void runBDHRMosaic(const run_date_struct * pRunDate ,
- const geo_data_struct * pGeoData ,
- const empe_params_struct * pMPEParams ,
- double * meanFieldBias ,
- int ** ID ,
- double ** RMosaic ,
- double ** QPEMosaic);
+void runBDHRMosaic(const run_date_struct * pRunDate,
+ const geo_data_struct * pGeoData, const empe_params_struct * pMPEParams,
+ double * meanFieldBias, int ** ID, double ** RMosaic,
+ double ** QPEMosaic);
void createDHRMosaic(const radarLoc_record_struct * pRadarLocRecord,
- const int grid_rows,
- const int grid_cols,
- float ** radar ,
- short ** radarMiscBins,
- const geo_data_struct * pGeoData ,
- const int index ,
- double ** RadarBeamHeight,
- double ** height,
- int ** ID,
- double ** mosaic);
+ const int grid_rows, const int grid_cols, float ** radar,
+ short ** radarMiscBins, const geo_data_struct * pGeoData,
+ const int index, double ** RadarBeamHeight, double ** height, int ** ID,
+ double ** mosaic);
-void readDHRData(const char * radarID,
- const char * datetime,
- const int dhr_wind,
- const int ignoreRadarFlag,
- float ** radar,
- int * radarAvailFlag);
+void readDHRData(const char * radarID, const char * datetime,
+ const int dhr_wind, const int ignoreRadarFlag, float ** radar,
+ int * radarAvailFlag);
-void readDPRData(const char * radarID,
- const char * datetime,
- const int dhr_wind,
- const int ignoreRadarFlag,
- float ** radar,
- int * radarAvailFlag);
+void readDPRData(const char * radarID, const char * datetime,
+ const int dhr_wind, const int ignoreRadarFlag, float ** radar,
+ int * radarAvailFlag);
+void readDHRRadar(const char * radid, const char * datetime,
+ const int dhr_window, double * prev_bias, double * post_bias,
+ char * prev_filename, char * post_filename, int * prev_offset,
+ int * post_offset, int * status);
-void readDHRRadar(const char * radid,
- const char * datetime,
- const int dhr_window,
- double * prev_bias,
- double * post_bias,
- char * prev_filename,
- char * post_filename,
- int * prev_offset,
- int * post_offset,
- int * status);
+void readDPRRadar(const char * radid, const char * datetime,
+ const int dhr_window, double * prev_bias, double * post_bias,
+ char * prev_filename, char * post_filename, int * prev_offset,
+ int * post_offset, int * status);
-void readDPRRadar(const char * radid,
- const char * datetime,
- const int dhr_window,
- double * prev_bias,
- double * post_bias,
- char * prev_filename,
- char * post_filename,
- int * prev_offset,
- int * post_offset,
- int * status);
+void readDecodedDHR(const char * filename, float ** radar, int * status);
-void readDecodedDHR(const char * filename,
- float ** radar ,
- int * status);
+void readDecodedDPR(const char * filename, float ** radar, int * status);
-void readDecodedDPR(const char * filename,
- float ** radar,
- int * status);
+void readDecodedDSP(const char * filename, float ** radar, int * status);
-void readDecodedDSP(const char * filename,
- float ** radar,
- int * status);
+void readDecodedDSA(const char * filename, float ** radar, int * status);
-void readDecodedDSA(const char * filename,
- float ** radar,
- int * status);
+void readDSPRadar(const char * radid, const char * datetime,
+ const int dsp_window, const int dsp_duration, const int ignoreRadarFlag,
+ float ** radar, int * radarAvailFlag);
-void readDSPRadar(const char * radid,
- const char * datetime,
- const int dsp_window,
- const int dsp_duration,
- const int ignoreRadarFlag,
- float ** radar,
- int * radarAvailFlag);
-
-void readDSARadar(const char * radid,
- const char * datetime,
- const int dsp_window,
- const int dsp_duration,
- const int ignoreRadarFlag,
- float ** radar,
- int * radarAvailFlag);
+void readDSARadar(const char * radid, const char * datetime,
+ const int dsp_window, const int dsp_duration, const int ignoreRadarFlag,
+ float ** radar, int * radarAvailFlag);
-void loadRadarBeamHeight(double ** radar_bean_height,
- const int grid_rows,
- const int grid_cols);
+void loadRadarBeamHeight(double ** radar_bean_height, const int grid_rows,
+ const int grid_cols);
void writeFormattedXMRG(const empe_params_struct * pEMPEParams,
- const geo_data_struct * pGeoData,
- const char * mosaic_dir,
- const char * fname_mosaic,
- const char * proc_flag ,
- const char * save_grib_token,
- const char * save_gif_token,
- const char * gif_dir_token,
- const char * gif_id_token,
- const char * save_netcdf_token,
- const char * netcdf_dir_token,
- const char * netcdf_id_token,
- const char * save_jpeg_token,
- double ** pMosaic);
+ const geo_data_struct * pGeoData, const char * mosaic_dir,
+ const char * fname_mosaic, const char * proc_flag,
+ const char * save_grib_token, const char * save_gif_token,
+ const char * gif_dir_token, const char * gif_id_token,
+ const char * save_netcdf_token, const char * netcdf_dir_token,
+ const char * netcdf_id_token, const char * save_jpeg_token,
+ double ** pMosaic);
-void read_daabiasdyn(const char *radar_id,
- const char *office_id,
- const char * str,
- const int lag_cut,
- double *num_pairs,
- double *sumgag,
- double *sumrad,
- double *bias,
- int *lag,
- char sstr1[19],
- long int *irc);
-
-
-void wrtodb_HPERadarResult(const char * hpe_productname,
- const char * producttime,
- const empe_params_struct * pEMPEParams,
- const int radar_data_source,
- const int nobias_flag);
+void read_daabiasdyn(const char *radar_id, const char *office_id,
+ const char * str, const int lag_cut, double *num_pairs, double *sumgag,
+ double *sumrad, double *bias, int *lag, char sstr1[19], long int *irc);
+
+void wrtodb_HPERadarResult(const char * hpe_productname,
+ const char * producttime, const empe_params_struct * pEMPEParams,
+ const int radar_data_source, const int nobias_flag);
#endif /* #ifndef MPE_FIELDGEN_H */
diff --git a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/main_empe_fieldgen.c b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/main_empe_fieldgen.c
index 51fd529093..d2584d41ec 100644
--- a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/main_empe_fieldgen.c
+++ b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/main_empe_fieldgen.c
@@ -2,11 +2,11 @@
#include "get_empe_product_state.h"
#include "p3.h"
-run_date_struct * ptrRunDate ;
+run_date_struct * ptrRunDate;
-geo_data_struct * ptrGeoData ;
+geo_data_struct * ptrGeoData;
-empe_params_struct * ptrEMPEParams ;
+empe_params_struct * ptrEMPEParams;
gage_table_struct ** ptrGageTable;
@@ -20,72 +20,71 @@ gage_table_struct ** ptrQCGageTable;
radarLoc_table_struct * ptrRadarLocTable;
-char * Mosaics[num_mosaics] = {"dhrmosaic", "bdhrmosaic", "ermosaic",
- "avgermosaic", "maxermosaic", "gageonly",
- "ebmosaic","lmosaic", "mmosaic", "mlmosaic",
- "lsatpre", "p3lmosaic"};
+char * Mosaics[num_mosaics] = { "dhrmosaic", "bdhrmosaic", "ermosaic",
+ "avgermosaic", "maxermosaic", "gageonly", "ebmosaic", "lmosaic",
+ "mmosaic", "mlmosaic", "lsatpre", "p3lmosaic" };
double ** BaseRMosaic = NULL;
-double ** RMosaic = NULL ;
+double ** RMosaic = NULL;
-double ** DHRMosaic = NULL ;
+double ** DHRMosaic = NULL;
-double ** BMosaic = NULL ;
+double ** BMosaic = NULL;
-double ** LMosaic = NULL ;
+double ** LMosaic = NULL;
/*
* Added by Ram for the average and max mosaic calculation
* structure to hold the max mosaic values throughout the program run
*/
-double ** MaxMosaic = NULL;
+double ** MaxMosaic = NULL;
/*
* structure to hold the average mosaic values
*/
-double ** AvgMosaic = NULL;
+double ** AvgMosaic = NULL;
/*
* structure to hold the number of radars contributed to a hrap grid bin
* this will be used to calculate the average mosaic.
*/
-int ** AvgMosaicNumRadars = NULL;
+int ** AvgMosaicNumRadars = NULL;
/*
* variable for the p3 lmosaic calculation
*/
-double ** P3Mosaic = NULL;
+double ** P3Mosaic = NULL;
int p3_return_value = -1;
int readradartriangles_once_for_all_hours = 0;
-int ** ID = NULL ;
+int ** ID = NULL;
/* This two dimensional array hold the "best estimate" mosaic */
-double ** QPEMosaic = NULL ;
+double ** QPEMosaic = NULL;
- /* prism data */
+/* prism data */
-double ** umeang = NULL ;
+double ** umeang = NULL;
- /* radar bean height data */
+/* radar bean height data */
-double ** RadarBeamHeight = NULL ;
+double ** RadarBeamHeight = NULL;
-short ** radarMiscBins = NULL ;
+short ** radarMiscBins = NULL;
/* The local bias satellite precipitation array. */
-double ** LSatpre = NULL ;
+double ** LSatpre = NULL;
/* mean field bias array */
-double * meanFieldBias = NULL ;
+double * meanFieldBias = NULL;
extern void free_tr();
@@ -94,28 +93,25 @@ extern void free_tr();
int dualpol_on_flag = 1;
int dualpol_used = 0;
-int hpe_fieldgen_main(int argc, const char ** argv)
-{
+int hpe_fieldgen_main(int argc, const char ** argv) {
enum DisplayFieldData radar_display_type = display_erMosaic;
mosaicType indexMosaic;
mosaicType indexBaseRadar = ermosaic;
int i, j, k, status;
int blnMosaic[num_mosaics];
- int blnGetPrism = 0 ;
+ int blnGetPrism = 0;
time_t tmpTime, start_time, end_time;
- static char strTempTime[50] = {'\0'} ;
- int flag , mosaicLength ;
+ static char strTempTime[50] = { '\0' };
+ int flag, mosaicLength;
int radar_processed;
int empe_base_radar_len = BESTFIELD_LEN;
- int verbose = VERBOSE ;
- char cemr[3] = {'\0'} ; /* char month of run */
- struct tm * pRunTime = NULL ;
- char datetime[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- int blnOverwrite = 1 ; /* 0 = overwrite best xmrg; 1 = don't overwrite */
-
- const char * HPE_DUALPOL_ON_TOKEN = "hpe_dualpol_on";
- char dualpol_on[TOKEN_LEN] = {'\0'};
+ int verbose = VERBOSE;
+ char cemr[3] = { '\0' }; /* char month of run */
+ struct tm * pRunTime = NULL;
+ char datetime[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ int blnOverwrite = 1; /* 0 = overwrite best xmrg; 1 = don't overwrite */
+ char tokenvalue[TOKEN_VALUE_LEN] = { '\0' };
short * iug = NULL;
short * ivg = NULL;
float * zg = NULL;
@@ -129,33 +125,25 @@ int hpe_fieldgen_main(int argc, const char ** argv)
ptrRunDate = NULL;
ptrGeoData = NULL;
ptrEMPEParams = NULL;
- ptrRadarLocTable = NULL ;
- ptrGageTable = NULL ;
- ptrGageTableP3 = NULL ;
- ptrQCGageTable = NULL ;
+ ptrRadarLocTable = NULL;
+ ptrGageTable = NULL;
+ ptrGageTableP3 = NULL;
+ ptrQCGageTable = NULL;
- /* determin if dual pol product can be retrived */
-
- getAppsDefaults(HPE_DUALPOL_ON_TOKEN, dualpol_on);
- if (strcmp(toLowerCase(dualpol_on), "yes") != 0 )
- dualpol_on_flag = 0;
- else
- dualpol_on_flag = 1;
-
- time(&start_time);
+ time(&start_time);
/*
* allocates memory for global struct data and initialization.
*/
- hpe_fieldgen_constructor() ;
+ hpe_fieldgen_constructor();
/*
* Verify the argument list
* and parse the values into variable ptrRunDate.
*/
- hpe_fieldgen_parseArgs(argc, argv, ptrRunDate) ;
+ hpe_fieldgen_parseArgs(argc, argv, ptrRunDate);
/*
* open the log file.
@@ -165,97 +153,77 @@ int hpe_fieldgen_main(int argc, const char ** argv)
time(&tmpTime);
strftime(strTempTime, 50, "%Y-%m-%d %X %Z", gmtime(&tmpTime));
- sprintf ( message , "\n\n\tHPE Precip Processing -- %s\n", strTempTime) ;
+ sprintf(message, "\n\n\tHPE Precip Processing -- %s\n", strTempTime);
printLogMessage(message);
- sprintf ( message , "\t\tVersion OB14.3.1 -- March 08, 2014 \n") ;
- printMessage( message, logFile );
-
-/*
- sprintf( message , "STATUS: HPE Fieldgen is running for %d hour(s)\n",
- ptrRunDate->hourNum) ;
- printMessage( message);
-*/
+ sprintf(message, "\t\tVersion OB16.2.1 -- August 08, 2015 \n");
+ printMessage(message, logFile);
/*
* retrieve the value of the base radar product.
*/
- get_empe_base_radar ( &verbose, ptrEMPEParams->base_radar_mosaic,
- &empe_base_radar_len, &status );
+ get_empe_base_radar(&verbose, ptrEMPEParams->base_radar_mosaic,
+ &empe_base_radar_len, &status);
- if ( status != 0 )
- {
- sprintf ( message, "Error occurred when retrieving base radar "
- "mosaic.\n\tProgram Exit." );
- shutdown( message );
+ if (status != 0) {
+ sprintf(message, "Error occurred when retrieving base radar "
+ "mosaic.\n\tProgram Exit.");
+ shutdown(message);
}
hpe_fieldgen_toLowerCase(ptrEMPEParams->base_radar_mosaic);
- if ( strcmp ( ptrEMPEParams->base_radar_mosaic, "ermosaic" ) == 0 )
- {
+ if (strcmp(ptrEMPEParams->base_radar_mosaic, "ermosaic") == 0) {
indexBaseRadar = ermosaic;
radar_display_type = display_erMosaic;
- }
- else if ( strcmp ( ptrEMPEParams->base_radar_mosaic, "avgermosaic" ) == 0 )
- {
+ } else if (strcmp(ptrEMPEParams->base_radar_mosaic, "avgermosaic") == 0) {
indexBaseRadar = avgermosaic;
radar_display_type = display_avgerMosaic;
- }
- else if ( strcmp ( ptrEMPEParams->base_radar_mosaic, "maxermosaic" ) == 0 )
- {
+ } else if (strcmp(ptrEMPEParams->base_radar_mosaic, "maxermosaic") == 0) {
indexBaseRadar = maxermosaic;
radar_display_type = display_maxerMosaic;
- }
- else
- {
- sprintf ( message, "Error: Unrecognized base radar mosaic %s.\n"
- "\tProgram Exit.",
- ptrEMPEParams->base_radar_mosaic );
- shutdown( message );
+ } else {
+ sprintf(message, "Error: Unrecognized base radar mosaic %s.\n"
+ "\tProgram Exit.", ptrEMPEParams->base_radar_mosaic);
+ shutdown(message);
}
- sprintf ( message, "STATUS: Using %s as the base radar mosaic...",
- ptrEMPEParams->base_radar_mosaic );
- hpe_fieldgen_printMessage( message );
+ sprintf(message, "STATUS: Using %s as the base radar mosaic...",
+ ptrEMPEParams->base_radar_mosaic);
+ hpe_fieldgen_printMessage(message);
/*
* read status for qpe generate types.
* and flag indicates if need calculate mean field bias.
*/
- sprintf( message , "STATUS: loading qpe generate types...") ;
- hpe_fieldgen_printMessage( message);
+ sprintf(message, "STATUS: loading qpe generate types...");
+ hpe_fieldgen_printMessage(message);
ptrEMPEParams->blnMeanFieldBias = 0;
ptrEMPEParams->blnDHRMeanFieldBias = 0;
- for( indexMosaic = dhrmosaic; indexMosaic < num_mosaics; indexMosaic++)
- {
+ for (indexMosaic = dhrmosaic; indexMosaic < num_mosaics; indexMosaic++) {
blnMosaic[indexMosaic] = 0;
- mosaicLength = strlen(Mosaics[indexMosaic]) ;
- get_empe_product_state(Mosaics[indexMosaic], &mosaicLength,
- &verbose, &flag, &status);
- if(status != 0)
- {
- sprintf ( message , "Error(s) occur when set generate type: %s."
- "\n\tProgram exit." , Mosaics[indexMosaic]) ;
- shutdown( message );
+ mosaicLength = strlen(Mosaics[indexMosaic]);
+ get_empe_product_state(Mosaics[indexMosaic], &mosaicLength, &verbose,
+ &flag, &status);
+ if (status != 0) {
+ sprintf(message, "Error(s) occur when set generate type: %s."
+ "\n\tProgram exit.", Mosaics[indexMosaic]);
+ shutdown(message);
}
- blnMosaic[indexMosaic] = flag ;
+ blnMosaic[indexMosaic] = flag;
- if(blnMosaic[indexMosaic] == 1)
- {
- sprintf ( message , "\tgenerate type: \"%s\" is set \"ON\" ",
- Mosaics[indexMosaic]) ;
- hpe_fieldgen_printMessage( message);
- }
- else
- {
- sprintf ( message , "\tgenerate type: \"%s\" is set \"OFF\" ",
- Mosaics[indexMosaic]) ;
- hpe_fieldgen_printMessage( message);
+ if (blnMosaic[indexMosaic] == 1) {
+ sprintf(message, "\tgenerate type: \"%s\" is set \"ON\" ",
+ Mosaics[indexMosaic]);
+ hpe_fieldgen_printMessage(message);
+ } else {
+ sprintf(message, "\tgenerate type: \"%s\" is set \"OFF\" ",
+ Mosaics[indexMosaic]);
+ hpe_fieldgen_printMessage(message);
}
/*
@@ -263,9 +231,7 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* when ebmosaic or mmosaic is ON
*/
- if((indexMosaic == ebmosaic)
- && blnMosaic[indexMosaic] == 1)
- {
+ if ((indexMosaic == ebmosaic) && blnMosaic[indexMosaic] == 1) {
ptrEMPEParams->blnMeanFieldBias = 1;
}
@@ -274,9 +240,7 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* when bdhrmosaic is ON
*/
- if((indexMosaic == bdhrmosaic)
- && blnMosaic[indexMosaic] == 1)
- {
+ if ((indexMosaic == bdhrmosaic) && blnMosaic[indexMosaic] == 1) {
blnMosaic[dhrmosaic] = 1;
ptrEMPEParams->blnDHRMeanFieldBias = 1;
}
@@ -286,10 +250,8 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* when mmosiac or mlmosaic or gageonly is ON
*/
- if((indexMosaic == mmosaic ||
- indexMosaic == mlmosaic ||
- indexMosaic == gaugeonly )
- && blnMosaic[indexMosaic] == 1)
+ if ((indexMosaic == mmosaic || indexMosaic == mlmosaic
+ || indexMosaic == gaugeonly) && blnMosaic[indexMosaic] == 1)
blnGetPrism = 1;
}
@@ -298,30 +260,67 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* which are determined by the run time data.
*/
- hpe_fieldgen_constructorByRunTime() ;
+ hpe_fieldgen_constructorByRunTime();
/*
* read in static parameters from Apps_defaults files.
*/
- readParams(ptrEMPEParams) ;
+ readParams(ptrEMPEParams);
+
+ /*
+ * print out dualPol bias info
+ */
+
+ if (hpe_fieldgen_getAppsDefaults("hpe_dualpol_on", tokenvalue) == -1) {
+ /* default to Yes */
+ dualpol_on_flag = 1;
+ sprintf(message, "\tDefault HPE dualPol radar product flag = ON");
+ hpe_fieldgen_printMessage(message);
+ } else {
+ if (strcmp(toLowerCase(tokenvalue), "yes") != 0) {
+ dualpol_on_flag = 0;
+ sprintf(message, "\tHPE dualPol radar product flag = OFF");
+ hpe_fieldgen_printMessage(message);
+ } else {
+ dualpol_on_flag = 1;
+ sprintf(message, "\tHPE dualPol radar product flag = ON");
+ hpe_fieldgen_printMessage(message);
+ }
+ }
+ if (hpe_fieldgen_getAppsDefaults("hpe_bias_source", tokenvalue) == -1) {
+ /* default to RFC*/
+ sprintf(message, "\tDefault HPE Bias Source = RFC");
+ hpe_fieldgen_printMessage(message);
+ } else {
+ sprintf(message, "\tHPE Bias Source = %s", tokenvalue);
+ hpe_fieldgen_printMessage(message);
+ }
+
+ if (hpe_fieldgen_getAppsDefaults("hpe_rfc_bias_flag", tokenvalue) == -1) {
+ /* default to 2 minutes*/
+ sprintf(message, "\tDefault HPE RFC bias flag = 2");
+ hpe_fieldgen_printMessage(message);
+ } else {
+ sprintf(message, "\tHPE RFC bias flag = %s", tokenvalue);
+ hpe_fieldgen_printMessage(message);
+ }
/*
* read in geo grid data.
*/
- readGeoData(ptrEMPEParams->hrap_grid_factor, ptrGeoData) ;
+ readGeoData(ptrEMPEParams->hrap_grid_factor, ptrGeoData);
/*
* read in the overlays
*/
- rfcw_load_static (ptrEMPEParams->hrap_grid_factor, & status );
+ rfcw_load_static(ptrEMPEParams->hrap_grid_factor, &status);
- if ( status != 0 )
- {
- sprintf ( message, "Error occurred when reading overlay data.\n" );
- hpe_fieldgen_printMessage( message );
+ if (status != 0) {
+ sprintf(message, "Error occurred when reading overlay data.\n");
+ hpe_fieldgen_printMessage(message);
}
ptrEMPEParams->irc_load_stat = status;
@@ -330,31 +329,30 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* which are determined by the geographic grid data.
*/
- hpe_fieldgen_constructorByGeodata(blnMosaic) ;
+ hpe_fieldgen_constructorByGeodata(blnMosaic);
/*
* Open the database.
*/
- if ( (status = OpenDbms ( ptrEMPEParams->db_name )) != 0 )
- {
- sprintf ( message , "Error(s) occur during opening database %s."
- " SQLCODE: %ld\n\tProgram exit.",
- ptrEMPEParams->db_name , SQLCODE ) ;
- shutdown( message );
+ if ((status = OpenDbms(ptrEMPEParams->db_name)) != 0) {
+ sprintf(message, "Error(s) occur during opening database %s."
+ " SQLCODE: %ld\n\tProgram exit.", ptrEMPEParams->db_name,
+ SQLCODE);
+ shutdown(message);
}
/*
- * read static parameters from database for running mpe_fieldgen.
+ * read static parameters from database for running hpe_fieldgen.
*/
- readDBParams(ptrEMPEParams) ;
+ readDBParams(ptrEMPEParams);
/*
* write static data to log file.
*/
- writeParams(ptrEMPEParams) ;
+ writeParams(ptrEMPEParams);
/*
* read in gage data for entire area and whole time range
@@ -364,16 +362,13 @@ int hpe_fieldgen_main(int argc, const char ** argv)
pRunTime = gmtime(&(ptrRunDate->tRunTime));
- if( (ptrEMPEParams->dsp_duration == 60) &&
- (pRunTime->tm_min == 0) )
- {
+ if ((ptrEMPEParams->dsp_duration == 60) && (pRunTime->tm_min == 0)) {
isTopHour = 1;
}
- if(isTopHour == 1)
- {
- readGageData(ptrRunDate, ptrEMPEParams, ptrGeoData,
- ptrGageTable, ptrGageTableP3, ptrQCGageTable);
+ if (isTopHour == 1) {
+ readGageData(ptrRunDate, ptrEMPEParams, ptrGeoData, ptrGageTable,
+ ptrGageTableP3, ptrQCGageTable);
}
/*
@@ -381,20 +376,21 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* store in radarloc struct variable
*/
- readRadarLoc(ptrRadarLocTable) ;
+ readRadarLoc(ptrRadarLocTable);
/*
* allocate memory and Initialize the mean bias struct data
* which is determined by the radarLoc number.
*/
- constructorForMeanBias(ptrRadarLocTable->radarNum) ;
+ constructorForMeanBias(ptrRadarLocTable->radarNum);
/*
* build the category name based on dsp_duration
*/
- buildCategoryName(ptrEMPEParams->dsp_duration, ptrEMPEParams->category_name);
+ buildCategoryName(ptrEMPEParams->dsp_duration,
+ ptrEMPEParams->category_name);
/*
* for multiple hours case:
@@ -409,51 +405,48 @@ int hpe_fieldgen_main(int argc, const char ** argv)
*/
loadRadarBeamHeight(RadarBeamHeight,
- NUM_DPA_ROWS * ptrEMPEParams->hrap_grid_factor,
- NUM_DPA_COLS * ptrEMPEParams->hrap_grid_factor);
+ NUM_DPA_ROWS * ptrEMPEParams->hrap_grid_factor,
+ NUM_DPA_COLS * ptrEMPEParams->hrap_grid_factor);
- for( i = 0; i < ptrRunDate->hourNum; i++)
- {
+ for (i = 0; i < ptrRunDate->hourNum; i++) {
radar_processed = 0;
ptrEMPEParams->sat_avail = 0;
- ptrEMPEParams->build_neighbor_list = 0 ;
+ ptrEMPEParams->build_neighbor_list = 0;
- gageSize = ptrGageTable[i]->totalGageNum ;
- gageSizeP3 = ptrGageTableP3[i]->totalGageNum ;
+ gageSize = ptrGageTable[i]->totalGageNum;
+ gageSizeP3 = ptrGageTableP3[i]->totalGageNum;
- if( isTopHour == 1 )
- {
+ if (isTopHour == 1) {
iug = init1DShortArray(ZERO_CONSTANT, gageSize);
ivg = init1DShortArray(ZERO_CONSTANT, gageSize);
- zg = init1DFloatArray(MOSAIC_DEFAULT, gageSize);
+ zg = init1DFloatArray(MOSAIC_DEFAULT, gageSize);
- for(j = 0; j < gageSize; j ++)
- {
- iug[j] = ptrGageTable[i]->ptrGageRecords[j].hrap_x ;
- ivg[j] = ptrGageTable[i]->ptrGageRecords[j].hrap_y ;
- zg[j] = ptrGageTable[i]->ptrGageRecords[j].gageValue ;
+ for (j = 0; j < gageSize; j++) {
+ iug[j] = ptrGageTable[i]->ptrGageRecords[j].hrap_x;
+ ivg[j] = ptrGageTable[i]->ptrGageRecords[j].hrap_y;
+ zg[j] = ptrGageTable[i]->ptrGageRecords[j].gageValue;
}
}
pRunTime = gmtime(&(ptrRunDate->tRunTime));
sprintf(cemr, "%02d", (pRunTime->tm_mon + 1));
- strftime ( datetime, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y-%m-%d %H:%M:00", pRunTime ) ;
+ strftime(datetime, ANSI_YEARSEC_TIME_LEN + 1, "%Y-%m-%d %H:%M:00",
+ pRunTime);
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "\n%s = time begin HPE fieldgen MOSAIC generation for: %s." ,
- currTime, datetime) ;
- hpe_fieldgen_printMessage( message);
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message,
+ "\n%s = time begin HPE fieldgen MOSAIC generation for: %s.",
+ currTime, datetime);
+ hpe_fieldgen_printMessage(message);
/*
* read in prism data if required.
*/
- if(blnGetPrism == 1)
- {
- get_climate(ptrEMPEParams->os , ptrGeoData->num_rows,
- ptrGeoData->num_cols, cemr, umeang) ;
+ if (blnGetPrism == 1) {
+ get_climate(ptrEMPEParams->os, ptrGeoData->num_rows,
+ ptrGeoData->num_cols, cemr, umeang);
}
/*
@@ -464,25 +457,8 @@ int hpe_fieldgen_main(int argc, const char ** argv)
int irfclen = strlen(ptrEMPEParams->rfc_name);
int idatelen = strlen(datetime);
- check_autosave(ptrEMPEParams->rfc_name, &irfclen,
- datetime, &idatelen, &blnOverwrite) ;
-
- /*
- * load the mean bias data for each radar ID
- * if need compute ebmosaic and/or bdhrmosaic.
- */
-
-/* if( (ptrEMPEParams->blnDHRMeanFieldBias == 1) ||
- (ptrEMPEParams->blnMeanFieldBias == 1) )*/
-
- /*if (ptrEMPEParams->blnDHRMeanFieldBias == 1)
- {
- readMeanBias(ptrRunDate,
- ptrRadarLocTable,
- ptrEMPEParams,
- meanFieldBias );
-
- }*/
+ check_autosave(ptrEMPEParams->rfc_name, &irfclen, datetime, &idatelen,
+ &blnOverwrite);
/*
* run mosaic functions based on mosaic status value.
@@ -496,310 +472,161 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* -- gzhou 09/2007
*/
- for( indexMosaic = dhrmosaic; indexMosaic < num_mosaics; indexMosaic++)
- {
- if(blnMosaic[indexMosaic] == 0)
- {
+ for (indexMosaic = dhrmosaic; indexMosaic < num_mosaics;
+ indexMosaic++) {
+ if (blnMosaic[indexMosaic] == 0) {
continue;
}
- switch(indexMosaic)
- {
- case dhrmosaic :
- runDHRMosaic(ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- ptrRadarLocTable,
- meanFieldBias,
- RadarBeamHeight,
- ID,
- DHRMosaic,
- QPEMosaic) ;
- break ;
+ switch (indexMosaic) {
+ case dhrmosaic:
+ runDHRMosaic(ptrRunDate, ptrGeoData, ptrEMPEParams,
+ ptrRadarLocTable, ptrGageTable[i], meanFieldBias,
+ RadarBeamHeight, ID, DHRMosaic, QPEMosaic);
+ break;
- case bdhrmosaic :
- runBDHRMosaic(ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- meanFieldBias,
- ID,
- DHRMosaic,
- QPEMosaic) ;
- break ;
+ case bdhrmosaic:
+ runBDHRMosaic(ptrRunDate, ptrGeoData, ptrEMPEParams,
+ meanFieldBias, ID, DHRMosaic, QPEMosaic);
+ break;
- case avgermosaic:
- case maxermosaic:
- case ermosaic :
- if ( radar_processed == 0 )
- {
- runERMosaic(ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- ptrRadarLocTable,
- ptrGageTable[i],
- ptrGageTableP3[i],
- ptrQCGageTable[i],
- meanFieldBias,
- RadarBeamHeight,
- ID,
- RMosaic,
- QPEMosaic,
- blnMosaic) ;
-
- /*
- * Assign the base radar mosaic. This radar mosaic
- * will be used as the base for all of the radar
- * derived MPE products.
- */
-
- switch ( indexBaseRadar )
- {
- case ermosaic:
- BaseRMosaic = RMosaic;
- break;
-
- case avgermosaic:
- BaseRMosaic = AvgMosaic;
- break;
-
- case maxermosaic:
- BaseRMosaic = MaxMosaic;
- break;
-
- default:
- sprintf ( message, "Error: Unrecognized base "
- "radar mosaic index.\n\t"
- "Program Exit." );
- shutdown ( message );
- break;
- }
-
- /*
- * delete zero gage values where radar says that
- * it is raining note that this will delete good
- * gage values in ap and virga but most of the
- * time will delete bad values
- */
-
- if( ptrEMPEParams->del_gage_zeros == 1 )
- {
- deleteZeros( &gageSize, iug, ivg, zg,
- BaseRMosaic) ;
- }
- }
-
- radar_processed = 1;
- break ;
-
- case ebmosaic :
- runEBMosaic(ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- meanFieldBias,
- ID,
- BaseRMosaic,
- BMosaic,
- QPEMosaic) ;
- break ;
-
- case p3lmosaic :
- sprintf ( message , "STATUS: P3LMosaic product is "
- "not available for current version.");
- hpe_fieldgen_printMessage( message);
-
-/*
- p3_return_value = runP3LMosaic ( ptrRunDate,
- ptrEMPEParams,
- ptrRadarLocTable,
- ptrGageTableP3[i],
- ptrGeoData,
- radar_display_type,
- P3Mosaic,
- BaseRMosaic,
- QPEMosaic);
-
- if(p3_return_value == -1)
- {
- sprintf ( message , "oops!...Problem calculating P3"
- " Mosaic..."
- " seems like there is no gage data\n");
- printMessage( message);
- }
- readradartriangles_once_for_all_hours = 1;
-*/
- break;
-
- case gaugeonly :
+ case avgermosaic:
+ case maxermosaic:
+ case ermosaic:
+ if (radar_processed == 0) {
+ runERMosaic(ptrRunDate, ptrGeoData, ptrEMPEParams,
+ ptrRadarLocTable, ptrGageTable[i],
+ ptrGageTableP3[i], ptrQCGageTable[i], meanFieldBias,
+ RadarBeamHeight, ID, RMosaic, QPEMosaic, blnMosaic);
/*
- * The gageonly can be calculated
- * only when the DSP duration is 60 minutes and
- * the run time is the top of the hour.
+ * Assign the base radar mosaic. This radar mosaic
+ * will be used as the base for all of the radar
+ * derived MPE products.
*/
- sprintf ( message , "STATUS: Gageonly product is "
- "not available for current version.");
- hpe_fieldgen_printMessage( message);
-/*
- if( isTopHour == 1 )
- {
- runGageonly(ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- gageSize, iug, ivg, zg,
- umeang,
- QPEMosaic) ;
- }
- else
- {
- sprintf ( message , "STATUS: Gageonly could not be "
- "calculated due to "
- "it is at non-top hour or "
- "DSP duration is not 60 minutes.");
- printMessage( message);
- }
-*/
- break ;
+ switch (indexBaseRadar) {
+ case ermosaic:
+ BaseRMosaic = RMosaic;
+ break;
- case lmosaic :
+ case avgermosaic:
+ BaseRMosaic = AvgMosaic;
+ break;
+
+ case maxermosaic:
+ BaseRMosaic = MaxMosaic;
+ break;
+
+ default:
+ sprintf(message, "Error: Unrecognized base "
+ "radar mosaic index.\n\t"
+ "Program Exit.");
+ shutdown(message);
+ break;
+ }
/*
- * The lmosaic can be calculated
- * only when the DSP duration is 60 minutes and
- * the run time is the top of the hour.
+ * delete zero gage values where radar says that
+ * it is raining note that this will delete good
+ * gage values in ap and virga but most of the
+ * time will delete bad values
*/
- sprintf ( message , "STATUS: LMosaic product is "
- "not available for current version.");
- hpe_fieldgen_printMessage( message);
-/*
- if( isTopHour == 1 )
- {
- runLMosaic( ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- gageSize, iug, ivg, zg,
- BaseRMosaic,
- LMosaic,
- QPEMosaic) ;
+ if (ptrEMPEParams->del_gage_zeros == 1) {
+ deleteZeros(&gageSize, iug, ivg, zg, BaseRMosaic);
}
- else
- {
- sprintf ( message , "STATUS: LMosaic could not be "
- "calculated due to "
- "it is at non-top hour or "
- "DSP duration is not 60 minutes.");
- printMessage( message);
- }
-*/
- break ;
+ }
- case mmosaic :
+ radar_processed = 1;
+ break;
- /*
- * The mmosaic can be calculated
- * only when the DSP duration is 60 minutes and
- * the run time is the top of the hour.
- */
+ case ebmosaic:
+ runEBMosaic(ptrRunDate, ptrGeoData, ptrEMPEParams,
+ meanFieldBias, ID, BaseRMosaic, BMosaic, QPEMosaic);
+ break;
- sprintf ( message , "STATUS: MMosaic product is "
- "not available for current version.");
- hpe_fieldgen_printMessage( message);
-/*
- if( isTopHour == 1 )
- {
- runMMosaic(ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- gageSize, iug, ivg, zg,
- ID,
- BaseRMosaic ,
- BMosaic ,
- umeang ,
- QPEMosaic) ;
- }
- else
- {
- sprintf ( message , "STATUS: MMosaic could not be "
- "calculated due to "
- "it is at non-top hour or "
- "DSP duration is not 60 minutes.");
- printMessage( message);
- }
-*/
- break ;
+ case p3lmosaic:
+ sprintf(message, "STATUS: P3LMosaic product is "
+ "not available for current version.");
+ hpe_fieldgen_printMessage(message);
- case mlmosaic :
+ break;
- /*
- * The mlmosaic can be calculated
- * only when the DSP duration is 60 minutes and
- * the run time is the top of the hour.
- */
+ case gaugeonly:
- sprintf ( message , "STATUS: MLMosaic product is "
- "not available for current version.");
- hpe_fieldgen_printMessage( message);
-/*
- if( isTopHour == 1 )
- {
- runMLMosaic( ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- gageSize, iug, ivg, zg,
- ID,
- BaseRMosaic ,
- LMosaic ,
- umeang ,
- QPEMosaic) ;
- }
- else
- {
- sprintf ( message , "STATUS: MLMosaic could not be "
- "calculated due to "
- "it is at non-top hour or "
- "DSP duration is not 60 minutes.");
- printMessage( message);
- }
-*/
- break ;
+ /*
+ * The gageonly can be calculated
+ * only when the DSP duration is 60 minutes and
+ * the run time is the top of the hour.
+ */
- case lsatpre :
+ sprintf(message, "STATUS: Gageonly product is "
+ "not available for current version.");
+ hpe_fieldgen_printMessage(message);
- /*
- * The lsatpre can be calculated
- * only when the DSP duration is 60 minutes and
- * the run time is the top of the hour.
- */
+ break;
- sprintf ( message , "STATUS: LSatpre product is "
- "not available for current version.");
- hpe_fieldgen_printMessage( message);
-/*
- if( isTopHour == 1 )
- {
- runLSatpre ( ptrRunDate,
- ptrGeoData,
- ptrEMPEParams,
- gageSize, iug, ivg, zg,
- BaseRMosaic,
- LSatpre,
- QPEMosaic );
- }
- else
- {
- sprintf ( message , "STATUS: LSatpre could not be "
- "calculated due to "
- "it is at non-top hour or "
- "DSP duration is not 60 minutes.");
- printMessage( message);
- }
-*/
- break ;
+ case lmosaic:
- default:
- sprintf ( message , "ERROR: Unknown mosaic type!");
- hpe_fieldgen_printMessage( message);
+ /*
+ * The lmosaic can be calculated
+ * only when the DSP duration is 60 minutes and
+ * the run time is the top of the hour.
+ */
+
+ sprintf(message, "STATUS: LMosaic product is "
+ "not available for current version.");
+ hpe_fieldgen_printMessage(message);
+
+ break;
+
+ case mmosaic:
+
+ /*
+ * The mmosaic can be calculated
+ * only when the DSP duration is 60 minutes and
+ * the run time is the top of the hour.
+ */
+
+ sprintf(message, "STATUS: MMosaic product is "
+ "not available for current version.");
+ hpe_fieldgen_printMessage(message);
+
+ break;
+
+ case mlmosaic:
+
+ /*
+ * The mlmosaic can be calculated
+ * only when the DSP duration is 60 minutes and
+ * the run time is the top of the hour.
+ */
+
+ sprintf(message, "STATUS: MLMosaic product is "
+ "not available for current version.");
+ hpe_fieldgen_printMessage(message);
+
+ break;
+
+ case lsatpre:
+
+ /*
+ * The lsatpre can be calculated
+ * only when the DSP duration is 60 minutes and
+ * the run time is the top of the hour.
+ */
+
+ sprintf(message, "STATUS: LSatpre product is "
+ "not available for current version.");
+ hpe_fieldgen_printMessage(message);
+
+ break;
+
+ default:
+ sprintf(message, "ERROR: Unknown mosaic type!");
+ hpe_fieldgen_printMessage(message);
+ break;
}
}
@@ -811,24 +638,23 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* -- gzhou 05-2007
*/
- blnOverwrite = 1 ;
- if( blnOverwrite == 0)
- {
- writeQPE(ptrRunDate, ptrEMPEParams, ptrGeoData ,
- ptrGageTable[i]->totalGageNum,
- ptrGageTableP3[i]->totalGageNum, QPEMosaic ) ;
+ blnOverwrite = 1;
+ if (blnOverwrite == 0) {
+ writeQPE(ptrRunDate, ptrEMPEParams, ptrGeoData,
+ ptrGageTable[i]->totalGageNum,
+ ptrGageTableP3[i]->totalGageNum, QPEMosaic);
}
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "%s = time end HPE Fieldgen MOSAIC generation for: %s.\n" ,
- currTime, datetime) ;
- hpe_fieldgen_printMessage( message);
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message,
+ "%s = time end HPE Fieldgen MOSAIC generation for: %s.\n",
+ currTime, datetime);
+ hpe_fieldgen_printMessage(message);
- if( isTopHour == 1 )
- {
- free1DShortArray( iug );
- free1DShortArray( ivg );
- free1DFloatArray( zg );
+ if (isTopHour == 1) {
+ free1DShortArray(iug);
+ free1DShortArray(ivg);
+ free1DFloatArray(zg);
}
/*
@@ -845,20 +671,19 @@ int hpe_fieldgen_main(int argc, const char ** argv)
* releases memory for global struct data.
*/
- hpe_fieldgen_destructor() ;
+ hpe_fieldgen_destructor();
time(&end_time);
- sprintf ( message , "STATUS: Program exit normally"
- " with elapse time: %ld second(s)",
- (end_time - start_time));
- hpe_fieldgen_printMessage( message);
+ sprintf(message, "STATUS: Program exit normally"
+ " with elapse time: %ld second(s)", (end_time - start_time));
+ hpe_fieldgen_printMessage(message);
/*
* close db connection and free memory of global variables.
*/
- hpeDeleteLogFile ( );
+ hpeDeleteLogFile();
CloseDbms();
exit(0);
diff --git a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/read_rwbiasdyn2.c b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/read_rwbiasdyn2.c
index 31999e6ea2..b8e257dcbd 100644
--- a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/read_rwbiasdyn2.c
+++ b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/read_rwbiasdyn2.c
@@ -6,48 +6,30 @@
#include "RadarLoc.h"
#define HPE_RFC_BIAS_LAG 2 // default number of bias lag hours
-
-RadarLoc * pRadarLocHead = NULL ;
+RadarLoc * pRadarLocHead = NULL;
extern int dualpol_on_flag;
-void retrieveOfficeIDByRadarID(const char * radarID,
- char * officeID,
- long int * status);
+void retrieveOfficeIDByRadarID(const char * radarID, char * officeID,
+ long int * status);
-void read_rwbiasdyn2(const char *radar_id,
- const char *office_id,
- const char * str,
- const int lag_cut,
- double *num_pairs,
- double *sumgag,
- double *sumrad,
- double *bias,
- int *lag,
- char sstr1[19],
- long int *irc);
+void read_rwbiasdyn2(const char *radar_id, const char *office_id,
+ const char * str, const int lag_cut, double *num_pairs, double *sumgag,
+ double *sumrad, double *bias, int *lag, char sstr1[19], long int *irc);
-void readRWBiasDyn(const char *radar_id,
- const char *site_id,
- const char *datehour,
- const int lag_cut,
- double *num_pairs,
- double *sumgag,
- double *sumrad,
- double *bias,
- int *lag,
- char datetime1[19],
- int dualpol_data_avail,
- long int *irc)
+void readRWBiasDyn(const char *radar_id, const char *site_id,
+ const char *datehour, const int lag_cut, double *num_pairs,
+ double *sumgag, double *sumrad, double *bias, int *lag,
+ char datetime1[19], int dualpol_data_avail, long int *irc)
{
- const char * HPE_RFC_BIAS_LAG_TOKEN = "hpe_rfc_bias_lag";
- const char * HPE_BIAS_SOURCE_TOKEN = "hpe_bias_source";
+ const char * HPE_RFC_BIAS_LAG_TOKEN = "hpe_rfc_bias_lag";
+ const char * HPE_BIAS_SOURCE_TOKEN = "hpe_bias_source";
- static int first = 1 ;
+ static int first = 1;
static int rfc_bias_lag = HPE_RFC_BIAS_LAG;
- static char bias_source[6] = "rfc"; // RFC or LOCAL, default to RFC
- char officeID[WFO_LEN + 1] = {'\0'};
- char strTokenValue[6] = {'\0'} ;
+ static char bias_source[6] = "rfc"; // RFC or LOCAL, default to RFC
+ char officeID[WFO_LEN + 1] = { '\0' };
+ char strTokenValue[6] = { '\0' };
/*
* load and store the token values:
@@ -55,138 +37,103 @@ void readRWBiasDyn(const char *radar_id,
* HPE_BIAS_SOURCE_TOKEN
*/
- if(first == 1)
- {
- if((hpe_fieldgen_getAppsDefaults(HPE_RFC_BIAS_LAG_TOKEN, strTokenValue) != -1)
- && (hpe_fieldgen_isDigits(strTokenValue) == 1))
- {
+ if (first == 1) {
+ if ((hpe_fieldgen_getAppsDefaults(HPE_RFC_BIAS_LAG_TOKEN, strTokenValue)
+ != -1) && (hpe_fieldgen_isDigits(strTokenValue) == 1)) {
int value = atoi(strTokenValue);
- if(value > 0)
- {
+
+ if (value > 0) {
rfc_bias_lag = value;
- sprintf ( message , "STATUS: token value for \"%s\" is: %d.",
- HPE_RFC_BIAS_LAG_TOKEN, rfc_bias_lag) ;
- hpe_fieldgen_printMessage( message );
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - token value for \"%s\" is: %d",
+ HPE_RFC_BIAS_LAG_TOKEN, rfc_bias_lag);
+ hpe_fieldgen_printMessage(message);
+ } else {
+ sprintf(message, "ERROR:in readRWBiasDyn - Invalid token value"
+ " for token \"%s\". Default value is set to: %d",
+ HPE_RFC_BIAS_LAG_TOKEN, HPE_RFC_BIAS_LAG);
+ hpe_fieldgen_printMessage(message);
}
- else
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\". Default it's value to: %d.",
- HPE_RFC_BIAS_LAG_TOKEN, HPE_RFC_BIAS_LAG) ;
- hpe_fieldgen_printMessage( message );
- }
- }
- else
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\". Default it's value to: %d.",
- HPE_RFC_BIAS_LAG_TOKEN, HPE_RFC_BIAS_LAG) ;
- hpe_fieldgen_printMessage( message );
+ } else {
+ sprintf(message, "ERROR:in readRWBiasDyn - Invalid token value"
+ " for token \"%s\". Default value is set to: %d",
+ HPE_RFC_BIAS_LAG_TOKEN, HPE_RFC_BIAS_LAG);
+ hpe_fieldgen_printMessage(message);
}
- if(hpe_fieldgen_getAppsDefaults(HPE_BIAS_SOURCE_TOKEN, strTokenValue) != -1)
- {
- if(strcmp(hpe_fieldgen_toLowerCase(strTokenValue), "local") == 0)
- {
+ if (hpe_fieldgen_getAppsDefaults(HPE_BIAS_SOURCE_TOKEN, strTokenValue)
+ != -1) {
+ if (strcmp(hpe_fieldgen_toLowerCase(strTokenValue), "local") == 0) {
strcpy(bias_source, "local");
- sprintf ( message , "STATUS: token value for \"%s\" is: %s.",
- HPE_BIAS_SOURCE_TOKEN, bias_source) ;
- hpe_fieldgen_printMessage( message );
- }
- else if(strcmp(hpe_fieldgen_toLowerCase(strTokenValue), "rfc") == 0)
- {
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - token value for \"%s\" is: %s",
+ HPE_BIAS_SOURCE_TOKEN, bias_source);
+ hpe_fieldgen_printMessage(message);
+ } else if (strcmp(hpe_fieldgen_toLowerCase(strTokenValue), "rfc")
+ == 0) {
strcpy(bias_source, "rfc");
- sprintf ( message , "STATUS: token value for \"%s\" is: %s.",
- HPE_BIAS_SOURCE_TOKEN, bias_source) ;
- hpe_fieldgen_printMessage( message );
-
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - token value for \"%s\" is: %s",
+ HPE_BIAS_SOURCE_TOKEN, bias_source);
+ hpe_fieldgen_printMessage(message);
}
-
- }
- else
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".",
- HPE_BIAS_SOURCE_TOKEN) ;
- hpe_fieldgen_printMessage( message );
+ } else {
+ sprintf(message, "ERROR:in readRWBiasDyn - Invalid token value"
+ " for token \"%s\". Default value is set to: rfc",
+ HPE_BIAS_SOURCE_TOKEN);
+ hpe_fieldgen_printMessage(message);
}
first = 0;
}
-
+
/*
* if the bias source is LOCAL,
* pick up bias value based on the FXA_LOCAL_SITE
*/
- if(strcmp(bias_source, "local") == 0)
+ if (strcmp(bias_source, "local") == 0) /*for LOCAL MFB */
{
- sprintf ( message , "STATUS: in readRWBiasDyn,loading bias value based on FXA_LOCAL_SITE.") ;
- hpe_fieldgen_printMessage( message );
-
- if (dualpol_on_flag == 0)
- {
- read_rwbiasdyn2(radar_id, site_id, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
-
- sprintf (message, " STATUS:in readRWBiasDyn, dualpol_on_flag is NO, loading bias value from RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
- }
- else
- {
- sprintf (message, "STATUS: in readRWBiasDyn, dualpol_on_flag is YES, loading bias value from DAABiasDyn table");
- hpe_fieldgen_printMessage( message );
-
- read_daabiasdyn(radar_id, site_id, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- if (*irc != 0)
- {
- read_rwbiasdyn2(radar_id, site_id, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
-
- sprintf(message, "STATUS: in readRWBiasDyn, dualpol_on_flag is YES. Fail to load bias value from DAABiasDyn table. Try RWBiasDyn table");
- hpe_fieldgen_printMessage( message );
- }
- else
- {
- if (dualpol_data_avail == 0)
- {
- read_rwbiasdyn2(radar_id, site_id, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
-
- sprintf( message, "STATUS: in readRWBiasDyn, bias value is found in DAABiasDyn table.But dualpol raw data is not available. "
- "Try RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
- }
- else
- {
- sprintf( message, "STATUS: in readRWBiasDyn, bias value is found in DAABiasDyn table. Dualpol raw data is available.");
- hpe_fieldgen_printMessage( message );
- }
- }
- }
- }
- else
+ if (dualpol_on_flag == 0) {
+ sprintf(message,
+ " STATUS:in readRWBiasDyn - Loading SP LOCAL MFB bias from RWBiasDyn "
+ "table for siteID (token fxa_local_site) = %s, lag time = %d",
+ site_id, lag_cut);
+ hpe_fieldgen_printMessage(message);
+
+ read_rwbiasdyn2(radar_id, site_id, datehour, lag_cut, num_pairs,
+ sumgag, sumrad, bias, lag, datetime1, irc);
+ } else {
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - Loading DP LOCAL MFB bias from DAABiasDyn "
+ "table for siteID (token fxa_local_site) = %s, lag time = %d",
+ site_id, lag_cut);
+ hpe_fieldgen_printMessage(message);
+
+ read_daabiasdyn(radar_id, site_id, datehour, lag_cut, num_pairs,
+ sumgag, sumrad, bias, lag, datetime1, irc);
+ }
+ } else /* for RFC MFB */
{
/*
* retrieve the office ID from RadarLoc table
*/
-
+
retrieveOfficeIDByRadarID(radar_id, officeID, irc);
-
- if(*irc == -1)
- {
- sprintf ( message, "ERROR: could not find office ID for radar: %s",
- radar_id);
- shutdown( message );
+
+ if (*irc == -1) {
+ sprintf(message,
+ "ERROR:in readRWBiasDyn - could not find office ID for radar: %s",
+ radar_id);
+ shutdown(message);
}
-
+
+ sprintf(message, "STATUS:in readRWBiasDyn - officeID = %s, siteID = %s",
+ officeID, site_id);
+ hpe_fieldgen_printMessage(message);
+
/*
* Pick up the bias value based on the radar's office ID.
* If there is no record found, check if the office ID is
@@ -194,345 +141,215 @@ void readRWBiasDyn(const char *radar_id,
* FXA_LOCAL_SITE as office ID to pick up the bias value again.
*/
- if(strcmp(officeID, site_id) != 0)
- {
+ if (strcmp(officeID, site_id) != 0) {
/*
* if the office ID != FXA_LOCAL_SITE,
* then use the HPE_RFC_BIAS_LAG_TOKEN value
* to pick up the bias value.
*/
+ if (dualpol_on_flag == 0) {
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - start to load SP RFC MFB from RWBiasDyn table"
+ " for officeID = %s, lag time = %d", officeID,
+ rfc_bias_lag);
+ hpe_fieldgen_printMessage(message);
- sprintf ( message , "STATUS: loading bias value based on"
- " %s and lag time: %d",
- officeID, rfc_bias_lag) ;
- hpe_fieldgen_printMessage( message );
-
- if (dualpol_on_flag == 0)
- {
- read_rwbiasdyn2(radar_id, officeID, datehour,
- rfc_bias_lag, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- sprintf (message, "STATUS: in readRWBiasDyn, dualpol_on_flag is NO, loading bias value from RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
-
- }
- else
- {
- sprintf (message, "STATUS: in readRWBiasDyn, dualpol_on_flag is YES, loading bias value from DAABiasDyn table");
- hpe_fieldgen_printMessage( message );
-
- read_daabiasdyn(radar_id, officeID, datehour,
- rfc_bias_lag, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
-
- if (*irc != 0)
- {
- read_rwbiasdyn2(radar_id, officeID, datehour,
- rfc_bias_lag, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- sprintf(message, "STATUS: in readRWBiasDyn, Fail to load bias value from DAABiasDyn table. Try RWBiasDyn table");
- hpe_fieldgen_printMessage( message );
+ read_rwbiasdyn2(radar_id, officeID, datehour, rfc_bias_lag,
+ num_pairs, sumgag, sumrad, bias, lag, datetime1, irc);
+ if (*irc != 0) {
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - can not load SP RFC MFB bias from RWBiasDyn"
+ " table for officeID = %s. Loading SP LOCAL MFB for siteID = %s, lag time = %d",
+ officeID, site_id, lag_cut);
+ hpe_fieldgen_printMessage(message);
+
+ read_rwbiasdyn2(radar_id, site_id, datehour, lag_cut,
+ num_pairs, sumgag, sumrad, bias, lag, datetime1,
+ irc);
+ } else {
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - Loading SP RFC MFB bias from RWBiasDyn "
+ "table for officeID = %s, lag time = %d",
+ officeID, rfc_bias_lag);
+ hpe_fieldgen_printMessage(message);
+ }
+ } else {
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - start to load DP RFC MFB from DAABiasDyn table"
+ " for officeID = %s, lag time = %d", officeID,
+ rfc_bias_lag);
+ hpe_fieldgen_printMessage(message);
+
+ read_daabiasdyn(radar_id, officeID, datehour, rfc_bias_lag,
+ num_pairs, sumgag, sumrad, bias, lag, datetime1, irc);
+ if (*irc != 0) {
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - can not load DP RFC MFB from DAABiasDyn table"
+ " for officeID = %s. Loading DP LOCAL MFB for siteID = %s, lag time = %d",
+ officeID, site_id, lag_cut);
+ hpe_fieldgen_printMessage(message);
+
+ read_daabiasdyn(radar_id, site_id, datehour, lag_cut,
+ num_pairs, sumgag, sumrad, bias, lag, datetime1,
+ irc);
+ } else {
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - Loading DP RFC MFB bias from DAABiasDyn table"
+ " for officeID = %s, lag time = %d",
+ officeID, rfc_bias_lag);
+ hpe_fieldgen_printMessage(message);
}
- else
- {
- if (dualpol_data_avail == 0)
- {
- read_rwbiasdyn2(radar_id, officeID, datehour,
- rfc_bias_lag, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- sprintf( message, "STATUS: in readRWBiasDyn, bias value is found in DAABiasDyn table.But dualpol data is not available. "
- "Try RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
- }
- else
- {
- sprintf( message, "STATUS: in readRWBiasDyn, bias value is found in DAABiasDyn table. Dualpol data is available.");
- hpe_fieldgen_printMessage( message );
- }
- }
}
- }
- else
- {
- sprintf ( message , "STATUS: in readRWBiasDyn, loading bias value based on"
- " %s and lag time: %d",
- officeID, lag_cut) ;
- hpe_fieldgen_printMessage( message );
-
- if (dualpol_on_flag == 0)
- {
- read_rwbiasdyn2(radar_id, officeID, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- sprintf (message, "STATUS: in readRWBiasDyn, dualpol_on_flag is NO. Loading bias value from RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
- }
- else
- {
- sprintf (message, "STATUS: in readRWBiasDyn, dualpol_on_flag is YES. Loading bias value from DAABiasDyn table");
- hpe_fieldgen_printMessage( message );
-
- read_daabiasdyn(radar_id, officeID, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- if (*irc != 0)
- {
- sprintf(message, "STATUS: in readRWBiasDyn, faild to load bias value from DAABiasDyn table. Try RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
-
- read_rwbiasdyn2(radar_id, officeID, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
-
- }
- else
- {
- if (dualpol_data_avail == 0)
- {
- read_rwbiasdyn2(radar_id, officeID, datehour,
- rfc_bias_lag, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- sprintf( message, "STATUS: in readRWBiasDyn, bias value is found in DAABiasDyn table.But dualpol data is not available. "
- "Try RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
- }
- else
- {
- sprintf(message, "STATUS: in readRWBiasDyn, bias value is found in DAABiasDyn table. Dualpol data is available.");
- hpe_fieldgen_printMessage( message );
- }
- }
- }
+ } else {
+ if (dualpol_on_flag == 0) {
+ read_rwbiasdyn2(radar_id, officeID, datehour, lag_cut,
+ num_pairs, sumgag, sumrad, bias, lag, datetime1, irc);
- }
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - Loading SP RFC MFB bias from RWBiasDyn table"
+ " for officeID(siteID) = %s, lag time = %d",
+ officeID, lag_cut);
+ hpe_fieldgen_printMessage(message);
+ } else {
+ read_daabiasdyn(radar_id, officeID, datehour, lag_cut,
+ num_pairs, sumgag, sumrad, bias, lag, datetime1, irc);
- /*
- * Record not found in RWBiasDyn table based on office ID.
- * try to pick up bias value based on the FXA_LOCAL_SITE
- * if it is different from office ID.
- */
-
- if(*irc == 100)
- {
-
- if(strcmp(officeID, site_id) != 0)
- {
- sprintf ( message , "STATUS: in readRWBiasDyn,Record not found in"
- " RWBiasDyn table based on %s."
- " try to pick up the bias value"
- " based on the %s",
- officeID, site_id) ;
- hpe_fieldgen_printMessage( message );
-
- if (dualpol_on_flag == 0)
- {
- read_rwbiasdyn2(radar_id, site_id, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- sprintf (message, "STATUS: in readRWBiasDyn, dualpol_on_flag is NO. Loading bias value from RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
- }
- else
- {
- sprintf (message, "STATUS: in readRWBiasDyn, dualpol_on_flag is YES. Loading bias value from DAABiasDyn table.");
- hpe_fieldgen_printMessage( message );
-
- read_daabiasdyn(radar_id, site_id, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- if (*irc != 0)
- {
- sprintf(message, "STATUS: in readRWBiasDyn, faild to find bias value in DAABiasDyn table. Try RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
- read_rwbiasdyn2(radar_id, site_id, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
- }
- else
- {
- if (dualpol_data_avail == 0)
- {
- read_rwbiasdyn2(radar_id, site_id, datehour,
- lag_cut, num_pairs, sumgag,
- sumrad, bias, lag, datetime1, irc) ;
-
- sprintf( message, "STATUS: in readRWBiasDyn, bias value is found in DAABiasDyn table.But dualpol data is not available. "
- "Try RWBiasDyn table.");
- hpe_fieldgen_printMessage( message );
- }
- else
- {
- sprintf(message, "STATUS: in readRWBiasDyn, bias value is found in DAABiasDyn table. Dualpol data is available.s");
- hpe_fieldgen_printMessage( message );
- }
- }
- }
+ sprintf(message,
+ "STATUS:in readRWBiasDyn - Loading DP RFC MFB bias from DAABiasDyn table "
+ "for officeID(siteID) = %s, lag time = %d",
+ officeID, lag_cut);
+ hpe_fieldgen_printMessage(message);
}
}
}
}
-void read_rwbiasdyn2(const char *radar_id,
- const char *office_id,
- const char * str,
- const int lag_cut,
- double *num_pairs,
- double *sumgag,
- double *sumrad,
- double *bias,
- int *lag,
- char sstr1[19],
- long int *irc)
+void read_rwbiasdyn2(const char *radar_id, const char *office_id,
+ const char * str, const int lag_cut, double *num_pairs, double *sumgag,
+ double *sumrad, double *bias, int *lag, char sstr1[19], long int *irc)
/*
- this function reads records from the RWBiasDyn table for previous hours
- these records contain the state variables used in the bias calculations
- each previous hour up to lag_cut hours is searched to find records in the
- table if no records is found, then state variables are reinitialized
+ this function reads records from the RWBiasDyn table for previous hours
+ these records contain the state variables used in the bias calculations
+ each previous hour up to lag_cut hours is searched to find records in the
+ table if no records is found, then state variables are reinitialized
- calling function: mfb_subr
-*/
+ calling function: mfb_subr
+ */
{
- int j, irec, ctr;
- RWBiasDyn *bdHead = NULL;
- RWBiasDyn *bdPtr = NULL;
- char rrad[4] = {'\0'};
- char strp[22] = {'\0'};
- char dude[22] = {'\0'};
- char where[BUFSIZ] = {'\0'};
- char obstime_ANSI[ANSI_TIME_LEN+1] = {'\0'};
- time_t firstTime = 0;
+ int j, irec, ctr;
+ RWBiasDyn *bdHead = NULL;
+ RWBiasDyn *bdPtr = NULL;
+ char rrad[4] = { '\0' };
+ char strp[22] = { '\0' };
+ char dude[22] = { '\0' };
+ char where[BUFSIZ] = { '\0' };
+ char obstime_ANSI[ANSI_TIME_LEN + 1] = { '\0' };
+ time_t firstTime = 0;
- strncpy(rrad, radar_id, 3);
- strncpy(dude, str, 19);
+ strncpy(rrad, radar_id, 3);
+ strncpy(dude, str, 19);
- yearsec_ansi_to_timet(dude, &firstTime);
-
- /*------------------------------------------------*/
- /* subtract 1 hour and attempt to select record */
- /*------------------------------------------------*/
+ yearsec_ansi_to_timet(dude, &firstTime);
- *irc = -1;
- for(j = 0; j < lag_cut; j ++)
- {
+ /*------------------------------------------------*/
+ /* subtract 1 hour and attempt to select record */
+ /*------------------------------------------------*/
+
+ *irc = -1;
+ for (j = 0; j < lag_cut; j++) {
firstTime -= SECONDS_PER_HOUR;
timet_to_yearsec_ansi(firstTime, strp);
strncpy(sstr1, strp, 19);
irec = 0;
- *lag = j+1;
+ *lag = j + 1;
/*------------------------------------------*/
/* select records for all mem_span values */
/*------------------------------------------*/
-
+
timet_to_yearsec_ansi(firstTime, obstime_ANSI);
sprintf(where, " WHERE radid='%s' AND obstime='%s' AND "
- " office_id = '%s'",
- rrad, obstime_ANSI, office_id);
+ " office_id = '%s'", rrad, obstime_ANSI, office_id);
bdHead = GetRWBiasDyn(where);
- if (bdHead)
- {
- bdPtr = (RWBiasDyn *) ListFirst(&bdHead->list);
+ if (bdHead) {
+ bdPtr = (RWBiasDyn *) ListFirst(&bdHead->list);
ctr = 0;
- while (bdPtr)
- {
- num_pairs[ctr] = (double)bdPtr->numpairs;
- sumgag[ctr] = (double)bdPtr->sumgag;
- sumrad[ctr] = (double)bdPtr->sumrad;
- bias[ctr] = (double)bdPtr->bias;
-
+ while (bdPtr) {
+ num_pairs[ctr] = (double) bdPtr->numpairs;
+ sumgag[ctr] = (double) bdPtr->sumgag;
+ sumrad[ctr] = (double) bdPtr->sumrad;
+ bias[ctr] = (double) bdPtr->bias;
+
ctr++;
bdPtr = (RWBiasDyn *) ListNext(&bdPtr->node);
}
- if ( bdHead != NULL )
- {
+ if (bdHead != NULL) {
FreeRWBiasDyn(bdHead);
- bdHead = NULL ;
+ bdHead = NULL;
}
- if (ctr > 0)
- {
+ if (ctr > 0) {
*irc = 0;
break;
}
- }
- else
- {
+ } else {
*irc = 100;
}
- } /* end for (j=0 ... */
+ } /* end for (j=0 ... */
- return ;
+ return;
-} /* end read_rwbiasdyn2 function */
+} /* end read_rwbiasdyn2 function */
+void retrieveOfficeIDByRadarID(const char * radarID, char * officeID,
+ long int * status) {
+ char where_clause[BUFSIZ] = { '\0' };
+ RadarLoc * pRadarLocNode = NULL;
-void retrieveOfficeIDByRadarID(const char * radarID,
- char * officeID,
- long int * status)
-{
- char where_clause [ BUFSIZ ] = {'\0'};
- RadarLoc * pRadarLocNode = NULL ;
-
- *status = 0 ;
+ *status = 0;
strcpy(officeID, "");
- sprintf ( where_clause, " ");
+ sprintf(where_clause, " ");
- if(pRadarLocHead == NULL)
- {
- pRadarLocHead = GetRadarLoc ( where_clause ) ;
+ if (pRadarLocHead == NULL) {
+ pRadarLocHead = GetRadarLoc(where_clause);
}
- if ( pRadarLocHead != NULL )
- {
- pRadarLocNode = ( RadarLoc * ) ListFirst (&pRadarLocHead->list);
+ if (pRadarLocHead != NULL) {
+ pRadarLocNode = (RadarLoc *) ListFirst(&pRadarLocHead->list);
- while (pRadarLocNode != NULL)
- {
- if(strcmp(pRadarLocNode->radid, radarID) == 0)
- {
+ while (pRadarLocNode != NULL) {
+ if (strcmp(pRadarLocNode->radid, radarID) == 0) {
strcpy(officeID, pRadarLocNode->office_id);
- sprintf ( message , "From RadarLoc table, Radar ID: %s, Office ID: %s",
- radarID, officeID );
- hpe_fieldgen_printMessage( message);
+ sprintf(message,
+ "STATUS:in retrieveOfficeIDByRadarID - From RadarLoc table, Radar ID: %s, Office ID: %s",
+ radarID, officeID);
+ hpe_fieldgen_printMessage(message);
break;
- }
- else
- {
+ } else {
pRadarLocNode = (RadarLoc *) ListNext(&pRadarLocNode->node);
}
}
- }
- else
- {
- * status = -1 ;
+ } else {
+ *status = -1;
}
- return ;
+ return;
}
-
-void freeRadarLocMemory()
-{
+void freeRadarLocMemory() {
/* Deallocate the RadarLoc linked list. */
- if ( pRadarLocHead != NULL )
- {
- FreeRadarLoc ( pRadarLocHead ) ;
- pRadarLocHead = NULL ;
+ if (pRadarLocHead != NULL) {
+ FreeRadarLoc(pRadarLocHead);
+ pRadarLocHead = NULL;
}
-
-/* ============== Statements containing RCS keywords: */
-{static char rcs_id1[] = "$Source: /fs/hseb/ob83/ohd/pproc/src/hpe_fieldgen/RCS/read_rwbiasdyn2.c,v $";
- static char rcs_id2[] = "$Id: read_rwbiasdyn2.c,v 1.2 2007/10/30 13:33:13 gzhou Exp $";}
-/* =================================================== */
-
}
diff --git a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/run_dhrmosaic.c b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/run_dhrmosaic.c
index e72cf4728d..fcb5110d89 100644
--- a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/run_dhrmosaic.c
+++ b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/run_dhrmosaic.c
@@ -1,89 +1,90 @@
/***********************************************************************
-* Filename: run_dhrmosaic.c
-*
-* Original Author: Guoxian Zhou
-*
-* File Creation Date: 08/13/2006
-*
-* Development Group: HSEB/OHD
-*
-* Description:
-* compute the raw DHR mosaic data
-*
-* Modules:
-* runDHRMosaic
-*
-***********************************************************************/
+ * Filename: run_dhrmosaic.c
+ *
+ * Original Author: Guoxian Zhou
+ *
+ * File Creation Date: 08/13/2006
+ *
+ * Development Group: HSEB/OHD
+ *
+ * Description:
+ * compute the raw DHR mosaic data
+ *
+ * Modules:
+ * runDHRMosaic
+ *
+ ***********************************************************************/
/* Include files, definitions, globals go here. */
#include "empe_fieldgen.h"
/***********************************************************************
-* Module Name: createDHRMosaic
-*
-* Original Author: Guoxian Zhou
-*
-* Module Creation Date: 08/13/2006
-*
-* Description:
-* This function computes the raw DHR mosaic data.
-*
-* calling function: main_empe_fieldgen
-* functions called: readRadarResult ,
-* readDHRData, readMisc,
-* createDHRMosaic, writeArray
-*
-* Calling Arguments:
-* Name Input/Output Type Description
-*
-* pRunDate Input run_date_struct* date/time
-* pGeoData Input geo_data_struct* global HRAP lowerleft-corner
-* bin and dimension and dimension
-* of the RFC estimation domain
-* pMPEParams Input mpe_params_struct* static parameters
-* pRadarLocRecord Input radarLoc_table_struct* info from radarLoc table
-* DHRMosaic Output double ** the DHR radar mosaic product
-* QPEMosaic Output double ** the mosaic of radars
-* for best estimate
-*
-*
-* Required
-* None
-*
-* Required Files/Databases:
-* None
-*
-* Non System Routines Called:
-*
-*
-* Return Value:
-* Type Description
-* None
-*
-* Error Codes/Exceptions:
-*
-*
-* OS Specific Assumptions:
-* None
-*
-* Local Variables:
-* Name Type Description
-*
-* Modification History:
-* Date Developer Action
-* 8/13/2006 Guoxian Zhou Build operational version
-* 07/2013 Jingtao Deng Modify for adding dual pol producat DPR
-* first try to find the DPR product from dprradar
-* table and calculate the rain rate. if
-* not able to get DPR product, then use DHR product
-* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
-***********************************************************************/
+ * Module Name: createDHRMosaic
+ *
+ * Original Author: Guoxian Zhou
+ *
+ * Module Creation Date: 08/13/2006
+ *
+ * Description:
+ * This function computes the raw DHR mosaic data.
+ *
+ * calling function: main_empe_fieldgen
+ * functions called: readRadarResult ,
+ * readDHRData, readMisc,
+ * createDHRMosaic, writeArray
+ *
+ * Calling Arguments:
+ * Name Input/Output Type Description
+ *
+ * pRunDate Input run_date_struct* date/time
+ * pGeoData Input geo_data_struct* global HRAP lowerleft-corner
+ * bin and dimension and dimension
+ * of the RFC estimation domain
+ * pMPEParams Input mpe_params_struct* static parameters
+ * pRadarLocRecord Input radarLoc_table_struct* info from radarLoc table
+ * DHRMosaic Output double ** the DHR radar mosaic product
+ * QPEMosaic Output double ** the mosaic of radars
+ * for best estimate
+ *
+ *
+ * Required
+ * None
+ *
+ * Required Files/Databases:
+ * None
+ *
+ * Non System Routines Called:
+ *
+ *
+ * Return Value:
+ * Type Description
+ * None
+ *
+ * Error Codes/Exceptions:
+ *
+ *
+ * OS Specific Assumptions:
+ * None
+ *
+ * Local Variables:
+ * Name Type Description
+ *
+ * Modification History:
+ * Date Developer Action
+ * 8/13/2006 Guoxian Zhou Build operational version
+ * 07/2013 Jingtao Deng Modify for adding dual pol producat DPR
+ * first try to find the DPR product from dprradar
+ * table and calculate the rain rate. if
+ * not able to get DPR product, then use DHR product
+ * 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
+ * 09/2015 JingtaoD A2 OB16.2.1 DR#17860 - HPE DualPol Mean field bias
+ ***********************************************************************/
-extern short ** radarMiscBins ;
+extern short ** radarMiscBins;
-static double ** tempID = NULL;
-static double ** DHRHeight = NULL ;
+static double ** tempID = NULL;
+static double ** DHRHeight = NULL;
static float ** origRadar = NULL;
static short ** hrapMiscBins = NULL;
@@ -94,30 +95,25 @@ extern int dualpol_used;
extern int dualpol_on_flag;
static void initMosaicArray(const geo_data_struct * pGeoData,
- const int grid_rows,
- const int grid_cols) ;
+ const int grid_rows, const int grid_cols);
static void freeMosaicArray(const geo_data_struct * pGeoData,
- const int grid_rows) ;
+ const int grid_rows);
void runDHRMosaic(const run_date_struct * pRunDate,
- const geo_data_struct * pGeoData,
- empe_params_struct * pEMPEParams,
- const radarLoc_table_struct * pRadarLocTable ,
- double * meanFieldBias,
- double ** RadarBeamHeight,
- int ** ID,
- double ** Mosaic,
- double ** QPEMosaic)
-{
- const int rowSize = pGeoData->num_rows ;
- const int colSize = pGeoData->num_cols ;
- const int replace_missing = 0 ;
+ const geo_data_struct * pGeoData, empe_params_struct * pEMPEParams,
+ const radarLoc_table_struct * pRadarLocTable,
+ const gage_table_struct * pGageTable, double * meanFieldBias,
+ double ** RadarBeamHeight, int ** ID, double ** Mosaic,
+ double ** QPEMosaic) {
+ const int rowSize = pGeoData->num_rows;
+ const int colSize = pGeoData->num_cols;
+ const int replace_missing = 0;
const char * MOSAIC_DIR_TOKEN = "hpe_dhrmosaic_dir";
const char * SAVE_HEIGHT_TOKEN = "hpe_save_dhrheight";
const char * HEIGHT_DIR_TOKEN = "hpe_dhrheight_dir";
- const char * SAVE_INDEX_TOKEN = "hpe_save_dhrindex";
- const char * INDEX_DIR_TOKEN = "hpe_dhrindex_dir";
+ const char * SAVE_INDEX_TOKEN = "hpe_save_dhrindex";
+ const char * INDEX_DIR_TOKEN = "hpe_dhrindex_dir";
const char * SAVE_GRIB_TOKEN = "dhrmosaic_save_grib";
@@ -131,24 +127,25 @@ void runDHRMosaic(const run_date_struct * pRunDate,
const char * SAVE_JPEG_TOKEN = "dhrmosaic_save_jpeg";
- char saveflag[TOKEN_LEN]= {'\0'};
+ char saveflag[TOKEN_LEN] = { '\0' };
- const int RADAR_ROWS = NUM_DPA_ROWS * pEMPEParams->hrap_grid_factor ;
- const int RADAR_COLS = NUM_DPA_COLS * pEMPEParams->hrap_grid_factor ;
+ const int RADAR_ROWS = NUM_DPA_ROWS * pEMPEParams->hrap_grid_factor;
+ const int RADAR_COLS = NUM_DPA_COLS * pEMPEParams->hrap_grid_factor;
- static char datetime[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- static char datehour[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- static char strDateTime[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- static char prdDateTime[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- static char radarID[ RADAR_ID_LEN + 1] = {'\0'} ;
- register int i, j, k;
+ static char datetime[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ static char datehour[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ static char strDateTime[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ static char prdDateTime[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ static char radarID[RADAR_ID_LEN + 1] = { '\0' };
+ register int i, j, k;
- long int irc ;
+ long int irc;
+ register int year, month, day, hour;
int radarAvailFlag = 0;
- int dp_ignoreRadarFlag = 0;
- int sp_ignoreRadarFlag = 0;
- register int year, month, day, hour;
+ int dp_blnEditBias, sp_blnEditBias;
+ double dp_editBiasValue, sp_editBiasValue;
+ int dp_ignoreRadarFlag, sp_ignoreRadarFlag;
static char fileName[PATH_LEN] = { '\0' };
static char dhrmosaic_fileName[PRESET_DESCR_LEN] = { '\0' };
@@ -161,369 +158,308 @@ void runDHRMosaic(const run_date_struct * pRunDate,
short pps_radar_count = 0, dp_radar_count = 0;
int index;
-
- int dualpol_meanbias_flag[MAX_RADAR_NUM];
- int sp_meanbias_flag[MAX_RADAR_NUM];
+ double meanBias = 0.0;
+ double memSpanBias;
+ int gageRadarPairNum = 0; /* number of positive gage/radar pairs */
+ int dualpol_meanbias_flag[MAX_RADAR_NUM];
+ int sp_meanbias_flag[MAX_RADAR_NUM];
int dualpol_data_avail[MAX_RADAR_NUM];
int nobias_flag;
/* for DHR product, there is no bias applied */
nobias_flag = 1;
-
- /* initialize no dualpol MFB and no dual pol product avialble for each radar */
- for (i = 0; i < MAX_RADAR_NUM; i++)
- {
- dualpol_meanbias_flag[i] = 0;
- sp_meanbias_flag[i] = 0;
- dualpol_data_avail[i] = 0;
- }
-
- pEMPEParams->radar_avail_num = 0 ;
+ /* initialize no dualpol MFB and no dual pol product available for each radar */
+ for (i = 0; i < MAX_RADAR_NUM; i++) {
+ dualpol_meanbias_flag[i] = 0;
+ sp_meanbias_flag[i] = 0;
+ dualpol_data_avail[i] = 0;
+ }
+
+ pEMPEParams->radar_avail_num = 0;
/*
* Allocates memory for data arrays
* based on the geo grid size data.
*/
- initMosaicArray(pGeoData, RADAR_ROWS, RADAR_COLS) ;
+ initMosaicArray(pGeoData, RADAR_ROWS, RADAR_COLS);
/*
* strDateTime string should be in format: yyyymmddHHMM
*/
- pRunTime = gmtime(&(pRunDate->tRunTime)) ;
- strftime ( datetime, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y-%m-%d %H:%M:00", pRunTime ) ;
- strftime ( datehour, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y-%m-%d %H:00:00", pRunTime ) ;
- strftime(strDateTime, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y%m%d%H%M", pRunTime);
- strftime(prdDateTime, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y-%m-%d %H:%M:%S", pRunTime);
+ pRunTime = gmtime(&(pRunDate->tRunTime));
+ strftime(datetime, ANSI_YEARSEC_TIME_LEN + 1, "%Y-%m-%d %H:%M:00",
+ pRunTime);
+ strftime(datehour, ANSI_YEARSEC_TIME_LEN + 1, "%Y-%m-%d %H:00:00",
+ pRunTime);
+ strftime(strDateTime, ANSI_YEARSEC_TIME_LEN + 1, "%Y%m%d%H%M", pRunTime);
+ strftime(prdDateTime, ANSI_YEARSEC_TIME_LEN + 1, "%Y-%m-%d %H:%M:%S",
+ pRunTime);
year = pRunTime->tm_year + 1900;
month = pRunTime->tm_mon + 1;
day = pRunTime->tm_mday;
hour = pRunTime->tm_hour;
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "%s = time begin DHRMOSAIC calculation." ,
- currTime) ;
- hpe_fieldgen_printMessage( message );
-
- sprintf ( message , "STATUS: In DHRMOSAIC - Dual pol product flag is %d.", dualpol_on_flag) ;
- printLogMessage( message );
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time begin DHRMOSAIC calculation.", currTime);
+ hpe_fieldgen_printMessage(message);
radar_result_struct * pRadarResult = NULL;
- pRadarResult = (radar_result_struct *) malloc(pRadarLocTable->radarNum
- * sizeof(radar_result_struct));
- if (pRadarResult == NULL)
- {
+ pRadarResult = (radar_result_struct *) malloc(
+ pRadarLocTable->radarNum * sizeof(radar_result_struct));
+ if (pRadarResult == NULL) {
sprintf(message, "ERROR: memory allocation failure"
- " in runDHRMosaic function."
- "\n\tProgram exit.") ;
+ " in runDHRMosaic function."
+ "\n\tProgram exit.");
shutdown(message);
}
- /* for dual pol proudcts which use daaradarresult table */
+ /* for dual pol proudcts which use daaradarresult table */
radar_result_struct * pDAARadarResult = NULL;
-
- pDAARadarResult = (radar_result_struct *)
- malloc(pRadarLocTable->radarNum * sizeof(radar_result_struct));
- if(pDAARadarResult == NULL)
- {
- sprintf ( message , "ERROR: memory allocation failure"
- " in runDHRMosaic function."
- "\n\tProgram exit.") ;
- shutdown( message );
+
+ pDAARadarResult = (radar_result_struct *) malloc(
+ pRadarLocTable->radarNum * sizeof(radar_result_struct));
+ if (pDAARadarResult == NULL) {
+ sprintf(message, "ERROR: memory allocation failure"
+ " in runDHRMosaic function."
+ "\n\tProgram exit.");
+ shutdown(message);
}
- for(i = 0; i < pRadarLocTable->radarNum; i++ )
- {
- memset(pRadarResult[i].radID, '\0', RADAR_ID_LEN + 1) ;
+ for (i = 0; i < pRadarLocTable->radarNum; i++) {
+ memset(pRadarResult[i].radID, '\0', RADAR_ID_LEN + 1);
pRadarResult[i].ignore_radar = 0;
- memset(pDAARadarResult[i].radID, '\0', RADAR_ID_LEN + 1) ;
- pDAARadarResult[i].ignore_radar = 0;
+ pRadarResult[i].edit_bias = 0;
+ pRadarResult[i].bias = 0.0;
+ memset(pDAARadarResult[i].radID, '\0', RADAR_ID_LEN + 1);
+ pDAARadarResult[i].ignore_radar = 0;
+ pDAARadarResult[i].edit_bias = 0;
+ pDAARadarResult[i].bias = 0.0;
}
/*
- * Read the ignore radar flag
- * from RWRadarResult table
+ * Read from RWRadarResult table for SinglePol or DAARadarResult table for DualPol
*/
- /* when dualpol_on_flag is set as zero, no any dual pol products will be used even
- though they are available. Only single pol radar producats are used. This keeps the old
- functionality */
-
- if (dualpol_on_flag == 0)
- {
- readRadarResult(datetime, pRadarResult, &pps_radar_count,sp_meanbias_flag, &irc) ;
- if (irc < 0)
- {
- sprintf(message, "ERROR: in runDHRMosaic - Database error #%ld attempting to "
- "select record from RWRadarResult table.", irc) ;
- printLogMessage(message);
- }
+ if (dualpol_on_flag == 0) {
+ readRadarResult(datetime, pRadarResult, &pps_radar_count,
+ sp_meanbias_flag, &irc);
+ if (irc < 0) {
+ sprintf(message,
+ "ERROR:in runDHRMosaic - Database error #%ld attempting to "
+ "select record from RWRadarResult table.", irc);
+ printLogMessage(message);
+ }
+ } else {
+ readDAARadarResult(datehour, pDAARadarResult, &dp_radar_count,
+ dualpol_meanbias_flag, &irc); /* for dual pol */
+
+ if (irc < 0) {
+ sprintf(message,
+ "ERROR:in runDHRMosaic - Database error #%ld attempting to "
+ "select record from DAARadarResult table.", irc);
+ hpe_fieldgen_printMessage(message);
+ }
}
- /* Able to use dual pol products if available for this radar, if not available for this radar, use the single
- pol product */
- else
- {
- readDAARadarResult (datehour, pDAARadarResult, &dp_radar_count, dualpol_meanbias_flag, &irc) ; /* for dual pol */
-
- if (irc < 0 || dp_radar_count <= 0)
- {
- if (irc < 0)
- {
- sprintf ( message , "ERROR: in runDHRMosaic - Database error #%ld attempting to "
- "select record from DAARadarResult table. Try RWRadarResult table.", irc) ;
- hpe_fieldgen_printMessage( message );
- }
-
- else if (dp_radar_count <= 0)
- {
- sprintf ( message , "STATUS: in runDHRMosaic - No data found for radar "
- "from DAARadarResult table, then select data from RWRadarResult table.") ;
- hpe_fieldgen_printMessage( message );
- }
- }
-
- readRadarResult (datehour, pRadarResult, &pps_radar_count, sp_meanbias_flag, &irc) ; /* for single pol */
- if (irc < 0)
- {
- sprintf ( message , "ERROR: in runDHRMosaic - Database error #%ld attempting to "
- "select record from RWRadarResult table.", irc) ;
- printLogMessage( message );
- }
- }
/*
* Read the misbin information if the token hpe_load_misbin is ON,
* otherwise the misbin will be default value(1).
- * Do this only once per EMPE_fieldgen run.
*/
- if ( radarMiscBins == NULL )
- {
- radarMiscBins = init2DShortArray(MISBIN_DEFAULT,
- pRadarLocTable->radarNum,
- NUM_DPA_ELEMENTS );
+ if (radarMiscBins == NULL) {
+ radarMiscBins = init2DShortArray(MISBIN_DEFAULT,
+ pRadarLocTable->radarNum, NUM_DPA_ELEMENTS);
- if(pEMPEParams->load_misbin == 1)
- {
- readMisc ( pRadarLocTable, radarMiscBins ) ;
+ if (pEMPEParams->load_misbin == 1) {
+ readMisc(pRadarLocTable, radarMiscBins);
}
}
-
/*
* begin loop on radars
*/
- for(i = 0; i < pRadarLocTable->radarNum; i++ )
- {
+ for (i = 0; i < pRadarLocTable->radarNum; i++) {
- strcpy(radarID, pRadarLocTable->ptrRadarLocRecords[i].radarID) ;
+ strcpy(radarID, pRadarLocTable->ptrRadarLocRecords[i].radarID);
- sprintf ( message , "\n******* radar: %s *******", radarID);
- hpe_fieldgen_printMessage( message );
+ sprintf(message, "\n******* radar: %s *******", radarID);
+ hpe_fieldgen_printMessage(message);
- radar_result_struct * dp_pRadarInfo = NULL ;
+ radar_result_struct * dp_pRadarInfo = NULL;
radar_result_struct * sp_pRadarInfo = NULL;
- if (pDAARadarResult != NULL)
- {
- dp_pRadarInfo = (radar_result_struct *)
- binary_search ( pDAARadarResult, radarID, dp_radar_count,
- sizeof ( radar_result_struct), compare_radar_id );
- if (dp_pRadarInfo != NULL)
- dp_ignoreRadarFlag = dp_pRadarInfo->ignore_radar;
-
- }
-
- if (pRadarResult != NULL)
- {
- sp_pRadarInfo = (radar_result_struct *) binary_search(pRadarResult,
- radarID, pps_radar_count, sizeof(radar_result_struct),
- compare_radar_id);
- if (sp_pRadarInfo != NULL)
- sp_ignoreRadarFlag = sp_pRadarInfo->ignore_radar;
-
- }
-
+ /*
+ * initialize edit bias flag, ignore radar flag
+ */
+
+ dp_blnEditBias = 0;
+ dp_editBiasValue = 0.0;
+ dp_ignoreRadarFlag = 0;
+ sp_blnEditBias = 0;
+ sp_editBiasValue = 0.0;
+ sp_ignoreRadarFlag = 0;
+
+ if (pDAARadarResult != NULL) {
+ dp_pRadarInfo = (radar_result_struct *) binary_search(
+ pDAARadarResult, radarID, dp_radar_count,
+ sizeof(radar_result_struct), compare_radar_id);
+ if (dp_pRadarInfo != NULL) {
+ dp_ignoreRadarFlag = dp_pRadarInfo->ignore_radar;
+ dp_editBiasValue = dp_pRadarInfo->bias;
+ dp_blnEditBias = dp_pRadarInfo->edit_bias;
+ }
+ }
+
+ if (pRadarResult != NULL) {
+ sp_pRadarInfo = (radar_result_struct *) binary_search(pRadarResult,
+ radarID, pps_radar_count, sizeof(radar_result_struct),
+ compare_radar_id);
+ if (sp_pRadarInfo != NULL) {
+ sp_ignoreRadarFlag = sp_pRadarInfo->ignore_radar;
+ sp_editBiasValue = sp_pRadarInfo->bias;
+ sp_blnEditBias = sp_pRadarInfo->edit_bias;
+ }
+ }
+
/*
* Read in gridded radar data
* count number of available radars
* an "ignored" radar is considered "not available"
*/
- if (dualpol_on_flag == 1)
- {
+ if (dualpol_on_flag == 1) {
readDPRData(radarID, datetime, pEMPEParams->dhr_window,
- dp_ignoreRadarFlag, origRadar, &radarAvailFlag);
-
- if (radarAvailFlag > 0)
- {
- sprintf ( message , "STATUS: In runDHRMosaic - dual pol product DPR is used for radar %s", radarID);
- hpe_fieldgen_printMessage( message );
- dualpol_data_avail[i] = 1;
- }
- else
- {
- readDHRData(radarID, datetime, pEMPEParams->dhr_window,
- sp_ignoreRadarFlag, origRadar, &radarAvailFlag) ;
-
- dualpol_data_avail[i] = 0;
- if (radarAvailFlag > 0)
- {
- sprintf ( message , "STATUS: In runDHRMosaic - single pol product DHR is used for radar %s", radarID);
- hpe_fieldgen_printMessage( message );
- }
- }
- }
- else
- {
+ dp_ignoreRadarFlag, origRadar, &radarAvailFlag);
+
+ if (radarAvailFlag > 0) {
+ sprintf(message,
+ "STATUS:In runDHRMosaic - dual pol product DPR is used for radar %s",
+ radarID);
+ hpe_fieldgen_printMessage(message);
+ dualpol_data_avail[i] = 1;
+ }
+ } else {
readDHRData(radarID, datetime, pEMPEParams->dhr_window,
- sp_ignoreRadarFlag, origRadar, &radarAvailFlag) ;
- dualpol_data_avail[i] = 0;
-
- if (radarAvailFlag > 0)
- {
- sprintf ( message , "STATUS: In runDHRMosaic - single pol product DHR is used for radar %s", radarID);
- hpe_fieldgen_printMessage( message );
- }
- }
-
- if(radarAvailFlag > 0)
- pEMPEParams->radar_avail_num ++ ;
- sprintf ( message , "STATUS: In runDHRMosaic - the dualpol_data_avail flag is %d for radarID %s", dualpol_data_avail[i], radarID);
- hpe_fieldgen_printMessage( message );
-
+ sp_ignoreRadarFlag, origRadar, &radarAvailFlag);
+
+ if (radarAvailFlag > 0) {
+ sprintf(message,
+ "STATUS:In runDHRMosaic - single pol product DHR is used for radar %s",
+ radarID);
+ hpe_fieldgen_printMessage(message);
+ dualpol_data_avail[i] = 0;
+ }
+ }
+
+ if (radarAvailFlag > 0) {
+ pEMPEParams->radar_avail_num++;
+ }
/*
* Convert radar array to current hrap grid
*/
- convertFloatArray(NUM_DHR_ROWS,
- NUM_DHR_COLS,
- origRadar,
- RADAR_DEFAULT,
- RADAR_ROWS,
- RADAR_COLS ,
- currRadar );
+ convertFloatArray(NUM_DHR_ROWS, NUM_DHR_COLS, origRadar, RADAR_DEFAULT,
+ RADAR_ROWS, RADAR_COLS, currRadar);
/*
* pick up the misbin for current running radar and
* convert it to current hrap grid
*/
- for(j = 0; j < NUM_DPA_ROWS; j ++)
- {
- for(k = 0; k < NUM_DPA_COLS; k ++)
- {
+ for (j = 0; j < NUM_DPA_ROWS; j++) {
+ for (k = 0; k < NUM_DPA_COLS; k++) {
index = j * NUM_DPA_COLS + k;
hrapMiscBins[j][k] = radarMiscBins[i][index];
}
}
- convertShortArray(NUM_DPA_ROWS,
- NUM_DPA_COLS,
- hrapMiscBins,
- MISBIN_DEFAULT,
- RADAR_ROWS,
- RADAR_COLS,
- currMiscBins);
-
- /*
+ convertShortArray(NUM_DPA_ROWS, NUM_DPA_COLS, hrapMiscBins,
+ MISBIN_DEFAULT, RADAR_ROWS, RADAR_COLS, currMiscBins);
+
+ /*
* get mean field bias if it is set to "ON"
*/
+ if (pEMPEParams->blnDHRMeanFieldBias == 1) {
+ getMeanBias(&(pRadarLocTable->ptrRadarLocRecords[i]), datetime,
+ RADAR_ROWS, RADAR_COLS, currMiscBins, currRadar, pGeoData,
+ pGageTable, pEMPEParams, dualpol_data_avail[i], &meanBias,
+ &memSpanBias, &gageRadarPairNum);
- if(pEMPEParams->blnDHRMeanFieldBias == 1)
- {
+ meanFieldBias[i] = meanBias;
- /*
- * load the mean field bias value
- * and save it to meanFieldBias[i]
- * use DAABiasDyn table to load mean field bias for dual pol product, if not available
- * use RWBiasDyn table to load mean field bias for PPS product
- */
- readMeanBias(ptrRunDate,
- ptrRadarLocTable,
- ptrEMPEParams,
- meanFieldBias,
- dualpol_data_avail[i] );
-
+ if (dualpol_on_flag == 1 && dp_blnEditBias == 1) {
+ sprintf(message,
+ "STATUS:In runDHRMosaic - Edited Bias is used for radar %s",
+ radarID);
+ hpe_fieldgen_printMessage(message);
+ meanFieldBias[i] = dp_editBiasValue;
+ } else if (dualpol_on_flag == 0 && sp_blnEditBias == 1) {
+ sprintf(message,
+ "STATUS:In runDHRMosaic - Edited Bias is used for radar %s",
+ radarID);
+ hpe_fieldgen_printMessage(message);
+ meanFieldBias[i] = sp_editBiasValue;
+ }
-
- } /*end of ptrEMPEParams->blnMeanFieldBias == 1 */
-
- sprintf( message , "STATUS: In runDHRMosaic - MFB is %f for radid %s." ,
- meanFieldBias[i], radarID) ;
- hpe_fieldgen_printMessage( message );
+ } /*end of pEMPEParams->blnMeanFieldBias == 1 */
+
+ sprintf(message, "\nSTATUS:In runDHRMosaic - MFB is %f for radid %s.",
+ meanFieldBias[i], radarID);
+ hpe_fieldgen_printMessage(message);
/*
* mosaicking algorithm
*/
- createDHRMosaic(&(pRadarLocTable->ptrRadarLocRecords[i]),
- RADAR_ROWS , RADAR_COLS ,
- currRadar, currMiscBins,
- pGeoData, i+1, RadarBeamHeight,
- DHRHeight, ID, Mosaic);
+ createDHRMosaic(&(pRadarLocTable->ptrRadarLocRecords[i]), RADAR_ROWS,
+ RADAR_COLS, currRadar, currMiscBins, pGeoData, i + 1,
+ RadarBeamHeight, DHRHeight, ID, Mosaic);
}
-
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "%s = time end DHRMOSAIC calculation.", currTime) ;
- hpe_fieldgen_printMessage( message );
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "\n%s = time end DHRMOSAIC calculation.", currTime);
+ hpe_fieldgen_printMessage(message);
/*
* write out gridded data in xmrg format to flat files
*/
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message, "%s = time begin writing DHRMOSAIC fields to flat files.",
- currTime) ;
- hpe_fieldgen_printMessage( message );
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time begin writing DHRMOSAIC fields to flat files.",
+ currTime);
+ hpe_fieldgen_printMessage(message);
- if(first == 1)
- {
- if(hpe_fieldgen_getAppsDefaults(MOSAIC_DIR_TOKEN, mosaicDir) == -1)
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".\n\tProgram exit.",
- MOSAIC_DIR_TOKEN) ;
- shutdown( message );
+ if (first == 1) {
+ if (hpe_fieldgen_getAppsDefaults(MOSAIC_DIR_TOKEN, mosaicDir) == -1) {
+ sprintf(message, "ERROR: Invalid token value"
+ " for token \"%s\".\n\tProgram exit.", MOSAIC_DIR_TOKEN);
+ shutdown(message);
}
}
- sprintf(dhrmosaic_fileName, "DHRMOSAIC%sz", strDateTime );
- sprintf(fileName, "DHRMOSAIC%sz", strDateTime );
- writeArray(pGeoData, mosaicDir, fileName, FACTOR_PRECIP,
- replace_missing, pEMPEParams->user, pRunDate->tRunTime,
- DHR_PROC_FLAG, Mosaic, &irc) ;
+ sprintf(dhrmosaic_fileName, "DHRMOSAIC%sz", strDateTime);
+ sprintf(fileName, "DHRMOSAIC%sz", strDateTime);
+ writeArray(pGeoData, mosaicDir, fileName, FACTOR_PRECIP, replace_missing,
+ pEMPEParams->user, pRunDate->tRunTime, DHR_PROC_FLAG, Mosaic, &irc);
- if(irc != 0)
- {
- sprintf( message , "ERROR: error number = %ld"
- " attempting to write file: %s/%s" ,
- irc, mosaicDir, fileName) ;
- printLogMessage( message );
- }
- else
- {
- sprintf( message , "STATUS: file written to: %s/%s" ,
- mosaicDir, fileName) ;
- printLogMessage( message );
+ if (irc != 0) {
+ sprintf(message, "ERROR: error number = %ld"
+ " attempting to write file: %s/%s", irc, mosaicDir, fileName);
+ printLogMessage(message);
+ } else {
+ sprintf(message, "STATUS: file written to: %s/%s", mosaicDir, fileName);
+ printLogMessage(message);
- writeFormattedXMRG(pEMPEParams, pGeoData,
- mosaicDir, fileName, DHR_PROC_FLAG,
- SAVE_GRIB_TOKEN,
- SAVE_GIF_TOKEN, GIF_DIR_TOKEN, GIF_ID_TOKEN,
- SAVE_NETCDF_TOKEN, NETCDF_DIR_TOKEN, NETCDF_ID_TOKEN,
- SAVE_JPEG_TOKEN,
- Mosaic);
+ writeFormattedXMRG(pEMPEParams, pGeoData, mosaicDir, fileName,
+ DHR_PROC_FLAG, SAVE_GRIB_TOKEN, SAVE_GIF_TOKEN, GIF_DIR_TOKEN,
+ GIF_ID_TOKEN, SAVE_NETCDF_TOKEN, NETCDF_DIR_TOKEN,
+ NETCDF_ID_TOKEN, SAVE_JPEG_TOKEN, Mosaic);
}
#if APPLY_POLYGON
@@ -534,172 +470,135 @@ void runDHRMosaic(const run_date_struct * pRunDate,
*/
apply_mpe_polygons ( (void * )&Mosaic,
- strDateTime,
- year,
- month,
- day,
- hour,
- display_erMosaic,
- pGeoData,
- FACTOR_PRECIP,
- 0,
- 0 );
+ strDateTime,
+ year,
+ month,
+ day,
+ hour,
+ display_erMosaic,
+ pGeoData,
+ FACTOR_PRECIP,
+ 0,
+ 0 );
#endif
hpe_fieldgen_getAppsDefaults(SAVE_HEIGHT_TOKEN, saveflag);
- if(strcmp(hpe_fieldgen_toLowerCase(saveflag), "save") == 0)
- {
- if(first == 1)
- {
- if(hpe_fieldgen_getAppsDefaults(HEIGHT_DIR_TOKEN, heightDir) == -1)
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".\n\tProgram exit.",
- HEIGHT_DIR_TOKEN) ;
- shutdown( message );
- }
- }
+ if (strcmp(hpe_fieldgen_toLowerCase(saveflag), "save") == 0) {
+ if (first == 1) {
+ if (hpe_fieldgen_getAppsDefaults(HEIGHT_DIR_TOKEN, heightDir)
+ == -1) {
+ sprintf(message, "ERROR: Invalid token value"
+ " for token \"%s\".\n\tProgram exit.",
+ HEIGHT_DIR_TOKEN);
+ shutdown(message);
+ }
+ }
- sprintf(fileName, "DHRHEIGHT%sz", strDateTime );
- writeArray(pGeoData, heightDir, fileName, FACTOR_OTHER,
- replace_missing, pEMPEParams->user, pRunDate->tRunTime,
- DHR_PROC_FLAG, DHRHeight, &irc) ;
+ sprintf(fileName, "DHRHEIGHT%sz", strDateTime);
+ writeArray(pGeoData, heightDir, fileName, FACTOR_OTHER, replace_missing,
+ pEMPEParams->user, pRunDate->tRunTime, DHR_PROC_FLAG, DHRHeight,
+ &irc);
- if(irc != 0)
- {
- sprintf( message , "ERROR: error number = %ld"
- " attempting to write file: %s/%s" ,
- irc, heightDir, fileName) ;
- printLogMessage( message );
- }
- else
- {
- sprintf( message , "STATUS: file written to: %s/%s" ,
- heightDir, fileName) ;
- printLogMessage( message );
- }
+ if (irc != 0) {
+ sprintf(message, "ERROR: error number = %ld"
+ " attempting to write file: %s/%s", irc, heightDir,
+ fileName);
+ printLogMessage(message);
+ } else {
+ sprintf(message, "STATUS: file written to: %s/%s", heightDir,
+ fileName);
+ printLogMessage(message);
+ }
}
hpe_fieldgen_getAppsDefaults(SAVE_INDEX_TOKEN, saveflag);
- if(strcmp(hpe_fieldgen_toLowerCase(saveflag), "save") == 0)
- {
- if(first == 1)
- {
- if(hpe_fieldgen_getAppsDefaults(INDEX_DIR_TOKEN, indexDir) == -1)
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".\n\tProgram exit.",
- INDEX_DIR_TOKEN) ;
- shutdown( message );
- }
- }
+ if (strcmp(hpe_fieldgen_toLowerCase(saveflag), "save") == 0) {
+ if (first == 1) {
+ if (hpe_fieldgen_getAppsDefaults(INDEX_DIR_TOKEN, indexDir) == -1) {
+ sprintf(message, "ERROR: Invalid token value"
+ " for token \"%s\".\n\tProgram exit.", INDEX_DIR_TOKEN);
+ shutdown(message);
+ }
+ }
- sprintf(fileName, "DHRINDEX%sz", strDateTime );
+ sprintf(fileName, "DHRINDEX%sz", strDateTime);
- /*
- * fill in tempID array
- */
+ /*
+ * * fill in tempID array
+ */
- for(i = 0; i < rowSize; i ++)
- {
- for(j = 0; j < colSize; j ++)
- {
- tempID[i][j] = (double)ID[i][j] ;
- }
- }
+ for (i = 0; i < rowSize; i++) {
+ for (j = 0; j < colSize; j++) {
+ tempID[i][j] = (double) ID[i][j];
+ }
+ }
- writeArray(pGeoData, indexDir, fileName, FACTOR_OTHER,
- replace_missing, pEMPEParams->user, pRunDate->tRunTime,
- DHR_PROC_FLAG, tempID, &irc) ;
+ writeArray(pGeoData, indexDir, fileName, FACTOR_OTHER, replace_missing,
+ pEMPEParams->user, pRunDate->tRunTime, DHR_PROC_FLAG, tempID,
+ &irc);
- if(irc != 0)
- {
- sprintf( message , "ERROR: error number = %ld"
- " attempting to write file: %s/%s" ,
- irc, indexDir, fileName) ;
- printLogMessage( message );
- }
- else
- {
- sprintf( message, "STATUS: file written to: %s/%s" ,
- indexDir, fileName) ;
- printLogMessage( message );
- }
+ if (irc != 0) {
+ sprintf(message, "ERROR: error number = %ld"
+ " attempting to write file: %s/%s", irc, indexDir,
+ fileName);
+ printLogMessage(message);
+ } else {
+ sprintf(message, "STATUS: file written to: %s/%s", indexDir,
+ fileName);
+ printLogMessage(message);
+ }
}
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message, "%s = time end writing DHRMOSAIC fields to flat files." ,
- currTime) ;
- hpe_fieldgen_printMessage( message );
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time end writing DHRMOSAIC fields to flat files.",
+ currTime);
+ printLogMessage(message);
- /* check dual_pol_flag */
- if (dualpol_on_flag == 0)
- dualpol_used = 0;
- else
- {
- for (i = 0; i < pRadarLocTable->radarNum; i++)
- {
- if (dualpol_data_avail[i] != 0)
- {
- dualpol_used = 1;
- break;
- }
- else
- dualpol_used = 0;
- }
- }
-
- sprintf ( message , "\nSTATUS: In DHRMOSAIC, the flag dualpol_used = %d\n", dualpol_used);
- printLogMessage( message );
-
- sprintf ( message , "\nSTATUS: In DHRMOSAIC, insert/update HPERadarResult table");
- printLogMessage( message );
-
- wrtodb_HPERadarResult(dhrmosaic_fileName, prdDateTime, pEMPEParams, dualpol_used, nobias_flag);
+ sprintf(message,
+ "\nSTATUS:In DHRMOSAIC - insert/update HPERadarResult table");
+ printLogMessage(message);
+
+ wrtodb_HPERadarResult(dhrmosaic_fileName, prdDateTime, pEMPEParams,
+ dualpol_used, nobias_flag);
+
+ sprintf(message,
+ "\nSTATUS:In DHRMOSAIC - complete insert/update HPERadarResult table");
+ printLogMessage(message);
- sprintf ( message , "\nSTATUS: In DHRMOSAIC, complete insert/update HPERadarResult table");
- printLogMessage( message );
-
/*
* run the nowcast
*/
- if (pEMPEParams->blnRunNowcast == 1)
- {
+ if (pEMPEParams->blnRunNowcast == 1) {
const char * mosaicID = "DHR";
runNowcast(pGeoData, pRunDate->tRunTime, mosaicID, pEMPEParams,
mosaicDir, Mosaic, dualpol_used);
}
-
- freeMosaicArray(pGeoData, RADAR_ROWS) ;
+ freeMosaicArray(pGeoData, RADAR_ROWS);
- if(pRadarResult != NULL)
- {
+ if (pRadarResult != NULL) {
free(pRadarResult);
pRadarResult = NULL;
}
- if (pDAARadarResult != NULL)
- {
+ if (pDAARadarResult != NULL) {
free(pDAARadarResult);
pDAARadarResult = NULL;
- }
+ }
first = 0;
}
static void initMosaicArray(const geo_data_struct * pGeoData,
- const int radar_rows,
- const int radar_cols)
-{
+ const int radar_rows, const int radar_cols) {
- const int rowSize = pGeoData->num_rows ;
- const int colSize = pGeoData->num_cols ;
+ const int rowSize = pGeoData->num_rows;
+ const int colSize = pGeoData->num_cols;
- DHRHeight = init2DDoubleArray(HEIGHT_DEFAULT, rowSize, colSize );
+ DHRHeight = init2DDoubleArray(HEIGHT_DEFAULT, rowSize, colSize);
- tempID = init2DDoubleArray(ID_DEFAULT, rowSize, colSize );
+ tempID = init2DDoubleArray(ID_DEFAULT, rowSize, colSize);
origRadar = init2DFloatArray(RADAR_DEFAULT, NUM_DHR_ROWS, NUM_DHR_COLS);
@@ -711,20 +610,19 @@ static void initMosaicArray(const geo_data_struct * pGeoData,
}
static void freeMosaicArray(const geo_data_struct * pGeoData,
- const int radar_rows)
-{
- const int rowSize = pGeoData->num_rows ;
+ const int radar_rows) {
+ const int rowSize = pGeoData->num_rows;
- free2DDoubleArray(DHRHeight, rowSize );
+ free2DDoubleArray(DHRHeight, rowSize);
- free2DDoubleArray(tempID, rowSize );
+ free2DDoubleArray(tempID, rowSize);
- free2DFloatArray(origRadar, NUM_DHR_ROWS );
+ free2DFloatArray(origRadar, NUM_DHR_ROWS);
- free2DFloatArray(currRadar, radar_rows );
+ free2DFloatArray(currRadar, radar_rows);
- free2DShortArray(hrapMiscBins, NUM_DPA_ROWS );
+ free2DShortArray(hrapMiscBins, NUM_DPA_ROWS);
- free2DShortArray(currMiscBins, radar_rows );
+ free2DShortArray(currMiscBins, radar_rows);
}
diff --git a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/run_ermosaic.c b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/run_ermosaic.c
index e7f5cccfff..1a2804828b 100644
--- a/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/run_ermosaic.c
+++ b/nativeLib/rary.ohd.pproc/src/hpe_fieldgen/TEXT/run_ermosaic.c
@@ -1,148 +1,138 @@
/***********************************************************************
-* Filename: run_ermosaic.c
-*
-* Original Author: Guoxian Zhou
-*
-* File Creation Date: 08/21/2006
-*
-* Development Group: HSEB/OHD
-*
-* Description:
-* compute the raw DSP radar mosaic data
-*
-* Modules:
-* runERMosaic
-*
-***********************************************************************/
+ * Filename: run_ermosaic.c
+ *
+ * Original Author: Guoxian Zhou
+ *
+ * File Creation Date: 08/21/2006
+ *
+ * Development Group: HSEB/OHD
+ *
+ * Description:
+ * compute the raw DSP radar mosaic data
+ *
+ * Modules:
+ * runERMosaic
+ *
+ ***********************************************************************/
/* Include files, definitions, globals go here. */
#include "empe_fieldgen.h"
/***********************************************************************
-* Module Name: runERMosaic
-*
-* Original Author: Guoxian Zhou
-*
-* Module Creation Date: 08/21/2006
-*
-* Description:
-* This function computes the raw DSP radar mosaic data.
-*
-* Calling Arguments:
-* Name Input/Output Type Description
-*
-* pRunDate Input const run_date_struct * date/time
-* pGeoData Input const geo_data_struct *
-* global HRAP lowerleft-corner
-* bin and dimension and dimension
-* of the RFC estimation domain
-* pMPEParams Input/Output mpe_params_struct *
-* static parameters
-* pRadarLocRecord Input const radarLoc_table_struct *
-* info from radarLoc table
-* meanFieldBias Output double ** the mean field bias value
-* computed for each radar.
-*
-* ID Output int ** the mosaic id array of radars.
-*
-* RMosaic Output double ** the raw dsp mosaic.
-* QPEMosaic Output double ** the best estimate mosaic
-*
-* Required
-* None
-*
-* Required Files/Databases:
-* None
-*
-* Non System Routines Called:
-* readRadarLoc, readRadarResult , readMisc, getMeanBias,
-* writeRadarResult, createMosaic, checkMultisensorQC, writeArray
-*
-* Return Value:
-* Type Description
-* None
-*
-* Error Codes/Exceptions:
-*
-*
-* OS Specific Assumptions:
-* None
-*
-* Local Variables:
-* Name Type Description
-*
-* Modification History:
-* Date Developer Action
-* C. R. Kondragunta Original FORTRAN code
-* March 2005 Guoxian Zhou convert to C Language
-* 9/06/2006 Guoxian Zhou Modify for empe dsp mosaic
-* 12/2012 Jingtao Deng Modify for adding dual pol producat DSA
-* first try to find the DSA product from dsaradar
-* table and calculate the 1 hour precipitation. if
-* not able to get DSA product, then use DSP product
-* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
-***********************************************************************/
+ * Module Name: runERMosaic
+ *
+ * Original Author: Guoxian Zhou
+ *
+ * Module Creation Date: 08/21/2006
+ *
+ * Description:
+ * This function computes the raw DSP radar mosaic data.
+ *
+ * Calling Arguments:
+ * Name Input/Output Type Description
+ *
+ * pRunDate Input const run_date_struct * date/time
+ * pGeoData Input const geo_data_struct *
+ * global HRAP lowerleft-corner
+ * bin and dimension and dimension
+ * of the RFC estimation domain
+ * pMPEParams Input/Output mpe_params_struct *
+ * static parameters
+ * pRadarLocRecord Input const radarLoc_table_struct *
+ * info from radarLoc table
+ * meanFieldBias Output double ** the mean field bias value
+ * computed for each radar.
+ *
+ * ID Output int ** the mosaic id array of radars.
+ *
+ * RMosaic Output double ** the raw dsp mosaic.
+ * QPEMosaic Output double ** the best estimate mosaic
+ *
+ * Required
+ * None
+ *
+ * Required Files/Databases:
+ * None
+ *
+ * Non System Routines Called:
+ * readRadarLoc, readRadarResult , readMisc, getMeanBias,
+ * writeRadarResult, createMosaic, checkMultisensorQC, writeArray
+ *
+ * Return Value:
+ * Type Description
+ * None
+ *
+ * Error Codes/Exceptions:
+ *
+ *
+ * OS Specific Assumptions:
+ * None
+ *
+ * Local Variables:
+ * Name Type Description
+ *
+ * Modification History:
+ * Date Developer Action
+ * C. R. Kondragunta Original FORTRAN code
+ * March 2005 Guoxian Zhou convert to C Language
+ * 9/06/2006 Guoxian Zhou Modify for empe dsp mosaic
+ * 12/2012 Jingtao Deng Modify for adding dual pol producat DSA
+ * first try to find the DSA product from dsaradar
+ * table and calculate the 1 hour precipitation. if
+ * not able to get DSA product, then use DSP product
+ * 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
+ * 09/2015 JingtaoD A2 OB16.2.1 DR#17860 - HPE DualPol Mean field bias
+ ***********************************************************************/
-extern short ** radarMiscBins ;
-
-static double ** MHeight = NULL ;
-static double ** tempID = NULL ;
-static float ** origRadar = NULL;
-static float ** currRadar = NULL ;
-static short ** hrapMiscBins = NULL ;
-static short ** currMiscBins = NULL ;
+extern short ** radarMiscBins;
+static double ** MHeight = NULL;
+static double ** tempID = NULL;
+static float ** origRadar = NULL;
+static float ** currRadar = NULL;
+static short ** hrapMiscBins = NULL;
+static short ** currMiscBins = NULL;
// Added by Ram for the average and max mosaic calculation
// ---------------------------
-extern double ** MaxMosaic;
-extern double ** AvgMosaic;
-extern int ** AvgMosaicNumRadars;
-extern double ** P3Mosaic;
+extern double ** MaxMosaic;
+extern double ** AvgMosaic;
+extern int ** AvgMosaicNumRadars;
// --------------------------
-
extern int dualpol_used;
extern int dualpol_on_flag;
-extern void set_best_estimate_p3();
static void initMosaicArray(const geo_data_struct * pGeoData,
- const int grid_rows,
- const int grid_cols) ;
+ const int grid_rows, const int grid_cols);
static void freeMosaicArray(const geo_data_struct * pGeoData,
- const int grid_rows) ;
+ const int grid_rows);
void runERMosaic(const run_date_struct * pRunDate,
- const geo_data_struct * pGeoData,
- empe_params_struct * pEMPEParams,
- const radarLoc_table_struct * pRadarLocTable ,
- const gage_table_struct * pGageTable,
- const gage_table_struct * pGageTableP3,
- const gage_table_struct * pQCGageTable,
- double * meanFieldBias,
- double ** RadarBeamHeight,
- int ** ID,
- double ** RMosaic,
- double ** QPEMosaic,
- int * blnMosaic)
-{
- const int rowSize = pGeoData->num_rows ;
- const int colSize = pGeoData->num_cols ;
- const int replace_missing = 0 ;
+ const geo_data_struct * pGeoData, empe_params_struct * pEMPEParams,
+ const radarLoc_table_struct * pRadarLocTable,
+ const gage_table_struct * pGageTable,
+ const gage_table_struct * pGageTableP3,
+ const gage_table_struct * pQCGageTable, double * meanFieldBias,
+ double ** RadarBeamHeight, int ** ID, double ** RMosaic,
+ double ** QPEMosaic, int * blnMosaic) {
+ const int rowSize = pGeoData->num_rows;
+ const int colSize = pGeoData->num_cols;
+ const int replace_missing = 0;
- const int GRID_ROWS = NUM_DPA_ROWS * pEMPEParams->hrap_grid_factor ;
- const int GRID_COLS = NUM_DPA_COLS * pEMPEParams->hrap_grid_factor ;
+ const int GRID_ROWS = NUM_DPA_ROWS * pEMPEParams->hrap_grid_factor;
+ const int GRID_COLS = NUM_DPA_COLS * pEMPEParams->hrap_grid_factor;
- const char * MOSAIC_DIR_TOKEN = "hpe_ermosaic_dir";
- const char * AVG_ERMOSAIC_DIR_TOKEN = "hpe_avg_ermosaic_dir";
- const char * MAX_ERMOSAIC_DIR_TOKEN = "hpe_max_ermosaic_dir";
+ const char * MOSAIC_DIR_TOKEN = "hpe_ermosaic_dir";
+ const char * AVG_ERMOSAIC_DIR_TOKEN = "hpe_avg_ermosaic_dir";
+ const char * MAX_ERMOSAIC_DIR_TOKEN = "hpe_max_ermosaic_dir";
const char * SAVE_HEIGHT_TOKEN = "hpe_save_dspheight";
const char * HEIGHT_DIR_TOKEN = "hpe_dspheight_dir";
- const char * SAVE_INDEX_TOKEN = "hpe_save_dspindex";
- const char * INDEX_DIR_TOKEN = "hpe_dspindex_dir";
+ const char * SAVE_INDEX_TOKEN = "hpe_save_dspindex";
+ const char * INDEX_DIR_TOKEN = "hpe_dspindex_dir";
const char * SAVE_GRIB_TOKEN = "ermosaic_save_grib";
@@ -158,69 +148,66 @@ void runERMosaic(const run_date_struct * pRunDate,
double ** pMosaic = NULL;
- char saveflag[TOKEN_LEN]= {'\0'};
+ char saveflag[TOKEN_LEN] = { '\0' };
- static char datetime[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- static char strDateTime[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- static char prdDateTime[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- static char datehour[ANSI_YEARSEC_TIME_LEN + 1] = {'\0'} ;
- static char radarID[ RADAR_ID_LEN + 1] = {'\0'} ;
- register int i = 0, j, k, l;
- int gageRadarPairNum = 0 ; /* number of positive gage/radar pairs */
-
- long int irc ;
+ static char datetime[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ static char strDateTime[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ static char prdDateTime[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ static char datehour[ANSI_YEARSEC_TIME_LEN + 1] = { '\0' };
+ static char radarID[RADAR_ID_LEN + 1] = { '\0' };
+ register int i = 0, j, k, l;
+ int gageRadarPairNum = 0; /* number of positive gage/radar pairs */
+ long int irc;
int radarAvailFlag = 0;
- int dp_blnEditBias, sp_blnEditBias ;
- int dp_blnIgnoreRadar, sp_blnIgnoreRadar ;
register int year, month, day, hour;
- double dp_editBiasValue = 0.0, sp_editBiasValue= 0.0 ;
- double memSpanBias ;
- double meanBias = 0.0 ;
+ int dp_blnEditBias, sp_blnEditBias;
+ double dp_editBiasValue, sp_editBiasValue;
+ int dp_blnIgnoreRadar, sp_blnIgnoreRadar;
- static char fileName[PATH_LEN] = {'\0'} ;
- static char ermosaic_fileName[PRESET_DESCR_LEN] = {'\0'} ;
- static char heightDir[PATH_LEN] = {'\0'} ;
- static char indexDir[PATH_LEN] = {'\0'} ;
- static char mosaicDir[PATH_LEN] = {'\0'} ;
- static char avgRMosaicDir[PATH_LEN] = {'\0'} ;
- static char maxRMosaicDir[PATH_LEN] = {'\0'} ;
+ double memSpanBias;
+ double meanBias = 0.0;
- static int first = 1 ;
+ static char fileName[PATH_LEN] = { '\0' };
+ static char ermosaic_fileName[PRESET_DESCR_LEN] = { '\0' };
+ static char heightDir[PATH_LEN] = { '\0' };
+ static char indexDir[PATH_LEN] = { '\0' };
+ static char mosaicDir[PATH_LEN] = { '\0' };
+ static char avgRMosaicDir[PATH_LEN] = { '\0' };
+ static char maxRMosaicDir[PATH_LEN] = { '\0' };
+
+ static int first = 1;
struct tm * pRunTime = NULL;
- short pps_radar_count, dp_radar_count ;
- int index ;
-
- int dualpol_meanbias_flag[MAX_RADAR_NUM];
- int sp_meanbias_flag[MAX_RADAR_NUM];
- int dualpol_data_avail[MAX_RADAR_NUM];
+ short pps_radar_count, dp_radar_count;
+ int index;
+
+ int dualpol_meanbias_flag[MAX_RADAR_NUM];
+ int sp_meanbias_flag[MAX_RADAR_NUM];
+ int dualpol_data_avail[MAX_RADAR_NUM];
int nobias_flag;
/*ERMOSAIC product has no bias applied */
nobias_flag = 1;
-
+
/* initialize no dualpol MFB and no dual pol product avialble for each radar */
- for (i = 0; i < MAX_RADAR_NUM; i++)
- {
- dualpol_meanbias_flag[i] = 0;
- sp_meanbias_flag[i] = 0;
- dualpol_data_avail[i] = 0;
+ for (i = 0; i < MAX_RADAR_NUM; i++) {
+ dualpol_meanbias_flag[i] = 0;
+ sp_meanbias_flag[i] = 0;
+ dualpol_data_avail[i] = 0;
}
-
- pEMPEParams->radar_avail_num = 0 ;
+
+ pEMPEParams->radar_avail_num = 0;
// Additional check added by Ram to see if any of the Radar mosaics are
// to be calculated. if not we abort here
// ---------------------
- if(blnMosaic[ermosaic] == 0 &&
- blnMosaic[avgermosaic] == 0 &&
- blnMosaic[maxermosaic] == 0)
- {
- sprintf ( message , "\nErroneous call to ERMosaic\n");
- printLogMessage( message );
+ if (blnMosaic[ermosaic] == 0 && blnMosaic[avgermosaic] == 0
+ && blnMosaic[maxermosaic] == 0) {
+ sprintf(message, "\nErroneous call to ERMosaic\n");
+ printLogMessage(message);
return;
}
@@ -229,357 +216,266 @@ void runERMosaic(const run_date_struct * pRunDate,
* based on the geo grid size data.
*/
- initMosaicArray(pGeoData, GRID_ROWS, GRID_COLS) ;
+ initMosaicArray(pGeoData, GRID_ROWS, GRID_COLS);
/*
* strDateTime string should be in format: yyyymmddHHMM
*/
- pRunTime = gmtime(&(pRunDate->tRunTime)) ;
- strftime ( datetime, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y-%m-%d %H:%M:00", pRunTime ) ;
- strftime ( datehour, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y-%m-%d %H:00:00", pRunTime ) ;
- strftime(strDateTime, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y%m%d%H%M", pRunTime);
- strftime(prdDateTime, ANSI_YEARSEC_TIME_LEN + 1,
- "%Y-%m-%d %H:%M:%S", pRunTime);
+ pRunTime = gmtime(&(pRunDate->tRunTime));
+ strftime(datetime, ANSI_YEARSEC_TIME_LEN + 1, "%Y-%m-%d %H:%M:00",
+ pRunTime);
+ strftime(datehour, ANSI_YEARSEC_TIME_LEN + 1, "%Y-%m-%d %H:00:00",
+ pRunTime);
+ strftime(strDateTime, ANSI_YEARSEC_TIME_LEN + 1, "%Y%m%d%H%M", pRunTime);
+ strftime(prdDateTime, ANSI_YEARSEC_TIME_LEN + 1, "%Y-%m-%d %H:%M:%S",
+ pRunTime);
year = pRunTime->tm_year + 1900;
month = pRunTime->tm_mon + 1;
day = pRunTime->tm_mday;
hour = pRunTime->tm_hour;
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "%s = time begin ERMOSAIC calculation." ,
- currTime) ;
- hpe_fieldgen_printMessage( message );
-
- sprintf ( message , "STATUS: In runERMosaic - Dual pol product flag is %d.", dualpol_on_flag) ;
- printLogMessage( message );
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time begin ERMOSAIC calculation.", currTime);
+ hpe_fieldgen_printMessage(message);
/* for single pol product which use rwradarresult table */
radar_result_struct * pRadarResult = NULL;
- pRadarResult = (radar_result_struct *)
- malloc(pRadarLocTable->radarNum * sizeof(radar_result_struct));
- if(pRadarResult == NULL)
- {
- sprintf ( message , "ERROR: memory allocation failure"
- " in runRMosaic function."
- "\n\tProgram exit.") ;
- shutdown( message );
- }
-
- /* for dual pol proudcts which use daaradarresult table */
- radar_result_struct * pDAARadarResult = NULL;
-
- pDAARadarResult = (radar_result_struct *)
- malloc(pRadarLocTable->radarNum * sizeof(radar_result_struct));
- if(pDAARadarResult == NULL)
- {
- sprintf ( message , "ERROR: memory allocation failure"
- " in runRMosaic function."
- "\n\tProgram exit.") ;
- shutdown( message );
+ pRadarResult = (radar_result_struct *) malloc(
+ pRadarLocTable->radarNum * sizeof(radar_result_struct));
+ if (pRadarResult == NULL) {
+ sprintf(message, "ERROR: memory allocation failure"
+ " in runRMosaic function."
+ "\n\tProgram exit.");
+ shutdown(message);
}
- for(i = 0; i < pRadarLocTable->radarNum; i++ )
- {
- memset(pRadarResult[i].radID, '\0', RADAR_ID_LEN + 1) ;
- pRadarResult[i].edit_bias = 0;
+ /* for dual pol proudcts which use daaradarresult table */
+ radar_result_struct * pDAARadarResult = NULL;
+
+ pDAARadarResult = (radar_result_struct *) malloc(
+ pRadarLocTable->radarNum * sizeof(radar_result_struct));
+ if (pDAARadarResult == NULL) {
+ sprintf(message, "ERROR: memory allocation failure"
+ " in runRMosaic function."
+ "\n\tProgram exit.");
+ shutdown(message);
+ }
+
+ for (i = 0; i < pRadarLocTable->radarNum; i++) {
+ memset(pRadarResult[i].radID, '\0', RADAR_ID_LEN + 1);
pRadarResult[i].ignore_radar = 0;
- pRadarResult[i].bias = 0.0 ;
-
- memset(pDAARadarResult[i].radID, '\0', RADAR_ID_LEN + 1) ;
- pDAARadarResult[i].edit_bias = 0;
+ pRadarResult[i].edit_bias = 0;
+ pRadarResult[i].bias = 0.0;
+ memset(pDAARadarResult[i].radID, '\0', RADAR_ID_LEN + 1);
pDAARadarResult[i].ignore_radar = 0;
- pDAARadarResult[i].bias = 0.0 ;
+ pDAARadarResult[i].edit_bias = 0;
+ pDAARadarResult[i].bias = 0.0;
}
/*
* Read the edit bias flag, edited bias, ignore radar flag
- * from RWRadarResult table for the top hour
+ * from RWRadarResult table for the top hour for Single Pol, from DAARadarResult table for DualPol
*/
- /* when dualpol_on_flag is set as zero, no any dual pol products will be used even
- though they are available. Only single pol radar producats are used. This keeps the old
- functionality */
- if (dualpol_on_flag == 0)
- {
- readRadarResult (datehour, pRadarResult, &pps_radar_count, sp_meanbias_flag, &irc) ; /* for single pol */
- if (irc < 0)
- {
- sprintf ( message , "ERROR: In runERMosaic - Database error #%ld attempting to "
- "select record from RWRadarResult table.", irc) ;
- printLogMessage( message );
+ if (dualpol_on_flag == 0) {
+ readRadarResult(datehour, pRadarResult, &pps_radar_count,
+ sp_meanbias_flag, &irc); /* for single pol */
+ if (irc < 0) {
+ sprintf(message,
+ "ERROR: In runERMosaic - Database error #%ld attempting to "
+ "select record from RWRadarResult table.", irc);
+ printLogMessage(message);
}
-
- }
- /* Able to use dual pol products if available for this radar, if not available for this radar, use the single
- pol product */
- else
- {
- readDAARadarResult (datehour, pDAARadarResult, &dp_radar_count, dualpol_meanbias_flag, &irc) ; /* for dual pol */
-
- if (irc < 0 || dp_radar_count <= 0)
- {
- if (irc < 0)
- {
- sprintf ( message , "ERROR: In runERMosaic - Database error #%ld attempting to "
- "select record from DAARadarResult table. Try RWRadarResult table.", irc) ;
- hpe_fieldgen_printMessage( message );
- }
-
- else if (dp_radar_count <= 0)
- {
- sprintf ( message , "STATUS: in RunERMosaic - No data found for radar "
- "from DAARadarResult table, then select data from RWRadarResult table.") ;
- hpe_fieldgen_printMessage( message );
- }
- }
- readRadarResult (datehour, pRadarResult, &pps_radar_count, sp_meanbias_flag, &irc) ; /* for single pol */
- if (irc < 0)
- {
- sprintf ( message , "ERROR: in RunERMosaic - Database error #%ld attempting to "
- "select record from RWRadarResult table.", irc) ;
- printLogMessage( message );
- }
-
- }
+ } else {
+ readDAARadarResult(datehour, pDAARadarResult, &dp_radar_count,
+ dualpol_meanbias_flag, &irc); /* for dual pol */
+
+ if (irc < 0) {
+ sprintf(message,
+ "ERROR: In runERMosaic - Database error #%ld attempting to "
+ "select record from DAARadarResult table.", irc);
+ hpe_fieldgen_printMessage(message);
+ }
+ }
/*
* Read the misbin information if the token hpe_load_misbin is ON,
* otherwise the misbin will be default value(1).
* Do this only once per EMPE_fieldgen run.
*/
- if ( radarMiscBins == NULL )
- {
+ if (radarMiscBins == NULL) {
radarMiscBins = init2DShortArray(MISBIN_DEFAULT,
- pRadarLocTable->radarNum,
- NUM_DPA_ELEMENTS );
+ pRadarLocTable->radarNum, NUM_DPA_ELEMENTS);
- if(pEMPEParams->load_misbin == 1)
- {
- readMisc ( pRadarLocTable, radarMiscBins ) ;
+ if (pEMPEParams->load_misbin == 1) {
+ readMisc(pRadarLocTable, radarMiscBins);
}
}
-
+
/*
* begin loop on radars
*/
- for(i = 0; i < pRadarLocTable->radarNum; i++ )
- {
- meanFieldBias[i] = 0.0 ;
+ for (i = 0; i < pRadarLocTable->radarNum; i++) {
+ meanFieldBias[i] = 0.0;
- strcpy(radarID, pRadarLocTable->ptrRadarLocRecords[i].radarID) ;
+ strcpy(radarID, pRadarLocTable->ptrRadarLocRecords[i].radarID);
- sprintf ( message , "\n******* radar: %s *******", radarID);
- hpe_fieldgen_printMessage( message );
+ sprintf(message, "\n******* radar: %s *******", radarID);
+ hpe_fieldgen_printMessage(message);
/*
* initialize edit bias flag, ignore radar flag
*/
+ radar_result_struct * dp_pRadarInfo = NULL;
+ radar_result_struct * sp_pRadarInfo = NULL;
- dp_blnEditBias = 0 ;
- dp_blnIgnoreRadar = 0 ;
- dp_editBiasValue = 0.0 ;
- sp_blnEditBias = 0 ;
- sp_blnIgnoreRadar = 0 ;
- sp_editBiasValue = 0.0 ;
+ /*
+ * initialize edit bias flag, ignore radar flag
+ */
+ dp_blnEditBias = 0;
+ dp_editBiasValue = 0.0;
+ dp_blnIgnoreRadar = 0;
+ sp_blnEditBias = 0;
+ sp_editBiasValue = 0.0;
+ sp_blnIgnoreRadar = 0;
- radar_result_struct * dp_pRadarInfo = NULL ;
- radar_result_struct * sp_pRadarInfo = NULL ;
+ if (pDAARadarResult != NULL) {
+ dp_pRadarInfo = (radar_result_struct *) binary_search(
+ pDAARadarResult, radarID, dp_radar_count,
+ sizeof(radar_result_struct), compare_radar_id);
- /* Try dual-pol first from DAARadarResult table first, not available, then use
- single-pol RWRadarResult table */
-
- if (dp_radar_count > 0)
- {
- dp_pRadarInfo = (radar_result_struct *)
- binary_search ( pDAARadarResult, radarID, dp_radar_count,
- sizeof ( radar_result_struct), compare_radar_id );
- if ( dp_pRadarInfo != NULL )
- {
- dp_editBiasValue = dp_pRadarInfo->bias;
- dp_blnEditBias = dp_pRadarInfo->edit_bias;
- dp_blnIgnoreRadar = dp_pRadarInfo->ignore_radar;
+ if (dp_pRadarInfo != NULL) {
+ dp_blnIgnoreRadar = dp_pRadarInfo->ignore_radar;
+ dp_editBiasValue = dp_pRadarInfo->bias;
+ dp_blnEditBias = dp_pRadarInfo->edit_bias;
}
}
- sp_pRadarInfo = (radar_result_struct *)
- binary_search ( pRadarResult, radarID, pps_radar_count,
- sizeof ( radar_result_struct), compare_radar_id );
- if ( sp_pRadarInfo != NULL )
- {
- sp_editBiasValue = sp_pRadarInfo->bias;
- sp_blnEditBias = sp_pRadarInfo->edit_bias;
- sp_blnIgnoreRadar = sp_pRadarInfo->ignore_radar;
- }
+ if (pRadarResult != NULL) {
+ sp_pRadarInfo = (radar_result_struct *) binary_search(pRadarResult,
+ radarID, pps_radar_count, sizeof(radar_result_struct),
+ compare_radar_id);
+
+ if (sp_pRadarInfo != NULL) {
+ sp_blnIgnoreRadar = sp_pRadarInfo->ignore_radar;
+ sp_editBiasValue = sp_pRadarInfo->bias;
+ sp_blnEditBias = sp_pRadarInfo->edit_bias;
+ }
+ }
/*
* Read in gridded radar data
* count number of available radars
* an "ignored" radar is considered "not available"
*/
-
- /* read the DSA gridded data first, if not available, then use DSP data */
- if (dualpol_on_flag == 1)
- {
+
+ if (dualpol_on_flag == 1) {
readDSARadar(radarID, datetime, pEMPEParams->dsp_window,
- pEMPEParams->dsp_duration, dp_blnIgnoreRadar,
- origRadar, &radarAvailFlag);
+ pEMPEParams->dsp_duration, dp_blnIgnoreRadar, origRadar,
+ &radarAvailFlag);
- if (radarAvailFlag > 0)
- {
- sprintf ( message , "STATUS: In runERMosaic - dual pol product DSA is used for radar %s", radarID);
- hpe_fieldgen_printMessage( message );
- dualpol_data_avail[i] = 1;
-
- }
- else
- {
- readDSPRadar(radarID, datetime, pEMPEParams->dsp_window,
- pEMPEParams->dsp_duration, sp_blnIgnoreRadar,
- origRadar, &radarAvailFlag);
+ if (radarAvailFlag > 0) {
+ sprintf(message,
+ "STATUS: In runERMosaic - dual pol product DSA is used for radar %s",
+ radarID);
+ hpe_fieldgen_printMessage(message);
+ dualpol_data_avail[i] = 1;
+ }
+ } else {
+ readDSPRadar(radarID, datetime, pEMPEParams->dsp_window,
+ pEMPEParams->dsp_duration, sp_blnIgnoreRadar, origRadar,
+ &radarAvailFlag);
- dualpol_data_avail[i] = 0;
-
- if (radarAvailFlag > 0)
- {
- sprintf ( message , "STATUS: In runERMosaic - single pol product DSP is used for radar %s", radarID);
- hpe_fieldgen_printMessage( message );
- }
- }
- }
- else
- {
- readDSPRadar(radarID, datetime, pEMPEParams->dsp_window,
- pEMPEParams->dsp_duration, sp_blnIgnoreRadar,
- origRadar, &radarAvailFlag);
-
- dualpol_data_avail[i] = 0;
-
- if (radarAvailFlag > 0)
- {
- sprintf ( message , "STATUS: In runERMosaic - single pol product DSP is used for radar %s", radarID);
- hpe_fieldgen_printMessage( message );
- }
- }
-
-
- if(radarAvailFlag > 0)
- {
- pEMPEParams->radar_avail_num ++ ;
+ if (radarAvailFlag > 0) {
+ sprintf(message,
+ "STATUS: In runERMosaic - single pol product DSP is used for radar %s",
+ radarID);
+ hpe_fieldgen_printMessage(message);
+ dualpol_data_avail[i] = 0;
+ }
+ }
+
+ if (radarAvailFlag > 0) {
+ pEMPEParams->radar_avail_num++;
}
- sprintf ( message , "STATUS: In runERMosaic - the dualpol_data_avail flag is %d for radarID %s", dualpol_data_avail[i], radarID);
- hpe_fieldgen_printMessage( message );
/*
* Convert radar array to current hrap grid
*/
- convertFloatArray(NUM_DSP_ROWS,
- NUM_DSP_COLS,
- origRadar,
- RADAR_DEFAULT,
- GRID_ROWS,
- GRID_COLS,
- currRadar );
+ convertFloatArray(NUM_DSP_ROWS, NUM_DSP_COLS, origRadar, RADAR_DEFAULT,
+ GRID_ROWS, GRID_COLS, currRadar);
/*
* pick up the misbin for current running radar and
* convert it to current hrap grid
*/
- for(j = 0; j < NUM_DPA_ROWS; j ++)
- {
- for(k = 0; k < NUM_DPA_COLS; k ++)
- {
+ for (j = 0; j < NUM_DPA_ROWS; j++) {
+ for (k = 0; k < NUM_DPA_COLS; k++) {
index = j * NUM_DPA_COLS + k;
- hrapMiscBins[j][k] = radarMiscBins[i][index];
+ hrapMiscBins[j][k] = radarMiscBins[i][index];
}
}
- convertShortArray(NUM_DPA_ROWS,
- NUM_DPA_COLS,
- hrapMiscBins,
- MISBIN_DEFAULT,
- GRID_ROWS,
- GRID_COLS,
- currMiscBins );
+ convertShortArray(NUM_DPA_ROWS, NUM_DPA_COLS, hrapMiscBins,
+ MISBIN_DEFAULT, GRID_ROWS, GRID_COLS, currMiscBins);
/*
* get mean field bias if it is set to "ON"
*/
- if(pEMPEParams->blnMeanFieldBias == 1)
- {
-
+ if (pEMPEParams->blnMeanFieldBias == 1) {
/*
* load the mean field bias value
* and save it to meanFieldBias[i]
- * use DAABiasDyn table to load mean field bias for dual pol product, if not available
- * use RWBiasDyn table to load mean field bias for PPS product
*/
- getMeanBias(&(pRadarLocTable->ptrRadarLocRecords[i]),
- datetime, GRID_ROWS, GRID_COLS,
- currMiscBins, currRadar,
- pGeoData, pGageTable, pEMPEParams, dualpol_data_avail[i],
- &meanBias, &memSpanBias, &gageRadarPairNum ) ;
+ getMeanBias(&(pRadarLocTable->ptrRadarLocRecords[i]), datetime,
+ GRID_ROWS, GRID_COLS, currMiscBins, currRadar, pGeoData,
+ pGageTable, pEMPEParams, dualpol_data_avail[i], &meanBias,
+ &memSpanBias, &gageRadarPairNum);
- meanFieldBias[i] = meanBias ;
+ meanFieldBias[i] = meanBias;
- /*
- * if blnEditBias = 1, then use edited bias value
- */
+ if (dualpol_on_flag == 1 && dp_blnEditBias == 1) {
+ sprintf(message,
+ "STATUS:In runDHRMosaic - Edited Bias is used for radar %s",
+ radarID);
+ hpe_fieldgen_printMessage(message);
+ meanFieldBias[i] = dp_editBiasValue;
+ } else if (dualpol_on_flag == 0 && sp_blnEditBias == 1) {
+ sprintf(message,
+ "STATUS:In runDHRMosaic - Edited Bias is used for radar %s",
+ radarID);
+ hpe_fieldgen_printMessage(message);
+ meanFieldBias[i] = sp_editBiasValue;
+ }
+
+ }
+
+ sprintf(message, "\nSTATUS: In runERMosaic - MFB is %f for radid %s.",
+ meanFieldBias[i], radarID);
+ hpe_fieldgen_printMessage(message);
- if(dualpol_data_avail[i] == 1)
- {
- if(dp_blnEditBias == 1)
- {
- meanFieldBias[i] = dp_editBiasValue ;
- sprintf ( message , "STATUS: in runERMosaic - Edited bias value = %4.2f used.",
- dp_editBiasValue);
- hpe_fieldgen_printMessage( message );
- }
- }
- else
- {
- if(sp_blnEditBias == 1)
- {
- meanFieldBias[i] = sp_editBiasValue ;
- sprintf ( message , "STATUS: in runERMosaic - Edited bias value = %4.2f used.",
- sp_editBiasValue);
- hpe_fieldgen_printMessage( message );
- }
- }
-
-
- } /*end of ptrEMPEParams->blnMeanFieldBias == 1 */
-
- sprintf( message , "STATUS: In runERMosaic - MFB is %f for radid %s." ,
- meanFieldBias[i], radarID) ;
- hpe_fieldgen_printMessage( message );
-
/*
* mosaicking algorithm
*/
- createMosaic(&(pRadarLocTable->ptrRadarLocRecords[i]),
- GRID_ROWS, GRID_COLS,
- currRadar, currMiscBins, pGeoData, i+1,
- RadarBeamHeight, RMosaic, MHeight, ID,
- MaxMosaic, AvgMosaic, AvgMosaicNumRadars, blnMosaic );
+ createMosaic(&(pRadarLocTable->ptrRadarLocRecords[i]), GRID_ROWS,
+ GRID_COLS, currRadar, currMiscBins, pGeoData, i + 1,
+ RadarBeamHeight, RMosaic, MHeight, ID, MaxMosaic, AvgMosaic,
+ AvgMosaicNumRadars, blnMosaic);
}
/* end loop on radars */
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "%s = time end ERMOSAIC calculation." ,
- currTime) ;
- hpe_fieldgen_printMessage( message );
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time end ERMOSAIC calculation.", currTime);
+ hpe_fieldgen_printMessage(message);
/*
* Added by Ram for the average and max ermosaic calculations
@@ -594,419 +490,339 @@ void runERMosaic(const run_date_struct * pRunDate,
* at this time.
*/
- if(blnMosaic[avgermosaic] == 1)
- {
- for(k=0;k 0)
- {
- if(AvgMosaic[k][l] >= 0.0)
- {
+ if (blnMosaic[avgermosaic] == 1) {
+ for (k = 0; k < rowSize; k++) {
+ for (l = 0; l < colSize; l++) {
+ if (AvgMosaicNumRadars[k][l] > 0) {
+ if (AvgMosaic[k][l] >= 0.0) {
AvgMosaic[k][l] /= AvgMosaicNumRadars[k][l];
- }
- else
- {
- sprintf(message, "grid cell calculation error"
- " for cell [%d][%d] = %lf in the avg mosaic.",
- k, l, AvgMosaic[k][l]);
- hpe_fieldgen_printMessage( message );
- }
- }
- else
- {
- if(AvgMosaic[k][l] >= 0.0)
- {
+ } else {
sprintf(message, "grid cell calculation error"
" for cell [%d][%d] = %lf in the avg mosaic.",
k, l, AvgMosaic[k][l]);
- hpe_fieldgen_printMessage( message );
+ hpe_fieldgen_printMessage(message);
+ }
+ } else {
+ if (AvgMosaic[k][l] >= 0.0) {
+ sprintf(message, "grid cell calculation error"
+ " for cell [%d][%d] = %lf in the avg mosaic.",
+ k, l, AvgMosaic[k][l]);
+ hpe_fieldgen_printMessage(message);
}
}
}
}
- if(first == 1)
- {
- if(hpe_fieldgen_getAppsDefaults(AVG_ERMOSAIC_DIR_TOKEN, avgRMosaicDir)==-1)
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".\n\tProgram exit.",
- AVG_ERMOSAIC_DIR_TOKEN) ;
- shutdown( message );
+ if (first == 1) {
+ if (hpe_fieldgen_getAppsDefaults(AVG_ERMOSAIC_DIR_TOKEN,
+ avgRMosaicDir) == -1) {
+ sprintf(message, "ERROR: Invalid token value"
+ " for token \"%s\".\n\tProgram exit.",
+ AVG_ERMOSAIC_DIR_TOKEN);
+ shutdown(message);
}
}
- sprintf(fileName, "AVGRMOSAIC%s%sz",
- pEMPEParams->category_name, strDateTime );
-
- writeArray( pGeoData, avgRMosaicDir, fileName,
- FACTOR_PRECIP, replace_missing,
- pEMPEParams->user, pRunDate->tRunTime,
- DSP_PROC_FLAG, AvgMosaic, &irc ) ;
+ sprintf(fileName, "AVGRMOSAIC%s%sz", pEMPEParams->category_name,
+ strDateTime);
- if(irc != 0)
- {
- sprintf( message , "ERROR: error number = %ld"
- " attempting to write file: %s/%s" ,
- irc, avgRMosaicDir, fileName) ;
- printLogMessage( message );
- }
- else
- {
- sprintf( message , "STATUS: file written to: %s/%s" ,
- avgRMosaicDir, fileName) ;
- printLogMessage( message );
+ writeArray(pGeoData, avgRMosaicDir, fileName, FACTOR_PRECIP,
+ replace_missing, pEMPEParams->user, pRunDate->tRunTime,
+ DSP_PROC_FLAG, AvgMosaic, &irc);
+
+ if (irc != 0) {
+ sprintf(message, "ERROR: error number = %ld"
+ " attempting to write file: %s/%s", irc, avgRMosaicDir,
+ fileName);
+ printLogMessage(message);
+ } else {
+ sprintf(message, "STATUS: file written to: %s/%s", avgRMosaicDir,
+ fileName);
+ printLogMessage(message);
}
#if APPLY_POLYGON
/* Apply edit polygons to the avgrmosaic product for
- use in furture products. */
+ use in furture products. */
apply_mpe_polygons ( AvgMosaic,
- strDateTime,
- year,
- month,
- day,
- hour,
- display_avgerMosaic,
- pGeoData,
- FACTOR_PRECIP,
- 0,
- 0);
+ strDateTime,
+ year,
+ month,
+ day,
+ hour,
+ display_avgerMosaic,
+ pGeoData,
+ FACTOR_PRECIP,
+ 0,
+ 0);
#endif
- }//end blnMosaic condition
-
- if(blnMosaic[maxermosaic] == 1)
- {
- if(first == 1)
- {
- if(hpe_fieldgen_getAppsDefaults(MAX_ERMOSAIC_DIR_TOKEN, maxRMosaicDir)==-1)
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".\n\tProgram exit.",
- MAX_ERMOSAIC_DIR_TOKEN) ;
- shutdown( message );
+ } //end blnMosaic condition
+
+ if (blnMosaic[maxermosaic] == 1) {
+ if (first == 1) {
+ if (hpe_fieldgen_getAppsDefaults(MAX_ERMOSAIC_DIR_TOKEN,
+ maxRMosaicDir) == -1) {
+ sprintf(message, "ERROR: Invalid token value"
+ " for token \"%s\".\n\tProgram exit.",
+ MAX_ERMOSAIC_DIR_TOKEN);
+ shutdown(message);
}
}
- sprintf(fileName, "MAXRMOSAIC%s%sz",
- pEMPEParams->category_name, strDateTime );
- writeArray(pGeoData, maxRMosaicDir, fileName,
- FACTOR_PRECIP, replace_missing,
- pEMPEParams->user, pRunDate->tRunTime,
- DSP_PROC_FLAG, MaxMosaic, &irc) ;
+ sprintf(fileName, "MAXRMOSAIC%s%sz", pEMPEParams->category_name,
+ strDateTime);
+ writeArray(pGeoData, maxRMosaicDir, fileName, FACTOR_PRECIP,
+ replace_missing, pEMPEParams->user, pRunDate->tRunTime,
+ DSP_PROC_FLAG, MaxMosaic, &irc);
- if(irc != 0)
- {
- sprintf( message , "ERROR: error number = %ld"
- " attempting to write file: %s/%s" ,
- irc, maxRMosaicDir, fileName) ;
- printLogMessage( message );
- }
- else
- {
- sprintf( message , "STATUS: file written to: %s/%s" ,
- maxRMosaicDir, fileName) ;
- printLogMessage( message );
+ if (irc != 0) {
+ sprintf(message, "ERROR: error number = %ld"
+ " attempting to write file: %s/%s", irc, maxRMosaicDir,
+ fileName);
+ printLogMessage(message);
+ } else {
+ sprintf(message, "STATUS: file written to: %s/%s", maxRMosaicDir,
+ fileName);
+ printLogMessage(message);
}
#if APPLY_POLYGON
/* Apply edit polygons to the avgrmosaic product for
- use in furture products. */
+ use in furture products. */
apply_mpe_polygons ( MaxMosaic,
- strDateTime,
- year,
- month,
- day,
- hour,
- display_maxerMosaic,
- pGeoData,
- FACTOR_PRECIP,
- 0,
- 0 );
+ strDateTime,
+ year,
+ month,
+ day,
+ hour,
+ display_maxerMosaic,
+ pGeoData,
+ FACTOR_PRECIP,
+ 0,
+ 0 );
#endif
- }// end of blnMosaic condition
- // -------------------------------------------------
- // average and max mosaic xmrg's written to file.
+ } // end of blnMosaic condition
+ // -------------------------------------------------
+ // average and max mosaic xmrg's written to file.
/*
* Gage QC - Point Check using Radar Mosaic data.
*/
- if(blnMosaic[ermosaic] == 1)
- {
- if(pEMPEParams->gage_qc == 1)
- {
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "%s = time begin Gage QC multisensor check." ,
- currTime) ;
- hpe_fieldgen_printMessage( message );
+ if (blnMosaic[ermosaic] == 1) {
+ if (pEMPEParams->gage_qc == 1) {
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time begin Gage QC multisensor check.",
+ currTime);
+ hpe_fieldgen_printMessage(message);
- if(pGageTable->pseudoGageNum == pGageTable->totalGageNum)
- {
- sprintf( message , "STATUS: No hourly gages data available,"
- " skip Multisensor Check." ) ;
- hpe_fieldgen_printMessage( message );
+ if (pGageTable->pseudoGageNum == pGageTable->totalGageNum) {
+ sprintf(message, "STATUS: No hourly gages data available,"
+ " skip Multisensor Check.");
+ hpe_fieldgen_printMessage(message);
+ } else {
+ checkMultisensorQC(datetime, RMosaic, pGeoData, pQCGageTable);
}
- else
- {
- checkMultisensorQC(datetime , RMosaic ,
- pGeoData, pQCGageTable) ;
- }
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "%s = time end Gage QC multisensor check." ,
- currTime) ;
- hpe_fieldgen_printMessage( message );
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time end Gage QC multisensor check.",
+ currTime);
+ hpe_fieldgen_printMessage(message);
}
- }//end blnMosaic condition
+ } //end blnMosaic condition
/*
* write out gridded data in xmrg format to flat files
*/
- if(blnMosaic[ermosaic] == 1)
- {
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message , "%s = time begin writing ERMOSAIC"
- " fields to flat files.", currTime) ;
- hpe_fieldgen_printMessage( message );
+ if (blnMosaic[ermosaic] == 1) {
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time begin writing ERMOSAIC"
+ " fields to flat files.", currTime);
+ hpe_fieldgen_printMessage(message);
- if(first == 1)
- {
- if(hpe_fieldgen_getAppsDefaults(MOSAIC_DIR_TOKEN, mosaicDir) == -1)
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".\n\tProgram exit.",
- MOSAIC_DIR_TOKEN) ;
- shutdown( message );
+ if (first == 1) {
+ if (hpe_fieldgen_getAppsDefaults(MOSAIC_DIR_TOKEN, mosaicDir)
+ == -1) {
+ sprintf(message, "ERROR: Invalid token value"
+ " for token \"%s\".\n\tProgram exit.",
+ MOSAIC_DIR_TOKEN);
+ shutdown(message);
}
}
- sprintf(fileName, "ERMOSAIC%s%sz",
- pEMPEParams->category_name, strDateTime );
- sprintf(ermosaic_fileName, "ERMOSAIC%s%sz",
- pEMPEParams->category_name, strDateTime );
- writeArray(pGeoData, mosaicDir, fileName, FACTOR_PRECIP,
- replace_missing, pEMPEParams->user, pRunDate->tRunTime,
- DSP_PROC_FLAG, RMosaic, &irc) ;
+ sprintf(fileName, "ERMOSAIC%s%sz", pEMPEParams->category_name,
+ strDateTime);
+ sprintf(ermosaic_fileName, "ERMOSAIC%s%sz", pEMPEParams->category_name,
+ strDateTime);
+ writeArray(pGeoData, mosaicDir, fileName, FACTOR_PRECIP,
+ replace_missing, pEMPEParams->user, pRunDate->tRunTime,
+ DSP_PROC_FLAG, RMosaic, &irc);
- if(irc != 0)
- {
- sprintf( message , "ERROR: error number = %ld"
- " attempting to write file: %s/%s" ,
- irc, mosaicDir, fileName) ;
- printLogMessage( message );
- }
- else
- {
- sprintf( message , "STATUS: file written to: %s/%s" ,
- mosaicDir, fileName) ;
- printLogMessage( message );
+ if (irc != 0) {
+ sprintf(message, "ERROR: error number = %ld"
+ " attempting to write file: %s/%s", irc, mosaicDir,
+ fileName);
+ printLogMessage(message);
+ } else {
+ sprintf(message, "STATUS: file written to: %s/%s", mosaicDir,
+ fileName);
+ printLogMessage(message);
}
#if APPLY_POLYGON
- /* Apply edit polygons to the avgrmosaic product for
- use in future products. */
- apply_mpe_polygons ( RMosaic,
- strDateTime,
- year,
- month,
- day,
- hour,
- display_erMosaic,
- pGeoData,
- FACTOR_PRECIP,
- 0,
- 0 );
+ /* Apply edit polygons to the avgrmosaic product for
+ use in future products. */
+ apply_mpe_polygons ( RMosaic,
+ strDateTime,
+ year,
+ month,
+ day,
+ hour,
+ display_erMosaic,
+ pGeoData,
+ FACTOR_PRECIP,
+ 0,
+ 0 );
#endif
hpe_fieldgen_getAppsDefaults(SAVE_HEIGHT_TOKEN, saveflag);
- if(strcmp(hpe_fieldgen_toLowerCase(saveflag), "save") == 0)
- {
- if(first == 1)
- {
- if(hpe_fieldgen_getAppsDefaults(HEIGHT_DIR_TOKEN, heightDir) == -1)
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".\n\tProgram exit.",
- HEIGHT_DIR_TOKEN) ;
- shutdown( message );
+ if (strcmp(hpe_fieldgen_toLowerCase(saveflag), "save") == 0) {
+ if (first == 1) {
+ if (hpe_fieldgen_getAppsDefaults(HEIGHT_DIR_TOKEN, heightDir)
+ == -1) {
+ sprintf(message, "ERROR: Invalid token value"
+ " for token \"%s\".\n\tProgram exit.",
+ HEIGHT_DIR_TOKEN);
+ shutdown(message);
}
}
-
- sprintf(fileName, "DSPHEIGHT%s%sz",
- pEMPEParams->category_name, strDateTime );
- writeArray(pGeoData, heightDir, fileName, FACTOR_OTHER,
- replace_missing, pEMPEParams->user, pRunDate->tRunTime,
- DSP_PROC_FLAG, MHeight, &irc) ;
-
- if(irc != 0)
- {
- sprintf( message , "ERROR: error number = %ld"
- " attempting to write file: %s/%s." ,
- irc, heightDir, fileName) ;
- printLogMessage( message );
- }
- else
- {
- sprintf( message , "STATUS: file written to: %s/%s." ,
- heightDir, fileName) ;
- printLogMessage( message );
+
+ sprintf(fileName, "DSPHEIGHT%s%sz", pEMPEParams->category_name,
+ strDateTime);
+ writeArray(pGeoData, heightDir, fileName, FACTOR_OTHER,
+ replace_missing, pEMPEParams->user, pRunDate->tRunTime,
+ DSP_PROC_FLAG, MHeight, &irc);
+
+ if (irc != 0) {
+ sprintf(message, "ERROR: error number = %ld"
+ " attempting to write file: %s/%s.", irc, heightDir,
+ fileName);
+ printLogMessage(message);
+ } else {
+ sprintf(message, "STATUS: file written to: %s/%s.", heightDir,
+ fileName);
+ printLogMessage(message);
}
}
hpe_fieldgen_getAppsDefaults(SAVE_INDEX_TOKEN, saveflag);
- if(strcmp(hpe_fieldgen_toLowerCase(saveflag), "save") == 0)
- {
- if(first == 1)
- {
- if(hpe_fieldgen_getAppsDefaults(INDEX_DIR_TOKEN, indexDir) == -1)
- {
- sprintf ( message , "ERROR: Invalid token value"
- " for token \"%s\".\n\tProgram exit.",
- INDEX_DIR_TOKEN) ;
- shutdown( message );
+ if (strcmp(hpe_fieldgen_toLowerCase(saveflag), "save") == 0) {
+ if (first == 1) {
+ if (hpe_fieldgen_getAppsDefaults(INDEX_DIR_TOKEN, indexDir)
+ == -1) {
+ sprintf(message, "ERROR: Invalid token value"
+ " for token \"%s\".\n\tProgram exit.",
+ INDEX_DIR_TOKEN);
+ shutdown(message);
}
}
-
- sprintf(fileName, "DSPINDEX%s%sz",
- pEMPEParams->category_name, strDateTime );
-
+
+ sprintf(fileName, "DSPINDEX%s%sz", pEMPEParams->category_name,
+ strDateTime);
+
/*
* fill in tempID array
*/
-
- for(i = 0; i < rowSize; i ++)
- {
- for(j = 0; j < colSize; j ++)
- {
- tempID[i][j] = (double)ID[i][j] ;
+
+ for (i = 0; i < rowSize; i++) {
+ for (j = 0; j < colSize; j++) {
+ tempID[i][j] = (double) ID[i][j];
}
}
-
- writeArray(pGeoData, indexDir, fileName, FACTOR_OTHER,
- replace_missing, pEMPEParams->user, pRunDate->tRunTime,
- DSP_PROC_FLAG, tempID, &irc) ;
-
- if(irc != 0)
- {
- sprintf( message , "ERROR: error number = %ld"
- " attempting to write file: %s/%s." ,
- irc, indexDir, fileName) ;
- printLogMessage( message );
- }
- else
- {
- sprintf( message, "STATUS: file written to: %s/%s.", indexDir,
- fileName) ;
- printLogMessage( message );
+
+ writeArray(pGeoData, indexDir, fileName, FACTOR_OTHER,
+ replace_missing, pEMPEParams->user, pRunDate->tRunTime,
+ DSP_PROC_FLAG, tempID, &irc);
+
+ if (irc != 0) {
+ sprintf(message, "ERROR: error number = %ld"
+ " attempting to write file: %s/%s.", irc, indexDir,
+ fileName);
+ printLogMessage(message);
+ } else {
+ sprintf(message, "STATUS: file written to: %s/%s.", indexDir,
+ fileName);
+ printLogMessage(message);
}
}
- if(strcmp(pEMPEParams->base_radar_mosaic, "ermosaic") == 0)
- {
- sprintf(fileName, "ERMOSAIC%s%sz",
- pEMPEParams->category_name, strDateTime );
+ if (strcmp(pEMPEParams->base_radar_mosaic, "ermosaic") == 0) {
+ sprintf(fileName, "ERMOSAIC%s%sz", pEMPEParams->category_name,
+ strDateTime);
pMosaic = RMosaic;
- }
- else if(strcmp(pEMPEParams->base_radar_mosaic, "avgermosaic") == 0)
- {
- sprintf(fileName, "AVGRMOSAIC%s%sz",
- pEMPEParams->category_name, strDateTime );
+ } else if (strcmp(pEMPEParams->base_radar_mosaic, "avgermosaic") == 0) {
+ sprintf(fileName, "AVGRMOSAIC%s%sz", pEMPEParams->category_name,
+ strDateTime);
pMosaic = AvgMosaic;
- }
- else if(strcmp(pEMPEParams->base_radar_mosaic, "maxermosaic") == 0)
- {
- sprintf(fileName, "MAXRMOSAIC%s%sz",
- pEMPEParams->category_name, strDateTime );
+ } else if (strcmp(pEMPEParams->base_radar_mosaic, "maxermosaic") == 0) {
+ sprintf(fileName, "MAXRMOSAIC%s%sz", pEMPEParams->category_name,
+ strDateTime);
pMosaic = MaxMosaic;
}
- writeFormattedXMRG(pEMPEParams, pGeoData,
- mosaicDir, fileName, DSP_PROC_FLAG,
- SAVE_GRIB_TOKEN,
- SAVE_GIF_TOKEN, GIF_DIR_TOKEN, GIF_ID_TOKEN,
- SAVE_NETCDF_TOKEN, NETCDF_DIR_TOKEN, NETCDF_ID_TOKEN,
- SAVE_JPEG_TOKEN,
- pMosaic);
+ writeFormattedXMRG(pEMPEParams, pGeoData, mosaicDir, fileName,
+ DSP_PROC_FLAG, SAVE_GRIB_TOKEN, SAVE_GIF_TOKEN, GIF_DIR_TOKEN,
+ GIF_ID_TOKEN, SAVE_NETCDF_TOKEN, NETCDF_DIR_TOKEN,
+ NETCDF_ID_TOKEN, SAVE_JPEG_TOKEN, pMosaic);
+ hpe_fieldgen_getCurrentTime(currTime);
+ sprintf(message, "%s = time end writing ERMOSAIC fields to flat files.",
+ currTime);
+ hpe_fieldgen_printMessage(message);
- hpe_fieldgen_getCurrentTime(currTime) ;
- sprintf( message, "%s = time end writing ERMOSAIC fields to flat files.",
- currTime) ;
- hpe_fieldgen_printMessage( message );
+ } //end blnMosaic condition
- }//end blnMosaic condition
-
- /* check dual_pol_flag */
- if (dualpol_on_flag == 0)
- dualpol_used = 0;
- else
- {
- for (i = 0; i < pRadarLocTable->radarNum; i++)
- {
- if (dualpol_data_avail[i] != 0)
- {
- dualpol_used = 1;
-
- /* if dualpol data is available, however no record found in the DAARadarResult table */
- if (dualpol_meanbias_flag[i] == 0)
- meanFieldBias[i] = 1.0;
-
- break;
- }
- else
- dualpol_used = 0;
- }
- }
-
- sprintf ( message , "\nSTATUS: In ERMOSAIC, the flag dualpol_used = %d\n", dualpol_used);
- printLogMessage( message );
-
- sprintf ( message , "\nSTATUS: In ERMOSAIC, insert/update HPERadarResult table");
- printLogMessage( message );
-
- if(blnMosaic[ermosaic] == 1)
- wrtodb_HPERadarResult(ermosaic_fileName, prdDateTime, pEMPEParams, dualpol_used, nobias_flag);
-
- sprintf ( message , "\nSTATUS: In ERMOSAIC, complete insert/update HPERadarResult table");
- printLogMessage( message );
-
- freeMosaicArray(pGeoData, GRID_ROWS) ;
+ sprintf(message,
+ "\nSTATUS: In ERMOSAIC - insert/update HPERadarResult table");
+ printLogMessage(message);
- if(pRadarResult != NULL)
- {
+ if (blnMosaic[ermosaic] == 1)
+ wrtodb_HPERadarResult(ermosaic_fileName, prdDateTime, pEMPEParams,
+ dualpol_used, nobias_flag);
+
+ sprintf(message,
+ "\nSTATUS: In ERMOSAIC - complete insert/update HPERadarResult table");
+ printLogMessage(message);
+
+ freeMosaicArray(pGeoData, GRID_ROWS);
+
+ if (pRadarResult != NULL) {
free(pRadarResult);
pRadarResult = NULL;
}
- if (pDAARadarResult != NULL)
- {
+ if (pDAARadarResult != NULL) {
free(pDAARadarResult);
pDAARadarResult = NULL;
}
-
- first = 0 ;
+ first = 0;
}
static void initMosaicArray(const geo_data_struct * pGeoData,
- const int radar_rows,
- const int radar_cols)
-{
- const int rowSize = pGeoData->num_rows ;
- const int colSize = pGeoData->num_cols ;
+ const int radar_rows, const int radar_cols) {
+ const int rowSize = pGeoData->num_rows;
+ const int colSize = pGeoData->num_cols;
- MHeight = init2DDoubleArray(HEIGHT_DEFAULT, rowSize, colSize );
+ MHeight = init2DDoubleArray(HEIGHT_DEFAULT, rowSize, colSize);
- tempID = init2DDoubleArray(ID_DEFAULT, rowSize, colSize );
+ tempID = init2DDoubleArray(ID_DEFAULT, rowSize, colSize);
origRadar = init2DFloatArray(RADAR_DEFAULT, NUM_DSP_ROWS, NUM_DSP_COLS);
@@ -1018,25 +834,19 @@ static void initMosaicArray(const geo_data_struct * pGeoData,
}
static void freeMosaicArray(const geo_data_struct * pGeoData,
- const int radar_rows)
-{
- const int rowSize = pGeoData->num_rows ;
+ const int radar_rows) {
+ const int rowSize = pGeoData->num_rows;
- free2DDoubleArray(MHeight, rowSize );
-
- free2DDoubleArray(tempID, rowSize );
+ free2DDoubleArray(MHeight, rowSize);
- free2DFloatArray(origRadar, NUM_DSP_ROWS );
+ free2DDoubleArray(tempID, rowSize);
- free2DFloatArray(currRadar, radar_rows );
+ free2DFloatArray(origRadar, NUM_DSP_ROWS);
- free2DShortArray(hrapMiscBins, NUM_DPA_ROWS );
+ free2DFloatArray(currRadar, radar_rows);
- free2DShortArray(currMiscBins, radar_rows );
+ free2DShortArray(hrapMiscBins, NUM_DPA_ROWS);
-/* ============== Statements containing RCS keywords: */
-{static char rcs_id1[] = "$Source$";
- static char rcs_id2[] = "$Id$";}
-/* =================================================== */
+ free2DShortArray(currMiscBins, radar_rows);
}
diff --git a/ost/com.raytheon.uf.edex.ost.feature/feature.xml b/ost/com.raytheon.uf.edex.ost.feature/feature.xml
index 5f71c41cf6..ee6262426e 100644
--- a/ost/com.raytheon.uf.edex.ost.feature/feature.xml
+++ b/ost/com.raytheon.uf.edex.ost.feature/feature.xml
@@ -29,5 +29,17 @@
install-size="0"
version="0.0.0"
unpack="false"/>
+
+
diff --git a/ost/gov.noaa.nws.ost.dataplugin.stq/.classpath b/ost/gov.noaa.nws.ost.dataplugin.stq/.classpath
new file mode 100644
index 0000000000..b820e56467
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.dataplugin.stq/.classpath
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.dataplugin.stq/.project b/ost/gov.noaa.nws.ost.dataplugin.stq/.project
new file mode 100644
index 0000000000..3e64e60e8f
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.dataplugin.stq/.project
@@ -0,0 +1,28 @@
+
+
+ gov.noaa.nws.ost.dataplugin.stq
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.dataplugin.stq/META-INF/MANIFEST.MF b/ost/gov.noaa.nws.ost.dataplugin.stq/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..7594b921f9
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.dataplugin.stq/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Stq
+Bundle-SymbolicName: gov.noaa.nws.ost.dataplugin.stq
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: gov.noaa.nws
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: com.raytheon.edex.common,
+ com.raytheon.uf.edex.decodertools,
+ com.raytheon.uf.common.dataplugin,
+ com.raytheon.uf.common.serialization,
+ com.raytheon.uf.common.pointdata,
+ com.raytheon.uf.edex.pointdata,
+ com.raytheon.uf.common.geospatial,
+ org.geotools,
+ javax.persistence,
+ javax.measure
+Export-Package: gov.noaa.nws.ost.dataplugin.stq
diff --git a/ost/gov.noaa.nws.ost.dataplugin.stq/build.properties b/ost/gov.noaa.nws.ost.dataplugin.stq/build.properties
new file mode 100644
index 0000000000..34d2e4d2da
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.dataplugin.stq/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/ost/gov.noaa.nws.ost.dataplugin.stq/src/gov/noaa/nws/ost/dataplugin/stq/SpotRequestRecord.java b/ost/gov.noaa.nws.ost.dataplugin.stq/src/gov/noaa/nws/ost/dataplugin/stq/SpotRequestRecord.java
new file mode 100644
index 0000000000..64a6457347
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.dataplugin.stq/src/gov/noaa/nws/ost/dataplugin/stq/SpotRequestRecord.java
@@ -0,0 +1,509 @@
+package gov.noaa.nws.ost.dataplugin.stq;
+
+import java.util.Calendar;
+import javax.persistence.Access;
+import javax.persistence.AccessType;
+import javax.persistence.Column;
+import javax.persistence.Embedded;
+import javax.persistence.Entity;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import javax.persistence.UniqueConstraint;
+import javax.xml.bind.annotation.XmlAttribute;
+
+import com.raytheon.uf.common.dataplugin.PluginDataObject;
+import com.raytheon.uf.common.dataplugin.annotations.DataURI;
+import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
+import com.raytheon.uf.common.geospatial.ISpatialEnabled;
+import com.raytheon.uf.common.pointdata.IPointData;
+import com.raytheon.uf.common.pointdata.PointDataView;
+import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
+import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
+import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
+import com.vividsolutions.jts.geom.Geometry;
+
+/**
+ * SpotRequestRecord is the Data Access component for Spot Forecast Request
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * -------------- ---------- ----------- --------------------------
+ * July 17, 2015 Pwang Initial creation for STQ: Spot Request
+ * Data plugin
+ *
+ *
+ *
+ * @author pwang
+ * @version 1.0
+ */
+
+@Entity
+@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "stqseq")
+@Table(name = "stq", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
+/*
+ * Both refTime and forecastTime are included in the refTimeIndex since
+ * forecastTime is unlikely to be used.
+ */
+@DynamicSerialize
+public class SpotRequestRecord extends PersistablePluginDataObject implements
+ ISpatialEnabled, IPointData {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String pluginName = "stq";
+
+ private static final String stqDispSymbol = "S";
+
+ /*
+ * Project key, such as FGOWB, which can be used for identify the STQ requests
+ * Extract from ofile, 2nd segment, such as
+ * FGOWB from 20150530.FGOWV.01
+ */
+ @DataURI(position = 1)
+ @Column(nullable = false)
+ @DynamicSerializeElement
+ @XmlAttribute
+ private String ofileKey;
+
+ @DataURI(position = 2)
+ @Column(nullable = false)
+ @DynamicSerializeElement
+ @XmlAttribute
+ private String ofileVersion;
+
+ @Embedded
+ @DataURI(position = 3, embedded = true)
+ @DynamicSerializeElement
+ private SurfaceObsLocation location;
+
+ // Site received the request, such as BYZ
+ @Column(nullable = false)
+ @DynamicSerializeElement
+ @XmlAttribute
+ private String site;
+
+ @Embedded
+ @DynamicSerializeElement
+ private PointDataView pointDataView;
+
+ // Project Name
+ @Column(length = 32)
+ @DynamicSerializeElement
+ @XmlAttribute
+ private String projectName;
+
+ // Text of the WMO header
+ @Transient
+ @DynamicSerializeElement
+ private String wmoHeader = "";
+
+ @Transient
+ @DynamicSerializeElement
+ private String reqOfficial;
+
+ @Transient
+ @DynamicSerializeElement
+ private String emPhone;
+
+ //Time Zone
+ @Transient
+ @DynamicSerializeElement
+ private String timeZone;
+
+ // State
+ @Transient
+ @DynamicSerializeElement
+ private String state;
+
+ // bottom elevation
+ @Transient
+ @DynamicSerializeElement
+ private int bottomElevation;
+
+ // Top elevation
+ @Column
+ @DynamicSerializeElement
+ @XmlAttribute
+ private int topElevation;
+
+ // size (acres)
+ @Transient
+ @DynamicSerializeElement
+ private int sizeAcres;
+
+ @Transient
+ @DynamicSerializeElement
+ private String stqSymbol = stqDispSymbol;
+
+ /**
+ *
+ */
+ public SpotRequestRecord() {
+ }
+
+ /**
+ * Constructor for DataURI construction through base class. This is used by
+ * the notification service.
+ *
+ * @param uri
+ * A data uri applicable to this class.
+ * @param tableDef
+ * The table definitions for this class.
+ */
+ public SpotRequestRecord(String dataUri) {
+ super(dataUri);
+ }
+
+ /**
+ * Override method getPluginMNmae
+ */
+ @Override
+ public String getPluginName() {
+ return pluginName;
+ }
+
+ /**
+ * Get OFile Key
+ * @return
+ */
+ public String getOfileKey() {
+ return ofileKey;
+ }
+
+ /**
+ * Set OFile Key
+ * @param ofileKey
+ */
+ public void setOfileKey(String ofileKey) {
+ this.ofileKey = ofileKey;
+ }
+
+ /**
+ * Get OFile Version
+ * @return
+ */
+ public String getOfileVersion() {
+ return ofileVersion;
+ }
+
+ /**
+ * Set OFile Version
+ * @param ofileVersion
+ */
+ public void setOfileVersion(String ofileVersion) {
+ this.ofileVersion = ofileVersion;
+ }
+
+ /**
+ * Get Site
+ * @return
+ */
+ public String getSite() {
+ return site;
+ }
+
+ /**
+ * Set Site
+ * @param site
+ */
+ public void setSite(String site) {
+ this.site = site;
+ }
+
+ /**
+ * Get SpatialObject: SurfaceObsLocation
+ * @return
+ */
+ @Override
+ public SurfaceObsLocation getSpatialObject() {
+ return location;
+ }
+
+ /**
+ * Get location
+ * @return
+ */
+ public SurfaceObsLocation getLocation() {
+ return location;
+ }
+
+ /**
+ * Set Location
+ * @param location: SurfaceObsLocation
+ */
+ public void setLocation(SurfaceObsLocation location) {
+ this.location = location;
+ }
+
+ /**
+ * Get this observation's geometry.
+ *
+ * @return The geometry for this observation.
+ */
+ public Geometry getGeometry() {
+ return location.getGeometry();
+ }
+
+ /**
+ * Get the geometry latitude.
+ *
+ * @return The geometry latitude.
+ */
+ public double getLatitude() {
+ return location.getLatitude();
+ }
+
+ /**
+ * Get the geometry longitude.
+ *
+ * @return The geometry longitude.
+ */
+ public double getLongitude() {
+ return location.getLongitude();
+ }
+
+ /**
+ * Set latitude
+ * @param latitude
+ */
+ public void setLatitude(float latitude) {
+ location.setLatitude(latitude);
+ }
+
+ /**
+ * Set longitude
+ * @param longitude
+ */
+ public void setLongitude(float longitude) {
+ location.setLongitude(longitude);
+ }
+
+ /**
+ * Get Project Name
+ * @return
+ */
+ public String getProjectName() {
+ return projectName;
+ }
+
+ /**
+ * Set Project name
+ * @param projectName
+ */
+ public void setProjectName(String projectName) {
+ this.projectName = projectName;
+ }
+
+ /**
+ * Get PointDataView
+ * @return PointDataView
+ */
+ @Override
+ public PointDataView getPointDataView() {
+ return pointDataView;
+ }
+
+ @Override
+ public void setPointDataView(PointDataView pointDataView) {
+ this.pointDataView = pointDataView;
+ }
+
+ /**
+ * Get WMO Header
+ * @return
+ */
+ public String getWmoHeader() {
+ return wmoHeader;
+ }
+
+ /**
+ * Set WMO Header
+ * @param wmoHeader
+ */
+ public void setWmoHeader(String wmoHeader) {
+ this.wmoHeader = wmoHeader;
+ }
+
+ /**
+ * Get TimeZone
+ * @return
+ */
+ public String getTimeZone() {
+ return timeZone;
+ }
+
+ /**
+ * Set TimeZone
+ * @param timeZone
+ */
+ public void setTimeZone(String timeZone) {
+ this.timeZone = timeZone;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ /**
+ * Set State
+ * @param state
+ */
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ /**
+ * Get Bottom Elevation
+ * @return
+ */
+ public int getBottomElevation() {
+ return bottomElevation;
+ }
+
+ /**
+ * Set Bottom Elevation
+ * @param bottomElevation
+ */
+ public void setBottomElevation(int bottomElevation) {
+ this.bottomElevation = bottomElevation;
+ }
+
+ /**
+ * Get Top Elevation
+ * @return
+ */
+ public int getTopElevation() {
+ return topElevation;
+ }
+
+ /**
+ * Set Top Elevation
+ * @param topElevation
+ */
+ public void setTopElevation(int topElevation) {
+ this.topElevation = topElevation;
+ }
+
+ /**
+ * Get Size of Spot
+ * @return
+ */
+ public int getSizeAcres() {
+ return sizeAcres;
+ }
+
+ public void setSizeAcres(int sizeAcres) {
+ this.sizeAcres = sizeAcres;
+ }
+
+ /**
+ * Get the station identifier for this observation.
+ *
+ * @return the stationId
+ */
+ public String getStationId() {
+ return location.getStationId();
+ }
+
+ /**
+ * Get the elevation, in meters, of the observing platform or location.
+ *
+ * @return The observation elevation, in meters.
+ */
+ public Integer getElevation() {
+ return location.getElevation();
+ }
+
+ /**
+ * Get whether the location for this observation is defined.
+ *
+ * @return Is this location defined.
+ */
+ public Boolean getLocationDefined() {
+ return location.getLocationDefined();
+ }
+
+ /**
+ * get DataURI
+ */
+ @Override
+ @Column
+ @Access(AccessType.PROPERTY)
+ public String getDataURI() {
+ return super.getDataURI();
+ }
+
+ /**
+ * Set the data uri for this observation.
+ *
+ * @param dataURI
+ */
+ @Override
+ public void setDataURI(String dataURI) {
+ super.setDataURI(dataURI);
+ identifier = dataURI;
+ }
+
+ /**
+ * Get Request Official Name
+ * @return
+ */
+ public String getReqOfficial() {
+ return reqOfficial;
+ }
+
+ /**
+ * Set Request Official Name
+ * @param reqOfficial
+ */
+ public void setReqOfficial(String reqOfficial) {
+ this.reqOfficial = reqOfficial;
+ }
+
+ /**
+ * Get Requester's Emergency Phone Number
+ * @return
+ */
+ public String getEmPhone() {
+ return emPhone;
+ }
+
+ /**
+ * Set Requester's Emergency Phone Number
+ * @param emPhone
+ */
+ public void setEmPhone(String emPhone) {
+ this.emPhone = emPhone;
+ }
+
+ /**
+ * Get Symbol
+ * @return
+ */
+ public String getStqSymbol() {
+ return stqSymbol;
+ }
+
+
+ /**
+ * toString
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ Calendar c = getDataTime().getRefTimeAsCalendar();
+ if (c != null) {
+ sb.append(String.format("STQ:%1$tY%1$tm%1$td%1$tH%1$tM",
+ getDataTime().getRefTimeAsCalendar()));
+ } else {
+ sb.append("STQ:YYYYMMDDHHmm");
+ }
+ sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude()));
+ return sb.toString();
+ }
+
+}
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/.classpath b/ost/gov.noaa.nws.ost.edex.plugin.stq/.classpath
new file mode 100644
index 0000000000..b820e56467
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/.classpath
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/.project b/ost/gov.noaa.nws.ost.edex.plugin.stq/.project
new file mode 100644
index 0000000000..cd2e936416
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/.project
@@ -0,0 +1,28 @@
+
+
+ gov.noaa.nws.ost.edex.plugin.stq
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/META-INF/MANIFEST.MF b/ost/gov.noaa.nws.ost.edex.plugin.stq/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..4ae13043c0
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Stq
+Bundle-SymbolicName: gov.noaa.nws.ost.edex.plugin.stq
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: gov.noaa.nws
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: com.raytheon.edex.common,
+ com.raytheon.uf.edex.decodertools,
+ com.raytheon.uf.common.pointdata,
+ com.raytheon.uf.edex.pointdata,
+ org.geotools,
+ org.apache.commons.logging,
+ org.dom4j,
+ javax.persistence,
+ javax.measure
+Export-Package: gov.noaa.nws.ost.edex.plugin.stq
+Import-Package: com.raytheon.uf.common.status,
+ com.raytheon.uf.common.wmo,
+ gov.noaa.nws.ost.dataplugin.stq,
+ gov.noaa.nws.ost.edex.plugin.stq
+
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/build.properties b/ost/gov.noaa.nws.ost.edex.plugin.stq/build.properties
new file mode 100644
index 0000000000..5791d48d5f
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ res/
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/res/pointdata/stq.xml b/ost/gov.noaa.nws.ost.edex.plugin.stq/res/pointdata/stq.xml
new file mode 100644
index 0000000000..6270d96577
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/res/pointdata/stq.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/res/pointdata/stqdb.xml b/ost/gov.noaa.nws.ost.edex.plugin.stq/res/pointdata/stqdb.xml
new file mode 100644
index 0000000000..aa9de79651
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/res/pointdata/stqdb.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/res/spring/stq-common.xml b/ost/gov.noaa.nws.ost.edex.plugin.stq/res/spring/stq-common.xml
new file mode 100644
index 0000000000..2b2ad6dc4b
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/res/spring/stq-common.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/res/spring/stq-ingest.xml b/ost/gov.noaa.nws.ost.edex.plugin.stq/res/spring/stq-ingest.xml
new file mode 100644
index 0000000000..2f80a22a3c
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/res/spring/stq-ingest.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ stq
+
+
+
+
+
+
+
+
+
+
+ java.lang.Throwable
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestDecoder.java b/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestDecoder.java
new file mode 100644
index 0000000000..21469a3852
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestDecoder.java
@@ -0,0 +1,116 @@
+package gov.noaa.nws.ost.edex.plugin.stq;
+
+import gov.noaa.nws.ost.dataplugin.stq.SpotRequestRecord;
+
+import java.io.File;
+
+import com.raytheon.edex.esb.Headers;
+import com.raytheon.edex.exception.DecoderException;
+import com.raytheon.uf.common.dataplugin.PluginDataObject;
+import com.raytheon.uf.common.pointdata.PointDataDescription;
+import com.raytheon.uf.common.status.IUFStatusHandler;
+import com.raytheon.uf.common.status.UFStatus;
+import gov.noaa.nws.ost.edex.plugin.stq.SpotRequestRecordDAO;
+
+
+/**
+ * AWIPS decoder adapter strategy for Spot Forecast Request data.
+ *
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * July 23, 2015 17366 pwang Initial implementation of SpotRequestDecoder
+ * Oct 30, 2015 17366 pwang Added error handling for DAO, PDD creation
+ *
+ *
+ *
+ * @author pwang
+ * @version 1.0
+ */
+public class SpotRequestDecoder {
+
+ private IUFStatusHandler logger = UFStatus
+ .getHandler(SpotRequestDecoder.class);
+ private static final String STQ_PDD_RES_FILE = "/res/pointdata/stq.xml";
+
+ private final String pluginName;
+
+ private PointDataDescription pdd = null;
+
+ private SpotRequestRecordDAO dao = null;
+
+
+ /**
+ * Construct a Spot Request decoder
+ */
+ public SpotRequestDecoder(String pluginName) {
+
+ this.pluginName = pluginName;
+ }
+
+ /**
+ * Get the next decoded data record.
+ *
+ * @return One record of decoded data.
+ * @throws DecoderException
+ * Thrown if no data is available.
+ */
+ public PluginDataObject[] decodeFile(File inputFile, Headers headers)
+ throws DecoderException {
+ logger.debug("STQ Decoder: start decode " + inputFile.getName());
+ SpotRequestRecord[] records = new SpotRequestRecord[1];
+
+ this.createPointDataDescription();
+ this.createDAO();
+
+ SpotRequestParser srp = new SpotRequestParser(inputFile, pdd, dao);
+ records[0] = srp.parse();
+ if (records.length > 0) {
+ SpotRequestRecord r = records[0];
+ logger.debug("STQ Record: dataURI = " + r.getDataURI());
+ }
+
+ return records;
+ }
+
+ /**
+ * Create DAO Object
+ * @throws DecoderException
+ */
+ protected void createDAO()
+ throws DecoderException {
+
+ try {
+ if(null == dao) {
+ dao = new SpotRequestRecordDAO(pluginName);
+ }
+ } catch (Exception e) {
+ logger.error("SpotRequestRecordDAO object creation failed", e);
+ throw new DecoderException("STQ Decoder: create SpotRequestRecordDAO object creation failed", e);
+ }
+ }
+
+ /**
+ * Create PointDataDescription
+ * @throws DecoderException
+ */
+ protected void createPointDataDescription()
+ throws DecoderException {
+ try {
+ if(null == pdd) {
+ pdd = PointDataDescription.fromStream(this.getClass()
+ .getResourceAsStream(STQ_PDD_RES_FILE));
+ }
+
+ } catch (Exception e) {
+ logger.error("STQ PointDataDescription object failed", e);
+ throw new DecoderException("STQ Decoder: create PointDataDescription object creation failed", e);
+ }
+
+ }
+
+}
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestParser.java b/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestParser.java
new file mode 100644
index 0000000000..59ae99f29c
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestParser.java
@@ -0,0 +1,424 @@
+package gov.noaa.nws.ost.edex.plugin.stq;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TimeZone;
+import java.util.regex.Pattern;
+
+import com.raytheon.edex.exception.DecoderException;
+import com.raytheon.uf.common.pointdata.PointDataContainer;
+import com.raytheon.uf.common.pointdata.PointDataDescription;
+import com.raytheon.uf.common.pointdata.PointDataView;
+import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
+import com.raytheon.uf.common.status.IUFStatusHandler;
+import com.raytheon.uf.common.status.UFStatus;
+import com.raytheon.uf.common.time.DataTime;
+import com.raytheon.uf.common.wmo.WMOHeader;
+
+import gov.noaa.nws.ost.dataplugin.stq.SpotRequestRecord;
+
+/**
+ * Spot Forecast Request file parser
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * July 29, 2015 DCS17366 pwang Initial creation
+ *
+ *
+ *
+ * @author pwang
+ * @version 1.0
+ */
+public class SpotRequestParser {
+
+ public static final String WMO_HEADER = "[A-Z]{3}[A-Z0-9](?:\\d{0,2}|[A-Z]{0,2})\\s+[A-Z0-9]{4}\\s+\\d{6}(?:[A-Z]{3})?";
+
+ private static final Pattern WMO_HEADER_PATTERN = Pattern
+ .compile(WMO_HEADER);
+
+ private static final Pattern STQ_FILE_PATTERN = Pattern
+ .compile("STQ[A-Z]{3}");
+
+ private static final Pattern STQ_PROPERTY_PATTERN = Pattern
+ .compile(".*:\\s+");
+
+ /*
+ * Reserved patterns
+ *
+ * private static final Pattern STQ_WXCOND_PATTERN = Pattern
+ * .compile("\\.*WEATHER\\s+CONDITIONS"); private static final Pattern
+ * STQ_REMARK_PATTERN = Pattern .compile("\\.*REMARK"); private static final
+ * Pattern STQ_WXPARMS_PATTERN = Pattern
+ * .compile("\\.*WEATHER\\s+PARAMETERS");
+ */
+ private static final String PROPERTY_DELIMINATER = ":\\s+";
+
+ private static final String DOT_DELIMINATER = "\\.";
+
+ private static final String SLASH_DELIMINATER = "\\/";
+
+ private static final Map TIMEZONE = new HashMap();
+ static {
+ TIMEZONE.put("EDT", 4);
+ TIMEZONE.put("EST", 5);
+ TIMEZONE.put("CDT", 5);
+ TIMEZONE.put("CST", 6);
+ TIMEZONE.put("MDT", 6);
+ TIMEZONE.put("MST", 7);
+ TIMEZONE.put("PDT", 7);
+ TIMEZONE.put("PST", 8);
+ TIMEZONE.put("GMT", 0);
+ }
+
+ private static final Map PROPERTY_PATTERN_MAP = new HashMap();
+ static {
+ PROPERTY_PATTERN_MAP.put("DATE_NAME", "DATE");
+ PROPERTY_PATTERN_MAP.put("DATE_VALUE",
+ "[0-9]{1,2}\\/[0-9]{1,2}\\/[0-9]{2}");
+ PROPERTY_PATTERN_MAP.put("TIME_NAME", "TIME");
+ PROPERTY_PATTERN_MAP.put("TIME_VALUE", "\\d{4}");
+ PROPERTY_PATTERN_MAP.put("PROJ_NAME", "PROJECT NAME");
+ PROPERTY_PATTERN_MAP.put("AGENCY_NAME", "REQUESTING\\s+AGENCY");
+ PROPERTY_PATTERN_MAP.put("OFFICIAL_NAME", "REQUESTING\\s+OFFICIAL");
+ PROPERTY_PATTERN_MAP.put("PHONE_NAME", "EMERGENCY\\s+PHONE");
+ PROPERTY_PATTERN_MAP
+ .put("PHONE_VALUE", "\\(\\d{3}\\)\\s*\\d{3}-\\d{4}");
+ PROPERTY_PATTERN_MAP.put("STATE_NAME", "STATE");
+ PROPERTY_PATTERN_MAP.put("DLAT_NAME", "DLAT");
+ PROPERTY_PATTERN_MAP.put("DLON_NAME", "DLON");
+ PROPERTY_PATTERN_MAP.put("LATLON_VALUE", "\\d+(\\.\\d+)?");
+ PROPERTY_PATTERN_MAP.put("BELEV_NAME", "BOTTOM\\s+ELEVATION");
+ PROPERTY_PATTERN_MAP.put("TELEV_NAME", "TOP\\s+ELEVATION");
+ PROPERTY_PATTERN_MAP.put("SIZE_NAME", "SIZE\\s*\\(ACRES\\)");
+ PROPERTY_PATTERN_MAP.put("SITE_NAME", "SITE");
+ PROPERTY_PATTERN_MAP.put("OFILE_NAME", "OFILE");
+ PROPERTY_PATTERN_MAP.put("OFILE_VALUE", "\\d{8}\\.\\w{5}\\.\\d{2}");
+ PROPERTY_PATTERN_MAP.put("TIMEZONE_NAME", "TIMEZONE");
+ PROPERTY_PATTERN_MAP.put("TIMEZONE_VALUE", "\\w{3}\\d{1}(\\w{3})?");
+ }
+
+ /** The logger */
+ private static final IUFStatusHandler logger = UFStatus
+ .getHandler(SpotRequestParser.class);
+
+ private File stqIngestFile = null;
+
+ private PointDataDescription pdd = null;
+
+ private SpotRequestRecordDAO dao = null;
+
+ private final Map containerMap;
+
+ private boolean isSTQFile = false;
+
+ private String[] mmddyyyy;
+
+ private WMOHeader wmoHeader;
+
+ public SpotRequestParser(File stqFile, PointDataDescription pdd,
+ SpotRequestRecordDAO dao) {
+ this.stqIngestFile = stqFile;
+ this.pdd = pdd;
+ this.dao = dao;
+ containerMap = new HashMap();
+ }
+
+ /**
+ * parse input stg file
+ *
+ * @return
+ * @throws DecoderException
+ */
+ public SpotRequestRecord parse() throws DecoderException {
+
+ SpotRequestRecord srr = new SpotRequestRecord();
+
+ SurfaceObsLocation location = new SurfaceObsLocation();
+ srr.setLocation(location);
+
+ BufferedReader br = null;
+ String oneline = "";
+
+ try {
+
+ br = new BufferedReader(new FileReader(this.stqIngestFile));
+ while ((oneline = br.readLine()) != null) {
+ // Trim spaces of the line
+ String line = oneline.trim();
+
+ // Match WHMHeader
+ if (WMO_HEADER_PATTERN.matcher(line).matches()) {
+ wmoHeader = new WMOHeader(line.getBytes(),
+ stqIngestFile.getName());
+ if (wmoHeader != null) {
+ srr.setWmoHeader(wmoHeader.getWmoHeader());
+ }
+
+ } else if (STQ_FILE_PATTERN.matcher(line).matches()) {
+ /* Just check this marker and make sure it is a right ingest
+ * file
+ */
+ isSTQFile = true;
+ } else if (STQ_PROPERTY_PATTERN.matcher(line).lookingAt()) {
+ // All lines with :
+ boolean status = parsePropertyLine(line, srr);
+ if (!status) {
+ // Missing required property
+ logger.error("STG Decoder error: invalid property value found");
+ throw new DecoderException(
+ "STQ Ingest file contains invalid property value");
+ }
+ }
+ /*
+ * Reserved else if
+ * (STQ_WXCOND_PATTERN.matcher(line).lookingAt()) { //Match
+ * reported weather conditions, reserved //do nothing continue;
+ * } else if(STQ_REMARK_PATTERN.matcher(line).lookingAt()) {
+ * //matched Remarks, reserved //do nothing continue; } else
+ * if(STQ_WXPARMS_PATTERN.matcher(line).lookingAt()) { //matched
+ * weather conditions, reserved //do nothing continue; }
+ */
+ }
+
+ // The file may not be a STQ file
+ if (!isSTQFile) {
+ logger.error("STG Decoder error: Ingest File "
+ + this.stqIngestFile + " is not a SRQ file!");
+ throw new DecoderException("STQ Ingest file "
+ + this.stqIngestFile + " is not a STQ file");
+ }
+
+ // Build PointDataDescription
+
+ PointDataContainer pdc = getContainer(srr);
+
+ // Populate the point data.
+ PointDataView view = pdc.append();
+
+ view.setString("projectName", srr.getProjectName());
+ view.setString("reqOfficial", srr.getReqOfficial());
+ view.setString("emPhone", srr.getEmPhone());
+ view.setString("timeZone", srr.getTimeZone());
+ view.setString("state", srr.getState());
+ view.setInt("bottomElevation", srr.getBottomElevation());
+ view.setInt("topElevation", srr.getTopElevation());
+ view.setInt("sizeAcres", srr.getSizeAcres());
+ view.setString("stqSymbol", srr.getStqSymbol());
+
+ srr.setPointDataView(view);
+
+ } catch (FileNotFoundException e) {
+ throw new DecoderException("STQ Ingest file " + this.stqIngestFile
+ + " is not found!", e);
+ } catch (IOException e) {
+ throw new DecoderException("I/O exception for reading "
+ + this.stqIngestFile, e);
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {
+ throw new DecoderException("I/O exception for closing "
+ + this.stqIngestFile, e);
+ }
+ }
+ }
+ return srr;
+ }
+
+ /**
+ * parsePropertyLine to property / value
+ *
+ * @param line
+ * @param stgPDO
+ * @return false if failed to parse the line
+ */
+ private boolean parsePropertyLine(String line, SpotRequestRecord stgPDO) {
+ boolean status = true;
+ String[] property = line.split(PROPERTY_DELIMINATER);
+ String propertyName = property[0].trim();
+ String propertyValue;
+
+ if (property.length > 1 && property[1] != null
+ && property[1].trim().length() > 0) {
+ // the property has a value
+ propertyValue = property[1].trim();
+ } else {
+ // Invalid property line, something wrong of the ingest file
+ return false;
+ }
+
+ // match and parse property pairs
+ if (propertyName.matches(PROPERTY_PATTERN_MAP.get("DATE_NAME"))) {
+ if (propertyValue.matches(PROPERTY_PATTERN_MAP
+ .get("DATE_VALUE"))) {
+ String mmddyyyyString = "";
+ try {
+ DateFormat informat = new SimpleDateFormat("MM/dd/yy");
+ DateFormat outformat = new SimpleDateFormat("MM/dd/yyyy");
+ mmddyyyyString = outformat.format(informat
+ .parse(propertyValue));
+ this.mmddyyyy = mmddyyyyString.split(SLASH_DELIMINATER);
+ } catch (ParseException pe) {
+ logger.error("STQ Parser: failed to parse Date string: "
+ + pe);
+ status = false;
+ }
+ }
+ else {
+ //Date is required, return false to discontinue the parsing
+ status = false;
+ }
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("TIME_NAME"))) {
+ if (propertyValue.matches(PROPERTY_PATTERN_MAP
+ .get("TIME_VALUE"))) {
+ String HHs = propertyValue.substring(0, 2);
+ String MMs = propertyValue.substring(2);
+
+ int hours = Integer.parseInt(HHs);
+ int minutes = Integer.parseInt(MMs);
+
+ stgPDO.setDataTime(getRefTime(this.mmddyyyy, hours, minutes));
+ }
+ else {
+ //Time is required, return false to discontinue the parsing
+ logger.error("STQ Parser: Invalid TIME Value: " + propertyValue);
+ status = false;
+ }
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("PROJ_NAME"))) {
+ //Project Name is required, but valuse is free text
+ stgPDO.setProjectName(propertyValue);
+ }
+ else if (propertyName
+ .matches(PROPERTY_PATTERN_MAP.get("OFFICIAL_NAME"))) {
+ stgPDO.setReqOfficial(propertyValue);
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("PHONE_NAME"))) {
+ if (propertyValue.matches(PROPERTY_PATTERN_MAP
+ .get("PHONE_VALUE"))) {
+ stgPDO.setEmPhone(propertyValue);
+ }
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("STATE_NAME"))) {
+ stgPDO.setState(propertyValue);
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("DLAT_NAME"))) {
+ if (propertyValue.matches(PROPERTY_PATTERN_MAP
+ .get("LATLON_VALUE"))) {
+ float dlat = Float.parseFloat(propertyValue.trim());
+ stgPDO.setLatitude(dlat);
+ }
+ else {
+ //DLAT is required, return false to discontinue the parsing
+ logger.error("STQ Parser: Invalid DLAT Value: " + propertyValue);
+ status = false;
+ }
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("DLON_NAME"))) {
+ if (propertyValue.matches(PROPERTY_PATTERN_MAP
+ .get("LATLON_VALUE"))) {
+ float dlon = Float.parseFloat(propertyValue.trim());
+ //Ensure lon direction is West
+ dlon = Math.abs(dlon) * -1;
+ stgPDO.setLongitude(dlon);
+ }
+ else {
+ //DLON is required, return false to discontinue the parsing
+ logger.error("STQ Parser: Invalid DLON Value: " + propertyValue);
+ status = false;
+ }
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("BELEV_NAME"))) {
+ int bottom_elevation = Integer.parseInt(propertyValue.trim());
+ stgPDO.setBottomElevation(bottom_elevation);
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("TELEV_NAME"))) {
+ int top_elevation = Integer.parseInt(propertyValue.trim());
+ stgPDO.setTopElevation(top_elevation);
+ stgPDO.getLocation().setElevation(top_elevation);
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("SIZE_NAME"))) {
+ int size = Integer.parseInt(propertyValue.trim());
+ stgPDO.setSizeAcres(size);
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("SITE_NAME"))) {
+ stgPDO.setSite(propertyValue);
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP.get("OFILE_NAME"))) {
+ if (propertyValue.matches(PROPERTY_PATTERN_MAP
+ .get("OFILE_VALUE"))) {
+ String[] ofileArray = propertyValue.split(DOT_DELIMINATER);
+ stgPDO.setOfileKey(ofileArray[1]);
+ stgPDO.setOfileVersion(ofileArray[2]);
+ stgPDO.getLocation()
+ .setStationId(ofileArray[1] + ofileArray[2]);
+ }
+ else {
+ //OFILE is required, return false to discontinue the parsing
+ logger.error("STQ Parser: Invalid OFILE Value: " + propertyValue);
+ status = false;
+ }
+ } else if (propertyName.matches(PROPERTY_PATTERN_MAP
+ .get("TIMEZONE_NAME"))) {
+ if (propertyValue.matches(PROPERTY_PATTERN_MAP
+ .get("TIMEZONE_VALUE"))) {
+ stgPDO.setTimeZone(propertyValue);
+ }
+ }
+
+ return status;
+ }
+
+ /**
+ * Gets Container
+ *
+ * @param obsData
+ * @return
+ */
+ private PointDataContainer getContainer(SpotRequestRecord stqData) {
+
+ File file = dao.getFullFilePath(stqData);
+ PointDataContainer container = containerMap.get(file);
+ if (container == null) {
+ container = PointDataContainer.build(pdd);
+ containerMap.put(file, container);
+ }
+ return container;
+ }
+
+ /**
+ * Gets the ref time from the time field, month, and year.
+ *
+ * @param time
+ * The time field.
+ * @param month
+ * The month.
+ * @param year
+ * The year.
+ * @return The ref time, or null if the time field is null.
+ */
+ private DataTime getRefTime(String[] mmddyyyy, int hour, int minute) {
+ if (mmddyyyy == null || mmddyyyy.length < 3) {
+ return null;
+ }
+
+ int year = Integer.parseInt(mmddyyyy[2]);
+ int month = Integer.parseInt(mmddyyyy[0]);
+ int day = Integer.parseInt(mmddyyyy[1]);
+
+ Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
+ cal.set(Calendar.YEAR, year);
+ cal.set(Calendar.MONTH, month - 1);
+ cal.set(Calendar.DAY_OF_MONTH, day);
+ cal.set(Calendar.HOUR_OF_DAY, hour);
+ cal.set(Calendar.MINUTE, minute);
+ cal.set(Calendar.SECOND, 0);
+ cal.set(Calendar.MILLISECOND, 0);
+ cal.setTimeZone(TimeZone.getTimeZone("GMT"));
+ return new DataTime(cal);
+ }
+
+}
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestRecordDAO.java b/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestRecordDAO.java
new file mode 100644
index 0000000000..298e280a5a
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/src/gov/noaa/nws/ost/edex/plugin/stq/SpotRequestRecordDAO.java
@@ -0,0 +1,122 @@
+package gov.noaa.nws.ost.edex.plugin.stq;
+
+import java.util.List;
+
+import com.raytheon.uf.common.dataplugin.PluginException;
+import com.raytheon.uf.common.status.IUFStatusHandler;
+import com.raytheon.uf.common.status.UFStatus;
+
+import gov.noaa.nws.ost.dataplugin.stq.SpotRequestRecord;
+import com.raytheon.uf.edex.database.DataAccessLayerException;
+import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
+
+/**
+ * SpotRequestRecord Dao
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Sept 4, 2015 pwang Initial creation
+ *
+ *
+ *
+ * @author pwang
+ * @version 1.0
+ */
+
+public class SpotRequestRecordDAO extends PointDataPluginDao {
+
+ /** The logger */
+ private static final IUFStatusHandler logger = UFStatus
+ .getHandler(SpotRequestRecordDAO.class);
+
+ private static final String FILE_NAME_KEY = "dataTime.refTime";
+ /**
+ * Creates a new Spot Request Dao
+ *
+ * @param pluginName
+ * @throws PluginException
+ */
+ public SpotRequestRecordDAO(String pluginName) throws PluginException {
+ super(pluginName);
+ }
+
+ /**
+ * Retrieves an spot request using the datauri .
+ *
+ * @param dataURI
+ * The dataURI to match against.
+ * @return The spot request record if it exists.
+ */
+ public SpotRequestRecord queryByDataURI(String dataURI) {
+ SpotRequestRecord req = null;
+ List> obs = null;
+ try {
+ obs = queryBySingleCriteria("dataURI", dataURI);
+ } catch (DataAccessLayerException e) {
+ logger.error("STQ DAO: query with criteria: " + dataURI + " failed ! " + e );
+ }
+ if ((obs != null) && (obs.size() > 0)) {
+ req = (SpotRequestRecord) obs.get(0);
+ }
+ return req;
+ }
+
+ /**
+ * Queries for to determine if a given data uri exists on the stq table.
+ *
+ * @param dataUri
+ * The DataURI to find.
+ * @return An array of objects. If not null, there should only be a single
+ * element.
+ */
+ public Object[] queryDataUriColumn(final String dataUri) {
+
+ String sql = "select datauri from awips.stq where datauri='" + dataUri
+ + "';";
+
+ Object[] results = executeSQLQuery(sql);
+
+ return results;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.raytheon.uf.edex.pointdata.PointDataPluginDao#getKeysRequiredForFileName
+ * ()
+ */
+ @Override
+ public String[] getKeysRequiredForFileName() {
+ return new String[] { FILE_NAME_KEY };
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.raytheon.uf.edex.pointdata.PointDataPluginDao#getPointDataFileName
+ * (com.raytheon.uf.common.dataplugin.PluginDataObject)
+ */
+ @Override
+ public String getPointDataFileName(SpotRequestRecord p) {
+ StringBuilder fname = new StringBuilder();
+ fname.append(this.pluginName);
+ fname.append(".h5");
+ return fname.toString();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.raytheon.uf.edex.pointdata.PointDataPluginDao#newObject()
+ */
+ @Override
+ public SpotRequestRecord newObject() {
+ return new SpotRequestRecord();
+ }
+}
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/utility/common_static/base/purge/stqPurgeRules.xml b/ost/gov.noaa.nws.ost.edex.plugin.stq/utility/common_static/base/purge/stqPurgeRules.xml
new file mode 100644
index 0000000000..ac97f6a01a
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/utility/common_static/base/purge/stqPurgeRules.xml
@@ -0,0 +1,6 @@
+
+
+
+ 01-00:00:00
+
+
\ No newline at end of file
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.stq/utility/edex_static/base/distribution/stq.xml b/ost/gov.noaa.nws.ost.edex.plugin.stq/utility/edex_static/base/distribution/stq.xml
new file mode 100644
index 0000000000..d205eb1d2e
--- /dev/null
+++ b/ost/gov.noaa.nws.ost.edex.plugin.stq/utility/edex_static/base/distribution/stq.xml
@@ -0,0 +1,4 @@
+
+
+ ^BMBB91.*
+
\ No newline at end of file
diff --git a/rpms/awips2.core/Installer.ldm/component.spec b/rpms/awips2.core/Installer.ldm/component.spec
index fe0929377e..6d5f46d91c 100644
--- a/rpms/awips2.core/Installer.ldm/component.spec
+++ b/rpms/awips2.core/Installer.ldm/component.spec
@@ -1,4 +1,4 @@
-%define _ldm_version 6.12.9
+%define _ldm_version 6.12.14
%define _ldm_src_tar ldm-%{_ldm_version}.tar.gz
# ldm-%{_ldm_version}.tar.gz is tarred up ldm-%{_ldm_version}/src dir after
# ISG makes retrans changes
@@ -198,6 +198,8 @@ if [ $? -ne 0 ]; then
exit 1
fi
export _current_dir=`pwd`
+# Localize configure based on the auto tools that are installed
+cd ${_current_dir}; autoreconf -if
su ldm -lc "cd ${_current_dir}; ./configure --disable-max-size --with-noaaport --with-retrans --disable-root-actions --prefix=${_ldm_root_dir} CFLAGS='-g -O0'" \
> configure.log 2>&1
if [ $? -ne 0 ]; then
diff --git a/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template b/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template
index c9f01c2ffb..6a6915f824 100644
--- a/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template
+++ b/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template
@@ -44,6 +44,7 @@
#20150827 4687 skorolev Add pattern for ECMWF station-based MOS text bulletins
#20150930 4930 rferrel Corrected patterns for intlsigmets.
#20151008 4958 dgilling Add pattern for NationalBlend
+#20151030 DR 17683 jwatson Add pattern for Day 8-11 Alaska 3km gridded MOS
#***************************************************************
# AWIPS 1 PATTERN GRAPHIC ^[PQ].* /redbook/Raw
@@ -246,6 +247,14 @@ NGRID ^([LM][ABCDFGH]U...) (KWBN) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#
NGRID ^(Y.UZ9[0-9]) (KWB.) (..)(..)(..)
FILE -overwrite -log -close -edex /data_store/grib2/(\3:yyyy)(\3:mm)\3/\4/GMOS/GRID184/\1_\2_\3\4\5_(seq).grib2.%Y%m%d%H
+# DR 17683
+# Day 8-11 3km Alaska Gridded MOS
+# Pattern added by Josh Watson
+# The noaaportIngester does not yet read a grib2 SBN file with more than one message.
+
+NGRID ^(L[BCDEFGHR]RZ96) (KWBQ) (..)(..)(..)
+ FILE -overwrite -log -close -edex /data_store/grib2/(\3:yyyy)(\3:mm)\3/\4/GMOS/GRID255/\1_\2_\3\4\5_(seq).grib2.%Y%m%d%H
+
# DR 17426
# 2.5km Hawaii GMOS
# Pattern added by Josh Watson
@@ -297,7 +306,8 @@ NGRID ^([LM].[EF].{1,3}) (KWBD) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([
# Pattern added by Josh Watson
# The noaaportIngester does not yet read a grib2 SBN file with more than one message.
# RM 17414 Split out EKDMOS from KMDL pattern
-NGRID ^(L[ABCDKLMN]U[ABZ][0-9][0-9]) (KMDL) (..)(..)(..)
+# DCS 11447 Fix Gridded LAMP pattern to add sky and wind
+NGRID ^(L[ABCDEFGKLMNOPQ]U[ABZ][0-9][0-9]) (KMDL) (..)(..)(..)
FILE -overwrite -log -close -edex /data_store/grib2/(\3:yyyy)(\3:mm)\3/\4/LAMP/GRID184/\1_\2_\3\4\5_(seq).grib2.%Y%m%d%H
NGRID ^([LM][EFGH][A-L]Z9[0-9]) (KMDL) (..)(..)(..)
FILE -overwrite -log -close -edex /data_store/grib2/(\3:yyyy)(\3:mm)\3/\4/EKDMOS/GRID184/\1_\2_\3\4\5_(seq).grib2.%Y%m%d%H
diff --git a/rpms/awips2.core/Installer.ldm/src/ldm-6.12.14.tar.gz b/rpms/awips2.core/Installer.ldm/src/ldm-6.12.14.tar.gz
new file mode 100755
index 0000000000..b25ced05c0
Binary files /dev/null and b/rpms/awips2.core/Installer.ldm/src/ldm-6.12.14.tar.gz differ
diff --git a/rpms/awips2.core/Installer.ldm/src/ldm-6.12.14.tgz b/rpms/awips2.core/Installer.ldm/src/ldm-6.12.14.tgz
new file mode 100644
index 0000000000..02b0e64a68
Binary files /dev/null and b/rpms/awips2.core/Installer.ldm/src/ldm-6.12.14.tgz differ