Merge branch 'master_14.2.4' into master_14.3.1 CM-MERGE:14.2.4-5 into 14.3.1

Conflicts:
	cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/StormTrackDisplay.java
	cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/LightningResource.java
	cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/VbSources.xml
	cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java
	edexOsgi/com.raytheon.uf.common.comm/src/com/raytheon/uf/common/comm/HttpClient.java

Former-commit-id: e654318431 [formerly 7334d3991903dfe8a62728de33c21e81534fdbb6]
Former-commit-id: aa83bf804f
This commit is contained in:
Brian.Dyke 2014-08-27 11:14:50 -04:00
commit f7f16ff9eb
68 changed files with 2330 additions and 524 deletions

View file

@ -0,0 +1,83 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.core.reflect;
import org.eclipse.osgi.framework.internal.core.AbstractBundle;
import org.eclipse.osgi.framework.internal.core.BundleHost;
import org.eclipse.osgi.internal.loader.BundleLoader;
import org.eclipse.osgi.internal.loader.BundleLoaderProxy;
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
/**
* Utility class to get the BundleLoader object associated with a Bundle, to
* potentially synchronize against that object.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 13, 2014 3500 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
* @see BundleSynchronizer
*/
public class BundleLoaderGetter {
private BundleLoaderGetter() {
}
/**
* Attempts to retrieve the BundleLoader associated with the bundle. Returns
* the BundleLoader or null if it could not be retrieved.
*
* @param bundle
* the bundle to retrieve the associated BundleLoader for
* @return the BundleLoader or null
*/
@SuppressWarnings("restriction")
protected static BundleLoader getBundleLoader(Bundle bundle) {
BundleLoader rval = null;
if (bundle instanceof AbstractBundle) {
BundleDescription bundleDesc = ((AbstractBundle) bundle)
.getBundleDescription();
if (bundleDesc != null) {
Object o = bundleDesc.getUserObject();
if (!(o instanceof BundleLoaderProxy)) {
if (o instanceof BundleReference)
o = ((BundleReference) o).getBundle();
if (o instanceof BundleHost)
o = ((BundleHost) o).getLoaderProxy();
}
if (o instanceof BundleLoaderProxy) {
rval = ((BundleLoaderProxy) o).getBundleLoader();
}
}
}
return rval;
}
}

View file

@ -25,7 +25,6 @@ import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.FileLocator;
import org.eclipse.osgi.framework.internal.core.BundleRepository;
import org.osgi.framework.Bundle; import org.osgi.framework.Bundle;
import org.osgi.framework.wiring.BundleWiring; import org.osgi.framework.wiring.BundleWiring;
import org.reflections.Reflections; import org.reflections.Reflections;
@ -49,6 +48,7 @@ import org.reflections.util.ConfigurationBuilder;
* Oct 21, 2013 2491 bsteffen Initial creation * Oct 21, 2013 2491 bsteffen Initial creation
* Jan 22, 2014 2062 bsteffen Handle bundles with no wiring. * Jan 22, 2014 2062 bsteffen Handle bundles with no wiring.
* Apr 16, 2014 3018 njensen Synchronize against BundleRepository * Apr 16, 2014 3018 njensen Synchronize against BundleRepository
* Aug 13, 2014 3500 bclement uses BundleSynchronizer
* *
* </pre> * </pre>
* *
@ -60,26 +60,19 @@ public class BundleReflections {
private final Reflections reflections; private final Reflections reflections;
@SuppressWarnings("restriction")
public BundleReflections(Bundle bundle, Scanner scanner) throws IOException { public BundleReflections(Bundle bundle, Scanner scanner) throws IOException {
ConfigurationBuilder cb = new ConfigurationBuilder(); final ConfigurationBuilder cb = new ConfigurationBuilder();
BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); final BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
BundleRepository bundleRepo = BundleRepositoryGetter
.getFrameworkBundleRepository(bundle);
if (bundleWiring != null) { if (bundleWiring != null) {
if (bundleRepo != null) { BundleSynchronizer.runSynchedWithBundle(new Runnable() {
synchronized (bundleRepo) { @Override
public void run() {
cb.addClassLoader(bundleWiring.getClassLoader()); cb.addClassLoader(bundleWiring.getClassLoader());
} }
} else { }, bundle);
/*
* even if we couldn't get the bundle repository to sync
* against, it's probably safe, see BundleRepositoryGetter
* javadoc
*/
cb.addClassLoader(bundleWiring.getClassLoader());
}
cb.addUrls(FileLocator.getBundleFile(bundle).toURI().toURL()); cb.addUrls(FileLocator.getBundleFile(bundle).toURI().toURL());
cb.setScanners(scanner); cb.setScanners(scanner);
reflections = cb.build(); reflections = cb.build();

View file

@ -30,28 +30,6 @@ import org.osgi.framework.Bundle;
* Utility class to get the BundleRepository object associated with a Bundle, to * Utility class to get the BundleRepository object associated with a Bundle, to
* potentially synchronize against that object. * potentially synchronize against that object.
* *
* Specifically if a call to BundleWiring.getClassLoader() is invoked on a
* thread other than main/UI thread, then there is a possible deadlock if the
* application shuts down while the BundleWiring.getClassLoader() call is still
* going. The BundleRepository of the Framework is the primary resource that is
* in contention in this deadlock scenario, due to the BundleRepository being
* used as a synchronization lock both deep in bundleWiring.getClassloader() and
* in Framework shutdown code. The other resource used as a synchronization lock
* and causing the deadlock is the BundleLoader associated with the bundle.
*
* Therefore to avoid this deadlock, if you are going to call
* BundleWiring.getClassLoader() you should attempt to get the BundleRepository
* and synchronize against it. This will ensure the call to getClassLoader() can
* finish and then release synchronization locks of both the BundleRepository
* and BundleLoader.
*
* If we fail to get the BundleRepository due to access restrictions, then you
* should proceed onwards anyway because the odds of the application shutting
* down at the same time as the call to BundleWiring.getClassLoader() is still
* running is low. Even if that occurs, the odds are further reduced that the
* two threads will synchronize against the BundleRepository at the same time
* and deadlock.
*
* *
* <pre> * <pre>
* *
@ -60,13 +38,14 @@ import org.osgi.framework.Bundle;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Apr 17, 2014 njensen Initial creation * Apr 17, 2014 njensen Initial creation
* Aug 13, 2014 3500 bclement moved documentation over to BundleSynchronizer
* *
* </pre> * </pre>
* *
* @author njensen * @author njensen
* @version 1.0 * @version 1.0
* @see BundleSynchronizer
*/ */
public class BundleRepositoryGetter { public class BundleRepositoryGetter {
private BundleRepositoryGetter() { private BundleRepositoryGetter() {

View file

@ -0,0 +1,96 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.core.reflect;
import org.eclipse.osgi.framework.internal.core.BundleRepository;
import org.eclipse.osgi.internal.loader.BundleLoader;
import org.osgi.framework.Bundle;
/**
* If a call to BundleWiring.getClassLoader() is invoked on a thread other than
* main/UI thread, then there is a possible deadlock if the application shuts
* down while the BundleWiring.getClassLoader() call is still going. The
* BundleLoader and BundleRepository of the Framework are the primary resources
* that are in contention in this deadlock scenario, due to the BundleRepository
* being used as a synchronization lock both deep in
* bundleWiring.getClassloader() and in Framework shutdown code. The other
* resource used as a synchronization lock and causing the deadlock is the
* BundleLoader associated with the bundle. When BundleLoader.findClass() is
* called, it results in a lock on the BundleLoader and then a lock on the
* BundleRepository. This happens when the DefaultClassLoader loads a class.
*
* Therefore to avoid this deadlock, if you are going to call
* BundleWiring.getClassLoader() you should attempt synchronize against the
* BundleLoader and the BundleRepository. This will ensure the call to
* getClassLoader() can finish and then release synchronization locks of both
* the BundleRepository and BundleLoader.
*
* If we fail to get the BundleLoader or BundleRepository, then you should
* proceed onwards anyway because the odds of the application shutting down at
* the same time as the call to BundleWiring.getClassLoader() is still running
* is low. Even if that occurs, the odds are further reduced that the two
* threads will synchronize against the BundleLoader and the BundleRepository at
* the same time and deadlock.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 13, 2014 3500 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class BundleSynchronizer {
private BundleSynchronizer() {
}
/**
* Attempts to synchronize with the bundle's BundleLoader and
* BundleRepository objects before running the runner. If either the
* BundleLoader or the BundleRepository are unable to be retrieved from the
* bundle, the runner is ran anyway since the likelihood of a deadlock is
* relatively small.
*
* @param runner
* @param bundle
* @see BundleLoaderGetter#getBundleLoader(Bundle)
* @see BundleRepositoryGetter#getFrameworkBundleRepository(Bundle)
*/
protected static void runSynchedWithBundle(Runnable runner, Bundle bundle) {
BundleRepository repo = BundleRepositoryGetter
.getFrameworkBundleRepository(bundle);
BundleLoader loader = BundleLoaderGetter.getBundleLoader(bundle);
if (repo != null && loader != null) {
synchronized (loader) {
synchronized (repo) {
runner.run();
}
}
} else {
runner.run();
}
}
}

View file

@ -28,7 +28,6 @@ import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.eclipse.osgi.framework.internal.core.BundleRepository;
import org.osgi.framework.Bundle; import org.osgi.framework.Bundle;
import org.osgi.framework.namespace.BundleNamespace; import org.osgi.framework.namespace.BundleNamespace;
import org.osgi.framework.namespace.PackageNamespace; import org.osgi.framework.namespace.PackageNamespace;
@ -58,6 +57,7 @@ import com.raytheon.uf.viz.core.Activator;
* bundles. * bundles.
* Feb 03, 2013 2764 bsteffen Use OSGi API to get dependencies. * Feb 03, 2013 2764 bsteffen Use OSGi API to get dependencies.
* Apr 17, 2014 3018 njensen Synchronize against BundleRepository * Apr 17, 2014 3018 njensen Synchronize against BundleRepository
* Aug 13, 2014 3500 bclement uses BundleSynchronizer
* *
* </pre> * </pre>
* *
@ -265,25 +265,20 @@ public class SubClassLocator implements ISubClassLocator {
*/ */
private Set<Class<?>> loadClassesFromCache(Bundle bundle, private Set<Class<?>> loadClassesFromCache(Bundle bundle,
Collection<String> classNames) { Collection<String> classNames) {
BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); final BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
if (bundleWiring == null) { if (bundleWiring == null) {
return Collections.emptySet(); return Collections.emptySet();
} }
BundleRepository bundleRepo = BundleRepositoryGetter final ClassLoader[] loaderHolder = new ClassLoader[1];
.getFrameworkBundleRepository(bundle); BundleSynchronizer.runSynchedWithBundle(new Runnable() {
ClassLoader loader = null; @Override
if (bundleRepo != null) { public void run() {
synchronized (bundleRepo) { loaderHolder[0] = bundleWiring.getClassLoader();
loader = bundleWiring.getClassLoader();
} }
} else { }, bundle);
/*
* even if we couldn't get the bundle repository to sync against, ClassLoader loader = loaderHolder[0];
* it's probably safe, see BundleRepositoryGetter javadoc
*/
loader = bundleWiring.getClassLoader();
}
if (loader == null) { if (loader == null) {
return Collections.emptySet(); return Collections.emptySet();
} }

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<DerivedParameter abbreviation="DIRC" name="Current Direction"
unit="°"
>
<Method name="Direction">
<Field abbreviation="UOGRD" />
<Field abbreviation="VOGRD" />
</Method>
<Method name="Direction">
<Field abbreviation="OGRD" />
</Method>
</DerivedParameter>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<DerivedParameter abbreviation="OGRD" name="Current Vectors"
unit="m/s"
>
<Method name="Vector">
<Field abbreviation="UOGRD" />
<Field abbreviation="VOGRD" />
</Method>
</DerivedParameter>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<DerivedParameter abbreviation="SPC" name="Current Speed" unit="m/s">
<Method name="Magnitude">
<Field abbreviation="UOGRD" />
<Field abbreviation="VOGRD" />
</Method>
<Method name="Magnitude">
<Field abbreviation="OGRD" />
</Method>
</DerivedParameter>

View file

@ -237,6 +237,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 09Apr2014 #3005 lvenable Added calls to mark the tabs as not current when the tabs are changed. * 09Apr2014 #3005 lvenable Added calls to mark the tabs as not current when the tabs are changed.
* This will show the tab as updating in the header and data text controls. * This will show the tab as updating in the header and data text controls.
* 07/23/2014 15645 zhao modified checkBasicSyntaxError() * 07/23/2014 15645 zhao modified checkBasicSyntaxError()
* 08/13/2014 3497 njensen Refactored syntax checking to prevent potential infinite loop
* *
* </pre> * </pre>
* *
@ -462,11 +463,6 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
*/ */
private TafRecord[] tafsInViewer; private TafRecord[] tafsInViewer;
/**
* Set to true is Python Syntax checker modified the TAF otherwise false.
*/
private boolean pythonModifiedTAF = false;
private FindReplaceDlg findDlg; private FindReplaceDlg findDlg;
/** /**
@ -1100,6 +1096,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
Menu fileMenu = new Menu(menuBar); Menu fileMenu = new Menu(menuBar);
fileMenuItem.setMenu(fileMenu); fileMenuItem.setMenu(fileMenu);
fileMenu.addListener(SWT.Show, new Listener() { fileMenu.addListener(SWT.Show, new Listener() {
@Override
public void handleEvent(Event event) { public void handleEvent(Event event) {
setAltFlagForEditorTafTabComp(); setAltFlagForEditorTafTabComp();
} }
@ -1211,6 +1208,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
Menu optionsMenu = new Menu(menuBar); Menu optionsMenu = new Menu(menuBar);
optionsMenuItem.setMenu(optionsMenu); optionsMenuItem.setMenu(optionsMenu);
optionsMenu.addListener(SWT.Show, new Listener() { optionsMenu.addListener(SWT.Show, new Listener() {
@Override
public void handleEvent(Event event) { public void handleEvent(Event event) {
setAltFlagForEditorTafTabComp(); setAltFlagForEditorTafTabComp();
} }
@ -1246,31 +1244,16 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
autoPrintMI.setText("A&uto Print"); autoPrintMI.setText("A&uto Print");
autoPrintMI.setSelection(configMgr autoPrintMI.setSelection(configMgr
.getResourceAsBoolean(ResourceTag.AutoPrint)); .getResourceAsBoolean(ResourceTag.AutoPrint));
autoPrintMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
}
});
// Update Times on Format menu item // Update Times on Format menu item
updateTimesFormatMI = new MenuItem(optionsMenu, SWT.CHECK); updateTimesFormatMI = new MenuItem(optionsMenu, SWT.CHECK);
updateTimesFormatMI.setText("U&pdate Times on Format"); updateTimesFormatMI.setText("U&pdate Times on Format");
updateTimesFormatMI.setSelection(configMgr updateTimesFormatMI.setSelection(configMgr
.getResourceAsBoolean(ResourceTag.UpdateTimes)); .getResourceAsBoolean(ResourceTag.UpdateTimes));
updateTimesFormatMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
}
});
// Send Collective menu item // Send Collective menu item
sendCollectMI = new MenuItem(optionsMenu, SWT.CHECK); sendCollectMI = new MenuItem(optionsMenu, SWT.CHECK);
sendCollectMI.setText("&Send in Collective"); sendCollectMI.setText("&Send in Collective");
sendCollectMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
}
});
} }
/** /**
@ -1290,6 +1273,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
Menu editMenu = new Menu(menuBar); Menu editMenu = new Menu(menuBar);
editMenuItem.setMenu(editMenu); editMenuItem.setMenu(editMenu);
editMenu.addListener(SWT.Show, new Listener() { editMenu.addListener(SWT.Show, new Listener() {
@Override
public void handleEvent(Event event) { public void handleEvent(Event event) {
setAltFlagForEditorTafTabComp(); setAltFlagForEditorTafTabComp();
} }
@ -1398,6 +1382,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
Menu helpMenu = new Menu(menuBar); Menu helpMenu = new Menu(menuBar);
helpMenuItem.setMenu(helpMenu); helpMenuItem.setMenu(helpMenu);
helpMenu.addListener(SWT.Show, new Listener() { helpMenu.addListener(SWT.Show, new Listener() {
@Override
public void handleEvent(Event event) { public void handleEvent(Event event) {
setAltFlagForEditorTafTabComp(); setAltFlagForEditorTafTabComp();
} }
@ -2094,12 +2079,6 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
wrapChk = new Button(controlsComp, SWT.CHECK); wrapChk = new Button(controlsComp, SWT.CHECK);
wrapChk.setText("Wrap"); wrapChk.setText("Wrap");
configMgr.setDefaultFontAndColors(wrapChk); configMgr.setDefaultFontAndColors(wrapChk);
wrapChk.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
}
});
String wrapStr = configMgr.getDataAsString(ResourceTag.Wrap); String wrapStr = configMgr.getDataAsString(ResourceTag.Wrap);
if (wrapStr.compareTo("word") == 0) { if (wrapStr.compareTo("word") == 0) {
@ -2910,20 +2889,10 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
* @return errorInTaf true when syntax error found otherwise false * @return errorInTaf true when syntax error found otherwise false
*/ */
private boolean checkSyntaxInEditor(boolean doLogMessage) { private boolean checkSyntaxInEditor(boolean doLogMessage) {
// Get the content of the Taf Editor.
// Assume editorTafTabComp is for the active tab.
// DR15477: trim blank lines before Syntax Checking
String in = (editorTafTabComp.getTextEditorControl().getText().trim());
// Declare variables for processing the editor's contents.
boolean errorInTaf = false;
int idx1 = 0;
int currentLineNo = 0;
clearSyntaxErrorLevel(); clearSyntaxErrorLevel();
st = editorTafTabComp.getTextEditorControl(); st = editorTafTabComp.getTextEditorControl();
final Map<StyleRange, String> syntaxMap = new HashMap<StyleRange, String>(); final Map<StyleRange, String> syntaxMap = new HashMap<StyleRange, String>();
ArrayList<String> tafList = new ArrayList<String>();
st.addMouseTrackListener(new MouseTrackAdapter() { st.addMouseTrackListener(new MouseTrackAdapter() {
@Override @Override
public void mouseHover(MouseEvent e) { public void mouseHover(MouseEvent e) {
@ -2953,12 +2922,59 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
} }
}); });
ArrayList<String> tList = new ArrayList<String>(); // Get the content of the Taf Editor.
// Assume editorTafTabComp is for the active tab.
// DR15477: trim blank lines before Syntax Checking
String in = (editorTafTabComp.getTextEditorControl().getText().trim());
checkSyntax(in, syntaxMap, doLogMessage);
// reset everything since checkSyntax may have altered the TAF
st.setStyleRange(null);
syntaxMap.clear();
/*
* TODO Refactor all of this to be smarter. Right now it's kind of dumb
* in that the python syntax check can potentially alter the datetime of
* the TAF and/or the whitespace/spacing of the TAF. If that occurs, the
* python does NOT return the map of syntax problems detected, so you
* have to run the syntax check again against the properly formatted
* TAF.
*
* Due to the way the code is currently structured, there's not an easy
* way to cleanly do the second syntax check only if necessary while
* keeping the style ranges correctly lined up. Therefore, for now we
* will run the syntax check once against the TAF(s) (ie the code
* above), and just presume that it altered the TAF's datetime or
* whitespace. Then we will run it a second time (ie the code below)
* since it should be guaranteed at that point to return a syntax map if
* there were any syntax issues detected.
*/
in = editorTafTabComp.getTextEditorControl().getText().trim();
boolean errorInTaf = checkSyntax(in, syntaxMap, doLogMessage);
st.setStyleRange(null);
Set<StyleRange> srs = syntaxMap.keySet();
for (StyleRange sr : srs) {
st.setStyleRange(sr);
}
return errorInTaf;
}
private boolean checkSyntax(String in, Map<StyleRange, String> syntaxMap,
boolean doLogMessage) {
boolean errorInTaf = false;
List<String> checkedTafs = new ArrayList<String>();
List<String> tList = new ArrayList<String>();
Map<StyleRange, String> sMap = new HashMap<StyleRange, String>(); Map<StyleRange, String> sMap = new HashMap<StyleRange, String>();
/*
* Separate each TAF individually and syntax check it, and then
* reassemble the set of TAFs each iteration to ensure the line numbers
* and style range indices will line up correctly.
*/
int idx1 = 0;
while (idx1 > -1) { while (idx1 > -1) {
int idx2 = in.indexOf("TAF", idx1 + 1); int idx2 = in.indexOf("TAF", idx1 + 1);
boolean errInTaf = false;
String taf; String taf;
sMap.clear(); sMap.clear();
tList.clear(); tList.clear();
@ -2967,52 +2983,35 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
} else { } else {
taf = in.substring(idx1); taf = in.substring(idx1);
} }
currentLineNo = st.getLineAtOffset(idx1);
errInTaf = checkSyntaxUsingPython(taf, currentLineNo, sMap, tList,
doLogMessage);
if (pythonModifiedTAF == false) { int currentLineNo = st.getLineAtOffset(idx1);
// TAF not changed prepare to check next taf. errorInTaf |= checkSyntaxUsingPython(taf, currentLineNo, sMap,
tafList.add(tList.get(0)); tList, doLogMessage);
if (errInTaf) { for (StyleRange skey : sMap.keySet()) {
for (StyleRange skey : sMap.keySet()) { syntaxMap.put(skey, sMap.get(skey));
syntaxMap.put(skey, sMap.get(skey));
}
}
errorInTaf |= errInTaf;
idx1 = idx2;
} else {
// Python modified the TAF. Assume self correction.
// Ignore errors and set up to check the corrected taf.
StringBuilder sb = new StringBuilder();
for (String tempTaf : tafList) {
sb.append(tempTaf);
sb.append("\n");
}
sb.append(tList.get(0));
sb.append("\n");
if (idx2 > -1) {
sb.append(in.substring(idx2));
}
in = sb.toString();
st.setText(in);
} }
}
StringBuilder sb = new StringBuilder(); String tafAfterCheck = tList.get(0);
checkedTafs.add(tafAfterCheck);
StringBuilder sb = new StringBuilder();
for (String checkedTaf : checkedTafs) {
sb.append(checkedTaf);
sb.append("\n");
}
int lengthChecked = sb.length();
for (String taf : tafList) { if (idx2 > -1) {
sb.append(taf); sb.append(in.substring(idx2));
sb.append("\n"); }
} in = sb.toString();
st.setText(in);
st.setText(sb.toString()); /*
st.setStyleRange(null); * Set idx1 to the next TAF after all the text that has already been
* checked. This ensures we won't hit the very rare infinite loop
Set<StyleRange> srs = syntaxMap.keySet(); * that occurs if tafAfterCheck comes back with two TAFS inside it.
*/
for (StyleRange sr : srs) { idx1 = in.indexOf("TAF", lengthChecked);
st.setStyleRange(sr);
} }
return errorInTaf; return errorInTaf;
@ -3037,32 +3036,19 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private boolean checkSyntaxUsingPython(String in, int currentLineNo, private boolean checkSyntaxUsingPython(String in, int currentLineNo,
Map<StyleRange, String> syntaxMap, ArrayList<String> tafList, Map<StyleRange, String> syntaxMap, List<String> tafList,
boolean doLogMessage) { boolean doLogMessage) {
// TODO remove
getSitesInTaf(in);
// Declare variables for processing the editor's contents.
boolean errorInTaf = false; boolean errorInTaf = false;
int[] range = new int[] { 0, 0, 0, 0 }; int[] range = new int[] { 0, 0, 0, 0 };
pythonModifiedTAF = false;
// Assume editorTafTabComp is for the active tab. in = in.trim();
st = editorTafTabComp.getTextEditorControl(); Map<String, Object> resultMap = parseText(in, editorTafTabComp.getBBB());
HashMap<String, Object> resultMap = parseText(in,
editorTafTabComp.getBBB());
HashMap<String, Object> parsedText = (HashMap<String, Object>) resultMap
.get("result");
String newText = (String) resultMap.get("text"); String newText = (String) resultMap.get("text");
Map<String, Object> parsedText = (Map<String, Object>) resultMap
.get("result");
String newTime = (String) resultMap.get("headerTime"); String newTime = (String) resultMap.get("headerTime");
tafList.add(newText); tafList.add(newText);
// Python may change the TAF let the caller handle it prior to setting
// up any error information.
if (in.trim().equals(newText.trim()) == false) {
pythonModifiedTAF = true;
return true;
}
editorTafTabComp.setLargeTF(newTime); editorTafTabComp.setLargeTF(newTime);
java.util.List<String> results; java.util.List<String> results;
StringBuilder errorMsg = new StringBuilder(); StringBuilder errorMsg = new StringBuilder();
@ -3328,7 +3314,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
* @return -- the decoded TAF * @return -- the decoded TAF
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private HashMap<String, Object> parseText(String text, String bbb) { private Map<String, Object> parseText(String text, String bbb) {
IPathManager pm = PathManagerFactory.getPathManager(); IPathManager pm = PathManagerFactory.getPathManager();
@ -3340,10 +3326,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
File baseDir = pm.getFile(baseContext, "aviation" File baseDir = pm.getFile(baseContext, "aviation"
+ IPathManager.SEPARATOR + "python"); + IPathManager.SEPARATOR + "python");
HashMap<String, Object> resultMap = null; Map<String, Object> resultMap = null;
Map<String, Object> argMap = new HashMap<String, Object>();
HashMap<String, Object> map = new HashMap<String, Object>();
try { try {
if (parsePythonScript == null) { if (parsePythonScript == null) {
parsePythonScript = new PythonScript(baseFile.getPath(), parsePythonScript = new PythonScript(baseFile.getPath(),
@ -3352,13 +3336,13 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
TafViewerEditorDlg.class.getClassLoader()); TafViewerEditorDlg.class.getClassLoader());
} }
parsePythonScript.instantiatePythonClass("parser", "Decoder", null); parsePythonScript.instantiatePythonClass("parser", "Decoder", null);
map.put("text", text); argMap.put("text", text);
map.put("bbb", bbb); argMap.put("bbb", bbb);
Object com = parsePythonScript.execute("parseFromJava", "parser", Object com = parsePythonScript.execute("parseFromJava", "parser",
map); argMap);
resultMap = (HashMap<String, Object>) com; resultMap = (Map<String, Object>) com;
} catch (JepException e) { } catch (JepException e) {
e.printStackTrace(); statusHandler.error("Error parsing TAF", e);
} }
return resultMap; return resultMap;
} }
@ -4433,6 +4417,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
* *
* @see com.raytheon.viz.aviation.editor.ITafSettable#getViewerTabList() * @see com.raytheon.viz.aviation.editor.ITafSettable#getViewerTabList()
*/ */
@Override
public List<ViewerTab> getViewerTabList() { public List<ViewerTab> getViewerTabList() {
return modelsTabs; return modelsTabs;
} }

View file

@ -106,6 +106,7 @@ import com.vividsolutions.jts.geom.LineString;
* 06-03-14 3191 njensen Fix postData to not retrieve * 06-03-14 3191 njensen Fix postData to not retrieve
* 06-17-2014 DR17409 mgamazaychikov Fix futurePoints calculation in generateNewTrackInfo() * 06-17-2014 DR17409 mgamazaychikov Fix futurePoints calculation in generateNewTrackInfo()
* and generateExistingTrackInfo() * and generateExistingTrackInfo()
* 08-21-2014 DR 15700 Qinglu Lin handle the situation where frameTime is null in paintTrack().
* *
* </pre> * </pre>
* *
@ -693,9 +694,6 @@ public class StormTrackDisplay implements IRenderable {
} }
if (state.geomChanged) { if (state.geomChanged) {
if (cachedTrack != null) {
cachedTrack.dispose();
}
if (StormTrackState.trackType.equals("lineOfStorms") && state.justSwitchedToLOS) { if (StormTrackState.trackType.equals("lineOfStorms") && state.justSwitchedToLOS) {
GeodeticCalculator gc = new GeodeticCalculator(); GeodeticCalculator gc = new GeodeticCalculator();
Coordinate[] coords = state.dragMeGeom.getCoordinates(); Coordinate[] coords = state.dragMeGeom.getCoordinates();
@ -704,9 +702,16 @@ public class StormTrackDisplay implements IRenderable {
coords[coords.length - 1].y); coords[coords.length - 1].y);
state.angle = adjustAngle(gc.getAzimuth() - 90); state.angle = adjustAngle(gc.getAzimuth() - 90);
} }
generateTrackInfo(state, paintProps); DataTime frameTime = paintProps.getDataTime();
if (state.mode == Mode.TRACK) { if (frameTime != null) {
createTrack(target, paintProps); if (cachedTrack != null) {
cachedTrack.dispose();
}
generateTrackInfo(state, paintProps, frameTime);
if (state.mode == Mode.TRACK) {
createTrack(target, paintProps);
}
state.geomChanged = false;
} }
state.geomChanged = false; state.geomChanged = false;
} }
@ -727,7 +732,7 @@ public class StormTrackDisplay implements IRenderable {
* @param currentState * @param currentState
*/ */
private void generateTrackInfo(StormTrackState currentState, private void generateTrackInfo(StormTrackState currentState,
PaintProperties paintProps) throws VizException { PaintProperties paintProps, DataTime frameTime) throws VizException {
int frameCount = trackUtil.getFrameCount(paintProps.getFramesInfo()); int frameCount = trackUtil.getFrameCount(paintProps.getFramesInfo());
int currFrame = trackUtil.getCurrentFrame(paintProps.getFramesInfo()); int currFrame = trackUtil.getCurrentFrame(paintProps.getFramesInfo());
try { try {
@ -740,7 +745,6 @@ public class StormTrackDisplay implements IRenderable {
&& currentState.timePoints.length != frameCount) { && currentState.timePoints.length != frameCount) {
// need to set theAnchorPoint and theAnchorIndex here // need to set theAnchorPoint and theAnchorIndex here
// because timePoints get erased before we get to updateAnchorPoint // because timePoints get erased before we get to updateAnchorPoint
DataTime frameTime = paintProps.getDataTime();
for (int j=0;j<currentState.timePoints.length;j++){ for (int j=0;j<currentState.timePoints.length;j++){
if (frameTime.equals(currentState.timePoints[j].time)) { if (frameTime.equals(currentState.timePoints[j].time)) {
theAnchorPoint = currentState.timePoints[j].coord; theAnchorPoint = currentState.timePoints[j].coord;
@ -787,7 +791,7 @@ public class StormTrackDisplay implements IRenderable {
generateNewTrackInfo(currentState, currFrame, paintProps); generateNewTrackInfo(currentState, currFrame, paintProps);
currentDisplayedTimes = trackUtil.getDataTimes(paintProps currentDisplayedTimes = trackUtil.getDataTimes(paintProps
.getFramesInfo()); .getFramesInfo());
generateTrackInfo(currentState, paintProps); generateTrackInfo(currentState, paintProps, frameTime);
} else { } else {
if (currentState.pointMoved) { if (currentState.pointMoved) {

View file

@ -49,6 +49,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.BinOffset; import com.raytheon.uf.common.time.BinOffset;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.common.time.TimeRange;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.viz.core.DrawableString; import com.raytheon.uf.viz.core.DrawableString;
import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IExtent;
import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.IGraphicsTarget;
@ -95,6 +96,7 @@ import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
* Feb 27, 2013 DCS 152 jgerth/elau Support for WWLLN and multiple sources * Feb 27, 2013 DCS 152 jgerth/elau Support for WWLLN and multiple sources
* Jan 21, 2014 2667 bclement renamed record's lightSource field to source * Jan 21, 2014 2667 bclement renamed record's lightSource field to source
* Jun 6, 2014 DR 17367 D. Friedman Fix cache object usage. * Jun 6, 2014 DR 17367 D. Friedman Fix cache object usage.
* Aug 04, 2014 3488 bclement added sanity check for record bin range
* Aug 19, 2014 3542 bclement fixed strike count clipping issue * Aug 19, 2014 3542 bclement fixed strike count clipping issue
* *
* </pre> * </pre>
@ -109,6 +111,8 @@ public class LightningResource extends
private static final transient IUFStatusHandler statusHandler = UFStatus private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(LightningResource.class); .getHandler(LightningResource.class);
private static final long MAX_RECORD_BIN_MILLIS = TimeUtil.MILLIS_PER_DAY;
private static class LightningFrame { private static class LightningFrame {
public LightningFrameMetadata metadata; public LightningFrameMetadata metadata;
@ -515,6 +519,13 @@ public class LightningResource extends
for (BinLightningRecord obj : objs) { for (BinLightningRecord obj : objs) {
if (obj.getSource().equals(this.lightSource) || this.lightSource.isEmpty()) { if (obj.getSource().equals(this.lightSource) || this.lightSource.isEmpty()) {
long duration = obj.getDataTime().getValidPeriod()
.getDuration();
if (duration > MAX_RECORD_BIN_MILLIS) {
statusHandler.error("Record bin time larger than maximum "
+ "supported period. Skipping record: " + obj);
continue;
}
DataTime time = new DataTime(obj.getStartTime()); DataTime time = new DataTime(obj.getStartTime());
DataTime end = new DataTime(obj.getStopTime()); DataTime end = new DataTime(obj.getStopTime());
time = this.getResourceData().getBinOffset() time = this.getResourceData().getBinOffset()

View file

@ -1,124 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- 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 This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
an_export_license_or_other_authorization. Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340 ________________________Mail_Stop_B8 U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
________________________Omaha,_NE_68106 ________________________402.291.0100 This_software_product_contains_export-restricted_data_whose
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for further_licensing_information. --> 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.
-->
<vbSourceList> <vbSourceList>
<vbSource key="DGEX186" category="Volume" /> <vbSource key="DGEX186" category="Volume" />
<vbSource key="GFS160" category="Volume" /> <vbSource key="GFS160" category="Volume" />
<vbSource key="ETA242" category="Volume" /> <vbSource key="ETA242" category="Volume" />
<vbSource key="mesoEta216" category="Volume" /> <vbSource key="mesoEta216" category="Volume" />
<vbSource key="SREF216" category="Volume" /> <vbSource key="SREF216" category="Volume" />
<vbSource key="Aviation" category="Volume" views="PLANVIEW TIMESERIES"/> <vbSource key="Aviation" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="DGEX185" category="Volume" /> <vbSource key="DGEX185" category="Volume" />
<vbSource key="ECMWF-HiRes" category="Volume" /> <vbSource key="ECMWF-HiRes" category="Volume" />
<vbSource key="ECMF-NorthernHemisphere" category="Volume" /> <vbSource key="ECMF-NorthernHemisphere" category="Volume" />
<vbSource key="GFS229" category="Volume" /> <vbSource key="GFS229" category="Volume" />
<!-- Old version being replaced by GFS229 <!-- Old version being replaced by GFS229
<vbSource key="AVN203" category="Volume" /> <vbSource key="AVN203" category="Volume" />
--> -->
<vbSource key="GFS201" category="Volume" /> <vbSource key="GFS201" category="Volume" />
<vbSource key="GFS212" category="Volume" /> <vbSource key="GFS212" category="Volume" />
<!--Old version being replaced by GFS229 <!--Old version being replaced by GFS229
<vbSource key="AVN225" category="Volume" /> <vbSource key="AVN225" category="Volume" />
<vbSource key="GFS213" category="Volume" /> <vbSource key="GFS213" category="Volume" />
--> -->
<vbSource key="ENSEMBLE" category="Volume" views="PLANVIEW TIMESERIES"/> <vbSource key="ENSEMBLE" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="AVN-NorthernHemisphere" category="Volume" /> <vbSource key="AVN-NorthernHemisphere" category="Volume" />
<vbSource key="HiResW-ARW-AK" category="Volume" /> <vbSource key="HFR-EAST_6KM" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="HiResW-ARW-East" category="Volume" /> <vbSource key="HFR-US_EAST_DELAWARE_1KM" category="Volume"
<vbSource key="HiResW-ARW-PR" category="Volume" /> views="PLANVIEW TIMESERIES" />
<vbSource key="HiResW-ARW-SJU" category="Volume" /> <vbSource key="HFR-US_EAST_FLORIDA_2KM" category="Volume"
<vbSource key="HiResW-ARW-West" category="Volume" /> views="PLANVIEW TIMESERIES" />
<vbSource key="HiResW-NMM-AK" category="Volume" /> <vbSource key="HFR-US_EAST_NORTH_2KM" category="Volume"
<vbSource key="HiResW-NMM-East" category="Volume" /> views="PLANVIEW TIMESERIES" />
<vbSource key="HiResW-NMM-PR" category="Volume" /> <vbSource key="HFR-US_EAST_SOUTH_2KM" category="Volume"
<vbSource key="HiResW-NMM-SJU" category="Volume" /> views="PLANVIEW TIMESERIES" />
<vbSource key="HiResW-NMM-West" category="Volume" /> <vbSource key="HFR-US_EAST_VIRGINIA_1KM" category="Volume"
views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-US_HAWAII_1KM" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-US_HAWAII_2KM" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-WEST_6KM" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-US_WEST_CENCAL_2KM" category="Volume"
views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-US_WEST_NORTH_2KM" category="Volume"
views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-US_WEST_SANFRAN_1KM" category="Volume"
views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-US_WEST_SOCAL_2KM" category="Volume"
views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-US_WEST_LOSANGELES_1KM" category="Volume"
views="PLANVIEW TIMESERIES" />
<vbSource key="HFR-US_WEST_LOSOSOS_1KM" category="Volume"
views="PLANVIEW TIMESERIES" />
<vbSource key="HiResW-ARW-AK" category="Volume" />
<vbSource key="HiResW-ARW-East" category="Volume" />
<vbSource key="HiResW-ARW-PR" category="Volume" />
<vbSource key="HiResW-ARW-SJU" category="Volume" />
<vbSource key="HiResW-ARW-West" category="Volume" />
<vbSource key="HiResW-NMM-AK" category="Volume" />
<vbSource key="HiResW-NMM-East" category="Volume" />
<vbSource key="HiResW-NMM-PR" category="Volume" />
<vbSource key="HiResW-NMM-SJU" category="Volume" />
<vbSource key="HiResW-NMM-West" category="Volume" />
<vbSource key="HRRR" category="Volume" /> <vbSource key="HRRR" category="Volume" />
<!-- Old version being replaced by GFS229 <!-- Old version being replaced by GFS229
<vbSource key="MRF204" category="Volume" /> <vbSource key="MRF204" category="Volume" />
--> -->
<vbSource key="LAMPQPF" category="Volume" /> <vbSource key="LAMPQPF" category="Volume" />
<vbSource key="LAPS" category="Volume" /> <vbSource key="LAPS" category="Volume" />
<vbSource key="ETA218" category="Volume" /> <vbSource key="ETA218" category="Volume" />
<vbSource key="mesoEta215" category="Volume" /> <vbSource key="mesoEta215" category="Volume" />
<vbSource key="mesoEta212" category="Volume" /> <vbSource key="mesoEta212" category="Volume" />
<vbSource key="ETA" category="Volume" /> <vbSource key="ETA" category="Volume" />
<vbSource key="ETA207" category="Volume" /> <vbSource key="ETA207" category="Volume" />
<vbSource key="NOGAPS" category="Volume" /> <vbSource key="NOGAPS" category="Volume" />
<vbSource key="GFS254" category="Volume" /> <vbSource key="GFS254" category="Volume" />
<vbSource key="SREF243" category="Volume" /> <vbSource key="SREF243" category="Volume" />
<vbSource key="RSM" category="Volume" /> <vbSource key="RSM" category="Volume" />
<vbSource key="RUC130" category="Volume" /> <vbSource key="RUC130" category="Volume" />
<vbSource key="RUC236" category="Volume" /> <vbSource key="RUC236" category="Volume" />
<vbSource key="GFS161" category="Volume" /> <vbSource key="GFS161" category="Volume" />
<!-- Old version being replaced by GFS229 <!-- Old version being replaced by GFS229
<vbSource key="MRF205" category="Volume" /> <vbSource key="MRF205" category="Volume" />
--> -->
<vbSource key="SREF212" category="Volume" views="PLANVIEW TIMESERIES"/> <vbSource key="SREF212" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="UKMET-NorthernHemisphere" category="Volume" /> <vbSource key="UKMET-NorthernHemisphere" category="Volume" />
<vbSource key="radar" name="Radar" category="Volume" /> <vbSource key="radar" name="Radar" category="Volume" />
<vbSource key="MOSGuide-AK" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="MOSGuide-AK" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-HPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AK-HPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AK-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-NICICE" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AK-NICICE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AK-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKWAVE239" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AKWAVE239" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AKwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AKwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AKHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="AKHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="BHPE" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="BHPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="CPCoutlook211" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="CPCoutlook211" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="DHM" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="DHM" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="ENPWAVE253" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="ENPWAVE253" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="EPwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="EPwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="estofsUS" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="estofsUS" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="estofsPR" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="estofsPR" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFE" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="GFE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFS199" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="GFS199" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="GFSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFSLAMPTstorm" name="GFSLAMP-Grid" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="GFSLAMPTstorm" name="GFSLAMP-Grid" category="SfcGrid"
<vbSource key="GLERL" category="SfcGrid" views="PLANVIEW TIMESERIES" /> views="PLANVIEW TIMESERIES" />
<vbSource key="GlobalWave" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="GLERL" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GlobalWave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GLOBHwave" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="GLOBHwave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GRLKwave" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="GRLKwave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MOSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="MOSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind175" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HurWind175" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="Guam-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="Guam-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GWW233" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="GWW233" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind250" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HurWind250" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HI-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HI-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HI-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HI-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCqpfNDFD" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HPCqpfNDFD" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCqpf" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HPCqpf" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPE" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MPE-Local" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="MPE-Local" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MSAS" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="MSAS" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NamDNG" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="NamDNG" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="ETA212" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="ETA212" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave15" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="NAHwave15" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="NAHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="NAHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NICICE" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="NICICE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave15" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="NPHwave15" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="NPHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="NPHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave181" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="OPCWave181" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave182" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="OPCWave182" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave180" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="OPCWave180" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PR-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="PR-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PR-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="PR-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="rfcMPE" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="rfcMPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RFCqpf" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="RFCqpf" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTGSST" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="RTGSST" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTGSSTHR" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="RTGSSTHR" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfMexico" category="SfcGrid/RTOFS/forecast" subCategory="Atlantic" views="PLANVIEW TIMESERIES" /> <vbSource key="RTOFS-GulfMexico" category="SfcGrid/RTOFS/forecast" subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfStream" category="SfcGrid/RTOFS/forecast" subCategory="Atlantic" views="PLANVIEW TIMESERIES" /> <vbSource key="RTOFS-GulfStream" category="SfcGrid/RTOFS/forecast" subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfMaine" category="SfcGrid/RTOFS/forecast" subCategory="Atlantic" views="PLANVIEW TIMESERIES" /> <vbSource key="RTOFS-GulfMaine" category="SfcGrid/RTOFS/forecast" subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
@ -149,42 +188,41 @@
<vbSource key="RTOFS-Now-TropPaciLowres" category="SfcGrid/RTOFS/nowcast" subCategory="Global" views="PLANVIEW TIMESERIES" /> <vbSource key="RTOFS-Now-TropPaciLowres" category="SfcGrid/RTOFS/nowcast" subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-WestAtl" category="SfcGrid/RTOFS/nowcast" subCategory="Global" views="PLANVIEW TIMESERIES" /> <vbSource key="RTOFS-Now-WestAtl" category="SfcGrid/RTOFS/nowcast" subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-WestConus" category="SfcGrid/RTOFS/nowcast" subCategory="Global" views="PLANVIEW TIMESERIES" /> <vbSource key="RTOFS-Now-WestConus" category="SfcGrid/RTOFS/nowcast" subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="SeaIce" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="SeaIce" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="SPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="SPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind226" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="HurWind226" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="TPCSurgeProb" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="TPCSurgeProb" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PHISH" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="PHISH" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="TPCWindProb" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="TPCWindProb" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WCwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="WCwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WCwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="WCwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAWAVE238" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="WNAWAVE238" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="WNAwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="WNAwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WPHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" /> <vbSource key="WPHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="bufrmosLAMP" name="GFSLAMP-Stn" category="Point" <vbSource key="bufrmosLAMP" name="GFSLAMP-Stn" category="Point"
views="TIMESERIES" /> views="TIMESERIES" />
<vbSource key="Ldad" category="Point" views="TIMESERIES" /> <vbSource key="Ldad" category="Point" views="TIMESERIES" />
<vbSource key="obs" name="Metar" category="Point" views="TIMESERIES" /> <vbSource key="obs" name="Metar" category="Point" views="TIMESERIES" />
<vbSource key="obsOA" name="MetarOA" category="Point" <vbSource key="obsOA" name="MetarOA" category="Point" views="PLANVIEW TIMESERIES" />
views="PLANVIEW TIMESERIES" /> <vbSource key="radar149" name="DMD" category="Point" subCategory="Column"
<vbSource key="radar149" name="DMD" category="Point" views="CROSSSECTION TIMEHEIGHT VARVSHGT TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT TIMESERIES" /> <vbSource key="modelsoundingGFS" name="GFSBufr" category="Point"
<vbSource key="modelsoundingGFS" name="GFSBufr" category="Point" subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" /> <vbSource key="goessounding" name="GoesBufr" category="Point"
<vbSource key="goessounding" name="GoesBufr" category="Point" subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" /> <vbSource key="acarssounding" name="MDCRS" category="Point"
<vbSource key="acarssounding" name="MDCRS" category="Point" subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" /> <vbSource key="modelsoundingETA" name="NAMBufr" category="Point"
<vbSource key="modelsoundingETA" name="NAMBufr" category="Point" subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" /> <vbSource key="poessounding" name="PoesBufr" category="Point"
<vbSource key="poessounding" name="PoesBufr" category="Point" subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" /> <vbSource key="profiler" name="Profiler" category="Point"
<vbSource key="profiler" name="Profiler" category="Point" subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" /> <vbSource key="bufrua" name="Raob" category="Point" subCategory="Column"
<vbSource key="bufrua" name="Raob" category="Point" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" /> <vbSource key="bufruaOA" name="RaobOA" category="Point"
<vbSource key="bufruaOA" name="RaobOA" category="Point" subCategory="Column" />
subCategory="Column" /> <vbSource key="radarVWP" name="VWP" category="Point" subCategory="Column"
<vbSource key="radarVWP" name="VWP" category="Point" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
</vbSourceList> </vbSourceList>

View file

@ -57,6 +57,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.viz.core.requests.ThriftClient; import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.viz.core.mode.CAVEMode; import com.raytheon.viz.core.mode.CAVEMode;
import com.raytheon.viz.warngen.gui.WarngenLayer; import com.raytheon.viz.warngen.gui.WarngenLayer;
import com.raytheon.viz.warngen.gui.WarngenLayer.GeoFeatureType;
import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.Polygon; import com.vividsolutions.jts.geom.Polygon;
@ -70,6 +71,7 @@ import com.vividsolutions.jts.geom.Polygon;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Jul 17, 2014 3419 jsanchez Initial creation * Jul 17, 2014 3419 jsanchez Initial creation
* Aug 20, 2014 ASM #16703 D. Friedman Ensure watches have a state attribute.
* *
* </pre> * </pre>
* *
@ -173,7 +175,8 @@ public class WatchUtil {
} }
DbQueryRequest request = buildRequest(simulatedTime, DbQueryRequest request = buildRequest(simulatedTime,
phenSigConstraint.toString(), warngenLayer.getAllUgcs(), phenSigConstraint.toString(),
warngenLayer.getAllUgcs(GeoFeatureType.COUNTY),
entityClass); entityClass);
DbQueryResponse response = (DbQueryResponse) ThriftClient DbQueryResponse response = (DbQueryResponse) ThriftClient
.sendRequest(request); .sendRequest(request);
@ -190,7 +193,7 @@ public class WatchUtil {
System.out.println("create watch area buffer time: " System.out.println("create watch area buffer time: "
+ (System.currentTimeMillis() - t0)); + (System.currentTimeMillis() - t0));
Set<String> validUgcZones = warngenLayer Set<String> validUgcZones = warngenLayer
.getUgcsForWatches(watchArea); .getUgcsForWatches(watchArea, GeoFeatureType.COUNTY);
watches = processRecords(records, validUgcZones); watches = processRecords(records, validUgcZones);
} catch (RuntimeException e) { } catch (RuntimeException e) {
statusHandler statusHandler
@ -327,6 +330,14 @@ public class WatchUtil {
*/ */
String ugcZone = ar.getUgcZone(); String ugcZone = ar.getUgcZone();
String state = getStateName(ugcZone.substring(0, 2)); String state = getStateName(ugcZone.substring(0, 2));
/*
* Temporary fix for SS DR #16703. Remove when marine watch wording
* is fixed.
*/
if (state == null)
continue;
String action = ar.getAct(); String action = ar.getAct();
String phenSig = ar.getPhensig(); String phenSig = ar.getPhensig();
String etn = ar.getEtn(); String etn = ar.getEtn();
@ -360,7 +371,16 @@ public class WatchUtil {
@Override @Override
public int compare(Watch watch1, Watch watch2) { public int compare(Watch watch1, Watch watch2) {
return watch1.getState().compareTo(watch2.getState()); String state1 = watch1.getState();
String state2 = watch2.getState();
if (state1 == state2)
return 0;
else if (state1 == null)
return 1; // null state is greater; put at end
else if (state2 == null)
return -1;
else
return state1.compareTo(state2);
} }
}); });

View file

@ -215,6 +215,7 @@ import com.vividsolutions.jts.io.WKTReader;
* 07/01/2014 DR 17450 D. Friedman Use list of templates from backup site. * 07/01/2014 DR 17450 D. Friedman Use list of templates from backup site.
* 07/28/2014 DR 17475 Qinglu Lin Updated populateStrings() and findLargestQuadrant(), removed findLargestGeometry(), * 07/28/2014 DR 17475 Qinglu Lin Updated populateStrings() and findLargestQuadrant(), removed findLargestGeometry(),
* added createAreaAndCentroidMaps() and movePopulatePt(), updated paintText() to center W. * added createAreaAndCentroidMaps() and movePopulatePt(), updated paintText() to center W.
* 08/20/2014 ASM #16703 D. Friedman Make geo feature types for watches explicit
* </pre> * </pre>
* *
* @author mschenke * @author mschenke
@ -1521,50 +1522,42 @@ public class WarngenLayer extends AbstractStormTrackResource {
return null; return null;
} }
public enum GeoFeatureType {
COUNTY("county", "FIPS"), MARINE("marinezones", "ID");
final private String tableName;
final private String fipsField;
private GeoFeatureType(String tableName, String fipsField) {
this.tableName = tableName;
this.fipsField = fipsField;
}
}
/** /**
* Returns a set of UGCs for each area in the CWA that intersects the given * Returns a set of UGCs for each area in the CWA that intersects the given
* polygon. * polygon.
*/ */
public Set<String> getUgcsForWatches(Polygon polygon) public Set<String> getUgcsForWatches(Polygon polygon, GeoFeatureType type)
throws Exception { throws Exception {
GeospatialDataAccessor gda = getGeospatialDataAcessor(); Set<String> ugcs = new HashSet<String>();
boolean isMarineZone = configuration.getGeospatialConfig() GeospatialDataAccessor gda = getGeospatialDataAcessor(type);
.getAreaSource().equalsIgnoreCase(MARINE); for (String fips : gda.getAllFipsInArea(gda.buildArea(polygon)))
if (!isMarineZone) { ugcs.add(FipsUtil.getUgcFromFips(fips));
Set<String> ugcs = new HashSet<String>(); return ugcs;
for (String fips : gda.getAllFipsInArea(gda.buildArea(polygon))) {
ugcs.add(FipsUtil.getUgcFromFips(fips));
}
return ugcs;
} else {
Set<String> ids = new HashSet<String>();
Geometry g = gda.buildArea(polygon);
ids = getAllFipsInArea(g);
return ids;
}
} }
public Set<String> getAllUgcs() throws Exception { public Set<String> getAllUgcs(GeoFeatureType type) throws Exception {
GeospatialDataAccessor gda; // TODO: zig
GeospatialDataAccessor gda = getGeospatialDataAcessor(type);
Set<String> ugcs = new HashSet<String>(); Set<String> ugcs = new HashSet<String>();
gda = getGeospatialDataAcessor(); for (GeospatialData r : gda.geoData.features) {
boolean isMarineZone = configuration.getGeospatialConfig() ugcs.add(FipsUtil.getUgcFromFips(gda.getFips(r)));
.getAreaSource().equalsIgnoreCase(MARINE);
if (!isMarineZone) {
for (GeospatialData r : gda.geoData.features) {
ugcs.add(FipsUtil.getUgcFromFips(gda.getFips(r)));
}
} else {
for (GeospatialData r : gda.geoData.features) {
ugcs.add(getFips(r));
}
} }
return ugcs; return ugcs;
} }
private GeospatialDataAccessor getGeospatialDataAcessor() private GeospatialDataAccessor getGeospatialDataAcessor(GeoFeatureType type)
throws Exception { throws Exception {
GeospatialDataList gdl = searchGeospatialDataAccessor(); GeospatialDataList gdl = searchGeospatialDataAccessor(type);
if (gdl == null) { if (gdl == null) {
// Cause county geospatial data to be loaded // Cause county geospatial data to be loaded
/* /*
@ -1574,36 +1567,33 @@ public class WarngenLayer extends AbstractStormTrackResource {
* the filename. What happens in the future if the base file gets * the filename. What happens in the future if the base file gets
* changed again? A ticket should be opened for this to be resolved. * changed again? A ticket should be opened for this to be resolved.
*/ */
WarngenConfiguration torConfig = WarngenConfiguration.loadConfig( String templateName;
"tornadoWarning", getLocalizedSite(), null); if (type == GeoFeatureType.COUNTY)
loadGeodataForConfiguration(torConfig); templateName = "tornadoWarning";
gdl = searchGeospatialDataAccessor(); else if (type == GeoFeatureType.MARINE)
templateName = "specialMarineWarning";
else
throw new IllegalArgumentException("Unsupported geo feature type " + type);
WarngenConfiguration config = WarngenConfiguration.loadConfig(
templateName, getLocalizedSite(), null);
loadGeodataForConfiguration(config);
gdl = searchGeospatialDataAccessor(type);
} }
// TODO: There should be some way to get the "county" configuration by // TODO: FIPS field should not be hardcoded.
// name
// independent of a template
AreaSourceConfiguration areaConfig = new AreaSourceConfiguration(); AreaSourceConfiguration areaConfig = new AreaSourceConfiguration();
areaConfig.setFipsField("FIPS"); areaConfig.setFipsField(type.fipsField);
return new GeospatialDataAccessor(gdl, areaConfig); return new GeospatialDataAccessor(gdl, areaConfig);
} }
private GeospatialDataList searchGeospatialDataAccessor() { private GeospatialDataList searchGeospatialDataAccessor(GeoFeatureType type) {
synchronized (siteMap) { synchronized (siteMap) {
for (Map.Entry<String, GeospatialDataList> entry : siteMap for (Map.Entry<String, GeospatialDataList> entry : siteMap
.entrySet()) { .entrySet()) {
String[] keyParts = entry.getKey().split("\\."); String[] keyParts = entry.getKey().split("\\.");
boolean isMarineZone = configuration.getGeospatialConfig()
.getAreaSource().equalsIgnoreCase(MARINE);
String mapdataTable = null;
if (!isMarineZone) {
mapdataTable = "county";
} else {
mapdataTable = "marinezones";
}
if ((keyParts.length == 2) if ((keyParts.length == 2)
&& mapdataTable.equalsIgnoreCase(keyParts[0]) && type.tableName.equalsIgnoreCase(keyParts[0])
&& getLocalizedSite().equals(keyParts[1])) { && getLocalizedSite().equals(keyParts[1])) {
return entry.getValue(); return entry.getValue();
} }

View file

@ -141,6 +141,7 @@ import com.vividsolutions.jts.io.WKTReader;
* added determineAffectedMarinePortions(). * added determineAffectedMarinePortions().
* Apr 28, 2014 3033 jsanchez Set the site and backup site in Velocity Engine's properties * Apr 28, 2014 3033 jsanchez Set the site and backup site in Velocity Engine's properties
* Jul 21, 2014 3419 jsanchez Refactored WatchUtil. * Jul 21, 2014 3419 jsanchez Refactored WatchUtil.
* Aug 15, 2014 DR15701 mgamazaychikov Removed static field watchUtil.
* </pre> * </pre>
* *
* @author njensen * @author njensen
@ -158,8 +159,6 @@ public class TemplateRunner {
private static Hashtable<String, DateFormat> dateFormat; private static Hashtable<String, DateFormat> dateFormat;
private static WatchUtil watchUtil;
static { static {
dateFormat = new Hashtable<String, DateFormat>(); dateFormat = new Hashtable<String, DateFormat>();
dateFormat dateFormat
@ -854,9 +853,7 @@ public class TemplateRunner {
// Store Watches // Store Watches
try { try {
t0 = System.currentTimeMillis(); t0 = System.currentTimeMillis();
if (watchUtil == null) { WatchUtil watchUtil = new WatchUtil(warngenLayer);
watchUtil = new WatchUtil(warngenLayer);
}
List<Watch> watches = watchUtil.getWatches(config, warnPolygon, List<Watch> watches = watchUtil.getWatches(config, warnPolygon,
simulatedTime); simulatedTime);
System.out.println("getWatches time: " System.out.println("getWatches time: "

View file

@ -1,4 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python
# This script will update any saved displays which use older skewT displays to # This script will update any saved displays which use older skewT displays to
# use Nsharp. # use Nsharp.
# #

View file

@ -0,0 +1,31 @@
#!/usr/bin/env python
# This script will update any saved displays or procedures with the old Topo file name
#
# This update only needs to be run if there are saved displays being stored
# outside of localization, for procedures saved in localization,
# updateTopoFile.sh will automatically call this.
import sys
import xml.etree.ElementTree as ET
xsitype = '{http://www.w3.org/2001/XMLSchema-instance}type'
def upgradeBundle(bundleFile):
tree = ET.parse(bundleFile)
root = tree.getroot()
iterpath = 'bundles/bundle/displayList/displays'
if root.tag == 'bundle':
iterpath = 'displayList/displays'
for display in root.iterfind(iterpath):
if display.get(xsitype) == "d2DMapRenderableDisplay":
for resourceData in display.iterfind('descriptor/resource/resourceData'):
if resourceData.get(xsitype) == 'topoResourceData':
for topoFile in resourceData.iterfind('topoFile'):
if topoFile.text == 'srtm30.hdf':
topoFile.text = 'defaultTopo.h5'
tree.write(bundleFile)
if __name__ == '__main__':
for arg in sys.argv[1:]:
upgradeBundle(arg)

View file

@ -0,0 +1,24 @@
#!/bin/bash
# This script will update any D2D procedures files
# which use the old Topo file name
IFS=$'\n'
files=`ls /awips2/edex/data/utility/cave_static/*/*/procedures/*.xml`
if [ $? -ne 0 ]; then
echo "No procedures found"
exit 1
fi
MY_DIR=`dirname $0`
for f in $files; do
grep 'srtm30.hdf' $f > /dev/null
if [ $? -eq 0 ]; then
echo Updating $f
python $MY_DIR/updateTopoFile.py $f
fi
done
echo "INFO: the update has completed successfully!"
exit 0

View file

@ -72,6 +72,7 @@ export SHLIB_PATH=$PROJECT/sharedlib
### End AWIPS 1 support ### ### End AWIPS 1 support ###
export HOSTNAME=`hostname` export HOSTNAME=`hostname`
export SHORT_HOSTNAME=`hostname -s`
# set Python & Java into the path # set Python & Java into the path
export PATH=$awips_home/bin:${JAVA_INSTALL}/bin:${PYTHON_INSTALL}/bin:$PATH export PATH=$awips_home/bin:${JAVA_INSTALL}/bin:${PYTHON_INSTALL}/bin:$PATH

View file

@ -0,0 +1,180 @@
#!/bin/sh
#####################################################################
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
#####################################################################
#####################################################################
# Script for capturing data from a wrapper java process when the
# wrapper restarts the process
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------- -------- ----------- --------------------------
# Aug 07, 2014 3470 rjpeter Initial creation
#
#####################################################################
# NOTE: Script must be located at /awips2/qpid/bin/yajsw/scripts for it to work
# base path to save capture data to, will create subdirectory for each server
basePath="/data/fxa/cave"
state=$1
string_state=$2
pid=$4
path_to_script=`readlink -f $0`
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Wrapper running $path_to_script due to state transition for pid $pid. New State $state|$string_state"
# ensure directory is created and has write permissions
checkDir() {
dir="$1"
if [ ! -d "$dir" ]; then
mkdir -p $dir
if [ ! -d "$dir" ]; then
message="Unable to create qpid capture data directory\n$dir"
echo -e "Capture failed: $message"
exit 1
fi
fi
if [ ! -w "$dir" ]; then
message="Do not have write permissions to qpid capture data directory\n$dir"
echo -e "Capture failed: $message"
exit 1
fi
}
# gets top output of local server
runTop() {
local curTime=`date "+%Y%m%d_%H:%M:%S"`
echo "$curTime: Capturing top"
echo "$curTime: Capturing top" >> $processFile
local out_file="${dataPath}/top.log"
export COLUMNS=160
top -b -c -n1 >> $out_file 2>&1
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: top captured"
}
# runs jstack 10 times, if it fails will run again with -F
runJstack() {
local curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Capturing jstacks"
local pid="$1"
local count=1
local cmd="/awips2/java/bin/jstack"
local prePath="${dataPath}/pid_${pid}_"
local log=""
while [ "$count" -le "10" ]; do
curTime=`date "+%Y%m%d_%H:%M:%S"`
log="${prePath}jstack_${count}.log"
echo "${curTime}: Running command: ${cmd} ${pid} >> ${log} 2>&1" >> $processFile
echo "Running for $curTime" >> $log
${cmd} ${pid} >> ${log} 2>&1
if [[ "$?" != "0" && $FORCE != "y" ]]; then
curTime=`date "+%Y%m%d_%H:%M:%S"`
echo "${curTime}: jstack for $pid failed to connect, rerunning with -F" >> $processFile
${cmd} -F ${pid} >> ${log} 2>&1
fi
let "count+=1"
done
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: jstacks captured"
}
# runs jmap -heap
runJmapHeap() {
local curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Capturing jmap -heap"
local pid=$1
local prePath="${dataPath}/pid_${pid}_"
local log="${prePath}jmapHeap.log"
local cmd="/awips2/java/bin/jmap -heap"
echo "${curTime}: Running command: $cmd $pid >> $log 2>&1" >> $processFile
$cmd $pid >> $log 2>&1
if [[ "$?" != "0" && $FORCE != "y" ]]; then
curTime=`date "+%Y%m%d_%H:%M:%S"`
echo "${curTime}: jmap for $pid failed to connect, rerunning with -F" >> $processFile
$cmd -F $pid >> $log 2>&1
fi
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: jmap -heap captured"
}
# runs jmap, if it fails will run again with -F
runJmap() {
local curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Capturing jmap -dump"
local pid=$1
local prePath="${dataPath}/pid_${pid}_jmap"
local log="${prePath}.log"
local dumpPath="${prePath}.hprof"
local cmd="/awips2/java/bin/jmap -dump:format=b,file=${dumpPath}"
echo "${curTime}: Running command: $cmd $pid >> $log 2>&1" >> $processFile
$cmd $pid >> $log 2>&1
if [[ "$?" != "0" && $FORCE != "y" ]]; then
curTime=`date "+%Y%m%d_%H:%M:%S"`
echo "${curTime}: jmap for $pid failed to connect, rerunning with -F" >> $processFile
$cmd -F $pid >> $log 2>&1
fi
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: jmap -dump captured"
}
if [[ "$pid" != "-1" ]]; then
process=`ps -ef | grep $pid | grep java`
if [[ "$process" != "" ]]; then
hostName=`hostname -s`
dataPath="${basePath}/${hostName}/wrapperCaptureData_${curTime}_pid_$pid"
checkDir $dataPath
processFile=${dataPath}/capture_info.log
echo "Wrapper running $0 due to state transition for pid $pid. New State $state|$string_state" >> $processFile
echo "Process information:" >> $processFile
ps -ef | grep $pid >> $processFile
runTop &
runJstack $pid &
runJmapHeap $pid &
# TODO: Double check if jvm already dumped one
runJmap $pid &
wait
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Data captured to $dataPath"
else
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: PID $pid is no longer running, nothing to capture"
fi
else
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: PID was -1, process no longer running, nothing to capture"
fi

View file

@ -96,6 +96,8 @@ wrapper.java.additional.5=-Duser.timezone=GMT
# garbage collection settings # garbage collection settings
wrapper.java.additional.gc.1=-XX:+UseConcMarkSweepGC wrapper.java.additional.gc.1=-XX:+UseConcMarkSweepGC
wrapper.java.additional.gc.2=-XX:+CMSIncrementalMode wrapper.java.additional.gc.2=-XX:+CMSIncrementalMode
wrapper.java.additional.gc.3=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.gc.4=-XX:HeapDumpPath=/data/fxa/cave/${SHORT_HOSTNAME}/
# use qpid binding URL instead of default address string format # use qpid binding URL instead of default address string format
wrapper.java.additional.qpid.1=-Dqpid.dest_syntax=BURL wrapper.java.additional.qpid.1=-Dqpid.dest_syntax=BURL
@ -154,7 +156,13 @@ wrapper.java.app.mainclass=com.raytheon.uf.edex.esb.Main
# Application parameters. Add parameters as needed starting from 2 # Application parameters. Add parameters as needed starting from 2
wrapper.app.parameter.2=start wrapper.app.parameter.2=start
wrapper.ping.timeout=300 wrapper.ping.timeout=30
# NOTE: script must be located at /awips2/qpid/bin/yajsw/scripts for it to be found
wrapper.script.ABORT=wrapperCapture.sh
wrapper.script.ABORT.timeout=120
wrapper.script.RESTART=wrapperCapture.sh
wrapper.script.RESTART.timeout=120
# jvm will be hard killed after 5 minutes of trying to shutdown # jvm will be hard killed after 5 minutes of trying to shutdown
wrapper.jvm_exit.timeout=0 wrapper.jvm_exit.timeout=0
@ -169,15 +177,16 @@ wrapper.java.monitor.heap.threshold.percent = 90
wrapper.java.monitor.deadlock = true wrapper.java.monitor.deadlock = true
# application will be restarted and a warning message will be logged # application will be restarted and a warning message will be logged
wrapper.filter.action.deadlock.restart=${WRAPPER_DEADLOCK_ACTION} wrapper.filter.trigger.deadlock=wrapper.java.monitor.deadlock: DEADLOCK IN THREADS:
wrapper.filter.action.deadlock=${WRAPPER_DEADLOCK_ACTION}
# restart the application if it crashes # restart the application if it crashes
wrapper.on_exit.default=${WRAPPER_ON_EXIT_ACTION} wrapper.on_exit.default=${WRAPPER_ON_EXIT_ACTION}
# restart the application if it runs out of memory # restart the application if it runs out of memory
wrapper.trigger.1=java.lang.OutOfMemoryError wrapper.filter.trigger.oom=java.lang.OutOfMemoryError
wrapper.trigger.action=${WRAPPER_TRIGGER_ACTION} wrapper.filter.action.oom=${WRAPPER_TRIGGER_ACTION}
#******************************************************************** #********************************************************************fil
# Wrapper Logging Properties # Wrapper Logging Properties
#******************************************************************** #********************************************************************
# Format of output for the console. (See docs for formats) # Format of output for the console. (See docs for formats)

View file

@ -22,8 +22,14 @@ package com.raytheon.edex.plugin.binlightning;
import gov.noaa.nws.ost.edex.plugin.binlightning.BinLigntningDecoderUtil; import gov.noaa.nws.ost.edex.plugin.binlightning.BinLigntningDecoderUtil;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TimeZone; import java.util.TimeZone;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
@ -33,12 +39,12 @@ import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.exception.DecoderException; import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.AbstractDecoder; import com.raytheon.edex.plugin.AbstractDecoder;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord; 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.LightningStrikePoint;
import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgStrikeType; import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgStrikeType;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.common.time.TimeRange;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.edex.decodertools.core.DecoderTools; import com.raytheon.uf.edex.decodertools.core.DecoderTools;
import com.raytheon.uf.edex.decodertools.time.TimeTools; import com.raytheon.uf.edex.decodertools.time.TimeTools;
import com.raytheon.uf.edex.wmo.message.WMOHeader; import com.raytheon.uf.edex.wmo.message.WMOHeader;
@ -82,6 +88,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* Jan 24, 2014 DR 16774 Wufeng Zhou Modified for updated Bin-lightning data spec, * Jan 24, 2014 DR 16774 Wufeng Zhou Modified for updated Bin-lightning data spec,
* and to used WMO header to distinguish bit-shifted * and to used WMO header to distinguish bit-shifted
* GLD360 and NLDN data. * GLD360 and NLDN data.
* Aug 04, 2014 3488 bclement added checkBinRange(), rebin() and finalizeRecords()
* *
* </pre> * </pre>
* *
@ -100,6 +107,9 @@ public class BinLightningDecoder extends AbstractDecoder {
private final Log logger = LogFactory.getLog(getClass()); private final Log logger = LogFactory.getLog(getClass());
private static final boolean REBIN_INVALID_DATA = Boolean
.getBoolean("rebin.invalid.binlightning");
/** /**
* Default lightning strike type for FLASH messages. RT_FLASH documents * Default lightning strike type for FLASH messages. RT_FLASH documents
* indicate no default, but D2D code defaults to STRIKE_CG also. * indicate no default, but D2D code defaults to STRIKE_CG also.
@ -127,7 +137,7 @@ public class BinLightningDecoder extends AbstractDecoder {
public PluginDataObject[] decode(byte[] data, Headers headers) throws DecoderException { public PluginDataObject[] decode(byte[] data, Headers headers) throws DecoderException {
//String traceId = null; //String traceId = null;
PluginDataObject[] reports = new PluginDataObject[0]; PluginDataObject[] rval = new PluginDataObject[0];
if (data != null) { if (data != null) {
traceId = (String) headers.get(DecoderTools.INGEST_FILE_NAME); traceId = (String) headers.get(DecoderTools.INGEST_FILE_NAME);
@ -163,11 +173,13 @@ public class BinLightningDecoder extends AbstractDecoder {
// both encrypted data and legacy data // both encrypted data and legacy data
// //
List<LightningStrikePoint> strikes = BinLigntningDecoderUtil.decodeBinLightningData(data, pdata, traceId, wmoHdr, baseTime.getTime()); Collection<LightningStrikePoint> strikes = BinLigntningDecoderUtil
.decodeBinLightningData(data, pdata, traceId, wmoHdr,
baseTime.getTime());
if (strikes == null) { // keep-alive record, log and return if (strikes == null) { // keep-alive record, log and return
logger.info(traceId + " - found keep-alive record. ignore for now."); logger.info(traceId + " - found keep-alive record. ignore for now.");
return reports; return rval;
} }
// //
@ -186,44 +198,133 @@ public class BinLightningDecoder extends AbstractDecoder {
return new PluginDataObject[0]; return new PluginDataObject[0];
} }
Calendar c = TimeTools.copy(baseTime);
if (c == null) {
throw new DecoderException(traceId + " - Error decoding times");
}
//report.setInsertTime(c); // OB13.4 source code does not have this line anymore, WZ 05/03/2013 //report.setInsertTime(c); // OB13.4 source code does not have this line anymore, WZ 05/03/2013
Collection<BinLightningRecord> records = checkBinRange(report,
Calendar cStart = report.getStartTime(); strikes);
if (cStart.getTimeInMillis() > (c.getTimeInMillis() + TEN_MINUTES)) { rval = finalizeRecords(records, baseTime);
synchronized (SDF) {
logger.info("Discarding future data for " + traceId
+ " at " + SDF.format(cStart.getTime()));
}
} else {
Calendar cStop = report.getStopTime();
TimeRange range = new TimeRange(cStart.getTimeInMillis(),
cStop.getTimeInMillis());
DataTime dataTime = new DataTime(cStart, range);
report.setDataTime(dataTime);
if (report != null) {
report.setTraceId(traceId);
//report.setPluginName("binlightning"); // line disappear in OB15.5.3
try {
report.constructDataURI();
reports = new PluginDataObject[] { report };
} catch (PluginException e) {
logger.error("Error constructing datauri", e);
throw new DecoderException("Error constructing datauri", e);
}
}
}
} }
} else { } else {
logger.error("No WMOHeader found in data"); logger.error("No WMOHeader found in data");
} }
return reports; return rval;
}
/**
* Perform final actions on each record and populate a PDO array with them.
* Any invalid records will be omitted from the return array.
*
* @param records
* @param baseTime
* @return
* @throws DecoderException
*/
private PluginDataObject[] finalizeRecords(
Collection<BinLightningRecord> records, Calendar baseTime)
throws DecoderException {
Calendar c = TimeTools.copy(baseTime);
if (c == null) {
throw new DecoderException(traceId + " - Error decoding times");
}
ArrayList<BinLightningRecord> rval = new ArrayList<BinLightningRecord>(
records.size());
for (BinLightningRecord record : records) {
Calendar cStart = record.getStartTime();
if (cStart.getTimeInMillis() > (c.getTimeInMillis() + TEN_MINUTES)) {
synchronized (SDF) {
logger.info("Discarding future data for " + traceId
+ " at " + SDF.format(cStart.getTime()));
}
} else {
Calendar cStop = record.getStopTime();
TimeRange range = new TimeRange(cStart.getTimeInMillis(),
cStop.getTimeInMillis());
DataTime dataTime = new DataTime(cStart, range);
record.setDataTime(dataTime);
if (record != null) {
record.setTraceId(traceId);
rval.add(record);
}
}
}
return rval.toArray(new PluginDataObject[rval.size()]);
}
/**
* Ensure that the record has a valid bin range. If it does, it will be the
* only record in the return value. Otherwise, {@link #REBIN_INVALID_DATA}
* is used to determine if no records should be returned or the strikes
* should be split into valid bin ranges uses {@link #rebin(Collection)}
*
* @param record
* @param strikes
* @return
*/
private Collection<BinLightningRecord> checkBinRange(
BinLightningRecord record, Collection<LightningStrikePoint> strikes) {
Collection<BinLightningRecord> rval = Collections.emptyList();
Calendar cStart = record.getStartTime();
Calendar cStop = record.getStopTime();
long binRange = cStop.getTimeInMillis() - cStart.getTimeInMillis();
if (binRange > TimeUtil.MILLIS_PER_DAY) {
if (REBIN_INVALID_DATA) {
rval = rebin(strikes);
} else {
String rangeStart;
String rangeEnd;
synchronized (SDF) {
rangeStart = SDF.format(cStart.getTime());
rangeEnd = SDF.format(cStop.getTime());
}
logger.error("Discarding data with invalid bin range of "
+ rangeStart + " to " + rangeEnd);
}
} else {
rval = Arrays.asList(record);
}
return rval;
}
/**
* Split the strikes into 1 day bins and create a new record for each bin
*
* @param strikes
* @return
*/
private Collection<BinLightningRecord> rebin(
Collection<LightningStrikePoint> strikes) {
Map<Long, Collection<LightningStrikePoint>> binMap = new HashMap<Long, Collection<LightningStrikePoint>>(
1);
for (LightningStrikePoint strike : strikes) {
Calendar c = TimeTools.getBaseCalendar(strike.getYear(),
strike.getMonth(), strike.getDay());
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
long key = c.getTimeInMillis();
Collection<LightningStrikePoint> bin = binMap.get(key);
if (bin == null) {
bin = new ArrayList<LightningStrikePoint>(strikes.size());
binMap.put(key, bin);
}
bin.add(strike);
}
Collection<BinLightningRecord> rval = new ArrayList<BinLightningRecord>(
binMap.size());
for (Entry<Long, Collection<LightningStrikePoint>> e : binMap
.entrySet()) {
Collection<LightningStrikePoint> bin = e.getValue();
BinLightningRecord record = new BinLightningRecord(bin.size());
for (LightningStrikePoint strike : bin) {
record.addStrike(strike);
}
rval.add(record);
}
return rval;
} }
/** /**

View file

@ -31,6 +31,7 @@ except:
import NetCDF import NetCDF
import JUtil import JUtil
import iscUtil import iscUtil
import logging
from java.util import ArrayList from java.util import ArrayList
from java.io import File from java.io import File
@ -72,6 +73,7 @@ from com.raytheon.uf.common.localization import LocalizationContext_Localization
# 09/20/13 2405 dgilling Clip grids before inserting into cache. # 09/20/13 2405 dgilling Clip grids before inserting into cache.
# 10/22/13 2405 rjpeter Remove WECache and store directly to cube. # 10/22/13 2405 rjpeter Remove WECache and store directly to cube.
# 10/31/2013 2508 randerso Change to use DiscreteGridSlice.getKeys() # 10/31/2013 2508 randerso Change to use DiscreteGridSlice.getKeys()
# 08/14/2014 3526 randerso Fixed to get sampling definition from appropriate site
# #
# Original A1 BATCH WRITE COUNT was 10, we found doubling that # Original A1 BATCH WRITE COUNT was 10, we found doubling that
@ -83,7 +85,7 @@ ifpNetcdfLogger=None
## Logging methods ## ## Logging methods ##
def initLogger(logFile=None): def initLogger(logFile=None):
global ifpNetcdfLogger global ifpNetcdfLogger
ifpNetcdfLogger = iscUtil.getLogger("ifpnetCDF",logFile) ifpNetcdfLogger = iscUtil.getLogger("ifpnetCDF",logFile, logLevel=logging.INFO)
def logEvent(*msg): def logEvent(*msg):
ifpNetcdfLogger.info(iscUtil.tupleToString(*msg)) ifpNetcdfLogger.info(iscUtil.tupleToString(*msg))
@ -249,7 +251,7 @@ def timeFromComponents(timeTuple):
epochDays = epochDays + daysInMonth(pmonth, timeTuple[0]) epochDays = epochDays + daysInMonth(pmonth, timeTuple[0])
pmonth = pmonth + 1 pmonth = pmonth + 1
epochDays = epochDays + timeTuple[2] - 1; # but not this day epochDays = epochDays + timeTuple[2] - 1 # but not this day
epochTime = epochDays * 86400 + \ epochTime = epochDays * 86400 + \
timeTuple[3] * 3600 + timeTuple[4] * 60 + timeTuple[5] timeTuple[3] * 3600 + timeTuple[4] * 60 + timeTuple[5]
@ -409,7 +411,7 @@ def storeLatLonGrids(client, file, databaseID, invMask, krunch, clipArea):
gridLoc = IFPServerConfigManager.getServerConfig(DatabaseID(databaseID).getSiteId()).dbDomain() gridLoc = IFPServerConfigManager.getServerConfig(DatabaseID(databaseID).getSiteId()).dbDomain()
pDict = gridLoc.getProjection() pDict = gridLoc.getProjection()
latLonGrid = gridLoc.getLatLonGrid().__numpy__[0]; latLonGrid = gridLoc.getLatLonGrid().__numpy__[0]
latLonGrid = numpy.reshape(latLonGrid, (2,gridLoc.getNy().intValue(),gridLoc.getNx().intValue()), order='F') latLonGrid = numpy.reshape(latLonGrid, (2,gridLoc.getNy().intValue(),gridLoc.getNx().intValue()), order='F')
@ -1188,11 +1190,20 @@ def compressFile(filename, factor):
###------------ ###------------
# getSamplingDefinition - accesses server to retrieve definition, # getSamplingDefinition - accesses server to retrieve definition,
# returns None or the sampling definition as Python. # returns None or the sampling definition as Python.
def getSamplingDefinition(client, configName): def getSamplingDefinition(client, configName, siteId):
if configName is None: if configName is None:
return None return None
file = PathManagerFactory.getPathManager().getStaticFile("isc/utilities/" + configName + ".py") pathManager = PathManagerFactory.getPathManager()
if file is None: fileName = "isc/utilities/" + configName + ".py"
siteContext = pathManager.getContextForSite(LocalizationType.COMMON_STATIC, siteId)
file = pathManager.getFile(siteContext, fileName)
# if site file not found, try base level
if file is None or not file.exists():
baseContext = pathManager.getContext(LocalizationType.COMMON_STATIC, LocalizationLevel.BASE)
file = pathManager.getFile(baseContext, fileName)
if file is None or not file.exists():
s = "Sampling Definition " + configName + " not found, using all grids." s = "Sampling Definition " + configName + " not found, using all grids."
logProblem(s) logProblem(s)
return None return None
@ -1341,7 +1352,8 @@ def main(outputFilename, parmList, databaseID, startTime,
#del maskGrid #del maskGrid
# Determine sampling definition # Determine sampling definition
samplingDef = getSamplingDefinition(client, argDict['configFileName']) siteId = DatabaseID(argDict['databaseID']).getSiteId()
samplingDef = getSamplingDefinition(client, argDict['configFileName'], siteId)
logVerbose("Sampling Definition:", samplingDef) logVerbose("Sampling Definition:", samplingDef)
# Open the netCDF file # Open the netCDF file
@ -1385,7 +1397,7 @@ def main(outputFilename, parmList, databaseID, startTime,
argDict['krunch'], clipArea) argDict['krunch'], clipArea)
totalGrids = totalGrids + 3 totalGrids = totalGrids + 3
storeGlobalAtts(file, argDict); storeGlobalAtts(file, argDict)
file.close() file.close()

View file

@ -90,6 +90,8 @@ from com.raytheon.uf.edex.database.cluster import ClusterTask
# 04/03/2014 2737 randerso Allow iscMosaic to blankOtherPeriods even when no grids received # 04/03/2014 2737 randerso Allow iscMosaic to blankOtherPeriods even when no grids received
# 04/11/2014 17242 David Gillingham (code checked in by zhao) # 04/11/2014 17242 David Gillingham (code checked in by zhao)
# 07/22/2014 17484 randerso Update cluster lock time to prevent time out # 07/22/2014 17484 randerso Update cluster lock time to prevent time out
# 08/07/2014 3517 randerso Improved memory utilization and error handling when unzipping input file.
# 08/14/2014 3526 randerso Fix bug in WECache that could incorrectly delete grids in the destination database
# #
BATCH_DELAY = 0.0 BATCH_DELAY = 0.0
@ -244,7 +246,7 @@ class WECache(object):
If the cache does not have room for a batch of grids to be loaded without exceeding the max cache size If the cache does not have room for a batch of grids to be loaded without exceeding the max cache size
the earliest dirty grids (or clean if not enough dirty grids are found) are flushed to disk before reading the earliest dirty grids (or clean if not enough dirty grids are found) are flushed to disk before reading
the next dash. the next batch.
Args: Args:
tr: the missing time range tr: the missing time range
@ -274,7 +276,7 @@ class WECache(object):
def __flushGrids(self, trList): def __flushGrids(self, trList):
""" """
Flush a list time ranges from the cache. Flush a list of time ranges from the cache.
Dirty time ranges will be written to disk. Dirty time ranges will be written to disk.
Writes will be done in _batchSize groups Writes will be done in _batchSize groups
@ -287,10 +289,19 @@ class WECache(object):
saveList = [] # python time ranges covered by this saveRequest saveList = [] # python time ranges covered by this saveRequest
saveSize = 0 # number of grids in saveRequest saveSize = 0 # number of grids in saveRequest
# get full time range for flush
sortedList = sorted(trList, key=lambda t: t[0])
flushTR = (sortedList[0][0], sortedList[-1][1])
timeSpan = None # time span if this contiguous batch timeSpan = None # time span if this contiguous batch
gridsToSave = ArrayList(self._batchSize) # grids in this contiguous batch gridsToSave = ArrayList(self._batchSize) # grids in this contiguous batch
saveBatch = False saveBatch = False
for tr in sorted(trList, key=lambda t: t[0]): for tr in self.keys():
if tr[1] <= flushTR[0]:
continue
if tr[0] >= flushTR[1]:
break
dirty = tr in self._dirty dirty = tr in self._dirty
if dirty: if dirty:
logger.debug("WECache storing: %s", printTR(tr)) logger.debug("WECache storing: %s", printTR(tr))
@ -315,6 +326,9 @@ class WECache(object):
logger.debug("WECache purging: %s", printTR(tr)) logger.debug("WECache purging: %s", printTR(tr))
self._inv[tr] = None self._inv[tr] = None
self._populated.remove(tr) self._populated.remove(tr)
else:
# skip any clean unpopulated grids
logger.debug("WECache skipping: %s", printTR(tr))
if saveBatch: if saveBatch:
# add this contiguous batch to saveRequest # add this contiguous batch to saveRequest
@ -405,9 +419,9 @@ class WECache(object):
self._populated.add(tr) self._populated.add(tr)
def flush(self): def flush(self):
"""Writes the entire contents of the WECache to HDF5/DB""" """Writes all dirty time ranges in the WECache to HDF5/DB"""
# flush entire inventory # flush entire inventory
self.__flushGrids(self.keys()) self.__flushGrids(self._dirty)
def overlaps(self, tr1, tr2): def overlaps(self, tr1, tr2):
if (tr1[0] >= tr2[0] and tr1[0] < tr2[1]) or \ if (tr1[0] >= tr2[0] and tr1[0] < tr2[1]) or \
@ -539,25 +553,39 @@ class IscMosaic:
gzipFile = None gzipFile = None
unzippedFile = None unzippedFile = None
gzipped = True
try: try:
import gzip import gzip
gzipFile = gzip.open(filename, 'rb') gzipFile = gzip.open(filename, 'rb')
unzippedFile = open(filename + ".unzipped", 'w') unzippedFile = open(filename + ".unzipped", 'w')
unzippedFile.write(gzipFile.read()) while True:
buffer = gzipFile.read(65536)
if len(buffer) == 0:
break
unzippedFile.write(buffer)
except IOError as e:
if e.message == "Not a gzipped file":
gzipped = False
else:
raise
else:
# no errors, close and rename the file
unzippedFile.close() unzippedFile.close()
gzipFile.close() gzipFile.close()
os.rename(unzippedFile.name, gzipFile.filename) os.rename(unzippedFile.name, gzipFile.filename)
except: gzipFile = unzippedFile = None
# Not gzipped finally:
# close the files in case of error
if gzipFile is not None: if gzipFile is not None:
gzipFile.close() gzipFile.close()
if unzippedFile is not None: if unzippedFile is not None:
unzippedFile.close() unzippedFile.close()
os.remove(unzippedFile.name) if not gzipped:
os.remove(unzippedFile.name)
a = os.times() a = os.times()
cpu = a[0] + a[1] cpugz = a[0] + a[1]
stop1 = a[4] stopgz = a[4]
file = NetCDF.NetCDFFile(filename, "r") file = NetCDF.NetCDFFile(filename, "r")
@ -657,15 +685,15 @@ class IscMosaic:
SendNotifications.send(notification) SendNotifications.send(notification)
a = os.times() a = os.times()
cpugz = a[0] + a[1] cpu = a[0] + a[1]
stop = a[4] stop = a[4]
logger.info("Elapsed/CPU time: " logger.info("Elapsed/CPU time: "
"%-.2f / %-.2f decompress, " "%-.2f / %-.2f decompress, "
"%-.2f / %-.2f processing, " "%-.2f / %-.2f processing, "
"%-.2f / %-.2f total", "%-.2f / %-.2f total",
stop1 - start, cpu - cpu0, stopgz - start, cpugz - cpu0,
stop - stop1, cpugz - cpu, stop - stopgz, cpu - cpugz,
stop - start, cpugz - cpu0) stop - start, cpu - cpu0)
def __processParm(self, parmName, vars, history, filename): def __processParm(self, parmName, vars, history, filename):
@ -1102,9 +1130,9 @@ class IscMosaic:
#areaMask.setGloc(domain) #areaMask.setGloc(domain)
areaMask = ReferenceData(domain, ReferenceID("full"), None, CoordinateType.GRID); areaMask = ReferenceData(domain, ReferenceID("full"), None, CoordinateType.GRID)
areaMask.getGrid(); areaMask.getGrid()
areaMask.invert(); areaMask.invert()
elif self.__altMask is not None: elif self.__altMask is not None:
try: try:
@ -1278,7 +1306,7 @@ class IscMosaic:
else: else:
#FIXME #FIXME
for i in range(0, len(history)): for i in range(0, len(history)):
hist.add(history[i]); hist.add(history[i])
if gridType == 'SCALAR': if gridType == 'SCALAR':
data = Grid2DFloat.createGrid(value.shape[1], value.shape[0], value) data = Grid2DFloat.createGrid(value.shape[1], value.shape[0], value)
@ -1296,7 +1324,7 @@ class IscMosaic:
keyList = ArrayList() keyList = ArrayList()
for key in value[1]: for key in value[1]:
keyList.add(WeatherKey()) keyList.add(WeatherKey())
slice = WeatherGridSlice(); slice = WeatherGridSlice()
slice.setValidTime(tr) slice.setValidTime(tr)
slice.setGridParmInfo(gpi) slice.setGridParmInfo(gpi)
slice.setGridDataHistory(hist) slice.setGridDataHistory(hist)
@ -1307,7 +1335,7 @@ class IscMosaic:
keyList = ArrayList() keyList = ArrayList()
for key in value[1]: for key in value[1]:
keyList.add(DiscreteKey()) keyList.add(DiscreteKey())
slice = DiscreteGridSlice(); slice = DiscreteGridSlice()
slice.setValidTime(tr) slice.setValidTime(tr)
slice.setGridParmInfo(gpi) slice.setGridParmInfo(gpi)
slice.setGridDataHistory(hist) slice.setGridDataHistory(hist)

View file

@ -49,7 +49,7 @@ from com.raytheon.uf.common.dataplugin.level import LevelFactory
from com.raytheon.edex.plugin.grib.spatial import GribSpatialCache from com.raytheon.edex.plugin.grib.spatial import GribSpatialCache
from com.raytheon.edex.util.grib import GribTableLookup from com.raytheon.edex.util.grib import GribTableLookup
from com.raytheon.edex.util import Util from com.raytheon.uf.common.util import GridUtil
from com.raytheon.edex.util.grib import GribParamTranslator from com.raytheon.edex.util.grib import GribParamTranslator
@ -123,6 +123,8 @@ logHandler = UFStatusHandler.UFStatusHandler("com.raytheon.edex.plugin.grib", "E
# grib files. # grib files.
# Feb 11, 2014 2765 bsteffen Better handling of probability parameters. # Feb 11, 2014 2765 bsteffen Better handling of probability parameters.
# Apr 28, 2014 3084 bsteffen Use full grid for looking up parameter aliases. # Apr 28, 2014 3084 bsteffen Use full grid for looking up parameter aliases.
# Aug 15, 2014 15699 MPorricelli Import GridUtil and update reference
# to GRID_FILL_VALUE
# #
class GribDecoder(): class GribDecoder():
@ -333,7 +335,7 @@ class GribDecoder():
subGridDataArray = numpy.zeros((subny, subnx), numpy.float32) subGridDataArray = numpy.zeros((subny, subnx), numpy.float32)
midx = nx - startx midx = nx - startx
subGridDataArray[0:subny, 0:midx] = numpyDataArray[starty:endY, startx:nx] subGridDataArray[0:subny, 0:midx] = numpyDataArray[starty:endY, startx:nx]
subGridDataArray[0:subny, midx:subnx] = Util.GRID_FILL_VALUE subGridDataArray[0:subny, midx:subnx] = GridUtil.GRID_FILL_VALUE
numpyDataArray = subGridDataArray numpyDataArray = subGridDataArray
else: else:
numpyDataArray = numpyDataArray[starty:endY, startx:endX] numpyDataArray = numpyDataArray[starty:endY, startx:endX]

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-EAST1_6KM</name>
<description>High Frequency Radar (EAST_6KM) total vector velocity (TVV)
Lon/Lat Resolution
</description>
<la1>21.73596</la1>
<lo1>262.11615</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>701</nx>
<ny>460</ny>
<dx>0.058075</dx>
<dy>0.05394</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-EAST2_6KM</name>
<description>High Frequency Radar (EAST_6KM) total vector velocity (TVV)
Lon/Lat Resolution
</description>
<la1>14.5</la1>
<lo1>289.5</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>171</nx>
<ny>140</ny>
<dx>0.05574</dx>
<dy>0.05394</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_EAST_DELAWARE_1KM</name>
<description>High Frequency Radar (US_EAST_DELAWARE_1KM) total vector
velocity (TVV) Lon/Lat Resolution
</description>
<la1>38.007858</la1>
<lo1>262.11615</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>4205</nx>
<ny>222</ny>
<dx>0.009682</dx>
<dy>0.008992</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_EAST_FLORIDA_2KM</name>
<description>High Frequency Radar (US_EAST_FLORIDA_2KM) total vector
velocity (TVV) Lon/Lat Resolution
</description>
<la1>25.00832</la1>
<lo1>262.11615</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>2103</nx>
<ny>167</ny>
<dx>0.019356</dx>
<dy>0.01798</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_EAST_NORTH_2KM</name>
<description>High Frequency Radar (US_EAST_NORTH_2KM) total vector velocity
(TVV) Lon/Lat Resolution
</description>
<la1>36.012081</la1>
<lo1>262.11615</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>2103</nx>
<ny>222</ny>
<dx>0.019356</dx>
<dy>0.017979</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_EAST_SOUTH_2KM</name>
<description>High Frequency Radar (US_EAST_SOUTH_2KM) total vector velocity
(TVV) Lon/Lat Resolution
</description>
<la1>30.00676</la1>
<lo1>262.11615</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>2103</nx>
<ny>223</ny>
<dx>0.019356</dx>
<dy>0.01798</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_EAST_VIRGINIA_1KM</name>
<description>High Frequency Radar (US_EAST_VIRGINIA_1KM) total vector
velocity (TVV) Lon/Lat Resolution
</description>
<la1>36.506531</la1>
<lo1>262.11615</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>4205</nx>
<ny>111</ny>
<dx>0.009682</dx>
<dy>0.008987</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_HAWAII_1KM</name>
<description>High Frequency Radar (US_HAWAII_1KM) total vector velocity
(TVV) Lon/Lat Resolution
</description>
<la1>16.2204</la1>
<lo1>196.855606</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>1204</nx>
<ny>963</ny>
<dx>0.009293</dx>
<dy>0.009041</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_HAWAII_2KM</name>
<description>High Frequency Radar (US_HAWAII_2KM) total vector velocity
(TVV) Lon/Lat Resolution
</description>
<la1>16.2204</la1>
<lo1>196.855606</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>602</nx>
<ny>482</ny>
<dx>0.018601</dx>
<dy>0.01808</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_WEST_500M</name>
<description>High Frequency Radar (US_WEST_500M) total vector velocity (TVV)
Lon/Lat Resolution
</description>
<la1>37.455486</la1>
<lo1>237.406532</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>106</nx>
<ny>153</ny>
<dx>0.005204</dx>
<dy>0.004494</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_WEST_CENCAL_2KM</name>
<description>High Frequency Radar (US_WEST_CENCAL_2KM) total vector velocity
(TVV) Lon/Lat Resolution
</description>
<la1>36.003601</la1>
<lo1>229.639999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>700</nx>
<ny>167</ny>
<dx>0.020829</dx>
<dy>0.017979</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_WEST_LOSANGELES_1KM</name>
<description>High Frequency Radar (US_WEST_LOSANGELES_1KM) total vector
velocity (TVV) Lon/Lat Resolution
</description>
<la1>32.003052</la1>
<lo1>229.639999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>1399</nx>
<ny>278</ny>
<dx>0.010407</dx>
<dy>0.008987</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_WEST_LOSOSOS_1KM</name>
<description>High Frequency Radar (US_WEST_LOSOSOS_1KM) total vector
velocity (TVV) Lon/Lat Resolution
</description>
<la1>34.50227</la1>
<lo1>229.639999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>1399</nx>
<ny>145</ny>
<dx>0.010407</dx>
<dy>0.008991</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_WEST_NORTH_2KM</name>
<description>High Frequency Radar (US_WEST_NORTH_2KM) total vector velocity
(TVV) Lon/Lat Resolution
</description>
<la1>43.0158</la1>
<lo1>229.639999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>700</nx>
<ny>361</ny>
<dx>0.020829</dx>
<dy>0.017979</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_WEST_SANFRAN_1KM</name>
<description>High Frequency Radar (US_WEST_SANFRAN_1KM) total vector
velocity (TVV) Lon/Lat Resolution
</description>
<la1>37.001492</la1>
<lo1>229.639999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>1399</nx>
<ny>167</ny>
<dx>0.010407</dx>
<dy>0.008987</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_WEST_SOCAL_2KM</name>
<description>High Frequency Radar (US_WEST_SOCAL_2KM) total vector velocity
(TVV) Lon/Lat Resolution
</description>
<la1>32.012039</la1>
<lo1>229.639999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>700</nx>
<ny>194</ny>
<dx>0.020829</dx>
<dy>0.017983</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-US_WEST_WASHINGTON_1KM</name>
<description>High Frequency Radar (US_WEST_WASHINGTON_1KM) total vector
velocity (TVV) Lon/Lat Resolution
</description>
<la1>48.005249</la1>
<lo1>229.639999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>1399</nx>
<ny>222</ny>
<dx>0.010407</dx>
<dy>0.008991</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-WEST1_6KM</name>
<description>High Frequency Radar (WEST_6KM) total vector velocity (TVV)
Lon/Lat Resolution
</description>
<la1>30.25</la1>
<lo1>229.639999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>234</nx>
<ny>367</ny>
<dx>0.06247</dx>
<dy>0.05394</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>gridHFR-WEST2_6KM</name>
<description>High Frequency Radar (WEST_6KM) total vector velocity (TVV)
Lon/Lat Resolution
</description>
<la1>16.2204</la1>
<lo1>196.855606</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>201</nx>
<ny>161</ny>
<dx>0.055801</dx>
<dy>0.054239</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<gribModelSet>
<!-- SUBCENTER 0 -->
<model>
<name>HFR-US_EAST_FLORIDA_2KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_EAST_FLORIDA_2KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_WEST_CENCAL_2KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_WEST_CENCAL_2KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_EAST_DELAWARE_1KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_EAST_DELAWARE_1KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_HAWAII_1KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_HAWAII_1KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_WEST_500M</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_WEST_500M</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_WEST_NORTH_2KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_WEST_NORTH_2KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_WEST_LOSANGELES_1KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_WEST_LOSANGELES_1KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_EAST_NORTH_2KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_EAST_NORTH_2KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_EAST_SOUTH_2KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_EAST_SOUTH_2KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_EAST_VIRGINIA_1KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_EAST_VIRGINIA_1KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_WEST_SANFRAN_1KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_WEST_SANFRAN_1KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-EAST_6KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-EAST1_6KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-EAST_6KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-EAST2_6KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_HAWAII_2KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_HAWAII_2KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-WEST_6KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-WEST1_6KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-WEST_6KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-WEST2_6KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_WEST_WASHINGTON_1KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_WEST_WASHINGTON_1KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_WEST_LOSOSOS_1KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_WEST_LOSOSOS_1KM</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>HFR-US_WEST_SOCAL_2KM</name>
<center>9</center>
<subcenter>0</subcenter>
<grid>gridHFR-US_WEST_SOCAL_2KM</grid>
<process>
<id>255</id>
</process>
</model>
</gribModelSet>

View file

@ -126,6 +126,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* 06/26/2014 3321 mpduff Fix ingestSwitchMap checks * 06/26/2014 3321 mpduff Fix ingestSwitchMap checks
* 07/10/2014 3370 mpduff Fix update/insert issue for riverstatus * 07/10/2014 3370 mpduff Fix update/insert issue for riverstatus
* 07/14/2014 mpduff Fix data range checks * 07/14/2014 mpduff Fix data range checks
* 08/05/2014 15671 snaples Fixed check for posting when not found in ingestfilter and token is set for load_shef_ingest
* </pre> * </pre>
* *
* @author mduff * @author mduff
@ -2150,7 +2151,6 @@ public class PostShef {
ingestSwitchMap.put(key, ingestSwitch); ingestSwitchMap.put(key, ingestSwitch);
} }
matchFound = ingestSwitchMap.containsKey(key);
ingestSwitch = ingestSwitchMap.get(key); ingestSwitch = ingestSwitchMap.get(key);
/* /*

View file

@ -53,9 +53,11 @@ import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseInterceptor; import org.apache.http.HttpResponseInterceptor;
import org.apache.http.auth.AuthScope; import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.AuthCache;
import org.apache.http.client.ClientProtocolException; import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.protocol.ClientContext;
import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.ConnectionPoolTimeoutException; import org.apache.http.conn.ConnectionPoolTimeoutException;
import org.apache.http.conn.params.ConnRoutePNames; import org.apache.http.conn.params.ConnRoutePNames;
@ -67,9 +69,12 @@ import org.apache.http.conn.ssl.X509HostnameVerifier;
import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.entity.AbstractHttpEntity;
import org.apache.http.entity.ByteArrayEntity; import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.entity.StringEntity; import org.apache.http.entity.StringEntity;
import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.BasicAuthCache;
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpConnectionParams;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
@ -108,6 +113,7 @@ import com.raytheon.uf.common.util.ByteArrayOutputStreamPool.ByteArrayOutputStre
* Https authentication failures notify handler * Https authentication failures notify handler
* Feb 17, 2014 2756 bclement added content type to response object * Feb 17, 2014 2756 bclement added content type to response object
* Feb 28, 2014 2756 bclement added isSuccess() and isNotExists() to response * Feb 28, 2014 2756 bclement added isSuccess() and isNotExists() to response
* Aug 15, 2014 3524 njensen Pass auth credentials on every https request
* *
* </pre> * </pre>
* *
@ -415,6 +421,20 @@ public class HttpClient {
private IHttpsConfiguration httpsConfiguration; private IHttpsConfiguration httpsConfiguration;
/**
* The authCache is for https requests only. Without the authCache, inside
* DefaultRequestDirector.execute() it will always attempt to connect to the
* https address without the credentials set, therefore receiving a 401 not
* authenticated, THEN apply the credentials we already validated and try
* again. ON EVERY SINGLE REQUEST. Without the authCache therefore every
* https request actually becomes two requests.
*
* There may be other ways to work around this limitation that could be
* investigated as time allows. A newer version of apache httpclient may
* also alleviate this.
*/
private AuthCache authCache;
/** /**
* Private constructor. * Private constructor.
*/ */
@ -530,7 +550,11 @@ public class HttpClient {
HttpResponse resp = null; HttpResponse resp = null;
if (put.getURI().getScheme().equalsIgnoreCase(HTTPS)) { if (put.getURI().getScheme().equalsIgnoreCase(HTTPS)) {
org.apache.http.client.HttpClient client = getHttpsInstance(); org.apache.http.client.HttpClient client = getHttpsInstance();
resp = execute(client, put); HttpContext context = new BasicHttpContext();
if (authCache != null) {
context.setAttribute(ClientContext.AUTH_CACHE, authCache);
}
resp = execute(client, put, context);
// Check for not authorized, 401 // Check for not authorized, 401
while (resp.getStatusLine().getStatusCode() == 401) { while (resp.getStatusLine().getStatusCode() == 401) {
@ -552,8 +576,9 @@ public class HttpClient {
this.setCredentials(host, port, null, credentials[0], this.setCredentials(host, port, null, credentials[0],
credentials[1]); credentials[1]);
context.setAttribute(ClientContext.AUTH_CACHE, authCache);
try { try {
resp = execute(client, put); resp = execute(client, put, context);
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.ERROR, statusHandler.handle(Priority.ERROR,
"Error retrying http request", e); "Error retrying http request", e);
@ -581,19 +606,29 @@ public class HttpClient {
} }
/** /**
* Execute the HttpUriRequest using the provided HttpClient instance. * Execute the HttpUriRequest using the provided HttpClient instance and
* context.
* *
* @param client * @param client
* The HttpClient instance * The HttpClient instance
* @param request * @param request
* The request * The request
* @param context
* The context
*
* @return HttpResponse * @return HttpResponse
* @throws ClientProtocolException * @throws ClientProtocolException
* @throws IOException * @throws IOException
*/ */
private HttpResponse execute(org.apache.http.client.HttpClient client, private HttpResponse execute(org.apache.http.client.HttpClient client,
HttpUriRequest request) throws ClientProtocolException, IOException { HttpUriRequest request, HttpContext context)
return client.execute(request); throws ClientProtocolException, IOException {
/*
* The apache http client will fill in values not set on the context
* with defaults. See AbstractHttpClient line 801 where it does:
* execContext = new DefaultedHttpContext(context, defaultContext);
*/
return client.execute(request, context);
} }
/** /**
@ -1222,6 +1257,10 @@ public class HttpClient {
(HttpsHolder.sslClient).getCredentialsProvider().setCredentials( (HttpsHolder.sslClient).getCredentialsProvider().setCredentials(
new AuthScope(host, port), new AuthScope(host, port),
new UsernamePasswordCredentials(username, password)); new UsernamePasswordCredentials(username, password));
if(this.authCache == null) {
this.authCache = new BasicAuthCache();
}
authCache.put(new HttpHost(host, port, HTTPS), new BasicScheme());
} }
/** /**

View file

@ -49,7 +49,7 @@
<contourStyle> <contourStyle>
<displayUnits>ft</displayUnits> <displayUnits>ft</displayUnits>
<contourLabeling labelSpacing="4" labelFormat="#"> <contourLabeling labelSpacing="4" labelFormat="#">
<increment>50</increment> <increment>1000</increment>
</contourLabeling> </contourLabeling>
</contourStyle> </contourStyle>
</styleRule> </styleRule>

View file

@ -189,20 +189,27 @@ ${drainage.name}##
########END MACRO ########END MACRO
#macro(inserttorwatches $watches $list $secondtimezone $dateUtil $timeFormat) #macro(inserttorwatches $watches $list $secondtimezone $dateUtil $timeFormat)
#set($tornadoWatches = []) #set($keys = [])
#set($mymap = {})
#foreach(${watch} in ${watches}) #foreach(${watch} in ${watches})
#if(${watch.getPhenSig()} == 'TO.A') #if(${watch.getPhenSig()} == 'TO.A')
#set($success = $tornadoWatches.add($watch)) #set($key = ${watch.action} + ${watch.etn} + ${watch.startTime} + ${watch.endTime})
#set($endTime = ${watch.endTime}) #if (${list.contains(${keys}, $key)})
#if(!$latestEndTime || ${endTime.after($latestEndTime)}) #set($value = ${mymap.get($key)})
#set($latestEndTime = ${endTime}) #else
#set($value = [])
#set($success = $keys.add($key))
#end
#set($success = $value.add($watch))
#set($success = ${mymap.put($key,$value)})
#end #end
#end #end
#end #set($torWatchAlso = "")
#if(!${list.isEmpty($tornadoWatches)}) #foreach(${key} in ${keys})
#set($tornadoWatches = ${mymap.get($key)})
A TORNADO WATCH REMAINS IN EFFECT UNTIL ${dateUtil.format(${latestEndTime}, ${timeFormat.plain}, 15, ${localtimezone})}## #set($tornadoWatch = ${tornadoWatches.get(0)})
${dateUtil.period(${latestEndTime},${timeFormat.plain}, 15, ${localtimezone})}## A TORNADO WATCH ${torWatchAlso}REMAINS IN EFFECT UNTIL ${dateUtil.format(${tornadoWatch.endTime}, ${timeFormat.plain}, 15, ${localtimezone})}##
${dateUtil.period(${tornadoWatch.endTime},${timeFormat.plain}, 15, ${localtimezone})}##
#if(${secondtimezone}) #if(${secondtimezone})
/${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/## /${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
#end #end
@ -218,27 +225,36 @@ ${dateUtil.period(${latestEndTime},${timeFormat.plain}, 15, ${localtimezone})}##
...## ...##
#end #end
#end #end
#set($torWatchAlso = "ALSO ")
. ## . ##
#end #end
#end #end
########END MACRO ########END MACRO
#macro(insertsvrwatches $watches $list $secondtimezone $dateUtil $timeFormat) #macro(insertsvrwatches $watches $list $secondtimezone $dateUtil $timeFormat)
#set($severeWatches = []) #set($keys = [])
#set($mymap = {})
#foreach(${watch} in ${watches}) #foreach(${watch} in ${watches})
#if(${watch.getPhenSig()} == 'SV.A') #if(${watch.getPhenSig()} == 'SV.A')
#set($success = $severeWatches.add($watch)) #set($key = ${watch.action} + ${watch.etn} + ${watch.startTime} + ${watch.endTime})
#set($endTime = ${watch.endTime}) #if (${list.contains(${keys}, $key)})
#if(!$latestEndTime || ${endTime.after($latestEndTime)}) #set($value = ${mymap.get($key)})
#set($latestEndTime = ${endTime}) #else
#set($value = [])
#set($success = $keys.add($key))
#end
#set($success = $value.add($watch))
#set($success = ${mymap.put($key,$value)})
#end #end
#end #end
#end #set($svrWatchAlso = "")
#if(!${list.isEmpty($severeWatches)}) #foreach(${key} in ${keys})
#set($severeWatches = ${mymap.get($key)})
A SEVERE THUNDERSTORM WATCH REMAINS IN EFFECT UNTIL ${dateUtil.format(${latestEndTime}, ${timeFormat.plain}, 15, ${localtimezone})}## #set($svrWatch = ${severeWatches.get(0)})
${dateUtil.period(${latestEndTime},${timeFormat.plain}, 15, ${localtimezone})}## A SEVERE THUNDERSTORM WATCH ${svrWatchAlso}REMAINS IN EFFECT UNTIL ${dateUtil.format(${svrWatch.endTime}, ${timeFormat.plain}, 15, ${localtimezone})}##
${dateUtil.period(${svrWatch.endTime},${timeFormat.plain}, 15, ${localtimezone})}##
#if(${secondtimezone}) #if(${secondtimezone})
/${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/## /${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
#end #end
@ -254,11 +270,13 @@ ${dateUtil.period(${latestEndTime},${timeFormat.plain}, 15, ${localtimezone})}##
...## ...##
#end #end
#end #end
#set($svrWatchAlso = "ALSO ")
. ## . ##
#end #end
#end #end
########END MACRO ########END
#macro(printcoords $coordinates $list) #macro(printcoords $coordinates $list)
#set($count = 0) #set($count = 0)

View file

@ -343,13 +343,13 @@ runJmap() {
fi fi
local cmd="/awips2/java/bin/jmap -dump:format=b,file=${dumpPath}" local cmd="/awips2/java/bin/jmap -dump:format=b,file=${dumpPath}"
echo "${t1}: Running command: $cmd $options $pid >> $log 2>&1 &" >> $processFile echo "${t1}: Running command: $cmd $options $pid >> $log 2>&1" >> $processFile
$cmd $options $pid >> $log 2>&1 & $cmd $options $pid >> $log 2>&1
if [[ "$?" != "0" && $FORCE != "y" ]]; then if [[ "$?" != "0" && $FORCE != "y" ]]; then
t1=`date "+%Y%m%d %H:%M:%S"` t1=`date "+%Y%m%d %H:%M:%S"`
echo "${t1}: jmap for $pid failed to connect, rerunning with -F" >> $processFile echo "${t1}: jmap for $pid failed to connect, rerunning with -F" >> $processFile
$cmd $options -F $pid >> $log 2>&1 & $cmd $options -F $pid >> $log 2>&1
fi fi
} }

View file

@ -0,0 +1,180 @@
#!/bin/sh
#####################################################################
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
#####################################################################
#####################################################################
# Script for capturing data from a wrapper java process when the
# wrapper restarts the process
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------- -------- ----------- --------------------------
# Aug 07, 2014 3470 rjpeter Initial creation
#
#####################################################################
# NOTE: Script must be located at /awips2/qpid/bin/yajsw/scripts for it to work
# base path to save capture data to, will create subdirectory for each server
basePath="/data/fxa/cave"
state=$1
string_state=$2
pid=$4
path_to_script=`readlink -f $0`
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Wrapper running $path_to_script due to state transition for pid $pid. New State $state|$string_state"
# ensure directory is created and has write permissions
checkDir() {
dir="$1"
if [ ! -d "$dir" ]; then
mkdir -p $dir
if [ ! -d "$dir" ]; then
message="Unable to create qpid capture data directory\n$dir"
echo -e "Capture failed: $message"
exit 1
fi
fi
if [ ! -w "$dir" ]; then
message="Do not have write permissions to qpid capture data directory\n$dir"
echo -e "Capture failed: $message"
exit 1
fi
}
# gets top output of local server
runTop() {
local curTime=`date "+%Y%m%d_%H:%M:%S"`
echo "$curTime: Capturing top"
echo "$curTime: Capturing top" >> $processFile
local out_file="${dataPath}/top.log"
export COLUMNS=160
top -b -c -n1 >> $out_file 2>&1
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: top captured"
}
# runs jstack 10 times, if it fails will run again with -F
runJstack() {
local curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Capturing jstacks"
local pid="$1"
local count=1
local cmd="/awips2/java/bin/jstack"
local prePath="${dataPath}/pid_${pid}_"
local log=""
while [ "$count" -le "10" ]; do
curTime=`date "+%Y%m%d_%H:%M:%S"`
log="${prePath}jstack_${count}.log"
echo "${curTime}: Running command: ${cmd} ${pid} >> ${log} 2>&1" >> $processFile
echo "Running for $curTime" >> $log
${cmd} ${pid} >> ${log} 2>&1
if [[ "$?" != "0" && $FORCE != "y" ]]; then
curTime=`date "+%Y%m%d_%H:%M:%S"`
echo "${curTime}: jstack for $pid failed to connect, rerunning with -F" >> $processFile
${cmd} -F ${pid} >> ${log} 2>&1
fi
let "count+=1"
done
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: jstacks captured"
}
# runs jmap -heap
runJmapHeap() {
local curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Capturing jmap -heap"
local pid=$1
local prePath="${dataPath}/pid_${pid}_"
local log="${prePath}jmapHeap.log"
local cmd="/awips2/java/bin/jmap -heap"
echo "${curTime}: Running command: $cmd $pid >> $log 2>&1" >> $processFile
$cmd $pid >> $log 2>&1
if [[ "$?" != "0" && $FORCE != "y" ]]; then
curTime=`date "+%Y%m%d_%H:%M:%S"`
echo "${curTime}: jmap for $pid failed to connect, rerunning with -F" >> $processFile
$cmd -F $pid >> $log 2>&1
fi
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: jmap -heap captured"
}
# runs jmap, if it fails will run again with -F
runJmap() {
local curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Capturing jmap -dump"
local pid=$1
local prePath="${dataPath}/pid_${pid}_jmap"
local log="${prePath}.log"
local dumpPath="${prePath}.hprof"
local cmd="/awips2/java/bin/jmap -dump:format=b,file=${dumpPath}"
echo "${curTime}: Running command: $cmd $pid >> $log 2>&1" >> $processFile
$cmd $pid >> $log 2>&1
if [[ "$?" != "0" && $FORCE != "y" ]]; then
curTime=`date "+%Y%m%d_%H:%M:%S"`
echo "${curTime}: jmap for $pid failed to connect, rerunning with -F" >> $processFile
$cmd -F $pid >> $log 2>&1
fi
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: jmap -dump captured"
}
if [[ "$pid" != "-1" ]]; then
process=`ps -ef | grep $pid | grep java`
if [[ "$process" != "" ]]; then
hostName=`hostname -s`
dataPath="${basePath}/${hostName}/wrapperCaptureData_${curTime}_pid_$pid"
checkDir $dataPath
processFile=${dataPath}/capture_info.log
echo "Wrapper running $0 due to state transition for pid $pid. New State $state|$string_state" >> $processFile
echo "Process information:" >> $processFile
ps -ef | grep $pid >> $processFile
runTop &
runJstack $pid &
runJmapHeap $pid &
# TODO: Double check if jvm already dumped one
runJmap $pid &
wait
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: Data captured to $dataPath"
else
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: PID $pid is no longer running, nothing to capture"
fi
else
curTime=`date +%Y%m%d_%H%M%S`
echo "$curTime: PID was -1, process no longer running, nothing to capture"
fi

View file

@ -3,6 +3,10 @@
determine where the various destination directories are determine where the various destination directories are
without ant-contrib without ant-contrib
--> -->
<!-- the location of javaUtilities -->
<dirname property="jutilities.dir" file="${basedir}" />
<!-- the EDEX destination --> <!-- the EDEX destination -->
<available file="${basedir}/../build.edex" <available file="${basedir}/../build.edex"
property="edex.destination" property="edex.destination"
@ -73,6 +77,14 @@
<exclude name="**/ReadMe.txt" /> <exclude name="**/ReadMe.txt" />
</fileset> </fileset>
</copy> </copy>
<!-- copy scripts -->
<mkdir dir="${edex.bin.directory}/yajsw/scripts" />
<copy todir="${edex.bin.directory}/yajsw/scripts"
failonerror="true" verbose="true" overwrite="true">
<fileset dir="${jutilities.dir}/yajsw-scripts">
<include name="*.sh" />
</fileset>
</copy>
<!-- deploy to QPID --> <!-- deploy to QPID -->
<tar destfile="${qpid.destination}/SOURCES/yajsw-distribution.tar" <tar destfile="${qpid.destination}/SOURCES/yajsw-distribution.tar"
basedir="${edex.bin.directory}" basedir="${edex.bin.directory}"

View file

@ -5,3 +5,5 @@ yajsw/src/main/java/org/rzo/yajsw/os/posix/bsd/AppStarter.java
yajsw/src/main/java/org/rzo/yajsw/os/posix/bsd/BSDProcess.java yajsw/src/main/java/org/rzo/yajsw/os/posix/bsd/BSDProcess.java
yajsw/src/main/java/org/rzo/yajsw/wrapper/AbstractWrappedProcess.java yajsw/src/main/java/org/rzo/yajsw/wrapper/AbstractWrappedProcess.java
yajsw/src/main/java/org/rzo/yajsw/wrapper/WrappedJavaProcess.java yajsw/src/main/java/org/rzo/yajsw/wrapper/WrappedJavaProcess.java
yajsw/src/main/java/org/rzo/yajsw/script/AbstractScript.java
yajsw/src/main/java/org/rzo/yajsw/script/ShellScript.java

View file

@ -16,6 +16,7 @@ import java.util.concurrent.Future;
import java.util.concurrent.SynchronousQueue; import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.jboss.netty.util.HashedWheelTimer; import org.jboss.netty.util.HashedWheelTimer;
import org.jboss.netty.util.Timeout; import org.jboss.netty.util.Timeout;
@ -28,29 +29,27 @@ import org.rzo.yajsw.wrapper.WrappedProcess;
/** /**
* The Class AbstractScript. * The Class AbstractScript.
*/ */
public abstract class AbstractScript implements Script public abstract class AbstractScript implements Script {
{
/** The _name. */ /** The _name. */
String _name; String _name;
/** The _timeout. */ /** The _timeout. */
int _timeout = 30000; int _timeout = 30000;
WrappedProcess _process; WrappedProcess _process;
String _id; String _id;
String[] _args;
String[] _args;
final static Timer TIMER = new HashedWheelTimer(); final static Timer TIMER = new HashedWheelTimer();
static final ExecutorService EXECUTOR = (ThreadPoolExecutor) new ThreadPoolExecutor(0, 50, 120L, TimeUnit.SECONDS, static final ExecutorService EXECUTOR = (ThreadPoolExecutor) new ThreadPoolExecutor(
new SynchronousQueue<Runnable>(), new DaemonThreadFactory("scriptExecutorInternal")); 0, 50, 120L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
new DaemonThreadFactory("scriptExecutorInternal"));
volatile Future _future; volatile Future _future;
volatile Timeout _timerTimeout; volatile Timeout _timerTimeout;
/** /**
* Instantiates a new abstract script. * Instantiates a new abstract script.
* *
@ -58,8 +57,8 @@ public abstract class AbstractScript implements Script
* the script * the script
* @param timeout * @param timeout
*/ */
public AbstractScript(String script, String id, WrappedProcess process, String[] args, int timeout) public AbstractScript(String script, String id, WrappedProcess process,
{ String[] args, int timeout) {
_name = script; _name = script;
_process = process; _process = process;
_id = id; _id = id;
@ -76,41 +75,35 @@ public abstract class AbstractScript implements Script
* java.lang.String, java.lang.Object) * java.lang.String, java.lang.Object)
*/ */
public abstract Object execute(String line); public abstract Object execute(String line);
public abstract void interrupt(); public abstract void interrupt();
abstract void log(String msg); abstract void log(String msg);
synchronized public void executeWithTimeout(final String line) synchronized public void executeWithTimeout(final String line) {
{ /**
Object result = null; * Changed by rjpeter Aug 07, 2014.
_timerTimeout = TIMER.newTimeout(new TimerTask() */
{ _future = EXECUTOR.submit(new Callable<Object>() {
@Override
public void run(Timeout arg0) throws Exception public Object call() {
{ return execute(line);
log("script takes too long -> interrupt");
try
{
interrupt();
}
catch (Throwable e)
{
}
} }
});
// wait for script to finish
try {
_future.get(_timeout, TimeUnit.MILLISECONDS);
} catch (TimeoutException e) {
log("script " + _name + " took too long -> interrupt");
try {
interrupt();
} catch (Throwable e1) {
}
} catch (Exception e) {
} }
, _timeout, TimeUnit.MILLISECONDS);
_future = EXECUTOR.submit(new Callable<Object>()
{
public Object call()
{
Object result = execute(line);
if (_timerTimeout != null)
_timerTimeout.cancel();
_timerTimeout = null;
return result;
}
});
} }
/* /*
@ -118,8 +111,7 @@ public abstract class AbstractScript implements Script
* *
* @see org.rzo.yajsw.script.Script#getScript() * @see org.rzo.yajsw.script.Script#getScript()
*/ */
public String getScript() public String getScript() {
{
return _name; return _name;
} }
@ -128,8 +120,7 @@ public abstract class AbstractScript implements Script
* *
* @return the timeout * @return the timeout
*/ */
public int getTimeout() public int getTimeout() {
{
return _timeout; return _timeout;
} }
@ -139,8 +130,7 @@ public abstract class AbstractScript implements Script
* @param timeout * @param timeout
* the new timeout * the new timeout
*/ */
public void setTimeout(int timeout) public void setTimeout(int timeout) {
{
_timeout = timeout; _timeout = timeout;
} }

View file

@ -76,8 +76,10 @@ public class ShellScript extends AbstractScript
public void executeWithTimeout() public void executeWithTimeout()
{ {
// TODO Auto-generated method stub /*
* Updated by bkowal 08/06/2014
*/
this.executeWithTimeout("");
} }
@Override @Override

View file

@ -6,6 +6,9 @@
/* /*
* ldm server mainline program module * ldm server mainline program module
*
* Updated on: Aug 05, 2014 (Omaha #3458: Increased edexBridge queue size to 10000)
* Author: rjpeter
*/ */
#include <ldmconfig.h> #include <ldmconfig.h>
@ -251,7 +254,7 @@ main(int ac, char *av[])
prod_class_t clss; prod_class_t clss;
int toffset = TOFFSET_NONE; int toffset = TOFFSET_NONE;
int loggingToStdErr = 0; int loggingToStdErr = 0;
unsigned queue_size = 5000; unsigned queue_size = 10000;
conffilename = DEFAULT_CONFFILENAME; conffilename = DEFAULT_CONFFILENAME;

View file

@ -7,6 +7,8 @@
* Author: bkowal * Author: bkowal
* Updated on: May 06, 2014 (Issue #3102: Updated to call cleanup if connect failed. Limit number of messages to be sent to QPID on a single send call) * Updated on: May 06, 2014 (Issue #3102: Updated to call cleanup if connect failed. Limit number of messages to be sent to QPID on a single send call)
* Author: rjpeter * Author: rjpeter
* Updated on: Aug 05, 2014 (Omaha #3458: Added logging of error when issue occurs on send)
* Author: rjpeter
*/ */
#include <qpid/messaging/Connection.h> #include <qpid/messaging/Connection.h>
@ -116,6 +118,7 @@ public:
} }
} catch (const std::exception& error) { } catch (const std::exception& error) {
// Error occurred during communication. Clean up the connection and return the number of messages processed. // Error occurred during communication. Clean up the connection and return the number of messages processed.
uerror(error.what());
cleanup(); cleanup();
} }

5
nativeLib/rary.cots.g2clib/drstemplates.h Executable file → Normal file
View file

@ -3,6 +3,7 @@
#include "grib2.h" #include "grib2.h"
// PRGMMR: Gilbert ORG: W/NP11 DATE: 2002-10-26 // PRGMMR: Gilbert ORG: W/NP11 DATE: 2002-10-26
// 2014-07-30 vkorolev Added template 5.4
// //
// ABSTRACT: This Fortran Module contains info on all the available // ABSTRACT: This Fortran Module contains info on all the available
// GRIB2 Data Representation Templates used in Section 5 (DRS). // GRIB2 Data Representation Templates used in Section 5 (DRS).
@ -31,7 +32,7 @@
// //
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#define MAXDRSTEMP 9 // maximum number of templates #define MAXDRSTEMP 10 // maximum number of templates
#define MAXDRSMAPLEN 200 // maximum template map length #define MAXDRSMAPLEN 200 // maximum template map length
struct drstemplate struct drstemplate
@ -49,6 +50,8 @@
{ 2, 16, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1} }, { 2, 16, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1} },
// 5.3: Grid point data - Complex Packing and spatial differencing // 5.3: Grid point data - Complex Packing and spatial differencing
{ 3, 18, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1,1,1} }, { 3, 18, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1,1,1} },
// 5.4: Grid Point Data - IEEE Floating Point Data
{ 4, 1, 0, {1} },
// 5.50: Spectral Data - Simple Packing // 5.50: Spectral Data - Simple Packing
{ 50, 5, 0, {4,-2,-2,1,4} }, { 50, 5, 0, {4,-2,-2,1,4} },
// 5.51: Spherical Harmonics data - Complex packing // 5.51: Spherical Harmonics data - Complex packing

17
nativeLib/rary.cots.g2clib/g2_unpack7.c Executable file → Normal file
View file

@ -34,6 +34,7 @@ g2int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum,g2int *igdstmpl
// PNG now allowed to use WMO Template no. 5.41 // PNG now allowed to use WMO Template no. 5.41
// 2004-12-16 Taylor - Added check on comunpack return code. // 2004-12-16 Taylor - Added check on comunpack return code.
// 2008-12-23 Wesley - Initialize Number of data points unpacked // 2008-12-23 Wesley - Initialize Number of data points unpacked
// 2014-07-29 vkorolev - Added processing Template no. 5.4
// //
// USAGE: int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum, // USAGE: int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum,
// g2int *igdstmpl, g2int idrsnum, // g2int *igdstmpl, g2int idrsnum,
@ -81,6 +82,9 @@ g2int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum,g2int *igdstmpl
g2int ierr,isecnum; g2int ierr,isecnum;
g2int ipos,lensec; g2int ipos,lensec;
g2float *lfld; g2float *lfld;
g2int *ifld;
ierr=0; ierr=0;
*fld=0; //NULL *fld=0; //NULL
@ -98,6 +102,7 @@ g2int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum,g2int *igdstmpl
ipos=(*iofst/8); ipos=(*iofst/8);
lfld=(g2float *)calloc(ndpts ? ndpts : 1,sizeof(g2float)); lfld=(g2float *)calloc(ndpts ? ndpts : 1,sizeof(g2float));
if (lfld == 0) { if (lfld == 0) {
ierr=6; ierr=6;
return(ierr); return(ierr);
@ -113,6 +118,18 @@ g2int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum,g2int *igdstmpl
return 7; return 7;
} }
} }
else if(idrsnum == 4) {
ifld=(g2int *)calloc(ndpts ? ndpts : 1, sizeof(g2int));
if(ifld != 0){
gbits(cgrib+ipos,ifld,0,32,0,ndpts);
rdieee(ifld,*fld,ndpts);
free(ifld);
}
else {
ierr=6;
return(ierr);
}
}
else if (idrsnum == 50) { // Spectral Simple else if (idrsnum == 50) { // Spectral Simple
simunpack(cgrib+ipos,idrstmpl,ndpts-1,lfld+1); simunpack(cgrib+ipos,idrstmpl,ndpts-1,lfld+1);
rdieee(idrstmpl+4,lfld+0,1); rdieee(idrstmpl+4,lfld+0,1);

View file

@ -9,7 +9,7 @@
Name: awips2-python Name: awips2-python
Summary: AWIPS II Python Distribution Summary: AWIPS II Python Distribution
Version: 2.7.1 Version: 2.7.1
Release: 10.el6 Release: 11.el6
Group: AWIPSII Group: AWIPSII
BuildRoot: %{_build_root} BuildRoot: %{_build_root}
BuildArch: %{_build_arch} BuildArch: %{_build_arch}

View file

@ -70,7 +70,14 @@ wrapper.java.additional.7=-Dqpid.broker.exceptionHandler.continue=true
# Maximum Java Heap Size (in MB) # Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1536 wrapper.java.maxmemory=1536
wrapper.ping.timeout=300 wrapper.ping.interval=5
wrapper.ping.timeout=30
# NOTE: script must be located at /awips2/qpid/bin/yajsw/scripts for it to be found
wrapper.script.ABORT=wrapperCapture.sh
wrapper.script.ABORT.timeout=120
wrapper.script.RESTART=wrapperCapture.sh
wrapper.script.RESTART.timeout=120
#******************************************************************** #********************************************************************
# Monitor the Application # Monitor the Application

View file

@ -14,7 +14,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
! !
! Name: awips2-qpid-java ! Name: awips2-qpid-java
Version: 0.18 Version: 0.18
! Release: 4%{?dist} ! Release: 5%{?dist}
Summary: Java implementation of Apache Qpid Summary: Java implementation of Apache Qpid
License: Apache Software License License: Apache Software License
Group: Development/Java Group: Development/Java