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:aa83bf804f
[formerlye654318431
[formerly 7334d3991903dfe8a62728de33c21e81534fdbb6]] Former-commit-id:e654318431
Former-commit-id:a08db8d73d
This commit is contained in:
commit
0a5ddf7457
68 changed files with 2330 additions and 524 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
|
@ -25,7 +25,6 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.runtime.FileLocator;
|
||||
import org.eclipse.osgi.framework.internal.core.BundleRepository;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.wiring.BundleWiring;
|
||||
import org.reflections.Reflections;
|
||||
|
@ -49,6 +48,7 @@ import org.reflections.util.ConfigurationBuilder;
|
|||
* Oct 21, 2013 2491 bsteffen Initial creation
|
||||
* Jan 22, 2014 2062 bsteffen Handle bundles with no wiring.
|
||||
* Apr 16, 2014 3018 njensen Synchronize against BundleRepository
|
||||
* Aug 13, 2014 3500 bclement uses BundleSynchronizer
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -60,26 +60,19 @@ public class BundleReflections {
|
|||
|
||||
private final Reflections reflections;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public BundleReflections(Bundle bundle, Scanner scanner) throws IOException {
|
||||
ConfigurationBuilder cb = new ConfigurationBuilder();
|
||||
BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
|
||||
BundleRepository bundleRepo = BundleRepositoryGetter
|
||||
.getFrameworkBundleRepository(bundle);
|
||||
final ConfigurationBuilder cb = new ConfigurationBuilder();
|
||||
final BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
|
||||
|
||||
if (bundleWiring != null) {
|
||||
if (bundleRepo != null) {
|
||||
synchronized (bundleRepo) {
|
||||
cb.addClassLoader(bundleWiring.getClassLoader());
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* even if we couldn't get the bundle repository to sync
|
||||
* against, it's probably safe, see BundleRepositoryGetter
|
||||
* javadoc
|
||||
*/
|
||||
BundleSynchronizer.runSynchedWithBundle(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
cb.addClassLoader(bundleWiring.getClassLoader());
|
||||
|
||||
}
|
||||
}, bundle);
|
||||
|
||||
cb.addUrls(FileLocator.getBundleFile(bundle).toURI().toURL());
|
||||
cb.setScanners(scanner);
|
||||
reflections = cb.build();
|
||||
|
|
|
@ -30,28 +30,6 @@ import org.osgi.framework.Bundle;
|
|||
* Utility class to get the BundleRepository object associated with a Bundle, to
|
||||
* 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>
|
||||
*
|
||||
|
@ -60,13 +38,14 @@ import org.osgi.framework.Bundle;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 17, 2014 njensen Initial creation
|
||||
* Aug 13, 2014 3500 bclement moved documentation over to BundleSynchronizer
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
* @version 1.0
|
||||
* @see BundleSynchronizer
|
||||
*/
|
||||
|
||||
public class BundleRepositoryGetter {
|
||||
|
||||
private BundleRepositoryGetter() {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,7 +28,6 @@ import java.util.HashSet;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.osgi.framework.internal.core.BundleRepository;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.namespace.BundleNamespace;
|
||||
import org.osgi.framework.namespace.PackageNamespace;
|
||||
|
@ -58,6 +57,7 @@ import com.raytheon.uf.viz.core.Activator;
|
|||
* bundles.
|
||||
* Feb 03, 2013 2764 bsteffen Use OSGi API to get dependencies.
|
||||
* Apr 17, 2014 3018 njensen Synchronize against BundleRepository
|
||||
* Aug 13, 2014 3500 bclement uses BundleSynchronizer
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -265,25 +265,20 @@ public class SubClassLocator implements ISubClassLocator {
|
|||
*/
|
||||
private Set<Class<?>> loadClassesFromCache(Bundle bundle,
|
||||
Collection<String> classNames) {
|
||||
BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
|
||||
final BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
|
||||
if (bundleWiring == null) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
BundleRepository bundleRepo = BundleRepositoryGetter
|
||||
.getFrameworkBundleRepository(bundle);
|
||||
ClassLoader loader = null;
|
||||
if (bundleRepo != null) {
|
||||
synchronized (bundleRepo) {
|
||||
loader = bundleWiring.getClassLoader();
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* even if we couldn't get the bundle repository to sync against,
|
||||
* it's probably safe, see BundleRepositoryGetter javadoc
|
||||
*/
|
||||
loader = bundleWiring.getClassLoader();
|
||||
final ClassLoader[] loaderHolder = new ClassLoader[1];
|
||||
BundleSynchronizer.runSynchedWithBundle(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
loaderHolder[0] = bundleWiring.getClassLoader();
|
||||
}
|
||||
}, bundle);
|
||||
|
||||
ClassLoader loader = loaderHolder[0];
|
||||
if (loader == null) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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.
|
||||
* This will show the tab as updating in the header and data text controls.
|
||||
* 07/23/2014 15645 zhao modified checkBasicSyntaxError()
|
||||
* 08/13/2014 3497 njensen Refactored syntax checking to prevent potential infinite loop
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -462,11 +463,6 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
*/
|
||||
private TafRecord[] tafsInViewer;
|
||||
|
||||
/**
|
||||
* Set to true is Python Syntax checker modified the TAF otherwise false.
|
||||
*/
|
||||
private boolean pythonModifiedTAF = false;
|
||||
|
||||
private FindReplaceDlg findDlg;
|
||||
|
||||
/**
|
||||
|
@ -1100,6 +1096,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
Menu fileMenu = new Menu(menuBar);
|
||||
fileMenuItem.setMenu(fileMenu);
|
||||
fileMenu.addListener(SWT.Show, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
setAltFlagForEditorTafTabComp();
|
||||
}
|
||||
|
@ -1211,6 +1208,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
Menu optionsMenu = new Menu(menuBar);
|
||||
optionsMenuItem.setMenu(optionsMenu);
|
||||
optionsMenu.addListener(SWT.Show, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
setAltFlagForEditorTafTabComp();
|
||||
}
|
||||
|
@ -1246,31 +1244,16 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
autoPrintMI.setText("A&uto Print");
|
||||
autoPrintMI.setSelection(configMgr
|
||||
.getResourceAsBoolean(ResourceTag.AutoPrint));
|
||||
autoPrintMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
}
|
||||
});
|
||||
|
||||
// Update Times on Format menu item
|
||||
updateTimesFormatMI = new MenuItem(optionsMenu, SWT.CHECK);
|
||||
updateTimesFormatMI.setText("U&pdate Times on Format");
|
||||
updateTimesFormatMI.setSelection(configMgr
|
||||
.getResourceAsBoolean(ResourceTag.UpdateTimes));
|
||||
updateTimesFormatMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
}
|
||||
});
|
||||
|
||||
// Send Collective menu item
|
||||
sendCollectMI = new MenuItem(optionsMenu, SWT.CHECK);
|
||||
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);
|
||||
editMenuItem.setMenu(editMenu);
|
||||
editMenu.addListener(SWT.Show, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
setAltFlagForEditorTafTabComp();
|
||||
}
|
||||
|
@ -1398,6 +1382,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
Menu helpMenu = new Menu(menuBar);
|
||||
helpMenuItem.setMenu(helpMenu);
|
||||
helpMenu.addListener(SWT.Show, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
setAltFlagForEditorTafTabComp();
|
||||
}
|
||||
|
@ -2094,12 +2079,6 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
wrapChk = new Button(controlsComp, SWT.CHECK);
|
||||
wrapChk.setText("Wrap");
|
||||
configMgr.setDefaultFontAndColors(wrapChk);
|
||||
wrapChk.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
}
|
||||
});
|
||||
|
||||
String wrapStr = configMgr.getDataAsString(ResourceTag.Wrap);
|
||||
|
||||
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
|
||||
*/
|
||||
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();
|
||||
st = editorTafTabComp.getTextEditorControl();
|
||||
|
||||
final Map<StyleRange, String> syntaxMap = new HashMap<StyleRange, String>();
|
||||
ArrayList<String> tafList = new ArrayList<String>();
|
||||
st.addMouseTrackListener(new MouseTrackAdapter() {
|
||||
@Override
|
||||
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>();
|
||||
|
||||
/*
|
||||
* 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) {
|
||||
int idx2 = in.indexOf("TAF", idx1 + 1);
|
||||
boolean errInTaf = false;
|
||||
String taf;
|
||||
sMap.clear();
|
||||
tList.clear();
|
||||
|
@ -2967,52 +2983,35 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
} else {
|
||||
taf = in.substring(idx1);
|
||||
}
|
||||
currentLineNo = st.getLineAtOffset(idx1);
|
||||
errInTaf = checkSyntaxUsingPython(taf, currentLineNo, sMap, tList,
|
||||
doLogMessage);
|
||||
|
||||
if (pythonModifiedTAF == false) {
|
||||
// TAF not changed prepare to check next taf.
|
||||
tafList.add(tList.get(0));
|
||||
if (errInTaf) {
|
||||
int currentLineNo = st.getLineAtOffset(idx1);
|
||||
errorInTaf |= checkSyntaxUsingPython(taf, currentLineNo, sMap,
|
||||
tList, doLogMessage);
|
||||
for (StyleRange skey : sMap.keySet()) {
|
||||
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.
|
||||
|
||||
String tafAfterCheck = tList.get(0);
|
||||
checkedTafs.add(tafAfterCheck);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String tempTaf : tafList) {
|
||||
sb.append(tempTaf);
|
||||
for (String checkedTaf : checkedTafs) {
|
||||
sb.append(checkedTaf);
|
||||
sb.append("\n");
|
||||
}
|
||||
sb.append(tList.get(0));
|
||||
sb.append("\n");
|
||||
int lengthChecked = sb.length();
|
||||
|
||||
if (idx2 > -1) {
|
||||
sb.append(in.substring(idx2));
|
||||
}
|
||||
in = sb.toString();
|
||||
st.setText(in);
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
for (String taf : tafList) {
|
||||
sb.append(taf);
|
||||
sb.append("\n");
|
||||
}
|
||||
|
||||
st.setText(sb.toString());
|
||||
st.setStyleRange(null);
|
||||
|
||||
Set<StyleRange> srs = syntaxMap.keySet();
|
||||
|
||||
for (StyleRange sr : srs) {
|
||||
st.setStyleRange(sr);
|
||||
/*
|
||||
* 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
|
||||
* that occurs if tafAfterCheck comes back with two TAFS inside it.
|
||||
*/
|
||||
idx1 = in.indexOf("TAF", lengthChecked);
|
||||
}
|
||||
|
||||
return errorInTaf;
|
||||
|
@ -3037,32 +3036,19 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean checkSyntaxUsingPython(String in, int currentLineNo,
|
||||
Map<StyleRange, String> syntaxMap, ArrayList<String> tafList,
|
||||
Map<StyleRange, String> syntaxMap, List<String> tafList,
|
||||
boolean doLogMessage) {
|
||||
// TODO remove
|
||||
getSitesInTaf(in);
|
||||
// Declare variables for processing the editor's contents.
|
||||
boolean errorInTaf = false;
|
||||
int[] range = new int[] { 0, 0, 0, 0 };
|
||||
pythonModifiedTAF = false;
|
||||
|
||||
// Assume editorTafTabComp is for the active tab.
|
||||
st = editorTafTabComp.getTextEditorControl();
|
||||
HashMap<String, Object> resultMap = parseText(in,
|
||||
editorTafTabComp.getBBB());
|
||||
HashMap<String, Object> parsedText = (HashMap<String, Object>) resultMap
|
||||
.get("result");
|
||||
in = in.trim();
|
||||
Map<String, Object> resultMap = parseText(in, editorTafTabComp.getBBB());
|
||||
String newText = (String) resultMap.get("text");
|
||||
Map<String, Object> parsedText = (Map<String, Object>) resultMap
|
||||
.get("result");
|
||||
String newTime = (String) resultMap.get("headerTime");
|
||||
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);
|
||||
java.util.List<String> results;
|
||||
StringBuilder errorMsg = new StringBuilder();
|
||||
|
@ -3328,7 +3314,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
* @return -- the decoded TAF
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private HashMap<String, Object> parseText(String text, String bbb) {
|
||||
private Map<String, Object> parseText(String text, String bbb) {
|
||||
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
|
||||
|
@ -3340,10 +3326,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
File baseDir = pm.getFile(baseContext, "aviation"
|
||||
+ IPathManager.SEPARATOR + "python");
|
||||
|
||||
HashMap<String, Object> resultMap = null;
|
||||
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
Map<String, Object> resultMap = null;
|
||||
Map<String, Object> argMap = new HashMap<String, Object>();
|
||||
try {
|
||||
if (parsePythonScript == null) {
|
||||
parsePythonScript = new PythonScript(baseFile.getPath(),
|
||||
|
@ -3352,13 +3336,13 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
TafViewerEditorDlg.class.getClassLoader());
|
||||
}
|
||||
parsePythonScript.instantiatePythonClass("parser", "Decoder", null);
|
||||
map.put("text", text);
|
||||
map.put("bbb", bbb);
|
||||
argMap.put("text", text);
|
||||
argMap.put("bbb", bbb);
|
||||
Object com = parsePythonScript.execute("parseFromJava", "parser",
|
||||
map);
|
||||
resultMap = (HashMap<String, Object>) com;
|
||||
argMap);
|
||||
resultMap = (Map<String, Object>) com;
|
||||
} catch (JepException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Error parsing TAF", e);
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
@ -4433,6 +4417,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
*
|
||||
* @see com.raytheon.viz.aviation.editor.ITafSettable#getViewerTabList()
|
||||
*/
|
||||
@Override
|
||||
public List<ViewerTab> getViewerTabList() {
|
||||
return modelsTabs;
|
||||
}
|
||||
|
|
|
@ -106,6 +106,7 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* 06-03-14 3191 njensen Fix postData to not retrieve
|
||||
* 06-17-2014 DR17409 mgamazaychikov Fix futurePoints calculation in generateNewTrackInfo()
|
||||
* and generateExistingTrackInfo()
|
||||
* 08-21-2014 DR 15700 Qinglu Lin handle the situation where frameTime is null in paintTrack().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -693,9 +694,6 @@ public class StormTrackDisplay implements IRenderable {
|
|||
}
|
||||
|
||||
if (state.geomChanged) {
|
||||
if (cachedTrack != null) {
|
||||
cachedTrack.dispose();
|
||||
}
|
||||
if (StormTrackState.trackType.equals("lineOfStorms") && state.justSwitchedToLOS) {
|
||||
GeodeticCalculator gc = new GeodeticCalculator();
|
||||
Coordinate[] coords = state.dragMeGeom.getCoordinates();
|
||||
|
@ -704,12 +702,19 @@ public class StormTrackDisplay implements IRenderable {
|
|||
coords[coords.length - 1].y);
|
||||
state.angle = adjustAngle(gc.getAzimuth() - 90);
|
||||
}
|
||||
generateTrackInfo(state, paintProps);
|
||||
DataTime frameTime = paintProps.getDataTime();
|
||||
if (frameTime != null) {
|
||||
if (cachedTrack != null) {
|
||||
cachedTrack.dispose();
|
||||
}
|
||||
generateTrackInfo(state, paintProps, frameTime);
|
||||
if (state.mode == Mode.TRACK) {
|
||||
createTrack(target, paintProps);
|
||||
}
|
||||
state.geomChanged = false;
|
||||
}
|
||||
state.geomChanged = false;
|
||||
}
|
||||
if (state.mode == Mode.TRACK
|
||||
&& (!state.isInitiallyMotionless() || state.isNonstationary())) {
|
||||
target.drawWireframeShape(cachedTrack, state.color,
|
||||
|
@ -727,7 +732,7 @@ public class StormTrackDisplay implements IRenderable {
|
|||
* @param currentState
|
||||
*/
|
||||
private void generateTrackInfo(StormTrackState currentState,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
PaintProperties paintProps, DataTime frameTime) throws VizException {
|
||||
int frameCount = trackUtil.getFrameCount(paintProps.getFramesInfo());
|
||||
int currFrame = trackUtil.getCurrentFrame(paintProps.getFramesInfo());
|
||||
try {
|
||||
|
@ -740,7 +745,6 @@ public class StormTrackDisplay implements IRenderable {
|
|||
&& currentState.timePoints.length != frameCount) {
|
||||
// need to set theAnchorPoint and theAnchorIndex here
|
||||
// because timePoints get erased before we get to updateAnchorPoint
|
||||
DataTime frameTime = paintProps.getDataTime();
|
||||
for (int j=0;j<currentState.timePoints.length;j++){
|
||||
if (frameTime.equals(currentState.timePoints[j].time)) {
|
||||
theAnchorPoint = currentState.timePoints[j].coord;
|
||||
|
@ -787,7 +791,7 @@ public class StormTrackDisplay implements IRenderable {
|
|||
generateNewTrackInfo(currentState, currFrame, paintProps);
|
||||
currentDisplayedTimes = trackUtil.getDataTimes(paintProps
|
||||
.getFramesInfo());
|
||||
generateTrackInfo(currentState, paintProps);
|
||||
generateTrackInfo(currentState, paintProps, frameTime);
|
||||
} else {
|
||||
|
||||
if (currentState.pointMoved) {
|
||||
|
|
|
@ -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.DataTime;
|
||||
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.IExtent;
|
||||
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
|
||||
* Jan 21, 2014 2667 bclement renamed record's lightSource field to source
|
||||
* 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
|
||||
*
|
||||
* </pre>
|
||||
|
@ -109,6 +111,8 @@ public class LightningResource extends
|
|||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(LightningResource.class);
|
||||
|
||||
private static final long MAX_RECORD_BIN_MILLIS = TimeUtil.MILLIS_PER_DAY;
|
||||
|
||||
private static class LightningFrame {
|
||||
|
||||
public LightningFrameMetadata metadata;
|
||||
|
@ -515,6 +519,13 @@ public class LightningResource extends
|
|||
|
||||
for (BinLightningRecord obj : objs) {
|
||||
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 end = new DataTime(obj.getStopTime());
|
||||
time = this.getResourceData().getBinOffset()
|
||||
|
|
|
@ -1,18 +1,30 @@
|
|||
<?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. -->
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<vbSourceList>
|
||||
<vbSource key="DGEX186" category="Volume" />
|
||||
<vbSource key="GFS160" category="Volume" />
|
||||
<vbSource key="ETA242" category="Volume" />
|
||||
<vbSource key="mesoEta216" 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="ECMWF-HiRes" category="Volume" />
|
||||
<vbSource key="ECMF-NorthernHemisphere" category="Volume" />
|
||||
|
@ -26,8 +38,34 @@
|
|||
<vbSource key="AVN225" 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="HFR-EAST_6KM" category="Volume" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HFR-US_EAST_DELAWARE_1KM" category="Volume"
|
||||
views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HFR-US_EAST_FLORIDA_2KM" category="Volume"
|
||||
views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HFR-US_EAST_NORTH_2KM" category="Volume"
|
||||
views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HFR-US_EAST_SOUTH_2KM" category="Volume"
|
||||
views="PLANVIEW TIMESERIES" />
|
||||
<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" />
|
||||
|
@ -59,7 +97,7 @@
|
|||
<!-- Old version being replaced by GFS229
|
||||
<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="radar" name="Radar" category="Volume" />
|
||||
<vbSource key="MOSGuide-AK" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
|
@ -82,7 +120,8 @@
|
|||
<vbSource key="GFE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="GFS199" 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"
|
||||
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" />
|
||||
|
@ -165,10 +204,9 @@
|
|||
views="TIMESERIES" />
|
||||
<vbSource key="Ldad" category="Point" views="TIMESERIES" />
|
||||
<vbSource key="obs" name="Metar" category="Point" views="TIMESERIES" />
|
||||
<vbSource key="obsOA" name="MetarOA" category="Point"
|
||||
views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="radar149" name="DMD" category="Point"
|
||||
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT TIMESERIES" />
|
||||
<vbSource key="obsOA" name="MetarOA" category="Point" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="radar149" name="DMD" category="Point" subCategory="Column"
|
||||
views="CROSSSECTION TIMEHEIGHT VARVSHGT TIMESERIES" />
|
||||
<vbSource key="modelsoundingGFS" name="GFSBufr" category="Point"
|
||||
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
|
||||
<vbSource key="goessounding" name="GoesBufr" category="Point"
|
||||
|
@ -181,10 +219,10 @@
|
|||
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
|
||||
<vbSource key="profiler" name="Profiler" category="Point"
|
||||
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
|
||||
<vbSource key="bufrua" name="Raob" category="Point"
|
||||
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
|
||||
<vbSource key="bufrua" name="Raob" category="Point" subCategory="Column"
|
||||
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
|
||||
<vbSource key="bufruaOA" name="RaobOA" category="Point"
|
||||
subCategory="Column" />
|
||||
<vbSource key="radarVWP" name="VWP" category="Point"
|
||||
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
|
||||
<vbSource key="radarVWP" name="VWP" category="Point" subCategory="Column"
|
||||
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
|
||||
</vbSourceList>
|
||||
|
|
|
@ -57,6 +57,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.viz.core.mode.CAVEMode;
|
||||
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.Polygon;
|
||||
|
||||
|
@ -70,6 +71,7 @@ import com.vividsolutions.jts.geom.Polygon;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 17, 2014 3419 jsanchez Initial creation
|
||||
* Aug 20, 2014 ASM #16703 D. Friedman Ensure watches have a state attribute.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -173,7 +175,8 @@ public class WatchUtil {
|
|||
}
|
||||
|
||||
DbQueryRequest request = buildRequest(simulatedTime,
|
||||
phenSigConstraint.toString(), warngenLayer.getAllUgcs(),
|
||||
phenSigConstraint.toString(),
|
||||
warngenLayer.getAllUgcs(GeoFeatureType.COUNTY),
|
||||
entityClass);
|
||||
DbQueryResponse response = (DbQueryResponse) ThriftClient
|
||||
.sendRequest(request);
|
||||
|
@ -190,7 +193,7 @@ public class WatchUtil {
|
|||
System.out.println("create watch area buffer time: "
|
||||
+ (System.currentTimeMillis() - t0));
|
||||
Set<String> validUgcZones = warngenLayer
|
||||
.getUgcsForWatches(watchArea);
|
||||
.getUgcsForWatches(watchArea, GeoFeatureType.COUNTY);
|
||||
watches = processRecords(records, validUgcZones);
|
||||
} catch (RuntimeException e) {
|
||||
statusHandler
|
||||
|
@ -327,6 +330,14 @@ public class WatchUtil {
|
|||
*/
|
||||
String ugcZone = ar.getUgcZone();
|
||||
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 phenSig = ar.getPhensig();
|
||||
String etn = ar.getEtn();
|
||||
|
@ -360,7 +371,16 @@ public class WatchUtil {
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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/28/2014 DR 17475 Qinglu Lin Updated populateStrings() and findLargestQuadrant(), removed findLargestGeometry(),
|
||||
* added createAreaAndCentroidMaps() and movePopulatePt(), updated paintText() to center W.
|
||||
* 08/20/2014 ASM #16703 D. Friedman Make geo feature types for watches explicit
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
|
@ -1521,50 +1522,42 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
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
|
||||
* polygon.
|
||||
*/
|
||||
public Set<String> getUgcsForWatches(Polygon polygon)
|
||||
public Set<String> getUgcsForWatches(Polygon polygon, GeoFeatureType type)
|
||||
throws Exception {
|
||||
GeospatialDataAccessor gda = getGeospatialDataAcessor();
|
||||
boolean isMarineZone = configuration.getGeospatialConfig()
|
||||
.getAreaSource().equalsIgnoreCase(MARINE);
|
||||
if (!isMarineZone) {
|
||||
Set<String> ugcs = new HashSet<String>();
|
||||
for (String fips : gda.getAllFipsInArea(gda.buildArea(polygon))) {
|
||||
GeospatialDataAccessor gda = getGeospatialDataAcessor(type);
|
||||
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 {
|
||||
GeospatialDataAccessor gda;
|
||||
public Set<String> getAllUgcs(GeoFeatureType type) throws Exception {
|
||||
// TODO: zig
|
||||
GeospatialDataAccessor gda = getGeospatialDataAcessor(type);
|
||||
Set<String> ugcs = new HashSet<String>();
|
||||
gda = getGeospatialDataAcessor();
|
||||
boolean isMarineZone = configuration.getGeospatialConfig()
|
||||
.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;
|
||||
}
|
||||
|
||||
private GeospatialDataAccessor getGeospatialDataAcessor()
|
||||
private GeospatialDataAccessor getGeospatialDataAcessor(GeoFeatureType type)
|
||||
throws Exception {
|
||||
GeospatialDataList gdl = searchGeospatialDataAccessor();
|
||||
GeospatialDataList gdl = searchGeospatialDataAccessor(type);
|
||||
if (gdl == null) {
|
||||
// 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
|
||||
* changed again? A ticket should be opened for this to be resolved.
|
||||
*/
|
||||
WarngenConfiguration torConfig = WarngenConfiguration.loadConfig(
|
||||
"tornadoWarning", getLocalizedSite(), null);
|
||||
loadGeodataForConfiguration(torConfig);
|
||||
gdl = searchGeospatialDataAccessor();
|
||||
String templateName;
|
||||
if (type == GeoFeatureType.COUNTY)
|
||||
templateName = "tornadoWarning";
|
||||
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
|
||||
// name
|
||||
// independent of a template
|
||||
// TODO: FIPS field should not be hardcoded.
|
||||
AreaSourceConfiguration areaConfig = new AreaSourceConfiguration();
|
||||
areaConfig.setFipsField("FIPS");
|
||||
areaConfig.setFipsField(type.fipsField);
|
||||
|
||||
return new GeospatialDataAccessor(gdl, areaConfig);
|
||||
}
|
||||
|
||||
private GeospatialDataList searchGeospatialDataAccessor() {
|
||||
private GeospatialDataList searchGeospatialDataAccessor(GeoFeatureType type) {
|
||||
synchronized (siteMap) {
|
||||
for (Map.Entry<String, GeospatialDataList> entry : siteMap
|
||||
.entrySet()) {
|
||||
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)
|
||||
&& mapdataTable.equalsIgnoreCase(keyParts[0])
|
||||
&& type.tableName.equalsIgnoreCase(keyParts[0])
|
||||
&& getLocalizedSite().equals(keyParts[1])) {
|
||||
return entry.getValue();
|
||||
}
|
||||
|
|
|
@ -141,6 +141,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* added determineAffectedMarinePortions().
|
||||
* Apr 28, 2014 3033 jsanchez Set the site and backup site in Velocity Engine's properties
|
||||
* Jul 21, 2014 3419 jsanchez Refactored WatchUtil.
|
||||
* Aug 15, 2014 DR15701 mgamazaychikov Removed static field watchUtil.
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
|
@ -158,8 +159,6 @@ public class TemplateRunner {
|
|||
|
||||
private static Hashtable<String, DateFormat> dateFormat;
|
||||
|
||||
private static WatchUtil watchUtil;
|
||||
|
||||
static {
|
||||
dateFormat = new Hashtable<String, DateFormat>();
|
||||
dateFormat
|
||||
|
@ -854,9 +853,7 @@ public class TemplateRunner {
|
|||
// Store Watches
|
||||
try {
|
||||
t0 = System.currentTimeMillis();
|
||||
if (watchUtil == null) {
|
||||
watchUtil = new WatchUtil(warngenLayer);
|
||||
}
|
||||
WatchUtil watchUtil = new WatchUtil(warngenLayer);
|
||||
List<Watch> watches = watchUtil.getWatches(config, warnPolygon,
|
||||
simulatedTime);
|
||||
System.out.println("getWatches time: "
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# This script will update any saved displays which use older skewT displays to
|
||||
# use Nsharp.
|
||||
#
|
||||
|
|
31
deltaScripts/14.2.1/updateTopoFile.py
Normal file
31
deltaScripts/14.2.1/updateTopoFile.py
Normal 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)
|
24
deltaScripts/14.2.1/updateTopoFile.sh
Normal file
24
deltaScripts/14.2.1/updateTopoFile.sh
Normal 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
|
|
@ -72,6 +72,7 @@ export SHLIB_PATH=$PROJECT/sharedlib
|
|||
### End AWIPS 1 support ###
|
||||
|
||||
export HOSTNAME=`hostname`
|
||||
export SHORT_HOSTNAME=`hostname -s`
|
||||
|
||||
# set Python & Java into the path
|
||||
export PATH=$awips_home/bin:${JAVA_INSTALL}/bin:${PYTHON_INSTALL}/bin:$PATH
|
||||
|
|
180
edexOsgi/build.edex/esb/bin/yajsw/scripts/wrapperCapture.sh
Normal file
180
edexOsgi/build.edex/esb/bin/yajsw/scripts/wrapperCapture.sh
Normal 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
|
Binary file not shown.
Binary file not shown.
|
@ -96,6 +96,8 @@ wrapper.java.additional.5=-Duser.timezone=GMT
|
|||
# garbage collection settings
|
||||
wrapper.java.additional.gc.1=-XX:+UseConcMarkSweepGC
|
||||
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
|
||||
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
|
||||
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
|
||||
wrapper.jvm_exit.timeout=0
|
||||
|
@ -169,15 +177,16 @@ wrapper.java.monitor.heap.threshold.percent = 90
|
|||
|
||||
wrapper.java.monitor.deadlock = true
|
||||
# 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
|
||||
wrapper.on_exit.default=${WRAPPER_ON_EXIT_ACTION}
|
||||
# restart the application if it runs out of memory
|
||||
wrapper.trigger.1=java.lang.OutOfMemoryError
|
||||
wrapper.trigger.action=${WRAPPER_TRIGGER_ACTION}
|
||||
wrapper.filter.trigger.oom=java.lang.OutOfMemoryError
|
||||
wrapper.filter.action.oom=${WRAPPER_TRIGGER_ACTION}
|
||||
|
||||
#********************************************************************
|
||||
#********************************************************************fil
|
||||
# Wrapper Logging Properties
|
||||
#********************************************************************
|
||||
# Format of output for the console. (See docs for formats)
|
||||
|
|
|
@ -22,8 +22,14 @@ package com.raytheon.edex.plugin.binlightning;
|
|||
import gov.noaa.nws.ost.edex.plugin.binlightning.BinLigntningDecoderUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
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 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.plugin.AbstractDecoder;
|
||||
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.impl.LightningStrikePoint;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgStrikeType;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
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.time.TimeTools;
|
||||
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,
|
||||
* and to used WMO header to distinguish bit-shifted
|
||||
* GLD360 and NLDN data.
|
||||
* Aug 04, 2014 3488 bclement added checkBinRange(), rebin() and finalizeRecords()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -100,6 +107,9 @@ public class BinLightningDecoder extends AbstractDecoder {
|
|||
|
||||
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
|
||||
* 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 {
|
||||
|
||||
//String traceId = null;
|
||||
PluginDataObject[] reports = new PluginDataObject[0];
|
||||
PluginDataObject[] rval = new PluginDataObject[0];
|
||||
|
||||
if (data != null) {
|
||||
traceId = (String) headers.get(DecoderTools.INGEST_FILE_NAME);
|
||||
|
@ -163,11 +173,13 @@ public class BinLightningDecoder extends AbstractDecoder {
|
|||
// 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
|
||||
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];
|
||||
}
|
||||
|
||||
//report.setInsertTime(c); // OB13.4 source code does not have this line anymore, WZ 05/03/2013
|
||||
Collection<BinLightningRecord> records = checkBinRange(report,
|
||||
strikes);
|
||||
rval = finalizeRecords(records, baseTime);
|
||||
}
|
||||
} else {
|
||||
logger.error("No WMOHeader found in data");
|
||||
}
|
||||
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");
|
||||
}
|
||||
//report.setInsertTime(c); // OB13.4 source code does not have this line anymore, WZ 05/03/2013
|
||||
|
||||
Calendar cStart = report.getStartTime();
|
||||
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 = report.getStopTime();
|
||||
Calendar cStop = record.getStopTime();
|
||||
|
||||
TimeRange range = new TimeRange(cStart.getTimeInMillis(),
|
||||
cStop.getTimeInMillis());
|
||||
|
||||
DataTime dataTime = new DataTime(cStart, range);
|
||||
report.setDataTime(dataTime);
|
||||
record.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);
|
||||
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 {
|
||||
logger.error("No WMOHeader found in data");
|
||||
rval = Arrays.asList(record);
|
||||
}
|
||||
return reports;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,6 +31,7 @@ except:
|
|||
import NetCDF
|
||||
import JUtil
|
||||
import iscUtil
|
||||
import logging
|
||||
|
||||
from java.util import ArrayList
|
||||
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.
|
||||
# 10/22/13 2405 rjpeter Remove WECache and store directly to cube.
|
||||
# 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
|
||||
|
@ -83,7 +85,7 @@ ifpNetcdfLogger=None
|
|||
## Logging methods ##
|
||||
def initLogger(logFile=None):
|
||||
global ifpNetcdfLogger
|
||||
ifpNetcdfLogger = iscUtil.getLogger("ifpnetCDF",logFile)
|
||||
ifpNetcdfLogger = iscUtil.getLogger("ifpnetCDF",logFile, logLevel=logging.INFO)
|
||||
|
||||
def logEvent(*msg):
|
||||
ifpNetcdfLogger.info(iscUtil.tupleToString(*msg))
|
||||
|
@ -249,7 +251,7 @@ def timeFromComponents(timeTuple):
|
|||
epochDays = epochDays + daysInMonth(pmonth, timeTuple[0])
|
||||
pmonth = pmonth + 1
|
||||
|
||||
epochDays = epochDays + timeTuple[2] - 1; # but not this day
|
||||
epochDays = epochDays + timeTuple[2] - 1 # but not this day
|
||||
|
||||
epochTime = epochDays * 86400 + \
|
||||
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()
|
||||
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')
|
||||
|
||||
|
@ -1188,11 +1190,20 @@ def compressFile(filename, factor):
|
|||
###------------
|
||||
# getSamplingDefinition - accesses server to retrieve definition,
|
||||
# returns None or the sampling definition as Python.
|
||||
def getSamplingDefinition(client, configName):
|
||||
def getSamplingDefinition(client, configName, siteId):
|
||||
if configName is None:
|
||||
return None
|
||||
file = PathManagerFactory.getPathManager().getStaticFile("isc/utilities/" + configName + ".py")
|
||||
if file is None:
|
||||
pathManager = PathManagerFactory.getPathManager()
|
||||
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."
|
||||
logProblem(s)
|
||||
return None
|
||||
|
@ -1341,7 +1352,8 @@ def main(outputFilename, parmList, databaseID, startTime,
|
|||
#del maskGrid
|
||||
|
||||
# Determine sampling definition
|
||||
samplingDef = getSamplingDefinition(client, argDict['configFileName'])
|
||||
siteId = DatabaseID(argDict['databaseID']).getSiteId()
|
||||
samplingDef = getSamplingDefinition(client, argDict['configFileName'], siteId)
|
||||
logVerbose("Sampling Definition:", samplingDef)
|
||||
|
||||
# Open the netCDF file
|
||||
|
@ -1385,7 +1397,7 @@ def main(outputFilename, parmList, databaseID, startTime,
|
|||
argDict['krunch'], clipArea)
|
||||
totalGrids = totalGrids + 3
|
||||
|
||||
storeGlobalAtts(file, argDict);
|
||||
storeGlobalAtts(file, argDict)
|
||||
|
||||
file.close()
|
||||
|
||||
|
|
|
@ -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/11/2014 17242 David Gillingham (code checked in by zhao)
|
||||
# 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
|
||||
|
@ -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
|
||||
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:
|
||||
tr: the missing time range
|
||||
|
@ -274,7 +276,7 @@ class WECache(object):
|
|||
|
||||
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.
|
||||
Writes will be done in _batchSize groups
|
||||
|
||||
|
@ -287,10 +289,19 @@ class WECache(object):
|
|||
saveList = [] # python time ranges covered by this 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
|
||||
gridsToSave = ArrayList(self._batchSize) # grids in this contiguous batch
|
||||
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
|
||||
if dirty:
|
||||
logger.debug("WECache storing: %s", printTR(tr))
|
||||
|
@ -315,6 +326,9 @@ class WECache(object):
|
|||
logger.debug("WECache purging: %s", printTR(tr))
|
||||
self._inv[tr] = None
|
||||
self._populated.remove(tr)
|
||||
else:
|
||||
# skip any clean unpopulated grids
|
||||
logger.debug("WECache skipping: %s", printTR(tr))
|
||||
|
||||
if saveBatch:
|
||||
# add this contiguous batch to saveRequest
|
||||
|
@ -405,9 +419,9 @@ class WECache(object):
|
|||
self._populated.add(tr)
|
||||
|
||||
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
|
||||
self.__flushGrids(self.keys())
|
||||
self.__flushGrids(self._dirty)
|
||||
|
||||
def overlaps(self, tr1, tr2):
|
||||
if (tr1[0] >= tr2[0] and tr1[0] < tr2[1]) or \
|
||||
|
@ -539,25 +553,39 @@ class IscMosaic:
|
|||
|
||||
gzipFile = None
|
||||
unzippedFile = None
|
||||
gzipped = True
|
||||
try:
|
||||
import gzip
|
||||
gzipFile = gzip.open(filename, 'rb')
|
||||
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()
|
||||
gzipFile.close()
|
||||
os.rename(unzippedFile.name, gzipFile.filename)
|
||||
except:
|
||||
# Not gzipped
|
||||
gzipFile = unzippedFile = None
|
||||
finally:
|
||||
# close the files in case of error
|
||||
if gzipFile is not None:
|
||||
gzipFile.close()
|
||||
if unzippedFile is not None:
|
||||
unzippedFile.close()
|
||||
if not gzipped:
|
||||
os.remove(unzippedFile.name)
|
||||
|
||||
a = os.times()
|
||||
cpu = a[0] + a[1]
|
||||
stop1 = a[4]
|
||||
cpugz = a[0] + a[1]
|
||||
stopgz = a[4]
|
||||
|
||||
file = NetCDF.NetCDFFile(filename, "r")
|
||||
|
||||
|
@ -657,15 +685,15 @@ class IscMosaic:
|
|||
SendNotifications.send(notification)
|
||||
|
||||
a = os.times()
|
||||
cpugz = a[0] + a[1]
|
||||
cpu = a[0] + a[1]
|
||||
stop = a[4]
|
||||
logger.info("Elapsed/CPU time: "
|
||||
"%-.2f / %-.2f decompress, "
|
||||
"%-.2f / %-.2f processing, "
|
||||
"%-.2f / %-.2f total",
|
||||
stop1 - start, cpu - cpu0,
|
||||
stop - stop1, cpugz - cpu,
|
||||
stop - start, cpugz - cpu0)
|
||||
stopgz - start, cpugz - cpu0,
|
||||
stop - stopgz, cpu - cpugz,
|
||||
stop - start, cpu - cpu0)
|
||||
|
||||
|
||||
def __processParm(self, parmName, vars, history, filename):
|
||||
|
@ -1102,9 +1130,9 @@ class IscMosaic:
|
|||
#areaMask.setGloc(domain)
|
||||
|
||||
|
||||
areaMask = ReferenceData(domain, ReferenceID("full"), None, CoordinateType.GRID);
|
||||
areaMask.getGrid();
|
||||
areaMask.invert();
|
||||
areaMask = ReferenceData(domain, ReferenceID("full"), None, CoordinateType.GRID)
|
||||
areaMask.getGrid()
|
||||
areaMask.invert()
|
||||
|
||||
elif self.__altMask is not None:
|
||||
try:
|
||||
|
@ -1278,7 +1306,7 @@ class IscMosaic:
|
|||
else:
|
||||
#FIXME
|
||||
for i in range(0, len(history)):
|
||||
hist.add(history[i]);
|
||||
hist.add(history[i])
|
||||
|
||||
if gridType == 'SCALAR':
|
||||
data = Grid2DFloat.createGrid(value.shape[1], value.shape[0], value)
|
||||
|
@ -1296,7 +1324,7 @@ class IscMosaic:
|
|||
keyList = ArrayList()
|
||||
for key in value[1]:
|
||||
keyList.add(WeatherKey())
|
||||
slice = WeatherGridSlice();
|
||||
slice = WeatherGridSlice()
|
||||
slice.setValidTime(tr)
|
||||
slice.setGridParmInfo(gpi)
|
||||
slice.setGridDataHistory(hist)
|
||||
|
@ -1307,7 +1335,7 @@ class IscMosaic:
|
|||
keyList = ArrayList()
|
||||
for key in value[1]:
|
||||
keyList.add(DiscreteKey())
|
||||
slice = DiscreteGridSlice();
|
||||
slice = DiscreteGridSlice()
|
||||
slice.setValidTime(tr)
|
||||
slice.setGridParmInfo(gpi)
|
||||
slice.setGridDataHistory(hist)
|
||||
|
|
|
@ -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.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
|
||||
|
||||
|
@ -123,6 +123,8 @@ logHandler = UFStatusHandler.UFStatusHandler("com.raytheon.edex.plugin.grib", "E
|
|||
# grib files.
|
||||
# Feb 11, 2014 2765 bsteffen Better handling of probability parameters.
|
||||
# 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():
|
||||
|
||||
|
@ -333,7 +335,7 @@ class GribDecoder():
|
|||
subGridDataArray = numpy.zeros((subny, subnx), numpy.float32)
|
||||
midx = nx - startx
|
||||
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
|
||||
else:
|
||||
numpyDataArray = numpyDataArray[starty:endY, startx:endX]
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -126,6 +126,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* 06/26/2014 3321 mpduff Fix ingestSwitchMap checks
|
||||
* 07/10/2014 3370 mpduff Fix update/insert issue for riverstatus
|
||||
* 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>
|
||||
*
|
||||
* @author mduff
|
||||
|
@ -2150,7 +2151,6 @@ public class PostShef {
|
|||
ingestSwitchMap.put(key, ingestSwitch);
|
||||
}
|
||||
|
||||
matchFound = ingestSwitchMap.containsKey(key);
|
||||
ingestSwitch = ingestSwitchMap.get(key);
|
||||
|
||||
/*
|
||||
|
|
|
@ -53,9 +53,11 @@ import org.apache.http.HttpResponse;
|
|||
import org.apache.http.HttpResponseInterceptor;
|
||||
import org.apache.http.auth.AuthScope;
|
||||
import org.apache.http.auth.UsernamePasswordCredentials;
|
||||
import org.apache.http.client.AuthCache;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
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.ConnectionPoolTimeoutException;
|
||||
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.ByteArrayEntity;
|
||||
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.conn.tsccm.ThreadSafeClientConnManager;
|
||||
import org.apache.http.params.HttpConnectionParams;
|
||||
import org.apache.http.protocol.BasicHttpContext;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
|
@ -108,6 +113,7 @@ import com.raytheon.uf.common.util.ByteArrayOutputStreamPool.ByteArrayOutputStre
|
|||
* Https authentication failures notify handler
|
||||
* Feb 17, 2014 2756 bclement added content type to response object
|
||||
* Feb 28, 2014 2756 bclement added isSuccess() and isNotExists() to response
|
||||
* Aug 15, 2014 3524 njensen Pass auth credentials on every https request
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -415,6 +421,20 @@ public class HttpClient {
|
|||
|
||||
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.
|
||||
*/
|
||||
|
@ -530,7 +550,11 @@ public class HttpClient {
|
|||
HttpResponse resp = null;
|
||||
if (put.getURI().getScheme().equalsIgnoreCase(HTTPS)) {
|
||||
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
|
||||
while (resp.getStatusLine().getStatusCode() == 401) {
|
||||
|
@ -552,8 +576,9 @@ public class HttpClient {
|
|||
|
||||
this.setCredentials(host, port, null, credentials[0],
|
||||
credentials[1]);
|
||||
context.setAttribute(ClientContext.AUTH_CACHE, authCache);
|
||||
try {
|
||||
resp = execute(client, put);
|
||||
resp = execute(client, put, context);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"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
|
||||
* The HttpClient instance
|
||||
* @param request
|
||||
* The request
|
||||
* @param context
|
||||
* The context
|
||||
*
|
||||
* @return HttpResponse
|
||||
* @throws ClientProtocolException
|
||||
* @throws IOException
|
||||
*/
|
||||
private HttpResponse execute(org.apache.http.client.HttpClient client,
|
||||
HttpUriRequest request) throws ClientProtocolException, IOException {
|
||||
return client.execute(request);
|
||||
HttpUriRequest request, HttpContext context)
|
||||
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(
|
||||
new AuthScope(host, port),
|
||||
new UsernamePasswordCredentials(username, password));
|
||||
if(this.authCache == null) {
|
||||
this.authCache = new BasicAuthCache();
|
||||
}
|
||||
authCache.put(new HttpHost(host, port, HTTPS), new BasicScheme());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<contourStyle>
|
||||
<displayUnits>ft</displayUnits>
|
||||
<contourLabeling labelSpacing="4" labelFormat="#">
|
||||
<increment>50</increment>
|
||||
<increment>1000</increment>
|
||||
</contourLabeling>
|
||||
</contourStyle>
|
||||
</styleRule>
|
||||
|
|
|
@ -189,20 +189,27 @@ ${drainage.name}##
|
|||
########END MACRO
|
||||
|
||||
#macro(inserttorwatches $watches $list $secondtimezone $dateUtil $timeFormat)
|
||||
#set($tornadoWatches = [])
|
||||
#set($keys = [])
|
||||
#set($mymap = {})
|
||||
#foreach(${watch} in ${watches})
|
||||
#if(${watch.getPhenSig()} == 'TO.A')
|
||||
#set($success = $tornadoWatches.add($watch))
|
||||
#set($endTime = ${watch.endTime})
|
||||
#if(!$latestEndTime || ${endTime.after($latestEndTime)})
|
||||
#set($latestEndTime = ${endTime})
|
||||
#set($key = ${watch.action} + ${watch.etn} + ${watch.startTime} + ${watch.endTime})
|
||||
#if (${list.contains(${keys}, $key)})
|
||||
#set($value = ${mymap.get($key)})
|
||||
#else
|
||||
#set($value = [])
|
||||
#set($success = $keys.add($key))
|
||||
#end
|
||||
#set($success = $value.add($watch))
|
||||
#set($success = ${mymap.put($key,$value)})
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#if(!${list.isEmpty($tornadoWatches)})
|
||||
|
||||
A TORNADO WATCH REMAINS IN EFFECT UNTIL ${dateUtil.format(${latestEndTime}, ${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
${dateUtil.period(${latestEndTime},${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
#set($torWatchAlso = "")
|
||||
#foreach(${key} in ${keys})
|
||||
#set($tornadoWatches = ${mymap.get($key)})
|
||||
#set($tornadoWatch = ${tornadoWatches.get(0)})
|
||||
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})
|
||||
/${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
|
||||
#end
|
||||
|
@ -218,27 +225,36 @@ ${dateUtil.period(${latestEndTime},${timeFormat.plain}, 15, ${localtimezone})}##
|
|||
...##
|
||||
#end
|
||||
#end
|
||||
#set($torWatchAlso = "ALSO ")
|
||||
. ##
|
||||
#end
|
||||
|
||||
|
||||
#end
|
||||
########END MACRO
|
||||
|
||||
#macro(insertsvrwatches $watches $list $secondtimezone $dateUtil $timeFormat)
|
||||
#set($severeWatches = [])
|
||||
#set($keys = [])
|
||||
#set($mymap = {})
|
||||
#foreach(${watch} in ${watches})
|
||||
#if(${watch.getPhenSig()} == 'SV.A')
|
||||
#set($success = $severeWatches.add($watch))
|
||||
#set($endTime = ${watch.endTime})
|
||||
#if(!$latestEndTime || ${endTime.after($latestEndTime)})
|
||||
#set($latestEndTime = ${endTime})
|
||||
#set($key = ${watch.action} + ${watch.etn} + ${watch.startTime} + ${watch.endTime})
|
||||
#if (${list.contains(${keys}, $key)})
|
||||
#set($value = ${mymap.get($key)})
|
||||
#else
|
||||
#set($value = [])
|
||||
#set($success = $keys.add($key))
|
||||
#end
|
||||
#set($success = $value.add($watch))
|
||||
#set($success = ${mymap.put($key,$value)})
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#if(!${list.isEmpty($severeWatches)})
|
||||
|
||||
A SEVERE THUNDERSTORM WATCH REMAINS IN EFFECT UNTIL ${dateUtil.format(${latestEndTime}, ${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
${dateUtil.period(${latestEndTime},${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
#set($svrWatchAlso = "")
|
||||
#foreach(${key} in ${keys})
|
||||
#set($severeWatches = ${mymap.get($key)})
|
||||
#set($svrWatch = ${severeWatches.get(0)})
|
||||
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})
|
||||
/${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
|
||||
#end
|
||||
|
@ -254,11 +270,13 @@ ${dateUtil.period(${latestEndTime},${timeFormat.plain}, 15, ${localtimezone})}##
|
|||
...##
|
||||
#end
|
||||
#end
|
||||
#set($svrWatchAlso = "ALSO ")
|
||||
. ##
|
||||
#end
|
||||
|
||||
|
||||
#end
|
||||
########END MACRO
|
||||
########END
|
||||
|
||||
#macro(printcoords $coordinates $list)
|
||||
#set($count = 0)
|
||||
|
|
|
@ -343,13 +343,13 @@ runJmap() {
|
|||
fi
|
||||
|
||||
local cmd="/awips2/java/bin/jmap -dump:format=b,file=${dumpPath}"
|
||||
echo "${t1}: Running command: $cmd $options $pid >> $log 2>&1 &" >> $processFile
|
||||
$cmd $options $pid >> $log 2>&1 &
|
||||
echo "${t1}: Running command: $cmd $options $pid >> $log 2>&1" >> $processFile
|
||||
$cmd $options $pid >> $log 2>&1
|
||||
|
||||
if [[ "$?" != "0" && $FORCE != "y" ]]; then
|
||||
t1=`date "+%Y%m%d %H:%M:%S"`
|
||||
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
|
||||
}
|
||||
|
||||
|
|
180
javaUtilities/yajsw-scripts/wrapperCapture.sh
Executable file
180
javaUtilities/yajsw-scripts/wrapperCapture.sh
Executable 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
|
|
@ -3,6 +3,10 @@
|
|||
determine where the various destination directories are
|
||||
without ant-contrib
|
||||
-->
|
||||
|
||||
<!-- the location of javaUtilities -->
|
||||
<dirname property="jutilities.dir" file="${basedir}" />
|
||||
|
||||
<!-- the EDEX destination -->
|
||||
<available file="${basedir}/../build.edex"
|
||||
property="edex.destination"
|
||||
|
@ -73,6 +77,14 @@
|
|||
<exclude name="**/ReadMe.txt" />
|
||||
</fileset>
|
||||
</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 -->
|
||||
<tar destfile="${qpid.destination}/SOURCES/yajsw-distribution.tar"
|
||||
basedir="${edex.bin.directory}"
|
||||
|
|
|
@ -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/wrapper/AbstractWrappedProcess.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
|
||||
|
|
|
@ -16,6 +16,7 @@ import java.util.concurrent.Future;
|
|||
import java.util.concurrent.SynchronousQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import org.jboss.netty.util.HashedWheelTimer;
|
||||
import org.jboss.netty.util.Timeout;
|
||||
|
@ -28,8 +29,7 @@ import org.rzo.yajsw.wrapper.WrappedProcess;
|
|||
/**
|
||||
* The Class AbstractScript.
|
||||
*/
|
||||
public abstract class AbstractScript implements Script
|
||||
{
|
||||
public abstract class AbstractScript implements Script {
|
||||
|
||||
/** The _name. */
|
||||
String _name;
|
||||
|
@ -44,13 +44,12 @@ public abstract class AbstractScript implements Script
|
|||
String[] _args;
|
||||
|
||||
final static Timer TIMER = new HashedWheelTimer();
|
||||
static final ExecutorService EXECUTOR = (ThreadPoolExecutor) new ThreadPoolExecutor(0, 50, 120L, TimeUnit.SECONDS,
|
||||
new SynchronousQueue<Runnable>(), new DaemonThreadFactory("scriptExecutorInternal"));
|
||||
static final ExecutorService EXECUTOR = (ThreadPoolExecutor) new ThreadPoolExecutor(
|
||||
0, 50, 120L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
|
||||
new DaemonThreadFactory("scriptExecutorInternal"));
|
||||
volatile Future _future;
|
||||
volatile Timeout _timerTimeout;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Instantiates a new abstract script.
|
||||
*
|
||||
|
@ -58,8 +57,8 @@ public abstract class AbstractScript implements Script
|
|||
* the script
|
||||
* @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;
|
||||
_process = process;
|
||||
_id = id;
|
||||
|
@ -76,41 +75,35 @@ public abstract class AbstractScript implements Script
|
|||
* java.lang.String, java.lang.Object)
|
||||
*/
|
||||
public abstract Object execute(String line);
|
||||
|
||||
public abstract void interrupt();
|
||||
|
||||
abstract void log(String msg);
|
||||
|
||||
synchronized public void executeWithTimeout(final String line)
|
||||
{
|
||||
Object result = null;
|
||||
_timerTimeout = TIMER.newTimeout(new TimerTask()
|
||||
{
|
||||
|
||||
public void run(Timeout arg0) throws Exception
|
||||
{
|
||||
log("script takes too long -> interrupt");
|
||||
try
|
||||
{
|
||||
interrupt();
|
||||
}
|
||||
catch (Throwable 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;
|
||||
synchronized public void executeWithTimeout(final String line) {
|
||||
/**
|
||||
* Changed by rjpeter Aug 07, 2014.
|
||||
*/
|
||||
_future = EXECUTOR.submit(new Callable<Object>() {
|
||||
@Override
|
||||
public Object call() {
|
||||
return execute(line);
|
||||
}
|
||||
});
|
||||
|
||||
// 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) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -118,8 +111,7 @@ public abstract class AbstractScript implements Script
|
|||
*
|
||||
* @see org.rzo.yajsw.script.Script#getScript()
|
||||
*/
|
||||
public String getScript()
|
||||
{
|
||||
public String getScript() {
|
||||
return _name;
|
||||
}
|
||||
|
||||
|
@ -128,8 +120,7 @@ public abstract class AbstractScript implements Script
|
|||
*
|
||||
* @return the timeout
|
||||
*/
|
||||
public int getTimeout()
|
||||
{
|
||||
public int getTimeout() {
|
||||
return _timeout;
|
||||
}
|
||||
|
||||
|
@ -139,8 +130,7 @@ public abstract class AbstractScript implements Script
|
|||
* @param timeout
|
||||
* the new timeout
|
||||
*/
|
||||
public void setTimeout(int timeout)
|
||||
{
|
||||
public void setTimeout(int timeout) {
|
||||
_timeout = timeout;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,8 +76,10 @@ public class ShellScript extends AbstractScript
|
|||
|
||||
public void executeWithTimeout()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
/*
|
||||
* Updated by bkowal 08/06/2014
|
||||
*/
|
||||
this.executeWithTimeout("");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
|
||||
/*
|
||||
* ldm server mainline program module
|
||||
*
|
||||
* Updated on: Aug 05, 2014 (Omaha #3458: Increased edexBridge queue size to 10000)
|
||||
* Author: rjpeter
|
||||
*/
|
||||
|
||||
#include <ldmconfig.h>
|
||||
|
@ -251,7 +254,7 @@ main(int ac, char *av[])
|
|||
prod_class_t clss;
|
||||
int toffset = TOFFSET_NONE;
|
||||
int loggingToStdErr = 0;
|
||||
unsigned queue_size = 5000;
|
||||
unsigned queue_size = 10000;
|
||||
|
||||
conffilename = DEFAULT_CONFFILENAME;
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
* 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)
|
||||
* 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>
|
||||
|
@ -116,6 +118,7 @@ public:
|
|||
}
|
||||
} catch (const std::exception& error) {
|
||||
// Error occurred during communication. Clean up the connection and return the number of messages processed.
|
||||
uerror(error.what());
|
||||
cleanup();
|
||||
|
||||
}
|
||||
|
|
5
nativeLib/rary.cots.g2clib/drstemplates.h
Executable file → Normal file
5
nativeLib/rary.cots.g2clib/drstemplates.h
Executable file → Normal file
|
@ -3,6 +3,7 @@
|
|||
#include "grib2.h"
|
||||
|
||||
// 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
|
||||
// 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
|
||||
|
||||
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} },
|
||||
// 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} },
|
||||
// 5.4: Grid Point Data - IEEE Floating Point Data
|
||||
{ 4, 1, 0, {1} },
|
||||
// 5.50: Spectral Data - Simple Packing
|
||||
{ 50, 5, 0, {4,-2,-2,1,4} },
|
||||
// 5.51: Spherical Harmonics data - Complex packing
|
||||
|
|
17
nativeLib/rary.cots.g2clib/g2_unpack7.c
Executable file → Normal file
17
nativeLib/rary.cots.g2clib/g2_unpack7.c
Executable file → Normal 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
|
||||
// 2004-12-16 Taylor - Added check on comunpack return code.
|
||||
// 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,
|
||||
// g2int *igdstmpl, g2int idrsnum,
|
||||
|
@ -81,6 +82,9 @@ g2int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum,g2int *igdstmpl
|
|||
g2int ierr,isecnum;
|
||||
g2int ipos,lensec;
|
||||
g2float *lfld;
|
||||
g2int *ifld;
|
||||
|
||||
|
||||
|
||||
ierr=0;
|
||||
*fld=0; //NULL
|
||||
|
@ -98,6 +102,7 @@ g2int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum,g2int *igdstmpl
|
|||
|
||||
ipos=(*iofst/8);
|
||||
lfld=(g2float *)calloc(ndpts ? ndpts : 1,sizeof(g2float));
|
||||
|
||||
if (lfld == 0) {
|
||||
ierr=6;
|
||||
return(ierr);
|
||||
|
@ -113,6 +118,18 @@ g2int g2_unpack7(unsigned char *cgrib,g2int *iofst,g2int igdsnum,g2int *igdstmpl
|
|||
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
|
||||
simunpack(cgrib+ipos,idrstmpl,ndpts-1,lfld+1);
|
||||
rdieee(idrstmpl+4,lfld+0,1);
|
||||
|
|
Binary file not shown.
|
@ -9,7 +9,7 @@
|
|||
Name: awips2-python
|
||||
Summary: AWIPS II Python Distribution
|
||||
Version: 2.7.1
|
||||
Release: 10.el6
|
||||
Release: 11.el6
|
||||
Group: AWIPSII
|
||||
BuildRoot: %{_build_root}
|
||||
BuildArch: %{_build_arch}
|
||||
|
|
Binary file not shown.
BIN
rpms/awips2.qpid/0.18/SOURCES/awips2/slf4j-log4j12-1.7.5.jar
Normal file
BIN
rpms/awips2.qpid/0.18/SOURCES/awips2/slf4j-log4j12-1.7.5.jar
Normal file
Binary file not shown.
|
@ -70,7 +70,14 @@ wrapper.java.additional.7=-Dqpid.broker.exceptionHandler.continue=true
|
|||
# Maximum Java Heap Size (in MB)
|
||||
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
|
||||
|
|
Binary file not shown.
|
@ -14,7 +14,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
|||
!
|
||||
! Name: awips2-qpid-java
|
||||
Version: 0.18
|
||||
! Release: 4%{?dist}
|
||||
! Release: 5%{?dist}
|
||||
Summary: Java implementation of Apache Qpid
|
||||
License: Apache Software License
|
||||
Group: Development/Java
|
||||
|
|
Loading…
Add table
Reference in a new issue